id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
88777477_167 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/operation/SortedDocumentCursorTest.java",
"identifier": "SortedDocumentCursorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIterator() {\n assertFalse(\n (new SortedDocumentCursor(\"field\", SortOrder.Ascending, null, NullOrder.First, null)).iterator().hasNext());\n }",
"class_method_signature": "SortedDocumentCursorTest.testIterator()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "field",
"modifier": "private final",
"original_string": "private final String field;",
"type": "String",
"var_name": "field"
},
{
"declarator": "sortOrder",
"modifier": "private final",
"original_string": "private final SortOrd... | {
"body": "@Override\n public Iterator<Pair<NitriteId, Document>> iterator() {\n Iterator<Pair<NitriteId, Document>> iterator = recordStream == null ? Collections.emptyIterator()\n : recordStream.iterator();\n return new SortedDocumentIterator(field, sortOrder, collator, nullOrder, iterato... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_188 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/NitriteDocumentTest.java",
"identifier": "NitriteDocumentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGet() {\n Class type = Object.class;\n assertNull((new NitriteDocument()).<Object>get(null, type));\n }",
"class_method_signature": "NitriteDocumentTest.testGet()",
"constructor": false,
"full_signature": "@Test public void testGet()",
"identifier": "test... | {
"fields": [
{
"declarator": "serialVersionUID = 1477462374L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1477462374L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "reservedFields = listOf... | {
"body": "@Override\n public Object get(String key) {\n if (key != null\n && key.contains(NitriteConfig.getFieldSeparator())\n && !containsKey(key)) {\n return deepGet(key);\n }\n return super.get(key);\n }",
"class_method_signature": "NitriteDocument.get... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_10 | {
"fields": [
{
"declarator": "db",
"modifier": "private",
"original_string": "private Nitrite db;",
"type": "Nitrite",
"var_name": "db"
},
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry r... | {
"body": "@Test\n public void testOpenOrCreate() {\n Nitrite actualOpenOrCreateResult = Nitrite.builder().openOrCreate(\"janedoe\", \"iloveyou\");\n PluginManager pluginManager = actualOpenOrCreateResult.getConfig().getPluginManager();\n NitriteStore<?> store = actualOpenOrCreateResult.getSto... | {
"fields": [
{
"declarator": "nitriteConfig",
"modifier": "@Getter\n private final",
"original_string": "@Getter\n private final NitriteConfig nitriteConfig;",
"type": "NitriteConfig",
"var_name": "nitriteConfig"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/Nit... | {
"body": "public Nitrite openOrCreate() {\n this.nitriteConfig.autoConfigure();\n return new NitriteDatabase(nitriteConfig);\n }",
"class_method_signature": "NitriteBuilder.openOrCreate()",
"constructor": false,
"full_signature": "public Nitrite openOrCreate()",
"identifier": "openOrCreate",... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_171 | {
"fields": [
{
"declarator": "db",
"modifier": "private",
"original_string": "private Nitrite db;",
"type": "Nitrite",
"var_name": "db"
},
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry r... | {
"body": "@Test\n public void testToString() {\n FilteredRecordStream recordStream = new FilteredRecordStream(null, null);\n FilteredRecordStream recordStream1 = new FilteredRecordStream(recordStream, Filter.byId(NitriteId.newId()));\n FilteredRecordStream recordStream2 = new FilteredRecordSt... | {
"fields": [
{
"declarator": "recordStream",
"modifier": "private final",
"original_string": "private final RecordStream<Pair<NitriteId, Document>> recordStream;",
"type": "RecordStream<Pair<NitriteId, Document>>",
"var_name": "recordStream"
},
{
"declarator": "foreign... | {
"body": "@Override\n public String toString() {\n return toList().toString();\n }",
"class_method_signature": "JoinedDocumentStream.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
"toString",
"toList... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_258 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/SwedishTest.java",
"identifier": "SwedishTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Swedish()).stopWords();\n assertEquals(418, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"övre\"));\n assertTrue(actualStopWordsResult.contains(\"del\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Swedish.java",
"identifier": "Swedish",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Swedish.stopWords()",
"constructor": false,
"full_signature": "@Override public ... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"aderton\",\n \"adertonde\",\n \"adjö\",\n \"aldrig\",\n \"alla\",\n \"allas\",\n \"allt\",\n \"alltid\",\n \"al... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_126 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/concurrent/LockServiceTest.java",
"identifier": "LockServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetReadLock() {\n assertTrue(\n (new LockService()).getReadLock(\"name\") instanceof java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock);\n }",
"class_method_signature": "LockServiceTest.testGetReadLock()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "lockRegistry",
"modifier": "private final",
"original_string": "private final Map<String, ReentrantReadWriteLock> lockRegistry;",
"type": "Map<String, ReentrantReadWriteLock>",
"var_name": "lockRegistry"
}
],
"file": "nitrite/src/main/java/org/d... | {
"body": "public synchronized Lock getReadLock(String name) {\n if (lockRegistry.containsKey(name)) {\n ReentrantReadWriteLock rwLock = lockRegistry.get(name);\n return rwLock.readLock();\n }\n ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();\n lockRegis... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_51 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryStoreTest.java",
"identifier": "InMemoryStoreTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHasMap() {\n assertFalse((new InMemoryStore()).hasMap(\"mapName\"));\n }",
"class_method_signature": "InMemoryStoreTest.testHasMap()",
"constructor": false,
"full_signature": "@Test public void testHasMap()",
"identifier": "testHasMap",
"invocations": [
"a... | {
"fields": [
{
"declarator": "nitriteMapRegistry",
"modifier": "private final",
"original_string": "private final Map<String, NitriteMap<?, ?>> nitriteMapRegistry;",
"type": "Map<String, NitriteMap<?, ?>>",
"var_name": "nitriteMapRegistry"
},
{
"declarator": "nitriteRT... | {
"body": "@Override\n public boolean hasMap(String mapName) {\n return nitriteMapRegistry.containsKey(mapName) || nitriteRTreeMapRegistry.containsKey(mapName);\n }",
"class_method_signature": "InMemoryStore.hasMap(String mapName)",
"constructor": false,
"full_signature": "@Override public boolean ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_204 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/MarathiTest.java",
"identifier": "MarathiTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Marathi()).stopWords();\n assertEquals(99, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"होते\"));\n assertTrue(actualStopWordsResult.contains(\"आता\"));\n a... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Marathi.java",
"identifier": "Marathi",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Marathi.stopWords()",
"constructor": false,
"full_signature": "@Override public ... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"अधिक\",\n \"अनेक\",\n \"अशी\",\n \"असलयाचे\",\n \"असलेल्या\",\n \"असा\",\n \"असून\",\n \"असे\",\n \"आज\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_195 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/NitriteDocumentTest.java",
"identifier": "NitriteDocumentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainsKey() {\n assertFalse((new NitriteDocument()).containsKey(\"key\"));\n }",
"class_method_signature": "NitriteDocumentTest.testContainsKey()",
"constructor": false,
"full_signature": "@Test public void testContainsKey()",
"identifier": "testContainsKey",
... | {
"fields": [
{
"declarator": "serialVersionUID = 1477462374L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1477462374L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "reservedFields = listOf... | {
"body": "@Override\n public boolean containsKey(String key) {\n return super.containsKey(key);\n }",
"class_method_signature": "NitriteDocument.containsKey(String key)",
"constructor": false,
"full_signature": "@Override public boolean containsKey(String key)",
"identifier": "containsKey",
"i... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_253 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/PolishTest.java",
"identifier": "PolishTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Polish()).stopWords();\n assertEquals(356, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"naszych\"));\n assertTrue(actualStopWordsResult.contains(\"zł\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Polish.java",
"identifier": "Polish",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Polish.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"aby\",\n \"ach\",\n \"acz\",\n \"aczkolwiek\",\n \"aj\",\n \"albo\",\n \"ale\",\n \"ależ\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_183 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/operation/BoundedDocumentStreamTest.java",
"identifier": "BoundedDocumentStreamTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIterator3() {\n FilteredRecordStream recordStream = new FilteredRecordStream(null, null);\n FilteredRecordStream recordStream1 = new FilteredRecordStream(recordStream, Filter.byId(NitriteId.newId()));\n assertTrue(\n (new BoundedDocumentStream(new ... | {
"fields": [
{
"declarator": "recordStream",
"modifier": "private final",
"original_string": "private final RecordStream<Pair<NitriteId, Document>> recordStream;",
"type": "RecordStream<Pair<NitriteId, Document>>",
"var_name": "recordStream"
},
{
"declarator": "offset"... | {
"body": "@Override\n public Iterator<Pair<NitriteId, Document>> iterator() {\n Iterator<Pair<NitriteId, Document>> iterator = recordStream == null ? Collections.emptyIterator()\n : recordStream.iterator();\n return new BoundedIterator<>(iterator, offset, limit);\n }",
"class_method_... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_245 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/FrenchTest.java",
"identifier": "FrenchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new French()).stopWords();\n assertEquals(689, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"certaine\"));\n assertTrue(actualStopWordsResult.contains(\"lui\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/French.java",
"identifier": "French",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "French.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"abord\",\n \"absolument\",\n \"afin\",\n \"ah\",\n \"ai\",\n \"aie\",\n \"aient\",\n \"aies\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_212 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/IndonesianTest.java",
"identifier": "IndonesianTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Indonesian()).stopWords();\n assertEquals(758, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"diakhirinya\"));\n assertTrue(actualStopWordsResult.contains(\"dimulail... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Indonesian.java",
"identifier": "Indonesian",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Indonesian.stopWords()",
"constructor": false,
"full_signature": "@Overrid... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"ada\",\n \"adalah\",\n \"adanya\",\n \"adapun\",\n \"agak\",\n \"agaknya\",\n \"agar\",\n \"akan\",\n \"akankah... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_3 | {
"fields": [],
"file": "nitrite-rocksdb-adapter/src/test/java/org/dizitart/no2/rocksdb/formatter/KryoObjectFormatterTest.java",
"identifier": "KryoObjectFormatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEncodeKey() {\n assertEquals(1, (new KryoObjectFormatter()).<Object>encodeKey(null).length);\n assertEquals(7, (new KryoObjectFormatter()).<Object>encodeKey(\"object\").length);\n }",
"class_method_signature": "KryoObjectFormatterTest.testEncodeKey()",
"const... | {
"fields": [
{
"declarator": "kryo = new Kryo()",
"modifier": "private static final",
"original_string": "private static final Kryo kryo = new Kryo();",
"type": "Kryo",
"var_name": "kryo"
},
{
"declarator": "keySerializerRegistry",
"modifier": "private final",
... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> byte[] encodeKey(T object) {\n if (object == null) return DB_NULL;\n\n Class<?> clazz = object.getClass();\n KryoKeySerializer<T> serializer = (KryoKeySerializer<T>) keySerializerRegistry.get(clazz);\n if (serialize... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_140 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/RegexFilterTest.java",
"identifier": "RegexFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testApply2() {\n RegexFilter regexFilter = new RegexFilter(\"field\", \"value\");\n NitriteId first = NitriteId.newId();\n assertFalse(regexFilter.apply(new Pair<NitriteId, Document>(first, Document.createDocument())));\n }",
"class_method_signature": "Regex... | {
"fields": [
{
"declarator": "pattern",
"modifier": "private final",
"original_string": "private final Pattern pattern;",
"type": "Pattern",
"var_name": "pattern"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/RegexFilter.java",
"identifier": "RegexFilter",
... | {
"body": "@Override\n public boolean apply(Pair<NitriteId, Document> element) {\n Document document = element.getSecond();\n Object fieldValue = document.get(getField());\n if (fieldValue != null) {\n if (fieldValue instanceof String) {\n Matcher matcher = pattern.ma... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_269 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/IndexEntryTest.java",
"identifier": "IndexEntryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompareTo() {\n IndexEntry indexEntry = new IndexEntry(\"\", \"\", \"collectionName\");\n assertEquals(-14, indexEntry.compareTo(new IndexEntry(\"indexType\", \"field\", \"collectionName\")));\n }",
"class_method_signature": "IndexEntryTest.testCompareTo()",
... | {
"fields": [
{
"declarator": "serialVersionUID = 1576690829L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1576690829L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "indexType",
"modi... | {
"body": "@Override\n public int compareTo(IndexEntry other) {\n String string = collectionName + field + indexType;\n String otherString = other.collectionName + other.field + other.indexType;\n return string.compareTo(otherString);\n }",
"class_method_signature": "IndexEntry.compareTo(... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_37 | {
"fields": [
{
"declarator": "operations",
"modifier": "private",
"original_string": "private RepositoryOperations operations;",
"type": "RepositoryOperations",
"var_name": "operations"
},
{
"declarator": "db",
"modifier": "private",
"original_string": "pri... | {
"body": "@Test(expected = NotIdentifiableException.class)\n public void testCreateUniqueFilterInvalidId() {\n NitriteMapper nitriteMapper = db.getConfig().nitriteMapper();\n ObjectRepository<B> repository = db.getRepository(B.class);\n operations = new RepositoryOperations(B.class, nitriteMa... | {
"fields": [
{
"declarator": "nitriteMapper",
"modifier": "private final",
"original_string": "private final NitriteMapper nitriteMapper;",
"type": "NitriteMapper",
"var_name": "nitriteMapper"
},
{
"declarator": "type",
"modifier": "private final",
"origina... | {
"body": "public Filter createUniqueFilter(Object object) {\n if (idField == null) {\n throw new NotIdentifiableException(\"update operation failed as no id value found for the object\");\n }\n\n idField.setAccessible(true);\n try {\n Object value = idField.get(objec... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_117 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/DocumentUtilsTest.j... | {
"body": "@Test\n public void testIsRecent() throws InterruptedException {\n Document first = createDocument(\"key1\", \"value1\");\n Thread.sleep(500);\n Document second = createDocument(\"key1\", \"value2\");\n assertTrue(isRecent(second, first));\n second = first.clone();\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/DocumentUtils.java",
"identifier": "DocumentUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentUtils.DocumentUtils()",
"constructor": true,
"full_signature": "private DocumentUtils()",
... | {
"body": "public static boolean isRecent(Document recent, Document older) {\n if (Objects.deepEquals(recent.getRevision(), older.getRevision())) {\n return recent.getLastModifiedSinceEpoch() >= older.getLastModifiedSinceEpoch();\n }\n return recent.getRevision() > older.getRevision();... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_60 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryMapTest.java",
"identifier": "InMemoryMapTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainsKey2() {\n assertFalse((new InMemoryMap<Object, Object>(\"mapName\", null)).containsKey(\"key\"));\n }",
"class_method_signature": "InMemoryMapTest.testContainsKey2()",
"constructor": false,
"full_signature": "@Test public void testContainsKey2()",
"iden... | {
"fields": [
{
"declarator": "backingMap",
"modifier": "private final",
"original_string": "private final NavigableMap<Key, Value> backingMap;",
"type": "NavigableMap<Key, Value>",
"var_name": "backingMap"
},
{
"declarator": "nullEntryMap",
"modifier": "private f... | {
"body": "@Override\n public boolean containsKey(Key key) {\n if (key == null) {\n return nullEntryMap.containsKey(NullEntry.getInstance());\n }\n return backingMap.containsKey(key);\n }",
"class_method_signature": "InMemoryMap.containsKey(Key key)",
"constructor": false,
... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_101 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ObjectUtilsTest.java",
"identifier": "ObjectUtilsTest",
"interfaces": "implements Serializable",
"superclass": ""
} | {
"body": "@Test\n public void testDeepEquals2() {\n CharArraySet makeStopSetResult = StopFilter.makeStopSet(new String[]{\"foo\", \"foo\", \"foo\"}, true);\n makeStopSetResult.add((Object) \"foo\");\n assertFalse(ObjectUtils.deepEquals(makeStopSetResult, new AnnotatedMethodMap()));\n }",
... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER_TYPE",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_TO_WRAPPER_TYPE"
},
{
"... | {
"body": "@SuppressWarnings(\"rawtypes\")\n public static boolean deepEquals(Object o1, Object o2) {\n if (o1 == null && o2 == null) {\n return true;\n } else if (o1 == null || o2 == null) {\n return false;\n }\n\n if (o1 == o2) {\n // if reference equa... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_99 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ObjectUtilsTest.java",
"identifier": "ObjectUtilsTest",
"interfaces": "implements Serializable",
"superclass": ""
} | {
"body": "@Test\n public void testFindRepositoryName() {\n assertEquals(\"entityName\", ObjectUtils.findRepositoryName(\"entityName\", \"\"));\n assertEquals(\"entityName+key\", ObjectUtils.findRepositoryName(\"entityName\", \"key\"));\n assertEquals(\"java.lang.Object+key\", ObjectUtils.find... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER_TYPE",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_TO_WRAPPER_TYPE"
},
{
"... | {
"body": "public static <T> String findRepositoryName(Class<T> type, String key) {\n return findRepositoryName(getEntityName(type), key);\n }",
"class_method_signature": "ObjectUtils.findRepositoryName(Class<T> type, String key)",
"constructor": false,
"full_signature": "public static String findRepo... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_228 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/LatvianTest.java",
"identifier": "LatvianTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Latvian()).stopWords();\n assertEquals(161, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"kļūstam\"));\n assertTrue(actualStopWordsResult.contains(\"pār\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Latvian.java",
"identifier": "Latvian",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Latvian.stopWords()",
"constructor": false,
"full_signature": "@Override public ... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"aiz\",\n \"ap\",\n \"apakš\",\n \"apakšpus\",\n \"ar\",\n \"arī\",\n \"augšpus\",\n \"bet\",\n \"bez\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_76 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryMapTest.java",
"identifier": "InMemoryMapTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsEmpty() {\n assertTrue((new InMemoryMap<Object, Object>(\"mapName\", null)).isEmpty());\n }",
"class_method_signature": "InMemoryMapTest.testIsEmpty()",
"constructor": false,
"full_signature": "@Test public void testIsEmpty()",
"identifier": "testIsEmpty",
"... | {
"fields": [
{
"declarator": "backingMap",
"modifier": "private final",
"original_string": "private final NavigableMap<Key, Value> backingMap;",
"type": "NavigableMap<Key, Value>",
"var_name": "backingMap"
},
{
"declarator": "nullEntryMap",
"modifier": "private f... | {
"body": "@Override\n public boolean isEmpty() {\n return backingMap.isEmpty() && nullEntryMap.isEmpty();\n }",
"class_method_signature": "InMemoryMap.isEmpty()",
"constructor": false,
"full_signature": "@Override public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": [
"isEmpt... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_156 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/EqualsFilterTest.java",
"identifier": "EqualsFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIsFieldIndexed2() {\n EqualsFilter equalsFilter = new EqualsFilter(\"field\", 42);\n equalsFilter.setObjectFilter(true);\n equalsFilter.setIndexer(null);\n equalsFilter.setIsFieldIndexed(true);\n assertTrue(equalsFilter.getIsFieldIndexed());\... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/EqualsFilter.java",
"identifier": "EqualsFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "EqualsFilter.EqualsFilter(String field, Object value)",
"constructor": true,
"full_signature": " EqualsFi... | {
"body": "@Override\n public void setIsFieldIndexed(Boolean isFieldIndexed) {\n if (!(getIndexer() instanceof TextIndexer && getValue() instanceof String)) {\n super.setIsFieldIndexed(isFieldIndexed);\n }\n }",
"class_method_signature": "EqualsFilter.setIsFieldIndexed(Boolean isField... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_21 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/mapper/MappableMapperTest.java",
"identifier": "MappableMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertToDocument2() {\n Class<?> forNameResult = Object.class;\n Class<?> forNameResult1 = Object.class;\n MappableMapper mappableMapper = new MappableMapper(forNameResult, forNameResult1, Object.class);\n assertEquals(2, mappableMapper.<Object>conver... | {
"fields": [
{
"declarator": "valueTypes",
"modifier": "private final",
"original_string": "private final Set<Class<?>> valueTypes;",
"type": "Set<Class<?>>",
"var_name": "valueTypes"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/mapper/MappableMapper.java",
"identi... | {
"body": "protected <Source> Document convertToDocument(Source source) {\n if (source instanceof Mappable) {\n Mappable mappable = (Mappable) source;\n return mappable.write(this);\n }\n\n throw new ObjectMappingException(\"object must implements Mappable\");\n }",
"cl... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_56 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryRTreeTest.java",
"identifier": "InMemoryRTreeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSize() {\n assertEquals(0L, (new InMemoryRTree<>()).size());\n }",
"class_method_signature": "InMemoryRTreeTest.testSize()",
"constructor": false,
"full_signature": "@Test public void testSize()",
"identifier": "testSize",
"invocations": [
"assertEquals",
... | {
"fields": [
{
"declarator": "backingMap",
"modifier": "private final",
"original_string": "private final Map<SpatialKey, Key> backingMap;",
"type": "Map<SpatialKey, Key>",
"var_name": "backingMap"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/store/memory/InMemoryRTr... | {
"body": "@Override\n public long size() {\n return backingMap.size();\n }",
"class_method_signature": "InMemoryRTree.size()",
"constructor": false,
"full_signature": "@Override public long size()",
"identifier": "size",
"invocations": [
"size"
],
"modifiers": "@Override public",
"pa... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_208 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/ChineseTest.java",
"identifier": "ChineseTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Chinese()).stopWords();\n assertEquals(788, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"、\"));\n assertTrue(actualStopWordsResult.contains(\"有时\"));\n asse... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Chinese.java",
"identifier": "Chinese",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Chinese.stopWords()",
"constructor": false,
"full_signature": "@Override public ... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"、\",\n \"。\",\n \"〈\",\n \"〉\",\n \"《\",\n \"》\",\n \"一\",\n \"一些\",\n \"一何\",\n \"一切\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_121 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/DocumentUtilsTest.j... | {
"body": "@Test\n public void testSkeletonDocument2() {\n Class<?> forNameResult = Object.class;\n Class<?> forNameResult1 = Object.class;\n MappableMapper nitriteMapper = new MappableMapper(forNameResult, forNameResult1, Object.class);\n assertEquals(0, DocumentUtils.skeletonDocument(... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/DocumentUtils.java",
"identifier": "DocumentUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentUtils.DocumentUtils()",
"constructor": true,
"full_signature": "private DocumentUtils()",
... | {
"body": "public static <T> Document skeletonDocument(NitriteMapper nitriteMapper, Class<T> type) {\n if (nitriteMapper.isValueType(type)) {\n return Document.createDocument();\n }\n T dummy = newInstance(type, true);\n Document document = nitriteMapper.convert(dummy, Document.... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_176 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/operation/DocumentCursorImplTest.java",
"identifier": "DocumentCursorImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProject() {\n FilteredRecordStream recordStream = new FilteredRecordStream(null, null);\n FilteredRecordStream recordStream1 = new FilteredRecordStream(recordStream, Filter.byId(NitriteId.newId()));\n DocumentCursorImpl documentCursorImpl = new DocumentCursor... | {
"fields": [
{
"declarator": "recordStream",
"modifier": "private final",
"original_string": "private final RecordStream<Pair<NitriteId, Document>> recordStream;",
"type": "RecordStream<Pair<NitriteId, Document>>",
"var_name": "recordStream"
}
],
"file": "nitrite/src/main/ja... | {
"body": "@Override\n public RecordStream<Document> project(Document projection) {\n validateProjection(projection);\n return new ProjectedDocumentStream(recordStream, projection);\n }",
"class_method_signature": "DocumentCursorImpl.project(Document projection)",
"constructor": false,
"full... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_199 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/NitriteTextIndexerTest.java",
"identifier": "NitriteTextIndexerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConstructor() {\n assertEquals(\"Fulltext\", (new NitriteTextIndexer()).getIndexType());\n }",
"class_method_signature": "NitriteTextIndexerTest.testConstructor()",
"constructor": false,
"full_signature": "@Test public void testConstructor()",
"identifier": "tes... | {
"fields": [
{
"declarator": "textTokenizer",
"modifier": "private final",
"original_string": "private final TextTokenizer textTokenizer;",
"type": "TextTokenizer",
"var_name": "textTokenizer"
},
{
"declarator": "indexCatalog",
"modifier": "private",
"origi... | {
"body": "@Override\n public String getIndexType() {\n return IndexType.Fulltext;\n }",
"class_method_signature": "NitriteTextIndexer.getIndexType()",
"constructor": false,
"full_signature": "@Override public String getIndexType()",
"identifier": "getIndexType",
"invocations": [],
"modifiers... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_17 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/mapper/MappableMapperTest.java",
"identifier": "MappableMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertFromDocument() {\n Class<?> forNameResult = Object.class;\n Class<?> forNameResult1 = Object.class;\n MappableMapper mappableMapper = new MappableMapper(forNameResult, forNameResult1, Object.class);\n assertNull(mappableMapper.<Object>convertFro... | {
"fields": [
{
"declarator": "valueTypes",
"modifier": "private final",
"original_string": "private final Set<Class<?>> valueTypes;",
"type": "Set<Class<?>>",
"var_name": "valueTypes"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/mapper/MappableMapper.java",
"identi... | {
"body": "protected <Target> Target convertFromDocument(Document source, Class<Target> type) {\n if (source == null) {\n return null;\n }\n\n if (Mappable.class.isAssignableFrom(type)) {\n Target item = newInstance(type, false);\n if (item == null) return null;\n... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_249 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/BretonTest.java",
"identifier": "BretonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Breton()).stopWords();\n assertEquals(1203, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"fezh\"));\n assertTrue(actualStopWordsResult.contains(\"c'he\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Breton.java",
"identifier": "Breton",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Breton.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"'blam\",\n \"'d\",\n \"'m\",\n \"'r\",\n \"'ta\",\n \"'vat\",\n \"'z\",\n \"'zo\",\n \"a\",\n \"a:\"... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_160 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/CollectionFactoryTes... | {
"body": "@Test(expected = ValidationException.class)\n public void testGetCollectionMapStoreNull() {\n CollectionFactory factory = new CollectionFactory(new LockService());\n assertNotNull(factory);\n\n NitriteConfig config = new NitriteConfig();\n factory.getCollection(null, config, ... | {
"fields": [
{
"declarator": "collectionMap",
"modifier": "private final",
"original_string": "private final Map<String, NitriteCollection> collectionMap;",
"type": "Map<String, NitriteCollection>",
"var_name": "collectionMap"
},
{
"declarator": "lockService",
"m... | {
"body": "public NitriteCollection getCollection(String name, NitriteConfig nitriteConfig, boolean writeCatalogue) {\n notNull(nitriteConfig, \"configuration is null while creating collection\");\n notEmpty(name, \"collection name is null or empty\");\n\n Lock lock = lockService.getWriteLock(thi... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_40 | {
"fields": [
{
"declarator": "operations",
"modifier": "private",
"original_string": "private RepositoryOperations operations;",
"type": "RepositoryOperations",
"var_name": "operations"
},
{
"declarator": "db",
"modifier": "private",
"original_string": "pri... | {
"body": "@Test(expected = ValidationException.class)\n public void testInvalidGetField() {\n NitriteMapper nitriteMapper = db.getConfig().nitriteMapper();\n ObjectRepository<ClassWithAnnotatedFields> repository = db.getRepository(ClassWithAnnotatedFields.class);\n operations = new Repository... | {
"fields": [
{
"declarator": "nitriteMapper",
"modifier": "private final",
"original_string": "private final NitriteMapper nitriteMapper;",
"type": "NitriteMapper",
"var_name": "nitriteMapper"
},
{
"declarator": "type",
"modifier": "private final",
"origina... | {
"body": "<T> Field getField(Class<T> type, String name) {\n if (name.contains(NitriteConfig.getFieldSeparator())) {\n return getEmbeddedField(type, name);\n } else {\n // first check declared fields (fix for kotlin properties, ref: issue #54)\n // if nothing found and ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_137 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/NotEqualsFilterTest.java",
"identifier": "NotEqualsFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIsFieldIndexed3() {\n NotEqualsFilter notEqualsFilter = new NotEqualsFilter(\"field\", \"value\");\n notEqualsFilter.setIsFieldIndexed(true);\n assertTrue(notEqualsFilter.getIsFieldIndexed());\n }",
"class_method_signature": "NotEqualsFilterTest.testS... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/NotEqualsFilter.java",
"identifier": "NotEqualsFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotEqualsFilter.NotEqualsFilter(String field, Object value)",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public void setIsFieldIndexed(Boolean isFieldIndexed) {\n if (!(getIndexer() instanceof TextIndexer && getValue() instanceof String)) {\n super.setIsFieldIndexed(isFieldIndexed);\n }\n }",
"class_method_signature": "NotEqualsFilter.setIsFieldIndexed(Boolean isFi... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_265 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/UniqueIndexerTest.java",
"identifier": "UniqueIndexerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetIndexType() {\n assertEquals(\"Unique\", (new UniqueIndexer()).getIndexType());\n }",
"class_method_signature": "UniqueIndexerTest.testGetIndexType()",
"constructor": false,
"full_signature": "@Test public void testGetIndexType()",
"identifier": "testGetIndex... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/UniqueIndexer.java",
"identifier": "UniqueIndexer",
"interfaces": "",
"methods": [
{
"class_method_signature": "UniqueIndexer.getIndexType()",
"constructor": false,
"full_signature": "@Override public String getIndexTy... | {
"body": "@Override\n public String getIndexType() {\n return IndexType.Unique;\n }",
"class_method_signature": "UniqueIndexer.getIndexType()",
"constructor": false,
"full_signature": "@Override public String getIndexType()",
"identifier": "getIndexType",
"invocations": [],
"modifiers": "@Ov... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_83 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ComparablesTest.java",
"identifier": "ComparablesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompare() {\n MutableByte first = new MutableByte();\n assertEquals(0, Comparables.compare(first, new MutableByte()));\n }",
"class_method_signature": "ComparablesTest.testCompare()",
"constructor": false,
"full_signature": "@Test public void testCompare()"... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/Comparables.java",
"identifier": "Comparables",
"interfaces": "",
"methods": [
{
"class_method_signature": "Comparables.Comparables()",
"constructor": true,
"full_signature": "private Comparables()",
"iden... | {
"body": "@SuppressWarnings({\"rawtypes\", \"unchecked\"})\n public static int compare(Comparable first, Comparable second) {\n if (first instanceof Number && second instanceof Number) {\n Number number1 = (Number) first;\n Number number2 = (Number) second;\n int result = N... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_232 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/NorwegianTest.java",
"identifier": "NorwegianTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Norwegian()).stopWords();\n assertEquals(221, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"båe\"));\n assertTrue(actualStopWordsResult.contains(\"deg\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Norwegian.java",
"identifier": "Norwegian",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Norwegian.stopWords()",
"constructor": false,
"full_signature": "@Override p... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"alle\",\n \"andre\",\n \"arbeid\",\n \"at\",\n \"av\",\n \"bare\",\n \"begge\",\n \"ble\",\n \"blei\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_224 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/ZuluTest.java",
"identifier": "ZuluTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Zulu()).stopWords();\n assertEquals(29, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"zakhe\"));\n assertTrue(actualStopWordsResult.contains(\"uma\"));\n ass... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Zulu.java",
"identifier": "Zulu",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Zulu.stopWords()",
"constructor": false,
"full_signature": "@Override public Set<Strin... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"futhi\",\n \"kahle\",\n \"kakhulu\",\n \"kanye\",\n \"khona\",\n \"kodwa\",\n \"kungani\",\n \"kusho\",\n \"la\... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_95 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/IterablesTest.java"... | {
"body": "@Test\n public void testArrayContains() {\n assertTrue(Iterables.arrayContains(new Object[]{\"element\"}, \"element\"));\n assertFalse(Iterables.arrayContains(new Object[]{\"array\"}, \"element\"));\n }",
"class_method_signature": "IterablesTest.testArrayContains()",
"constructor": ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/Iterables.java",
"identifier": "Iterables",
"interfaces": "",
"methods": [
{
"class_method_signature": "Iterables.Iterables()",
"constructor": true,
"full_signature": "private Iterables()",
"identifier": "... | {
"body": "public static <T> boolean arrayContains(T[] array, T element) {\n for (T item : array) {\n if (item.equals(element)) return true;\n }\n return false;\n }",
"class_method_signature": "Iterables.arrayContains(T[] array, T element)",
"constructor": false,
"full_signatu... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_273 | {
"fields": [],
"file": "nitrite-mapdb-adapter/src/test/java/org/dizitart/no2/mapdb/MapDBStoreTest.java",
"identifier": "MapDBStoreTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsClosed() {\n assertTrue((new MapDBStore()).isClosed());\n }",
"class_method_signature": "MapDBStoreTest.testIsClosed()",
"constructor": false,
"full_signature": "@Test public void testIsClosed()",
"identifier": "testIsClosed",
"invocations": [
"assertTru... | {
"fields": [
{
"declarator": "db",
"modifier": "private",
"original_string": "private DB db;",
"type": "DB",
"var_name": "db"
},
{
"declarator": "nitriteMapRegistry",
"modifier": "private final",
"original_string": "private final Map<String, NitriteMap<?, ?... | {
"body": "@Override\n public boolean isClosed() {\n return db == null || db.isClosed();\n }",
"class_method_signature": "MapDBStore.isClosed()",
"constructor": false,
"full_signature": "@Override public boolean isClosed()",
"identifier": "isClosed",
"invocations": [
"isClosed"
],
"modi... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_272 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/NonUniqueIndexerTest.java",
"identifier": "NonUniqueIndexerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetIndexType() {\n assertEquals(\"NonUnique\", (new NonUniqueIndexer()).getIndexType());\n }",
"class_method_signature": "NonUniqueIndexerTest.testGetIndexType()",
"constructor": false,
"full_signature": "@Test public void testGetIndexType()",
"identifier": "tes... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/NonUniqueIndexer.java",
"identifier": "NonUniqueIndexer",
"interfaces": "",
"methods": [
{
"class_method_signature": "NonUniqueIndexer.isUnique()",
"constructor": false,
"full_signature": "@Override boolean isUnique()"... | {
"body": "@Override\n public String getIndexType() {\n return IndexType.NonUnique;\n }",
"class_method_signature": "NonUniqueIndexer.getIndexType()",
"constructor": false,
"full_signature": "@Override public String getIndexType()",
"identifier": "getIndexType",
"invocations": [],
"modifiers"... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_225 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/YorubaTest.java",
"identifier": "YorubaTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Yoruba()).stopWords();\n assertEquals(60, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"ọ̀pọ̀lọpọ̀\"));\n assertTrue(actualStopWordsResult.contains(\"ṣùgbọ́n\"));\n... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Yoruba.java",
"identifier": "Yoruba",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Yoruba.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"an\",\n \"bá\",\n \"bí\",\n \"bẹ̀rẹ̀\",\n \"fún\",\n \"fẹ́\",\n \"gbogbo\",\n \"inú\",\n \"... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_94 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/IterablesTest.java"... | {
"body": "@Test\n public void testToArray3() {\n assertEquals(0, Iterables.toArray(new ArrayList<>()).length);\n }",
"class_method_signature": "IterablesTest.testToArray3()",
"constructor": false,
"full_signature": "@Test public void testToArray3()",
"identifier": "testToArray3",
"invocations"... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/Iterables.java",
"identifier": "Iterables",
"interfaces": "",
"methods": [
{
"class_method_signature": "Iterables.Iterables()",
"constructor": true,
"full_signature": "private Iterables()",
"identifier": "... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T> T[] toArray(Iterable<T> iterable, Class<T> type) {\n T[] dummy = (T[]) Array.newInstance(type, 0);\n if (iterable instanceof Collection) {\n return ((Collection<T>) iterable).toArray(dummy);\n } else {\n List... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_82 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ValidationUtilsTest... | {
"body": "@Test\n public void testCharSequenceNotEmpty() {\n CharSequence cs = \"\";\n boolean invalid = false;\n try {\n notEmpty(cs, \"test\");\n } catch (ValidationException iae) {\n invalid = true;\n assertEquals(iae.getMessage(), \"test\");\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/ValidationUtils.java",
"identifier": "ValidationUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ValidationUtils.ValidationUtils()",
"constructor": true,
"full_signature": "private ValidationU... | {
"body": "public static void notEmpty(String value, String message) {\n if (isNullOrEmpty(value)) {\n throw new ValidationException(message);\n }\n }",
"class_method_signature": "ValidationUtils.notEmpty(String value, String message)",
"constructor": false,
"full_signature": "public... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_233 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/RussianTest.java",
"identifier": "RussianTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Russian()).stopWords();\n assertEquals(559, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"девять\"));\n assertTrue(actualStopWordsResult.contains(\"новый\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Russian.java",
"identifier": "Russian",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Russian.stopWords()",
"constructor": false,
"full_signature": "@Override public ... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"c\",\n \"а\",\n \"алло\",\n \"без\",\n \"белый\",\n \"близко\",\n \"более\",\n \"больше\",\n \"большой\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_264 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/UniversalTextTokenizerTest.java",
"identifier": "UniversalTextTokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new UniversalTextTokenizer()).stopWords();\n assertEquals(18352, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"ছিলেন\"));\n assertTrue(actualStopWordsResult.contains(\"... | {
"fields": [
{
"declarator": "stopWords = new HashSet<>()",
"modifier": "private final",
"original_string": "private final Set<String> stopWords = new HashSet<>();",
"type": "Set<String>",
"var_name": "stopWords"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/index/ful... | {
"body": "@Override\n public Set<String> stopWords() {\n return stopWords;\n }",
"class_method_signature": "UniversalTextTokenizer.stopWords()",
"constructor": false,
"full_signature": "@Override public Set<String> stopWords()",
"identifier": "stopWords",
"invocations": [],
"modifiers": "@Ov... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_136 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/NotEqualsFilterTest.java",
"identifier": "NotEqualsFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIsFieldIndexed2() {\n NotEqualsFilter notEqualsFilter = new NotEqualsFilter(\"field\", 42);\n notEqualsFilter.setObjectFilter(true);\n notEqualsFilter.setIndexer(null);\n notEqualsFilter.setIsFieldIndexed(true);\n assertTrue(notEqualsFilter.g... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/NotEqualsFilter.java",
"identifier": "NotEqualsFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotEqualsFilter.NotEqualsFilter(String field, Object value)",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public void setIsFieldIndexed(Boolean isFieldIndexed) {\n if (!(getIndexer() instanceof TextIndexer && getValue() instanceof String)) {\n super.setIsFieldIndexed(isFieldIndexed);\n }\n }",
"class_method_signature": "NotEqualsFilter.setIsFieldIndexed(Boolean isFi... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_41 | {
"fields": [
{
"declarator": "operations",
"modifier": "private",
"original_string": "private RepositoryOperations operations;",
"type": "RepositoryOperations",
"var_name": "operations"
},
{
"declarator": "db",
"modifier": "private",
"original_string": "pri... | {
"body": "@Test(expected = ValidationException.class)\n public void testExtractInvalidIndex() {\n @Index(value = \"fake\")\n class Test implements Mappable {\n private String test;\n\n @Override\n public Document write(NitriteMapper mapper) {\n return ... | {
"fields": [
{
"declarator": "nitriteMapper",
"modifier": "private final",
"original_string": "private final NitriteMapper nitriteMapper;",
"type": "NitriteMapper",
"var_name": "nitriteMapper"
},
{
"declarator": "type",
"modifier": "private final",
"origina... | {
"body": "<T> Set<Index> extractIndices(Class<T> type) {\n notNull(type, \"type cannot be null\");\n\n // populate from @Indices\n List<Indices> indicesList;\n if (type.isAnnotationPresent(InheritIndices.class)) {\n indicesList = findAnnotations(Indices.class, type);\n }... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_161 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/CollectionFactoryTes... | {
"body": "@Test(expected = ValidationException.class)\n public void testGetCollectionContextNull() {\n CollectionFactory factory = new CollectionFactory(new LockService());\n factory.getCollection(\"test\", null, false);\n }",
"class_method_signature": "CollectionFactoryTest.testGetCollectionCo... | {
"fields": [
{
"declarator": "collectionMap",
"modifier": "private final",
"original_string": "private final Map<String, NitriteCollection> collectionMap;",
"type": "Map<String, NitriteCollection>",
"var_name": "collectionMap"
},
{
"declarator": "lockService",
"m... | {
"body": "public NitriteCollection getCollection(String name, NitriteConfig nitriteConfig, boolean writeCatalogue) {\n notNull(nitriteConfig, \"configuration is null while creating collection\");\n notEmpty(name, \"collection name is null or empty\");\n\n Lock lock = lockService.getWriteLock(thi... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_16 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/mapper/MappableMapperTest.java",
"identifier": "MappableMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvert3() {\n Class<?> forNameResult = Object.class;\n Class<?> forNameResult1 = Object.class;\n MappableMapper mappableMapper = new MappableMapper(forNameResult, forNameResult1, Object.class);\n assertEquals(0, ((Integer) mappableMapper.<Object, Obje... | {
"fields": [
{
"declarator": "valueTypes",
"modifier": "private final",
"original_string": "private final Set<Class<?>> valueTypes;",
"type": "Set<Class<?>>",
"var_name": "valueTypes"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/mapper/MappableMapper.java",
"identi... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <Source, Target> Target convert(Source source, Class<Target> type) {\n if (source == null) {\n return null;\n }\n\n if (isValue(source)) {\n return (Target) source;\n } else {\n if (Docu... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_248 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/KoreanTest.java",
"identifier": "KoreanTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Korean()).stopWords();\n assertEquals(679, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"가\"));\n assertTrue(actualStopWordsResult.contains(\"저\"));\n assert... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Korean.java",
"identifier": "Korean",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Korean.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"!\",\n \"\\\"\",\n \"$\",\n \"%\",\n \"&\",\n \"'\",\n \"(\",\n \")\",\n \"*\",\n \"+\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_177 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/operation/DocumentCursorImplTest.java",
"identifier": "DocumentCursorImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJoin() {\n FilteredRecordStream recordStream = new FilteredRecordStream(null, null);\n FilteredRecordStream recordStream1 = new FilteredRecordStream(recordStream, Filter.byId(NitriteId.newId()));\n DocumentCursorImpl documentCursorImpl = new DocumentCursorImp... | {
"fields": [
{
"declarator": "recordStream",
"modifier": "private final",
"original_string": "private final RecordStream<Pair<NitriteId, Document>> recordStream;",
"type": "RecordStream<Pair<NitriteId, Document>>",
"var_name": "recordStream"
}
],
"file": "nitrite/src/main/ja... | {
"body": "@Override\n public RecordStream<Document> join(DocumentCursor foreignCursor, Lookup lookup) {\n return new JoinedDocumentStream(recordStream, foreignCursor, lookup);\n }",
"class_method_signature": "DocumentCursorImpl.join(DocumentCursor foreignCursor, Lookup lookup)",
"constructor": false... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_198 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/NitriteDocumentTest.java",
"identifier": "NitriteDocumentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals3() {\n NitriteDocument nitriteDocument = new NitriteDocument();\n assertTrue(nitriteDocument.equals(new NitriteDocument()));\n }",
"class_method_signature": "NitriteDocumentTest.testEquals3()",
"constructor": false,
"full_signature": "@Test public vo... | {
"fields": [
{
"declarator": "serialVersionUID = 1477462374L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1477462374L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "reservedFields = listOf... | {
"body": "@Override\n public boolean equals(Object other) {\n if (other == this)\n return true;\n\n if (!(other instanceof NitriteDocument))\n return false;\n\n NitriteDocument m = (NitriteDocument) other;\n if (m.size() != size())\n return false;\n\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_120 | {
"fields": [
{
"declarator": "retry = new Retry(3)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public Retry retry = new Retry(3);",
"type": "Retry",
"var_name": "retry"
}
],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/DocumentUtilsTest.j... | {
"body": "@Test\n public void testSkeletonDocument() {\n Class type = Object.class;\n assertNull(DocumentUtils.skeletonDocument(new NitriteBuilderTest.CustomNitriteMapper(), type));\n }",
"class_method_signature": "DocumentUtilsTest.testSkeletonDocument()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/DocumentUtils.java",
"identifier": "DocumentUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentUtils.DocumentUtils()",
"constructor": true,
"full_signature": "private DocumentUtils()",
... | {
"body": "public static <T> Document skeletonDocument(NitriteMapper nitriteMapper, Class<T> type) {\n if (nitriteMapper.isValueType(type)) {\n return Document.createDocument();\n }\n T dummy = newInstance(type, true);\n Document document = nitriteMapper.convert(dummy, Document.... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_57 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryConfigTest.java",
"identifier": "InMemoryConfigTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFilePath() {\n assertNull((new InMemoryConfig()).filePath());\n }",
"class_method_signature": "InMemoryConfigTest.testFilePath()",
"constructor": false,
"full_signature": "@Test public void testFilePath()",
"identifier": "testFilePath",
"invocations": [
"a... | {
"fields": [
{
"declarator": "eventListeners",
"modifier": "@Getter\n @Setter(AccessLevel.PACKAGE)\n private",
"original_string": "@Getter\n @Setter(AccessLevel.PACKAGE)\n private Set<StoreEventListener> eventListeners;",
"type": "Set<StoreEventListener>",
"var_name": "e... | {
"body": "@Override\n public final String filePath() {\n return null;\n }",
"class_method_signature": "InMemoryConfig.filePath()",
"constructor": false,
"full_signature": "@Override public final String filePath()",
"identifier": "filePath",
"invocations": [],
"modifiers": "@Override public f... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_209 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/DanishTest.java",
"identifier": "DanishTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Danish()).stopWords();\n assertEquals(170, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"hun\"));\n assertTrue(actualStopWordsResult.contains(\"mod\"));\n as... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Danish.java",
"identifier": "Danish",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Danish.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"ad\",\n \"af\",\n \"aldrig\",\n \"alle\",\n \"alt\",\n \"anden\",\n \"andet\",\n \"andre\",\n \"at\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_20 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/mapper/MappableMapperTest.java",
"identifier": "MappableMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertToDocument() {\n Class<?> forNameResult = Object.class;\n Class<?> forNameResult1 = Object.class;\n assertThrows(ObjectMappingException.class,\n () -> (new MappableMapper(forNameResult, forNameResult1, Object.class)).<Object>convertToDocumen... | {
"fields": [
{
"declarator": "valueTypes",
"modifier": "private final",
"original_string": "private final Set<Class<?>> valueTypes;",
"type": "Set<Class<?>>",
"var_name": "valueTypes"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/mapper/MappableMapper.java",
"identi... | {
"body": "protected <Source> Document convertToDocument(Source source) {\n if (source instanceof Mappable) {\n Mappable mappable = (Mappable) source;\n return mappable.write(this);\n }\n\n throw new ObjectMappingException(\"object must implements Mappable\");\n }",
"cl... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_157 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/EqualsFilterTest.java",
"identifier": "EqualsFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIsFieldIndexed3() {\n EqualsFilter equalsFilter = new EqualsFilter(\"field\", 42);\n equalsFilter.setIndexer(new NitriteTextIndexer());\n equalsFilter.setIsFieldIndexed(true);\n assertTrue(equalsFilter.getValue() instanceof Integer);\n assert... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/EqualsFilter.java",
"identifier": "EqualsFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "EqualsFilter.EqualsFilter(String field, Object value)",
"constructor": true,
"full_signature": " EqualsFi... | {
"body": "@Override\n public void setIsFieldIndexed(Boolean isFieldIndexed) {\n if (!(getIndexer() instanceof TextIndexer && getValue() instanceof String)) {\n super.setIsFieldIndexed(isFieldIndexed);\n }\n }",
"class_method_signature": "EqualsFilter.setIsFieldIndexed(Boolean isField... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_98 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ObjectUtilsTest.java",
"identifier": "ObjectUtilsTest",
"interfaces": "implements Serializable",
"superclass": ""
} | {
"body": "@Test\n public void testGetEntityName() {\n assertEquals(\"java.lang.Object\", ObjectUtils.getEntityName(Object.class));\n }",
"class_method_signature": "ObjectUtilsTest.testGetEntityName()",
"constructor": false,
"full_signature": "@Test public void testGetEntityName()",
"identifier":... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER_TYPE",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_TO_WRAPPER_TYPE"
},
{
"... | {
"body": "public static <T> String getEntityName(Class<T> type) {\n if (type.isAnnotationPresent(Entity.class)) {\n Entity entity = type.getAnnotation(Entity.class);\n String name = entity.value();\n if (name.contains(KEY_OBJ_SEPARATOR)) {\n throw new Validation... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_229 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/HebrewTest.java",
"identifier": "HebrewTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Hebrew()).stopWords();\n assertEquals(194, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"בשעהש\"));\n assertTrue(actualStopWordsResult.contains(\"או\"));\n a... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Hebrew.java",
"identifier": "Hebrew",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Hebrew.stopWords()",
"constructor": false,
"full_signature": "@Override public Set... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"אבל\",\n \"או\",\n \"אולי\",\n \"אותה\",\n \"אותו\",\n \"אותי\",\n \"אותך\",\n \"אותם\",\n \"אותן\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_77 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/DatabaseMetaDataTest.java",
"identifier": "DatabaseMetaDataTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetInfo() {\n DatabaseMetaData databaseMetaData = new DatabaseMetaData();\n databaseMetaData.setNitriteVersion(\"1.0.2\");\n assertEquals(4, databaseMetaData.getInfo().size());\n }",
"class_method_signature": "DatabaseMetaDataTest.testGetInfo()",
"cons... | {
"fields": [
{
"declarator": "createTime",
"modifier": "private",
"original_string": "private Long createTime;",
"type": "Long",
"var_name": "createTime"
},
{
"declarator": "storeVersion",
"modifier": "private",
"original_string": "private String storeVersi... | {
"body": "public Document getInfo() {\n return Document.createDocument()\n .put(\"createTime\", createTime)\n .put(\"storeVersion\", storeVersion)\n .put(\"nitriteVersion\", nitriteVersion)\n .put(\"schemaVersion\", schemaVersion);\n }",
"class_method_signature... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_100 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/common/util/ObjectUtilsTest.java",
"identifier": "ObjectUtilsTest",
"interfaces": "implements Serializable",
"superclass": ""
} | {
"body": "@Test\n public void testDeepEquals() {\n assertFalse(ObjectUtils.deepEquals(\"o1\", \"o2\"));\n assertFalse(ObjectUtils.deepEquals(null, \"o2\"));\n assertFalse(ObjectUtils.deepEquals(new AnnotatedMethodMap(), \"o2\"));\n assertTrue(ObjectUtils.deepEquals(null, null));\n ... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER_TYPE",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_TO_WRAPPER_TYPE"
},
{
"... | {
"body": "@SuppressWarnings(\"rawtypes\")\n public static boolean deepEquals(Object o1, Object o2) {\n if (o1 == null && o2 == null) {\n return true;\n } else if (o1 == null || o2 == null) {\n return false;\n }\n\n if (o1 == o2) {\n // if reference equa... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_61 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/store/memory/InMemoryMapTest.java",
"identifier": "InMemoryMapTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainsKey3() {\n assertFalse((new InMemoryMap<Object, Object>(\"mapName\", null)).containsKey(null));\n }",
"class_method_signature": "InMemoryMapTest.testContainsKey3()",
"constructor": false,
"full_signature": "@Test public void testContainsKey3()",
"identif... | {
"fields": [
{
"declarator": "backingMap",
"modifier": "private final",
"original_string": "private final NavigableMap<Key, Value> backingMap;",
"type": "NavigableMap<Key, Value>",
"var_name": "backingMap"
},
{
"declarator": "nullEntryMap",
"modifier": "private f... | {
"body": "@Override\n public boolean containsKey(Key key) {\n if (key == null) {\n return nullEntryMap.containsKey(NullEntry.getInstance());\n }\n return backingMap.containsKey(key);\n }",
"class_method_signature": "InMemoryMap.containsKey(Key key)",
"constructor": false,
... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_116 | {
"fields": [
{
"declarator": "x",
"modifier": "@Parameterized.Parameter\n public",
"original_string": "@Parameterized.Parameter\n public Number x;",
"type": "Number",
"var_name": "x"
},
{
"declarator": "y",
"modifier": "@Parameterized.Parameter(value = 1)\n... | {
"body": "@Test\n public void testCompare2() {\n Integer x = new Integer(1);\n assertEquals(0, Numbers.compare(x, new Integer(1)));\n }",
"class_method_signature": "NumbersTest.testCompare2()",
"constructor": false,
"full_signature": "@Test public void testCompare2()",
"identifier": "test... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/common/util/Numbers.java",
"identifier": "Numbers",
"interfaces": "",
"methods": [
{
"class_method_signature": "Numbers.Numbers()",
"constructor": true,
"full_signature": "private Numbers()",
"identifier": "Numbers",
... | {
"body": "public static int compare(Number x, Number y) {\n if (isSpecial(x) || isSpecial(y)) {\n return Double.compare(x.doubleValue(), y.doubleValue());\n } else {\n return toBigDecimal(x).compareTo(toBigDecimal(y));\n }\n }",
"class_method_signature": "Numbers.compa... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_268 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/IndexOptionsTest.java",
"identifier": "IndexOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIndexOptions2() {\n IndexOptions actualIndexOptionsResult = IndexOptions.indexOptions(\"indexType\");\n assertFalse(actualIndexOptionsResult.isAsync());\n assertEquals(\"indexType\", actualIndexOptionsResult.getIndexType());\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "indexType",
"modifier": "@Getter\n @Setter\n private",
"original_string": "@Getter\n @Setter\n private String indexType;",
"type": "String",
"var_name": "indexType"
},
{
"declarator": "async = false",
"modifier": "@Getter... | {
"body": "public static IndexOptions indexOptions(String indexType) {\n return indexOptions(indexType, false);\n }",
"class_method_signature": "IndexOptions.indexOptions(String indexType)",
"constructor": false,
"full_signature": "public static IndexOptions indexOptions(String indexType)",
"identif... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_36 | {
"fields": [
{
"declarator": "operations",
"modifier": "private",
"original_string": "private RepositoryOperations operations;",
"type": "RepositoryOperations",
"var_name": "operations"
},
{
"declarator": "db",
"modifier": "private",
"original_string": "pri... | {
"body": "@Test\n public void testGetFieldsUpTo() {\n NitriteMapper nitriteMapper = db.getConfig().nitriteMapper();\n ObjectRepository<Employee> repository = db.getRepository(Employee.class);\n operations = new RepositoryOperations(TestObjectWithIndex.class, nitriteMapper, repository.getDocum... | {
"fields": [
{
"declarator": "nitriteMapper",
"modifier": "private final",
"original_string": "private final NitriteMapper nitriteMapper;",
"type": "NitriteMapper",
"var_name": "nitriteMapper"
},
{
"declarator": "type",
"modifier": "private final",
"origina... | {
"body": "List<Field> getFieldsUpto(Class<?> startClass, Class<?> exclusiveParent) {\n notNull(startClass, \"startClass cannot be null\");\n List<Field> currentClassFields = new ArrayList<>(Arrays.asList(startClass.getDeclaredFields()));\n filterSynthetics(currentClassFields);\n Class<?> ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_141 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/filters/FluentFilterTest.java",
"identifier": "FluentFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEq() {\n assertFalse(((EqualsFilter) FluentFilter.where(\"field\").eq(\"value\")).getOnIdField());\n assertTrue(((EqualsFilter) FluentFilter.where(\"field\").eq(\"value\")).getValue() instanceof String);\n assertFalse(((EqualsFilter) FluentFilter.where(\"fiel... | {
"fields": [
{
"declarator": "field",
"modifier": "private",
"original_string": "private String field;",
"type": "String",
"var_name": "field"
}
],
"file": "nitrite/src/main/java/org/dizitart/no2/filters/FluentFilter.java",
"identifier": "FluentFilter",
"interfaces": "",... | {
"body": "public Filter eq(Object value) {\n return new EqualsFilter(field, value);\n }",
"class_method_signature": "FluentFilter.eq(Object value)",
"constructor": false,
"full_signature": "public Filter eq(Object value)",
"identifier": "eq",
"invocations": [],
"modifiers": "public",
"paramet... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_2 | {
"fields": [],
"file": "nitrite-rocksdb-adapter/src/test/java/org/dizitart/no2/rocksdb/formatter/KryoObjectFormatterTest.java",
"identifier": "KryoObjectFormatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEncode() {\n assertEquals(7, (new KryoObjectFormatter()).<Object>encode(\"object\").length);\n assertEquals(1, (new KryoObjectFormatter()).<Object>encode(null).length);\n }",
"class_method_signature": "KryoObjectFormatterTest.testEncode()",
"constructor": fal... | {
"fields": [
{
"declarator": "kryo = new Kryo()",
"modifier": "private static final",
"original_string": "private static final Kryo kryo = new Kryo();",
"type": "Kryo",
"var_name": "kryo"
},
{
"declarator": "keySerializerRegistry",
"modifier": "private final",
... | {
"body": "@Override\n public <T> byte[] encode(T object) {\n if (object == null) return DB_NULL;\n\n try(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\n try (Output output = new Output(byteArrayOutputStream)) {\n synchronized (kryo) {\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_213 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/CzechTest.java",
"identifier": "CzechTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Czech()).stopWords();\n assertEquals(550, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"nä›kde\"));\n assertTrue(actualStopWordsResult.contains(\"nove\"));\n ... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Czech.java",
"identifier": "Czech",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Czech.stopWords()",
"constructor": false,
"full_signature": "@Override public Set<St... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"aby\",\n \"ahoj\",\n \"aj\",\n \"ale\",\n \"anebo\",\n \"ani\",\n \"aniž\",\n \"ano\",\n \"... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_244 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/HungarianTest.java",
"identifier": "HungarianTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Hungarian()).stopWords();\n assertEquals(1185, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"mögüled\"));\n assertTrue(actualStopWordsResult.contains(\"viszont\"));... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Hungarian.java",
"identifier": "Hungarian",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Hungarian.stopWords()",
"constructor": false,
"full_signature": "@Override p... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"abba\",\n \"abban\",\n \"abbã³l\",\n \"abból\",\n \"addig\",\n \"ahhoz\",\n \"ahogy\",\n \"ahol\",\n ... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_182 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/operation/BoundedDocumentStreamTest.java",
"identifier": "BoundedDocumentStreamTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIterator2() {\n FilteredRecordStream recordStream = new FilteredRecordStream(null, null);\n FilteredRecordStream recordStream1 = new FilteredRecordStream(recordStream, Filter.byId(NitriteId.newId()));\n BoundedDocumentStream recordStream2 = new BoundedDocumen... | {
"fields": [
{
"declarator": "recordStream",
"modifier": "private final",
"original_string": "private final RecordStream<Pair<NitriteId, Document>> recordStream;",
"type": "RecordStream<Pair<NitriteId, Document>>",
"var_name": "recordStream"
},
{
"declarator": "offset"... | {
"body": "@Override\n public Iterator<Pair<NitriteId, Document>> iterator() {\n Iterator<Pair<NitriteId, Document>> iterator = recordStream == null ? Collections.emptyIterator()\n : recordStream.iterator();\n return new BoundedIterator<>(iterator, offset, limit);\n }",
"class_method_... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_252 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/BrazilianPortugueseTest.java",
"identifier": "BrazilianPortugueseTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new BrazilianPortuguese()).stopWords();\n assertEquals(126, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"tua\"));\n assertTrue(actualStopWordsResult.contains(\"depois\... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/BrazilianPortuguese.java",
"identifier": "BrazilianPortuguese",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "BrazilianPortuguese.stopWords()",
"constructor": false,
... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"ainda\",\n \"alem\",\n \"ambas\",\n \"ambos\",\n \"antes\",\n \"ao\",\n \"aonde\"... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_194 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/collection/NitriteDocumentTest.java",
"identifier": "NitriteDocumentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testClone() {\n assertEquals(0, (new NitriteDocument()).clone().size());\n }",
"class_method_signature": "NitriteDocumentTest.testClone()",
"constructor": false,
"full_signature": "@Test public void testClone()",
"identifier": "testClone",
"invocations": [
"as... | {
"fields": [
{
"declarator": "serialVersionUID = 1477462374L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1477462374L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "reservedFields = listOf... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public Document clone() {\n Map<String, Object> clone = (Map<String, Object>) super.clone();\n return new NitriteDocument(clone);\n }",
"class_method_signature": "NitriteDocument.clone()",
"constructor": false,
"full_signature": "@... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
88777477_205 | {
"fields": [],
"file": "nitrite/src/test/java/org/dizitart/no2/index/fulltext/languages/PortugueseTest.java",
"identifier": "PortugueseTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStopWords() {\n Set<String> actualStopWordsResult = (new Portuguese()).stopWords();\n assertEquals(560, actualStopWordsResult.size());\n assertTrue(actualStopWordsResult.contains(\"sejam\"));\n assertTrue(actualStopWordsResult.contains(\"catorze\"));\n... | {
"fields": [],
"file": "nitrite/src/main/java/org/dizitart/no2/index/fulltext/languages/Portuguese.java",
"identifier": "Portuguese",
"interfaces": "implements Language",
"methods": [
{
"class_method_signature": "Portuguese.stopWords()",
"constructor": false,
"full_signature": "@Overrid... | {
"body": "@Override\n public Set<String> stopWords() {\n return new HashSet<>(Arrays.asList(\n \"a\",\n \"acerca\",\n \"adeus\",\n \"agora\",\n \"ainda\",\n \"alem\",\n \"algmas\",\n \"algo\",\n \"algumas\",\... | {
"created": "4/19/2017 6:26:54 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 88777477,
"size": null,
"stargazer_count": null,
"stars": 414,
"updates": "2020-01-27T05:46:15+00:00",
"url": "https://github.com/dizitart/nitrite... |
11369509_4 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleDoc2() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredMethod(\"method1\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest.testSin... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_13 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testDuplicateTypeIdInDifferentFiles() {\n exception.expect(DescriptorParserException.class);\n exception.expectMessage(\"Duplicate type id 100010 for type test2.M2. Already used by test1.M1\");\n\n String file1 = \"package test1;\\n\" +\n \"/**@TypeId(100010)... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_8 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultiDoc4() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredField(\"field5\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\\n\\n2\\n3\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_9 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
],... | {
"body": "@Test\n public void testFromClass() {\n ReflectionClassFactory typeFactory = new ReflectionClassFactory();\n\n XClass integerClass = typeFactory.fromClass(Integer.class);\n\n assertSame(\"java.lang.Integer\", integerClass.getName());\n assertFalse(integerClass.isArray());\n }",
"c... | {
"fields": [
{
"declarator": "classCache = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, XClass> classCache = new HashMap<>();",
"type": "Map<Class<?>, XClass>",
"var_name": "classCache"
}
],
"file": "core/src/main/java/org/in... | {
"body": "@Override\n public XClass fromClass(Class<?> c) {\n if (c == null) {\n return null;\n }\n\n XClass xclass = classCache.get(c);\n if (xclass == null) {\n xclass = new ReflectionClass(c);\n classCache.put(c, xclass);\n }\n return xclass;\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_12 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testUnregisterMissingFiles() {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"File test.proto does not exist\");\n\n SerializationContext ctx = createContext();\n ctx.unregisterProtoFile(\"test.proto\");\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void unregisterProtoFile(String fileName) {\n log.debugf(\"Unregistering proto file : %s\", fileName);\n writeLock.lock();\n try {\n FileDescriptor fileDescriptor = fileDescriptors.remove(fileName);\n if (fileDescriptor != null) {\n unregisterF... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_5 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultiDoc1() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredField(\"field2\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\\n2\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest.testMu... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_15 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testEnumConstantNameClashesWithOtherType1() {\n exception.expect(DescriptorParserException.class);\n exception.expectMessage(\"Enum value test1.E1.M1 clashes with message definition test1.M1\");\n\n String file1 = \"package test1;\\n\" +\n \"message M1 {\\n\"... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_19 | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(AnnotationParserTest.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(AnnotationParserTest.class);",
"type": "Log",
"var_name": "log"
},
{
"de... | {
"body": "@Test\n public void testUnexpectedShmoo() {\n exception.expect(AnnotationParserException.class);\n exception.expectMessage(\"Error: 1,1: Unexpected character: x\");\n\n testAnnotationParsing(\n \"xx\\n\" +\n \" @Abc \\n\" +\n \"\\n\",\n ... | {
"fields": [
{
"declarator": "lexer",
"modifier": "private final",
"original_string": "private final AnnotationLexer lexer;",
"type": "AnnotationLexer",
"var_name": "lexer"
}
],
"file": "core/src/main/java/org/infinispan/protostream/impl/parser/AnnotationParser.java",
"ide... | {
"body": "private void expect(AnnotationTokens token) {\n if (lexer.token == token) {\n lexer.nextToken();\n } else {\n long pos = AnnotationElement.line(lexer.pos) > AnnotationElement.line(lexer.lastPos) ? lexer.lastPos : lexer.pos;\n throw new AnnotationParserException(String.form... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_2 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
],... | {
"body": "@Test\n public void testDuplicateReservedName() {\n expectedException.expect(ProtoSchemaBuilderException.class);\n expectedException.expectMessage(\"Found duplicate @ProtoReserved name \\\"triceratops\\\" in org.infinispan.protostream.annotations.impl.ReservedProcessorTest.DuplicateName\");\n\n... | {
"fields": [
{
"declarator": "reservedNumbers",
"modifier": "private",
"original_string": "private SortedSet<ReservedInterval> reservedNumbers;",
"type": "SortedSet<ReservedInterval>",
"var_name": "reservedNumbers"
},
{
"declarator": "reservedNames",
"modifier": ... | {
"body": "void scan(XClass javaClass) {\n reservedNumbers = new TreeSet<>();\n reservedNames = new TreeMap<>();\n scanReserved(javaClass, new HashSet<>());\n }",
"class_method_signature": "ReservedProcessor.scan(XClass javaClass)",
"constructor": false,
"full_signature": " void scan(XClass jav... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_3 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleDoc1() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredField(\"field1\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest.testSingl... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_22 | {
"fields": [],
"file": "processor/src/test/java/org/infinispan/protostream/annotations/impl/processor/types/MirrorClassFactoryTest.java",
"identifier": "MirrorClassFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFromTypeMirror() {\n ProcessingEnvironment processingEnvironmentMock = mock(ProcessingEnvironment.class);\n Elements elementsMock = mock(Elements.class);\n Types typesMock = mock(Types.class);\n when(processingEnvironmentMock.getElementUtils()).thenReturn(eleme... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final Elements elements;",
"type": "Elements",
"var_name": "elements"
},
{
"declarator": "types",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n public XClass fromTypeMirror(TypeMirror typeMirror) {\n if (typeMirror == null) {\n return null;\n }\n\n switch (typeMirror.getKind()) {\n case ERROR:\n throw new IllegalStateException(\"Unresolved type : \" + typeMirror.toString());\n case VO... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_18 | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(AnnotationParserTest.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(AnnotationParserTest.class);",
"type": "Log",
"var_name": "log"
},
{
"de... | {
"body": "@Test\n public void testAnnotationsMustStartOnAnEmptyLine() {\n exception.expect(AnnotationParserException.class);\n exception.expectMessage(\"Error: 4,7: Annotations must start on an empty line\");\n\n testAnnotationParsing(\n \"some garbage \\n\" +\n \"\\n\" ... | {
"fields": [
{
"declarator": "lexer",
"modifier": "private final",
"original_string": "private final AnnotationLexer lexer;",
"type": "AnnotationLexer",
"var_name": "lexer"
}
],
"file": "core/src/main/java/org/infinispan/protostream/impl/parser/AnnotationParser.java",
"ide... | {
"body": "private void expect(AnnotationTokens token) {\n if (lexer.token == token) {\n lexer.nextToken();\n } else {\n long pos = AnnotationElement.line(lexer.pos) > AnnotationElement.line(lexer.lastPos) ? lexer.lastPos : lexer.pos;\n throw new AnnotationParserException(String.form... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_14 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testDuplicateTypeIdInSameFile() {\n exception.expect(DescriptorParserException.class);\n exception.expectMessage(\"Duplicate type id 100010 for type test1.M2. Already used by test1.M1\");\n\n String file1 = \"package test1;\\n\" +\n \"/**@TypeId(100010)*/\\n\... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_17 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testEnumConstantNameClashesWithOtherType3() {\n exception.expect(DescriptorParserException.class);\n exception.expectMessage(\"Enum value test1.E1.M1 clashes with message definition test1.M1\");\n\n String file1 = \"package test1;\\n\" +\n \"message M1 {\\n\"... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_0 | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(ProtobufParserTest.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(ProtobufParserTest.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "core... | {
"body": "@Test\n public void testTagHandler() throws Exception {\n ImmutableSerializationContext ctx = createContext();\n\n User user = new User();\n user.setId(1);\n user.setName(\"John\");\n user.setSurname(\"Batman\");\n user.setGender(User.Gender.MALE);\n user.setAccountIds(... | {
"fields": [
{
"declarator": "INSTANCE = new ProtobufParser()",
"modifier": "public static final",
"original_string": "public static final ProtobufParser INSTANCE = new ProtobufParser();",
"type": "ProtobufParser",
"var_name": "INSTANCE"
}
],
"file": "core/src/main/java/org/... | {
"body": "public void parse(TagHandler tagHandler, Descriptor messageDescriptor, InputStream input) throws IOException {\n if (messageDescriptor == null) {\n throw new IllegalArgumentException(\"messageDescriptor cannot be null\");\n }\n RawProtoStreamReader in = RawProtoStreamReaderImpl.newIn... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_21 | {
"fields": [],
"file": "processor/src/test/java/org/infinispan/protostream/annotations/impl/processor/types/MirrorClassFactoryTest.java",
"identifier": "MirrorClassFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFromClass() {\n ProcessingEnvironment processingEnvironmentMock = mock(ProcessingEnvironment.class);\n Elements elementsMock = mock(Elements.class);\n Types typesMock = mock(Types.class);\n when(processingEnvironmentMock.getElementUtils()).thenReturn(elementsMo... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final Elements elements;",
"type": "Elements",
"var_name": "elements"
},
{
"declarator": "types",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n public XClass fromClass(Class<?> c) {\n if (c == null) {\n return null;\n }\n\n if (c == byte[].class) {\n XClass componentType = byteType;\n String fqn = \"[\" + componentType.getName();\n XClass xclass = classCache.get(fqn);\n if (xclas... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_20 | {
"fields": [
{
"declarator": "GSON = new Gson()",
"modifier": "private static final",
"original_string": "private static final Gson GSON = new Gson();",
"type": "Gson",
"var_name": "GSON"
}
],
"file": "core/src/test/java/org/infinispan/protostream/ProtobufUtilTest.java",
"... | {
"body": "@Test\n public void testWrappedMessageTypeIdMapper() throws Exception {\n WrappedMessageTypeIdMapper mapper = new WrappedMessageTypeIdMapper() {\n @Override\n public int mapTypeIdOut(int typeId, ImmutableSerializationContext ctx) {\n if (typeId == 100042) { // change typeI... | {
"fields": [
{
"declarator": "BUFFER_SIZE = 512",
"modifier": "private static final",
"original_string": "private static final int BUFFER_SIZE = 512;",
"type": "int",
"var_name": "BUFFER_SIZE"
},
{
"declarator": "RFC_3339_DATE_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\"",
... | {
"body": "public static byte[] toWrappedByteArray(ImmutableSerializationContext ctx, Object t) throws IOException {\n return toWrappedByteArray(ctx, t, BUFFER_SIZE);\n }",
"class_method_signature": "ProtobufUtil.toWrappedByteArray(ImmutableSerializationContext ctx, Object t)",
"constructor": false,
"ful... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_1 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
],... | {
"body": "@Test\n public void testDuplicateReservedNumber() {\n expectedException.expect(ProtoSchemaBuilderException.class);\n expectedException.expectMessage(\"Found duplicate @ProtoReserved number 1 in org.infinispan.protostream.annotations.impl.ReservedProcessorTest.DuplicateNumber\");\n\n XClass... | {
"fields": [
{
"declarator": "reservedNumbers",
"modifier": "private",
"original_string": "private SortedSet<ReservedInterval> reservedNumbers;",
"type": "SortedSet<ReservedInterval>",
"var_name": "reservedNumbers"
},
{
"declarator": "reservedNames",
"modifier": ... | {
"body": "void scan(XClass javaClass) {\n reservedNumbers = new TreeSet<>();\n reservedNames = new TreeMap<>();\n scanReserved(javaClass, new HashSet<>());\n }",
"class_method_signature": "ReservedProcessor.scan(XClass javaClass)",
"constructor": false,
"full_signature": " void scan(XClass jav... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_16 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testEnumConstantNameClashesWithOtherType2() {\n exception.expect(DescriptorParserException.class);\n exception.expectMessage(\"Enum value test1.E1.M1 clashes with message definition test1.M1\");\n\n String file1 = \"package test1;\\n\" +\n \"message M1 {\\n\"... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_6 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultiDoc2() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredField(\"field3\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\\n2\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest.testMu... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_11 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@org.junit.Rule\n public",
"original_string": "@org.junit.Rule\n public ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"... | {
"body": "@Test\n public void testRegisterProtoFiles() {\n SerializationContext ctx = createContext();\n\n String file1 = \"syntax = \\\"proto3\\\";\\n\" +\n \"package p;\\n\" +\n \"message A {\\n\" +\n \" optional int32 f1 = 1;\\n\" +\n \"}\";\n\n Strin... | {
"fields": [
{
"declarator": "log = Log.LogFactory.getLog(SerializationContextImpl.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.LogFactory.getLog(SerializationContextImpl.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException {\n if (log.isDebugEnabled()) {\n log.debugf(\"Registering proto files : %s\", source.getFiles().keySet());\n }\n Map<String, FileDescriptor> fileDescriptorMap = parser.parse(so... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_10 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
],... | {
"body": "@Test\n public void testFromTypeMirror() {\n expectedException.expect(UnsupportedOperationException.class);\n expectedException.expectMessage(\"javax.lang.model.type.TypeMirror is only supported when processing annotations at compile time.\");\n\n ReflectionClassFactory typeFactory = new R... | {
"fields": [
{
"declarator": "classCache = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, XClass> classCache = new HashMap<>();",
"type": "Map<Class<?>, XClass>",
"var_name": "classCache"
}
],
"file": "core/src/main/java/org/in... | {
"body": "@Override\n public XClass fromTypeMirror(TypeMirror typeMirror) {\n throw new UnsupportedOperationException(\"javax.lang.model.type.TypeMirror is only supported when processing annotations at compile time.\");\n }",
"class_method_signature": "ReflectionClassFactory.fromTypeMirror(TypeMirror type... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
11369509_7 | {
"fields": [],
"file": "core/src/test/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractorTest.java",
"identifier": "DocumentationExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultiDoc3() throws Exception {\n String doc = DocumentationExtractor.getDocumentation(TestDocs.class.getDeclaredField(\"field4\").getAnnotationsByType(ProtoDoc.class));\n assertEquals(\"1\", doc);\n }",
"class_method_signature": "DocumentationExtractorTest.testMultiD... | {
"fields": [],
"file": "core/src/main/java/org/infinispan/protostream/annotations/impl/types/DocumentationExtractor.java",
"identifier": "DocumentationExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DocumentationExtractor.getDocumentation(ProtoDoc[] annotations)",
"con... | {
"body": "public static String getDocumentation(ProtoDoc[] annotations) {\n int start = 0;\n while (start < annotations.length && annotations[start].value().isEmpty()) {\n start++;\n }\n\n int end = annotations.length;\n while (end > start && annotations[end - 1].value().isEmpty()) {... | {
"created": null,
"fork": null,
"fork_count": 20,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11369509,
"size": 1756,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/infinispan/protostream"
} |
95752629_235 | {
"fields": [
{
"declarator": "mojo",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
},
{
"declarator": "handler",
"modifier": "private",
"original_string":... | {
"body": "@Test\n public void publish() throws Exception {\n final DeployTarget deployTarget = new WebAppDeployTarget(this.mojo.getWebApp());\n buildHandler();\n doNothing().when(handlerSpy).publish(deployTarget);\n handlerSpy.publish(deployTarget);\n verify(handlerSpy).publish(... | {
"fields": [
{
"declarator": "jarFile",
"modifier": "private",
"original_string": "private String jarFile;",
"type": "String",
"var_name": "jarFile"
},
{
"declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"",
"modifier": "public stati... | {
"body": "@Override\n public void publish(DeployTarget deployTarget) throws AzureExecutionException {\n final File jar = getJarFile();\n assureJarFileExisted(jar);\n\n try {\n prepareDeploymentFiles(jar);\n } catch (IOException e) {\n throw new AzureExecutionExcep... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_48 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java",
"identifier": "AzureLoginHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeviceLogin() throws Exception {\n final AuthenticationResult authenticationResult = TestHelper.createAuthenticationResult();\n final AuthenticationContext ctx = mock(AuthenticationContext.class);\n final AzureEnvironment env = AzureEnvironment.AZURE;\n ... | {
"fields": [
{
"declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();",
"type": "Map<AzureEnvironment, String>",
"var_name": "AZURE_E... | {
"body": "static AzureCredential deviceLogin(AzureEnvironment env)\n throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException {\n final String currentLogLevelFieldName = \"currentLogLevel\";\n Object logger = null;\n Object oldLevelValue = nul... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.