id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_713 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test\n public void testGroupedEnrichmentField() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST8' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n \n String transf... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_969 | {
"fields": [],
"file": "web-services/common-util/src/test/java/datawave/security/util/DnUtilsTest.java",
"identifier": "DnUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testBuildNormalizedDNListTooFewIssuers() {\n DnUtils.buildNormalizedDNList(\"SDN\", \"IDN\", \"SDN2<SDN3>\", \"IDN2\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedDNListTooFewIssuers()",
"constructor": fals... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static Collection<String> buildNormalizedDNList(String subjectDN, String issuerDN, String proxiedSubjectDNs, String proxiedIssuerDNs) {\n subjectDN = normalizeDN(subjectDN);\n issuerDN = normalizeDN(issuerDN);\n List<String> dnList = new ArrayList<>();\n HashSet<String> s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_590 | {
"fields": [
{
"declarator": "log = Logger.getLogger(UniqueTransformTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(UniqueTransformTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Test\n public void testUniqueness() {\n Random random = new Random(2000);\n List<Document> input = new ArrayList<>();\n for (int i = 0; i < 100; i++) {\n input.add(createDocument(random, false));\n }\n \n // choose three fields such that the number o... | {
"fields": [
{
"declarator": "log = Logger.getLogger(GroupingTransform.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(GroupingTransform.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Nullable\n @Override\n public Entry<Key,Document> apply(@Nullable Entry<Key,Document> keyDocumentEntry) {\n if (keyDocumentEntry != null) {\n try {\n if (isDuplicate(keyDocumentEntry.getValue())) {\n keyDocumentEntry = null;\n }\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_986 | {
"fields": [
{
"declarator": "USER_DN = \"userDN\"",
"modifier": "private static final",
"original_string": "private static final String USER_DN = \"userDN\";",
"type": "String",
"var_name": "USER_DN"
},
{
"declarator": "ISSUER_DN = \"issuerDN\"",
"modifier": "pr... | {
"body": "@Test\n public void testMinimizeWithDupsButNoSubset() {\n ArrayList<Authorizations> authSets = Lists.newArrayList(new Authorizations(\"A\", \"B\", \"C\", \"D\"), new Authorizations(\"B\", \"C\", \"F\"), new Authorizations(\n \"A\", \"B\", \"C\", \"D\"), new Authorizations(\... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Collection<Authorizations> minimize(Collection<Authorizations> authorizations) {\n return AuthorizationsMinimizer.minimize(authorizations);\n }",
"class_method_signature": "AuthorizationsUtil.minimize(Collection<Authorizations> authorizations)",
"constructor": false,
"full_sig... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_601 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/data/parsers/DatawaveKeyTest.java",
"identifier": "DatawaveKeyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseShardFiKeyInvalid() {\n Key testKey = new Key(\"row\", \"fi\\u0000fieldNameA\", \"fieldValueA\\u0000datatype\", \"viz\");\n DatawaveKey key = new DatawaveKey(testKey);\n \n Assert.assertTrue(key.isInvalidKey());\n }",
"class_method_signature": "D... | {
"fields": [
{
"declarator": "NULL = 0x00",
"modifier": "public static final",
"original_string": "public static final int NULL = 0x00;",
"type": "int",
"var_name": "NULL"
},
{
"declarator": "DOCUMENT_COLUMN = new Text(\"d\")",
"modifier": "public static final",
... | {
"body": "public boolean isInvalidKey() {\n return invalidKey;\n }",
"class_method_signature": "DatawaveKey.isInvalidKey()",
"constructor": false,
"full_signature": "public boolean isInvalidKey()",
"identifier": "isInvalidKey",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_251 | {
"fields": [
{
"declarator": "ingestHelper",
"modifier": "protected",
"original_string": "protected WikipediaIngestHelper ingestHelper;",
"type": "WikipediaIngestHelper",
"var_name": "ingestHelper"
}
],
"file": "warehouse/ingest-wikipedia/src/test/java/datawave/ingest/wikipe... | {
"body": "@Test\n public void testNormalizedEquivalence() throws Exception {\n WikipediaRecordReader reader = new WikipediaRecordReader();\n reader.initialize(split, ctx);\n reader.setInputDate(System.currentTimeMillis());\n \n Assert.assertTrue(reader.nextKeyValue());\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(WikipediaIngestHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(WikipediaIngestHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public Multimap<String,NormalizedContentInterface> getEventFields(RawRecordContainer event) {\n HashMultimap<String,String> fields = HashMultimap.create();\n \n // Get the raw data\n String data = new String(event.getRawData());\n // Wrap the data\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_744 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/jexl/JexlNodeSetTest.java",
"identifier": "JexlNodeSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRetainAll() {\n JexlNode node1 = JexlNodeFactory.buildEQNode(\"FOO\", \"bar\");\n JexlNode node2 = JexlNodeFactory.buildEQNode(\"FOO2\", \"bar2\");\n JexlNode node3 = JexlNodeFactory.buildEQNode(\"FOO3\", \"bar3\");\n \n Collection<JexlNode> nod... | {
"fields": [
{
"declarator": "useSourceNodeForKeys = false",
"modifier": "private",
"original_string": "private boolean useSourceNodeForKeys = false;",
"type": "boolean",
"var_name": "useSourceNodeForKeys"
},
{
"declarator": "nodeMap",
"modifier": "protected fina... | {
"body": "@Override\n public boolean retainAll(Collection<?> collection) {\n Set<String> retainKeys = new HashSet<>();\n if (collection != null) {\n for (Object o : collection) {\n retainKeys.add(buildKey((JexlNode) o));\n }\n }\n \n boolean ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_314 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/DepthVisitorTest.java",
"identifier": "DepthVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParen() throws Exception {\n String originalQuery = \"FOO == 'abc' or (FOO = 'bcd' and FOO = 'abcdef')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n Assert.assertEquals(4, DepthVisitor.getDepth(script, 5));\n Asse... | {
"fields": [
{
"declarator": "maxDepth = 100",
"modifier": "private",
"original_string": "private int maxDepth = 100;",
"type": "int",
"var_name": "maxDepth"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/DepthVisitor.java",
"identifier": "De... | {
"body": "public static int getDepth(JexlNode root, int maxDepth) {\n DepthVisitor vis = new DepthVisitor(maxDepth);\n Depth depth = new Depth();\n root.jjtAccept(vis, depth);\n return depth.getMaxDepth();\n }",
"class_method_signature": "DepthVisitor.getDepth(JexlNode root, int maxD... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_32 | {
"fields": [
{
"declarator": "dataType = new Type(\"dt1\", null, null, null, 10, null)",
"modifier": "private",
"original_string": "private Type dataType = new Type(\"dt1\", null, null, null, 10, null);",
"type": "Type",
"var_name": "dataType"
},
{
"declarator": "conf"... | {
"body": "@Test\n public void shouldDropBIfEqual() {\n fields.put(\"A1\", \"Test1\");\n fields.put(\"A2\", \"Test2\");\n fields.put(\"B1\", \"Test1\");\n fields.put(\"B2\", \"Test2\");\n \n filter.apply(fields);\n \n assertFieldKept(fields, \"A1\");\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(IngestFieldFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(IngestFieldFilter.class);",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public void apply(Multimap<String,?> fields) {\n // for the field name filters, remove the drop fields if the keep fields exist\n for (FieldFilter filter : fieldNameFilters) {\n if (fields.keySet().containsAll(filter.getKeepFields())) {\n if (logger.isTraceEnabled())... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_197 | {
"fields": [
{
"declarator": "constraintChecker",
"modifier": "private",
"original_string": "private ConstraintChecker constraintChecker;",
"type": "ConstraintChecker",
"var_name": "constraintChecker"
},
{
"declarator": "emptyViz = new ColumnVisibility().getExpression(... | {
"body": "@Test(expected = ConstraintChecker.ConstraintViolationException.class)\n public void shouldFailOnViolatedConstraint() {\n constraintChecker.check(new Text(\"eventTable\"), emptyViz);\n }",
"class_method_signature": "ConstraintCheckerTest.shouldFailOnViolatedConstraint()",
"constructor": fa... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ConstraintChecker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ConstraintChecker.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public void check(Text table, byte[] visibility) throws ConstraintViolationException {\n // fast return if we are not configured\n if (!isConfigured) {\n return;\n }\n \n Collection<VisibilityConstraint> tableConstraints = constraints.get(table);\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_894 | {
"fields": [
{
"declarator": "testKeyHelper",
"modifier": "private",
"original_string": "private EdgeTableTestKeyHelper testKeyHelper;",
"type": "EdgeTableTestKeyHelper",
"var_name": "testKeyHelper"
},
{
"declarator": "decoder",
"modifier": "private",
"orig... | {
"body": "@Test\n public void dateExtractionForMissingDates() {\n Assert.assertEquals(\"\", EdgeKeyDecoder.getYYYYMMDD(new Text(\"\")));\n Assert.assertEquals(\"\", EdgeKeyDecoder.getYYYYMMDD(new Text(\"/CATEGORY/ATTRIBUTE2/ATTRIBUTE3\")));\n Assert.assertEquals(\"\", EdgeKeyDecoder.getYYYYMM... | {
"fields": [
{
"declarator": "log = Logger.getLogger(EdgeKeyDecoder.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(EdgeKeyDecoder.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DATE... | {
"body": "public static String getYYYYMMDD(Text colQual) {\n int numCharsToCheck = Math.min(DATE_LEN + 1, colQual.getLength());\n \n int firstSlashIndex = DATE_LEN; // there may not be a slash\n byte[] bytes = colQual.getBytes();\n \n // find the first slash if it exists\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_482 | {
"fields": [
{
"declarator": "logAppender",
"modifier": "private static",
"original_string": "private static TestLogAppender logAppender;",
"type": "TestLogAppender",
"var_name": "logAppender"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/Quer... | {
"body": "@Test\n public void nestedBranchRewriteTest() throws ParseException {\n String query = \"((_NOFIELD_ == 'x' || _NOFIELD_ == 'y') && _NOFIELD_ == 'z') || FIELD2 == 'z'\";\n \n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n JexlNode reduced = QueryPruningVisitor.... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static JexlNode reduce(JexlNode node, boolean showPrune) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(true, showPrune);\n \n String before = null;\n String after;\n \n if (showPrune) {\n before = JexlStringBuildingVisitor.buildQuery(n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_178 | {
"fields": [
{
"declarator": "PASSWORD = \"passw0rd\"",
"modifier": "public static final",
"original_string": "public static final String PASSWORD = \"passw0rd\";",
"type": "String",
"var_name": "PASSWORD"
},
{
"declarator": "HOST_NAME = \"localhost\"",
"modifier... | {
"body": "@Test\n public void testGetSplitsTrimByPassed() throws IOException {\n logger.info(\"testGetSplitsTrimByPassed called...\");\n setSplitsCacheDir();\n setupConfiguration();\n \n try {\n \n TableSplitsCache uut = new TableSplitsCache(createMockJobCo... | {
"fields": [
{
"declarator": "REFRESH_SPLITS = \"datawave.ingest.refresh.splits\"",
"modifier": "public static final",
"original_string": "public static final String REFRESH_SPLITS = \"datawave.ingest.refresh.splits\";",
"type": "String",
"var_name": "REFRESH_SPLITS"
},
{
... | {
"body": "public List<Text> getSplits(String table) throws IOException {\n if (null == this.splits)\n read();\n List<Text> tableSplits = this.splits.get(table);\n if (tableSplits == null) {\n return Collections.emptyList();\n }\n return tableSplits;\n }",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_528 | {
"fields": [
{
"declarator": "log = Logger.getLogger(JexlASTHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(JexlASTHelperTest.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "warehouse/... | {
"body": "@Test\n public void testFindLiteral() throws Throwable {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"i == 10\");\n if (log.isDebugEnabled()) {\n PrintingVisitor.printQuery(script);\n }\n JexlNode literal = JexlASTHelper.findLiteral(script);\n Ass... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JexlASTHelper.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(JexlASTHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "AN... | {
"body": "public static JexlNode findLiteral(JexlNode node) {\n if (node instanceof Literal<?>) {\n return node;\n }\n \n for (JexlNode child : JexlNodes.children(node)) {\n JexlNode test = findLiteral(child);\n if (test != null && test instanceof Literal<... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_247 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTmpDir() throws Exception {\n File tmp = Files.tmpDir();\n assertNotNull(tmp);\n }",
"class_method_signature": "FilesTest.testTmpDir()",
"constructor": false,
"full_signature": "@Test public void testTmpDir()",
"identifier": "testTmpDir",
"invocations":... | {
"fields": [
{
"declarator": "NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\"",
"modifier": "private static final",
"original_string": "private static final String NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\";",
"type": "String",
... | {
"body": "public static File tmpDir() {\n return new File(System.getProperty(\"java.io.tmpdir\"));\n }",
"class_method_signature": "Files.tmpDir()",
"constructor": false,
"full_signature": "public static File tmpDir()",
"identifier": "tmpDir",
"invocations": [
"getProperty"
],
"modifiers"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_617 | {
"fields": [
{
"declarator": "data = null",
"modifier": "private",
"original_string": "private byte[][] data = null;",
"type": "byte[][]",
"var_name": "data"
},
{
"declarator": "sortedOrder = null",
"modifier": "private",
"original_string": "private int[] s... | {
"body": "@Test\n public void testClear() {\n set.clear();\n assertTrue(set.isEmpty());\n }",
"class_method_signature": "BufferedFileBackedSortedSetTest.testClear()",
"constructor": false,
"full_signature": "@Test public void testClear()",
"identifier": "testClear",
"invocations": [
... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BufferedFileBackedSortedSet.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(BufferedFileBackedSortedSet.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "@Override\n public void clear() {\n // This will cause the MultiSetBackedSortedSet to call clear on each Set in its Set of Sets, including the buffer\n // It will also call clear on its Set of Sets, emptying the contents\n set.clear();\n // Null the buffer so that it will sta... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_24 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/data/config/NormalizedFieldAndValueTest.java",
"identifier": "NormalizedFieldAndValueTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetDefaultEventFieldName() {\n \n NormalizedContentInterface nci = new NormalizedFieldAndValueTest.GroupedInstance();\n \n NormalizedFieldAndValue uut = new NormalizedFieldAndValue(nci);\n uut.setEventFieldName(null);\n \n String g... | {
"fields": [
{
"declarator": "grouped = false",
"modifier": "private",
"original_string": "private boolean grouped = false;",
"type": "boolean",
"var_name": "grouped"
},
{
"declarator": "group = null",
"modifier": "private",
"original_string": "private Stri... | {
"body": "protected String getDefaultEventFieldName() {\n if (defaultEventFieldName == null) {\n if (isGrouped()) {\n StringBuilder builder = new StringBuilder();\n builder.append(getIndexedFieldName());\n if (getGroup() != null) {\n b... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1049 | {
"fields": [
{
"declarator": "crq = null",
"modifier": "private",
"original_string": "private CachedRunningQuery crq = null;",
"type": "CachedRunningQuery",
"var_name": "crq"
},
{
"declarator": "fixedColumns = StringUtils.join(CacheableQueryRowImpl.getFixedColumnSet(),... | {
"body": "@Test\n public void testDateFunctionInOrder() throws Exception {\n String startDateString = \"Tue Apr 8 10:30:57 GMT 2014\";\n String endDateString = \"Wed Apr 9 10:30:57 GMT 2014\";\n String UPTIME = \"UPTIME.0\";\n String dateFormat = \"%a %b %e %H:%i:%s GMT %Y\";\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_302 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testNegationEvaluation() {\n Assert.assertFalse(ExecutableDeterminationVisitor.isNegated(null));\n Assert.assertFalse(ExecutableDeterminationVisitor.isNegated(\"\"));\n Assert.assertFalse(ExecutableDeterminationVisitor.isNegated(\"!!\"));\n Assert.assertFa... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableDeterminationVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableDeterminationVisitor.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "public static boolean isNegated(Object data) {\n if (data == null || StringUtils.isEmpty(data.toString().trim())) {\n return false;\n } else {\n // flatten the string\n String trimmed = data.toString().trim();\n int notCount = 0;\n // loo... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_752 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test\n public void testPhraseCharacters() throws ParseException {\n Assert.assertEquals(\"esca\\\"ped\", queryParser.parse(\"\\\"esca\\\\\\\"ped\\\"\").getContents());\n }",
"class_method_signature": "TestLuceneQueryParser.testPhraseCharacters()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LuceneQueryParser.class.getName())",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LuceneQueryParser.class.getName());",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public datawave.query.language.tree.QueryNode parse(String query) throws ParseException {\n query = query.replaceAll(\"\\\\u0093\", \"\\\"\"); // replace open smart quote 147\n query = query.replaceAll(\"\\\\u0094\", \"\\\"\"); // replace close smart quote 148\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_882 | {
"fields": [],
"file": "warehouse/core/src/test/java/datawave/util/TextUtilTest.java",
"identifier": "TextUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToUtf8() throws UnsupportedEncodingException {\n String multiByteCharString = \"\\u007A\\u6C34\\uD834\\uDD1E\";\n byte[] utf8 = TextUtil.toUtf8(multiByteCharString);\n Assert.assertArrayEquals(multiByteCharString.getBytes(\"UTF-8\"), utf8);\n }",
"class_... | {
"fields": [
{
"declarator": "nullByte = {0}",
"modifier": "private static final",
"original_string": "private static final byte[] nullByte = {0};",
"type": "byte[]",
"var_name": "nullByte"
}
],
"file": "warehouse/core/src/main/java/datawave/util/TextUtil.java",
"identifie... | {
"body": "public static byte[] toUtf8(String string) {\n ByteBuffer buffer;\n try {\n buffer = Text.encode(string, false);\n } catch (CharacterCodingException cce) {\n throw new IllegalArgumentException(cce);\n }\n byte[] bytes = new byte[buffer.limit()];\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_928 | {
"fields": [
{
"declarator": "kv",
"modifier": "public",
"original_string": "public AtomKeyValueParser kv;",
"type": "AtomKeyValueParser",
"var_name": "kv"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_st... | {
"body": "@SuppressWarnings(\"static-access\")\n @Test\n public void testDelimiterAtEnd() {\n Key key = new Key(new Text(\"row1\\0\"), new Text(\"fi\\0color\"), new Text(\"red\\0truck\\0t-uid001\"));\n byte[] vals = new byte[4];\n Value value = new Value(vals);\n thrown.expect(Value... | {
"fields": [
{
"declarator": "DELIMITER = \"\\0\"",
"modifier": "private static final",
"original_string": "private static final String DELIMITER = \"\\0\";",
"type": "String",
"var_name": "DELIMITER"
},
{
"declarator": "ENTRY_ID_FORMAT = \"https://{0}:{1}/DataWave/Ato... | {
"body": "public static AtomKeyValueParser parse(Key key, Value value) throws IOException {\n AtomKeyValueParser atom = new AtomKeyValueParser();\n \n String row = key.getRow().toString();\n int splitPoint = row.indexOf(DELIMITER);\n if (splitPoint != -1) {\n atom.setCol... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_181 | {
"fields": [
{
"declarator": "JOB_ID = \"job_201109071404_1\"",
"modifier": "private static final",
"original_string": "private static final String JOB_ID = \"job_201109071404_1\";",
"type": "String",
"var_name": "JOB_ID"
},
{
"declarator": "filenames = new ArrayList<>... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testSetCompressionTypeWithBadType() {\n \n MultiRFileOutputFormatterTest.logger.info(\"testSetCompressionTypeWithBadType called...\");\n \n try {\n \n MultiRFileOutputFormatter.setCompression... | {
"fields": [
{
"declarator": "log = Logger.getLogger(MultiRFileOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(MultiRFileOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static void setCompressionType(Configuration conf, String compressionType) {\n if (compressionType != null) {\n if (!(\"snappy\".equals(compressionType) || \"lzo\".equals(compressionType) || \"gz\".equals(compressionType) || \"none\".equals(compressionType)))\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_494 | {
"fields": [
{
"declarator": "logAppender",
"modifier": "private static",
"original_string": "private static TestLogAppender logAppender;",
"type": "TestLogAppender",
"var_name": "logAppender"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/Quer... | {
"body": "@Test\n public void functionTest() throws ParseException {\n String query = \"filter:isNull(FIELD)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getState(script));\n \n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_640 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/ranges/RangeFactoryTest.java",
"identifier": "RangeFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildShardRange() {\n String shard = \"20190314_0\";\n Range shardRange = RangeFactory.createShardRange(shard);\n \n String expectedEndKeyRow = shard + RangeFactory.NULL_BYTE_STRING;\n \n assertEquals(shard, shardRange.getStartKey().getRo... | {
"fields": [
{
"declarator": "NULL_BYTE_STRING = \"\\u0000\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE_STRING = \"\\u0000\";",
"type": "String",
"var_name": "NULL_BYTE_STRING"
},
{
"declarator": "MAX_UNICODE_STRING = ... | {
"body": "public static Range createShardRange(String shard) {\n Key start = new Key(shard);\n Key end = new Key(shard + NULL_BYTE_STRING);\n return new Range(start, true, end, false);\n }",
"class_method_signature": "RangeFactory.createShardRange(String shard)",
"constructor": false,
"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_210 | {
"fields": [
{
"declarator": "jsonFile = \"/input/flattener-test.json\"",
"modifier": "protected static",
"original_string": "protected static String jsonFile = \"/input/flattener-test.json\";",
"type": "String",
"var_name": "jsonFile"
},
{
"declarator": "json",
... | {
"body": "@Test\n public void testFlattenWithWhitelist() throws Exception {\n JsonObjectFlattener flattener = new JsonObjectFlattenerImpl.Builder()\n .mapKeyWhitelist(new HashSet<>(Arrays.asList(\"ROOTOBJECT.NUMBER2\", \"ROOTOBJECT.STRING2\"))).pathDelimiter(\".\")\n ... | {
"fields": [
{
"declarator": "DEFAULT_PATH_DELIMITER = \".\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_PATH_DELIMITER = \".\";",
"type": "String",
"var_name": "DEFAULT_PATH_DELIMITER"
},
{
"declarator": "DEFAULT_OCCURRE... | {
"body": "@Override\n public Multimap<String,String> flatten(JsonObject object) throws IllegalStateException {\n Multimap<String,String> map = HashMultimap.create();\n flatten(object, map);\n return map;\n }",
"class_method_signature": "JsonObjectFlattenerImpl.flatten(JsonObject object)"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_705 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test\n public void testNoEnrichment() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST3' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n \n String transformed = lo... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_355 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testFilterFunctionNormalizationWithMultipleNormalizers() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"IP\", Sets.newHashSet(new IpAddressType(), new LcNoDiacriticsType()));\n \n helper.setIndexe... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class);",
"type": "Logger",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandTerms(ShardQueryConfiguration config, MetadataHelper helper, T script) {\n ExpandMultiNormalizedTerms visitor = new ExpandMultiNormalizedTerms(config, helper);\n \n if (null == visitor.config.getQueryField... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_73 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(DateIndexTableConfigHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(DateIndexTableConfigHelperTest.class);",
"type": "Logger",
"var_name": "logge... | {
"body": "@Test\n public void testSetupOneDateIndexTableDefinedInConfiguration() {\n \n DateIndexTableConfigHelperTest.logger.info(\"DateIndexTableConfigHelperTest.testSetupNothingDefinedInConfiguration called.\");\n \n try {\n \n DateIndexTableConfigHelper uut = ... | {
"fields": [
{
"declarator": "log",
"modifier": "protected",
"original_string": "protected Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "conf",
"modifier": "protected",
"original_string": "protected Configuration conf;",
"type"... | {
"body": "@Override\n public void setup(String tableName, Configuration config, Logger log) throws IllegalArgumentException {\n \n this.log = log;\n this.conf = config;\n this.tableName = tableName;\n \n if (this.tableName == null) {\n throw new IllegalArgument... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_586 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/GroupingRequiredFilterFunctionsTest.java",
"identifier": "GroupingRequiredFilterFunctionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetGroupsForMatchesInGroup() {\n // @formatter:off\n // there is only one match and it is in context group .1\n Collection<?> groups = GroupingRequiredFilterFunctions.getGroupsForMatchesInGroup(\n makeValueTuple(\"ALPHA.1,BAR,bar\"), \"bar\",\n... | {
"fields": [
{
"declarator": "GROUPING_REQUIRED_FUNCTION_NAMESPACE = \"grouping\"",
"modifier": "public static final",
"original_string": "public static final String GROUPING_REQUIRED_FUNCTION_NAMESPACE = \"grouping\";",
"type": "String",
"var_name": "GROUPING_REQUIRED_FUNCTION_NAME... | {
"body": "public static Collection<?> getGroupsForMatchesInGroup(Object... args) {\n // this is either '0', or it is the integer value of the last argument\n // when the argumentCount is odd\n Set<String> groups = new HashSet<>();\n int positionFromRight = 0;\n if (args.length % 2 ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_990 | {
"fields": [
{
"declarator": "interceptor = null",
"modifier": "private",
"original_string": "private RequiredInterceptor interceptor = null;",
"type": "RequiredInterceptor",
"var_name": "interceptor"
},
{
"declarator": "ctx = null",
"modifier": "@Mock\n priva... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testRequiredWithNullStringParameter() throws Exception {\n method = TestClass.class.getMethod(\"testMethod\", String.class);\n // Null String parameter\n EasyMock.expect(ctx.getParameters()).andReturn(new String[] {null}... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "web-services/common-util/src/main/java/datawave/inte... | {
"body": "@AroundInvoke\n public Object checkRequiredParameters(InvocationContext ctx) throws Exception {\n // Check to see if any of the parameters are required\n Object[] methodParams = ctx.getParameters();\n if (null != methodParams && methodParams.length > 0) {\n Annotation[][]... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_139 | {
"fields": [
{
"declarator": "FILE_SYSTEM_URI = URI.create(\"file:///\")",
"modifier": "protected static final",
"original_string": "protected static final URI FILE_SYSTEM_URI = URI.create(\"file:///\");",
"type": "URI",
"var_name": "FILE_SYSTEM_URI"
},
{
"declarator":... | {
"body": "@Test\n public void testCleanUpJobDirectoryWithFailedJobAndFailedCreateNewFile() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testCleanUpJobDirectoryWithFailedJobAndFailedCreateNewFile called...\");\n \n try {\n \n URL url = BulkInge... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BulkIngestMapFileLoader.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(BulkIngestMapFileLoader.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public void cleanUpJobDirectory(Path mapFilesDir) throws IOException {\n Path jobDirectory = mapFilesDir.getParent();\n \n FileSystem destFs = getFileSystem(destHdfs);\n \n FileStatus[] failedDirs = destFs.globStatus(new Path(mapFilesDir, \"failures/*/*\"));\n bool... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_569 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/GeoFunctionsDescriptorTest.java",
"identifier": "GeoFunctionsDescriptorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void antiMeridianTest2() throws Exception {\n String query = \"geo:within_bounding_box(LON_FIELD, LAT_FIELD, '170', '40', '-170', '50')\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n JexlArgumentDescriptor argDesc = new GeoFunctionsDescriptor().getArgumen... | {
"fields": [
{
"declarator": "log = Logger.getLogger(GeoFunctionsDescriptor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(GeoFunctionsDescriptor.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@Override\n public JexlArgumentDescriptor getArgumentDescriptor(ASTFunctionNode node) {\n FunctionJexlNodeVisitor fvis = new FunctionJexlNodeVisitor();\n fvis.visit(node, null);\n \n Class<?> functionClass = (Class<?>) ArithmeticJexlEngines.functions().get(fvis.namespace());\... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_97 | {
"fields": [
{
"declarator": "COLUMN_FAMILY = new Text(\"yuuuup\")",
"modifier": "public static final",
"original_string": "public static final Text COLUMN_FAMILY = new Text(\"yuuuup\");",
"type": "Text",
"var_name": "COLUMN_FAMILY"
},
{
"declarator": "date = 123456789... | {
"body": "@Test\n public void testNoReplacement() {\n MetadataWithMostRecentDate counters = new MetadataWithMostRecentDate(COLUMN_FAMILY);\n counters.createOrUpdate(fieldName, dataTypeName, normalizerClassName, date);\n counters.createOrUpdate(fieldName, dataTypeName, normalizerClassName, 123... | {
"fields": [
{
"declarator": "IGNORED_NORMALIZER_CLASS = null",
"modifier": "public static final",
"original_string": "public static final String IGNORED_NORMALIZER_CLASS = null;",
"type": "String",
"var_name": "IGNORED_NORMALIZER_CLASS"
},
{
"declarator": "columnFamil... | {
"body": "public void createOrUpdate(String fieldName, String dataTypeOutputName, String normalizerClassName, long eventDate) {\n String identifier = createKey(fieldName, dataTypeOutputName, normalizerClassName);\n MostRecentEventDateAndKeyComponents value = mostRecentDates.get(identifier);\n if... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1015 | {
"fields": [
{
"declarator": "MODEL_NAME = \"MODEL\"",
"modifier": "private static final",
"original_string": "private static final String MODEL_NAME = \"MODEL\";",
"type": "String",
"var_name": "MODEL_NAME"
},
{
"declarator": "FIELD_NAME = \"field1\"",
"modifier... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testKeyWithIncorrectlyPositionedIndexOnlyAndDirection() throws Exception {\n // Correct cq: field\\x00\n Key mismatchedParts = new Key(MODEL_FIELD_NAME, MODEL_NAME, FIELD_NAME + ModelKeyParser.NULL_BYTE + FORWARD.getValue() + M... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static FieldMapping parseKey(Key key, Set<Authorizations> auths) {\n FieldMapping mapping = new FieldMapping();\n String row = key.getRow().toString();\n String[] colf = key.getColumnFamily().toString().split(NULL_BYTE);\n String[] colq = key.getColumnQualifier().toString... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_78 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(MetadataTableConfigHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(MetadataTableConfigHelperTest.class);",
"type": "Logger",
"var_name": "logger"... | {
"body": "@Test\n public void testSetupOneShardTableDefinedInConfiguration() {\n \n MetadataTableConfigHelperTest.logger.info(\"MetadataTableConfigHelperTest.testSetupNothingDefinedInConfiguration called.\");\n \n try {\n \n WrappedMetadataTableConfigHelper uut = ... | {
"fields": [
{
"declarator": "log",
"modifier": "protected",
"original_string": "protected Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "conf",
"modifier": "protected",
"original_string": "protected Configuration conf;",
"type"... | {
"body": "@Override\n public void setup(String tableName, Configuration config, Logger log) throws IllegalArgumentException {\n \n this.log = log;\n this.conf = config;\n this.tableName = conf.get(ShardedDataTypeHandler.METADATA_TABLE_NAME, null);\n \n if (this.tableName ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_427 | {
"fields": [
{
"declarator": "GEO_FIELD_QUERY = \"(((GEO_FIELD >= '0208' && GEO_FIELD <= '020d') || GEO_FIELD == '0202') && (geowave:intersects(GEO_FIELD, 'POLYGON((10 10, -10 10, -10 -10, 10 -10, 10 10 ))')))\"",
"modifier": "private static final",
"original_string": "private static final Stri... | {
"body": "@Test\n public void testPointField() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper.parseJexlQuery(COMBINED_FIELDS_QUERY);\n \n GeoWaveQueryInfo queryInfo = new GeoWaveQueryInfoVisitor(Arrays.asList(\"POINT_FIELD\")).parseGeoWaveQueryInfo(queryTree);\n assertEqu... | {
"fields": [
{
"declarator": "geoFields",
"modifier": "private final",
"original_string": "private final Collection<String> geoFields;",
"type": "Collection<String>",
"var_name": "geoFields"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/GeoWav... | {
"body": "public GeoWaveQueryInfo parseGeoWaveQueryInfo(JexlNode script) {\n GeoWaveQueryInfo queryInfo = new GeoWaveQueryInfo();\n script.childrenAccept(this, queryInfo);\n return queryInfo;\n }",
"class_method_signature": "GeoWaveQueryInfoVisitor.parseGeoWaveQueryInfo(JexlNode script)",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_974 | {
"fields": [
{
"declarator": "USER_DN = \"userDN\"",
"modifier": "private static final",
"original_string": "private static final String USER_DN = \"userDN\";",
"type": "String",
"var_name": "USER_DN"
},
{
"declarator": "ISSUER_DN = \"issuerDN\"",
"modifier": "pr... | {
"body": "@Test\n public void testDowngradeAuthorizations() {\n HashSet<Authorizations> expected = Sets.newHashSet(new Authorizations(\"A\", \"C\"), new Authorizations(\"A\", \"B\", \"E\"), new Authorizations(\"A\", \"F\", \"G\"));\n assertEquals(expected, AuthorizationsUtil.getDowngradedAuthorizati... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Set<Authorizations> getDowngradedAuthorizations(String requestedAuths, Principal principal) {\n if (principal instanceof DatawavePrincipal) {\n return getDowngradedAuthorizations(requestedAuths, (DatawavePrincipal) principal);\n } else {\n return Collection... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_831 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUidConstructor() {\n String uid = \"uid\";\n IndexMatch indexMatch = new IndexMatch(uid);\n // Assert via getters & direct access\n assertEquals(uid, indexMatch.getUid());\n assertEquals(uid, indexMatch.uid);\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "shard",
"modifier": "protected",
"original_string": "protected String shard;",
"type": "String",
"var_name": "shard"
},
{
"declarator": "uid",
"modifier": "protected",
"original_string": "protected String uid;",
"type": "... | {
"body": "public String getUid() {\n return uid;\n }",
"class_method_signature": "IndexMatch.getUid()",
"constructor": false,
"full_signature": "public String getUid()",
"identifier": "getUid",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_562 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/EvaluationPhaseFilterFunctionsTest.java",
"identifier": "EvaluationPhaseFilterFunctionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLeftOf() {\n // @formatter:off\n String[] inputs = {\n \"NAME.gggparent.ggparent.grandparent_0.parent_0.child_0\",\n \"NAME.gggparent.ggparent.grandparent_0.parent_0.child_0\",\n \"NAME.gggparent.ggparent.grandparent_0.pa... | {
"fields": [
{
"declarator": "EVAL_PHASE_FUNCTION_NAMESPACE = \"filter\"",
"modifier": "public static final",
"original_string": "public static final String EVAL_PHASE_FUNCTION_NAMESPACE = \"filter\";",
"type": "String",
"var_name": "EVAL_PHASE_FUNCTION_NAMESPACE"
},
{
... | {
"body": "public static String getMatchToLeftOfPeriod(String input, int pos) {\n // always peel off the fieldName before the first '.'\n input = input.substring(input.indexOf('.') + 1);\n int[] indices = indicesOf(input, '.');\n if (indices.length < pos + 1)\n throw new Runtime... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_132 | {
"fields": [
{
"declarator": "conf = null",
"modifier": "private",
"original_string": "private Configuration conf = null;",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "ctx = null",
"modifier": "private",
"original_string": "private TaskA... | {
"body": "@Test\n public void testHandlerListNormalizedAlphanumNoSpace() throws Exception {\n \n ctx.getConfiguration().set(\"test\" + \".\" + ALPHANUM_LIST + BaseIngestHelper.FIELD_TYPE, LcNoDiacriticsType.class.getName());\n ctx.getConfiguration().set(\"test\" + \".\" + ContentBaseIngestHel... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ContentIndexingColumnBasedHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ContentIndexingColumnBasedHandler.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n super.setup(context);\n contentHelper = getContentIndexingDataTypeHelper();\n tokenFieldNameSuffix = contentHelper.getTokenFieldNameDesignator();\n Preconditions.checkNotNull(tokenFieldNameSuffix);\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_759 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test\n public void testRanges() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n Assert.assertEquals(\"PROJECT:{lower TO upper}\", luceneParser.parse(\"PROJECT:{lower TO upper}\").getContents());\n Assert.assertEquals(\"PROJECT:{lo*wer TO upper}... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LuceneQueryParser.class.getName())",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LuceneQueryParser.class.getName());",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public datawave.query.language.tree.QueryNode parse(String query) throws ParseException {\n query = query.replaceAll(\"\\\\u0093\", \"\\\"\"); // replace open smart quote 147\n query = query.replaceAll(\"\\\\u0094\", \"\\\"\"); // replace close smart quote 148\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1042 | {
"fields": [
{
"declarator": "q = null",
"modifier": "",
"original_string": "QueryImpl q = null;",
"type": "QueryImpl",
"var_name": "q"
},
{
"declarator": "QUERY_SYNTAX = \"query.syntax\"",
"modifier": "public static final",
"original_string": "public stati... | {
"body": "@Test\n public void testForNPEinAddParam() {\n \n // when no previous parameters were added using setParameters, addParameter used to throw a NPE\n // test passes by not\n try {\n q.addParameter(QUERY_SYNTAX, \"LUCENE\");\n } catch (NullPointerException e) {... | {
"fields": [
{
"declarator": "PARAMETER_SEPARATOR = \";\"",
"modifier": "public static final",
"original_string": "public static final String PARAMETER_SEPARATOR = \";\";",
"type": "String",
"var_name": "PARAMETER_SEPARATOR"
},
{
"declarator": "PARAMETER_NAME_VALUE_SEP... | {
"body": "public void addParameter(String key, String val) {\n Parameter p = new Parameter(key, val);\n this.parameters.add(p);\n this.paramLookup.put(p.getParameterName(), p);\n }",
"class_method_signature": "QueryImpl.addParameter(String key, String val)",
"constructor": false,
"full_... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_309 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/DepthVisitorTest.java",
"identifier": "DepthVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOr2() throws Exception {\n String originalQuery = \"FOO == 'abc' or FOO = 'bcd' or FOO = 'abcdef'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n Assert.assertEquals(2, DepthVisitor.getDepth(script, 3));\n Assert.as... | {
"fields": [
{
"declarator": "maxDepth = 100",
"modifier": "private",
"original_string": "private int maxDepth = 100;",
"type": "int",
"var_name": "maxDepth"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/DepthVisitor.java",
"identifier": "De... | {
"body": "public static int getDepth(JexlNode root, int maxDepth) {\n DepthVisitor vis = new DepthVisitor(maxDepth);\n Depth depth = new Depth();\n root.jjtAccept(vis, depth);\n return depth.getMaxDepth();\n }",
"class_method_signature": "DepthVisitor.getDepth(JexlNode root, int maxD... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_923 | {
"fields": [
{
"declarator": "TYPE1 = \"/type1-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String TYPE1 = \"/type1-config.xml\";",
"type": "String",
"var_name": "TYPE1"
},
{
"declarator": "TYPE2 = \"/type2-config.xml\"",
... | {
"body": "@Test\n public void shouldDetectLeftOnlySettings() {\n CompareResult result = compare.run(type1Conf, type2Conf);\n assertTrue(result.getLeftOnly().contains(\"only.type1.value\"));\n }",
"class_method_signature": "DataTypeConfigCompareTest.shouldDetectLeftOnlySettings()",
"constructo... | {
"fields": [
{
"declarator": "PREFIX = \"data.name\"",
"modifier": "public static final",
"original_string": "public static final String PREFIX = \"data.name\";",
"type": "String",
"var_name": "PREFIX"
}
],
"file": "warehouse/ops-tools/config-compare/src/main/java/datawave/c... | {
"body": "public CompareResult run(Configuration left, Configuration right) {\n SortedSet<String> same = new TreeSet<>();\n SortedSet<String> diff = new TreeSet<>();\n SortedSet<String> leftOnly = new TreeSet<>();\n SortedSet<String> rightOnly = new TreeSet<>();\n \n String ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_5 | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(FlagMaker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(FlagMaker.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@Test\n public void testGetHadoopFS() throws Exception {\n log.info(\"----- testGetHadoopFS -----\");\n File fdir = new File(FLAG_DIR);\n if (fdir.exists())\n fdir.delete();\n FlagMaker instance = new TestWrappedFlagMaker(fmc);\n FileSystem result = instan... | {
"fields": [
{
"declarator": "cc = new GzipCodec()",
"modifier": "private static final",
"original_string": "private static final CompressionCodec cc = new GzipCodec();",
"type": "CompressionCodec",
"var_name": "cc"
},
{
"declarator": "ct = CompressionType.BLOCK",
... | {
"body": "FileSystem getHadoopFS() throws IOException {\n Configuration hadoopConfiguration = new Configuration();\n hadoopConfiguration.set(\"fs.defaultFS\", fmc.getHdfs());\n try {\n return FileSystem.get(hadoopConfiguration);\n } catch (IOException ex) {\n log.err... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_889 | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrieTest.class)",
"modifier": "public static",
"original_string": "public static Logger log = Logger.getLogger(TokenTtlTrieTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "BENCHMARK_SIZE... | {
"body": "@Test\n public void fuzzTtlTrie() {\n List<Long> trieEntries = new ArrayList<>();\n Random r = new Random();\n TokenTtlTrie.Builder builder = new TokenTtlTrie.Builder().setDelimiters(\",;\".getBytes());\n \n long nextKey = 0;\n for (int i = 0; i < BENCHMARK_SIZE... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrie.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TokenTtlTrie.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DELIMITE... | {
"body": "public Long scan(byte[] rawString) {\n int bestPriority = Integer.MAX_VALUE;\n float ttl = 0;\n int curState = 0;\n for (byte b : rawString) {\n short charClass = charClasses[0xff & (int) b];\n if (curState == REJECT_TOKEN) {\n if (charClass ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_470 | {
"fields": [
{
"declarator": "DATATYPE = \"ingest\"",
"modifier": "private static final",
"original_string": "private static final String DATATYPE = \"ingest\";",
"type": "String",
"var_name": "DATATYPE"
},
{
"declarator": "UID = \"uid\"",
"modifier": "private st... | {
"body": "@Test\n public void testExcludeRegexFunctionQuery() throws Exception {\n String originalQuery = \"filter:excludeRegex(FOO, '.*23ab.*')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n ASTJexlScript newScript = FunctionIndexQueryExpansionVisitor.expandFuncti... | {
"fields": [
{
"declarator": "log = Logger.getLogger(EventDataQueryExpressionVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(EventDataQueryExpressionVisitor.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "public static Map<String,ExpressionFilter> getExpressionFilters(ASTJexlScript script, AttributeFactory factory) {\n final EventDataQueryExpressionVisitor v = new EventDataQueryExpressionVisitor(factory);\n \n script.jjtAccept(v, \"\");\n \n return v.getFilterMap();\n }... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_165 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(CBMutationOutputFormatterTest.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger logger = Logger.getLogger(CBMutationOutputFormatterTest.class);",
"type": "Logger",
"var_name": "log... | {
"body": "@Test\n public void testRecordWriterWriteWithUpdatesWithColFamilyTypedWithBadUID() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithUpdatesWithColFamilyTypedWithBadUID called...\");\n \n try {\n \n... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CBMutationOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CBMutationOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
}
],
"fi... | {
"body": "@Override\n public RecordWriter<Text,Mutation> getRecordWriter(TaskAttemptContext attempt) throws IOException {\n return new CBRecordWriter(super.getRecordWriter(attempt), attempt);\n }",
"class_method_signature": "CBMutationOutputFormatter.getRecordWriter(TaskAttemptContext attempt)",
"co... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_535 | {
"fields": [
{
"declarator": "log = Logger.getLogger(JexlASTHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(JexlASTHelperTest.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "warehouse/... | {
"body": "@Test\n public void parse3TrailingBackslashesRegex() throws Exception {\n String query = \"CITY =~ 'city\\\\\\\\\\\\\\\\\\\\\\\\'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assertE... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JexlASTHelper.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(JexlASTHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "AN... | {
"body": "public static ASTJexlScript parseJexlQuery(String query) throws ParseException {\n // Instantiate a parser and visitor\n Parser parser = new Parser(new StringReader(\";\"));\n \n // lowercase all 'and', 'or', and 'not' portions of the query.\n String caseFixQuery = AND_PA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_866 | {
"fields": [
{
"declarator": "builder",
"modifier": "",
"original_string": "UIDBuilder<UID> builder;",
"type": "UIDBuilder<UID>",
"var_name": "builder"
},
{
"declarator": "data = \"20100901: the quick brown fox jumped over the lazy dog\"",
"modifier": "private",
... | {
"body": "@Test\n public void testComparisons() {\n UID a = builder.newId(data.getBytes());\n UID b = builder.newId(data2.getBytes());\n assertTrue(a.compareTo(b) < 0);\n assertTrue(b.compareTo(a) > 0);\n a = builder.newId(data.getBytes(), \"blabla.blabla\");\n b = builde... | {
"fields": [
{
"declarator": "serialVersionUID = 1856715886248436235L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1856715886248436235L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "TOO_B... | {
"body": "@Override\n public int compareTo(final UID uid) {\n int result;\n if (uid instanceof SnowflakeUID) {\n final SnowflakeUID o = (SnowflakeUID) uid;\n final CompareToBuilder compare = new CompareToBuilder();\n if (null == this.snowflake) {\n com... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1054 | {
"fields": [
{
"declarator": "crq = null",
"modifier": "private",
"original_string": "private CachedRunningQuery crq = null;",
"type": "CachedRunningQuery",
"var_name": "crq"
},
{
"declarator": "fixedColumns = StringUtils.join(CacheableQueryRowImpl.getFixedColumnSet(),... | {
"body": "@Test\n public void testColumnThatNeedEscapingInOrderByWithBackTicks() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar\", null, null, \"`foo.bar`\", \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`foo.bar` FROM v WHERE _user_ = 'me' ORDER BY `foo.ba... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_39 | {
"fields": [
{
"declarator": "filter",
"modifier": "",
"original_string": "BloomFilter<String> filter;",
"type": "BloomFilter<String>",
"var_name": "filter"
},
{
"declarator": "logger",
"modifier": "",
"original_string": "Logger logger;",
"type": "Log... | {
"body": "@Test\n public void testTokenize_NoPruning() throws Exception {\n // Create test input\n final NormalizedContentInterface nci = new NormalizedFieldAndValue(\"TEST\", \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n \n // Calculate the expected number of n-grams\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(NGramTokenizationStrategy.class)",
"modifier": "private final",
"original_string": "private final Logger log = Logger.getLogger(NGramTokenizationStrategy.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "public int tokenize(final NormalizedContentInterface content, int maxNGramLength) throws TokenizationException {\n // Initialize return value and try tokenization using the parent\n int ngramCount = super.tokenize(content, maxNGramLength);\n \n // If the parent did not tokenize,... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_466 | {
"fields": [
{
"declarator": "DATATYPE = \"ingest\"",
"modifier": "private static final",
"original_string": "private static final String DATATYPE = \"ingest\";",
"type": "String",
"var_name": "DATATYPE"
},
{
"declarator": "UID = \"uid\"",
"modifier": "private st... | {
"body": "@Test\n public void testRegexHead() throws Exception {\n String originalQuery = \"FOO =~ 'abc.*'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilters(script, attrFa... | {
"fields": [
{
"declarator": "log = Logger.getLogger(EventDataQueryExpressionVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(EventDataQueryExpressionVisitor.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "public static Map<String,ExpressionFilter> getExpressionFilters(ASTJexlScript script, AttributeFactory factory) {\n final EventDataQueryExpressionVisitor v = new EventDataQueryExpressionVisitor(factory);\n \n script.jjtAccept(v, \"\");\n \n return v.getFilterMap();\n }... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_935 | {
"fields": [
{
"declarator": "drm",
"modifier": "private",
"original_string": "private DatawaveRoleManager drm;",
"type": "DatawaveRoleManager",
"var_name": "drm"
},
{
"declarator": "datawavePrincipal",
"modifier": "private",
"original_string": "private Dat... | {
"body": "@Test\n public void testCanRunQuery() {\n \n drm = new DatawaveRoleManager(getFirstRole());\n \n // Expect false when passing in a null Principal object\n boolean canRun = drm.canRunQuery(null, null);\n Assert.assertFalse(canRun);\n \n // Modify th... | {
"fields": [
{
"declarator": "requiredRoles",
"modifier": "private",
"original_string": "private Set<String> requiredRoles;",
"type": "Set<String>",
"var_name": "requiredRoles"
}
],
"file": "web-services/query/src/main/java/datawave/webservice/query/logic/DatawaveRoleManager... | {
"body": "@Override\n public boolean canRunQuery(QueryLogic<?> queryLogic, Principal principal) {\n if (principal instanceof DatawavePrincipal == false)\n return false;\n DatawavePrincipal datawavePrincipal = (DatawavePrincipal) principal;\n if (requiredRoles != null && !requiredRo... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_870 | {
"fields": [],
"file": "warehouse/core/src/test/java/datawave/data/hash/UIDTest.java",
"identifier": "UIDTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testConfigurationViaBuilder() {\n // Test all nulls\n UIDBuilder<UID> builder = UID.builder();\n builder.configure(null, (Option[]) null);\n \n // Test null options\n Configuration configuration = new Con... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(UID.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(UID.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "EMPTY_EXTRAS = {}... | {
"body": "public static UIDBuilder<UID> builder() {\n return HashUID.builder();\n }",
"class_method_signature": "UID.builder()",
"constructor": false,
"full_signature": "public static UIDBuilder<UID> builder()",
"identifier": "builder",
"invocations": [
"builder"
],
"modifiers": "public s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_523 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleLT() throws ParseException {\n String queryString = \"FOO < BAR\";\n String expectedQuery = \"FOO < BAR\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ASTJexlScript negatedScript = RewriteNegationsVisitor.rewrite(script)... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RewriteNegationsVisitor.java",
"identifier": "RewriteNegationsVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"fu... | {
"body": "public static <T extends JexlNode> T rewrite(T node) {\n node.jjtAccept(new RewriteNegationsVisitor(), null);\n return node;\n }",
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"full_signature": "public static T rewrite(T node)",
"identi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_489 | {
"fields": [
{
"declarator": "logAppender",
"modifier": "private static",
"original_string": "private static TestLogAppender logAppender;",
"type": "TestLogAppender",
"var_name": "logAppender"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/Quer... | {
"body": "@Test\n public void notUnknownTest() throws ParseException {\n String query = \"FIELD != 'a'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getState(script));\n \n Asser... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_173 | {
"fields": [
{
"declarator": "PASSWORD = \"passw0rd\"",
"modifier": "public static final",
"original_string": "public static final String PASSWORD = \"passw0rd\";",
"type": "String",
"var_name": "PASSWORD"
},
{
"declarator": "HOST_NAME = \"localhost\"",
"modifier... | {
"body": "@Test(expected = IOException.class)\n public void testUpdateNoFile() throws IOException {\n logger.info(\"testUpdateNoFile called...\");\n setupConfiguration();\n setSplitsCacheDir(String.format(\"/random/dir%s/must/not/exist\", (int) (Math.random() * 100) + 1));\n try {\n ... | {
"fields": [
{
"declarator": "REFRESH_SPLITS = \"datawave.ingest.refresh.splits\"",
"modifier": "public static final",
"original_string": "public static final String REFRESH_SPLITS = \"datawave.ingest.refresh.splits\";",
"type": "String",
"var_name": "REFRESH_SPLITS"
},
{
... | {
"body": "public List<Text> getSplits(String table) throws IOException {\n if (null == this.splits)\n read();\n List<Text> tableSplits = this.splits.get(table);\n if (tableSplits == null) {\n return Collections.emptyList();\n }\n return tableSplits;\n }",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_81 | {
"fields": [
{
"declarator": "agg = new DateIndexDateAggregator()",
"modifier": "",
"original_string": "PropogatingCombiner agg = new DateIndexDateAggregator();",
"type": "PropogatingCombiner",
"var_name": "agg"
}
],
"file": "warehouse/ingest-core/src/test/java/datawave/inge... | {
"body": "@Test\n public void testSingleShard() {\n agg.reset();\n BitSet bitSet = new BitSet(20);\n bitSet.set(20);\n Value val = new Value(bitSet.toByteArray());\n \n Value result = agg.reduce(new Key(\"key\"), Iterators.singletonIterator(val));\n assertNotNull(r... | {
"fields": [],
"file": "warehouse/ingest-core/src/main/java/datawave/ingest/table/aggregator/DateIndexDateAggregator.java",
"identifier": "DateIndexDateAggregator",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateIndexDateAggregator.reduce(Key key, Iterator<Value> iter)",
"con... | {
"body": "@Override\n public Value reduce(Key key, Iterator<Value> iter) {\n byte[] finalBytes = new byte[0];\n int len = finalBytes.length;\n while (iter.hasNext()) {\n byte[] nextBytes = iter.next().get();\n len = (nextBytes.length > len ? nextBytes.length : len);\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_718 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testManditoryFieldEdgeType() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1003 | {
"fields": [
{
"declarator": "MODEL_NAME = \"MODEL\"",
"modifier": "private static final",
"original_string": "private static final String MODEL_NAME = \"MODEL\";",
"type": "String",
"var_name": "MODEL_NAME"
},
{
"declarator": "FIELD_NAME = \"field1\"",
"modifier... | {
"body": "@Test\n public void testForwardMappingParse() throws Exception {\n EasyMock.expect(System.currentTimeMillis()).andReturn(TIMESTAMP);\n PowerMock.replayAll();\n Key k = ModelKeyParser.createKey(FORWARD_FIELD_MAPPING, MODEL_NAME);\n PowerMock.verifyAll();\n Assert.assert... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static Key createKey(FieldMapping mapping, String modelName) {\n ColumnVisibility cv = new ColumnVisibility(mapping.getColumnVisibility());\n \n String inName = Direction.REVERSE.equals(mapping.getDirection()) ? mapping.getFieldName() : mapping.getModelFieldName();\n Stri... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_348 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testNormalizedAndUnNormalizedBoundsCase() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.put(\"NEW\", new LcNoDiacriticsType());\n \n config.setQueryFieldsDatatypes(dataTypes);\n \n String or... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class);",
"type": "Logger",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandTerms(ShardQueryConfiguration config, MetadataHelper helper, T script) {\n ExpandMultiNormalizedTerms visitor = new ExpandMultiNormalizedTerms(config, helper);\n \n if (null == visitor.config.getQueryField... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_962 | {
"fields": [],
"file": "web-services/common-util/src/test/java/datawave/security/util/DnUtilsTest.java",
"identifier": "DnUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testTest() {\n String[] dns = new String[] {\"sdn\"};\n DnUtils.getUserDN(dns, true);\n }",
"class_method_signature": "DnUtilsTest.testTest()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentE... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static String getUserDN(String[] dns) {\n return getUserDN(dns, false);\n }",
"class_method_signature": "DnUtils.getUserDN(String[] dns)",
"constructor": false,
"full_signature": "public static String getUserDN(String[] dns)",
"identifier": "getUserDN",
"invocations": [
"getU... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_431 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testConjunctionWithFlatten() throws ParseException {\n String original = \"a && b && c\";\n optimize(original, original, false, true);\n }",
"class_method_signature": "BooleanOptimizationRebuildingVisitorTest.testConjunctionWithFlatten()",
"constructor": false,
... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BooleanOptimizationRebuildingVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(BooleanOptimizationRebuildingVisitor.class);",
"type": "Logger",
"var_name": ... | {
"body": "public static ASTJexlScript optimize(JexlNode node) {\n if (node == null) {\n return null;\n }\n \n BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();\n \n return (ASTJexlScript) node.jjtAccept(visitor, null);\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_124 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/content/BoundedOffsetQueueTest.java",
"identifier": "BoundedOffsetQueueTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOffsetListComparatorLogic() {\n \n BoundedOffsetQueue boq = new BoundedOffsetQueue(20);\n BoundedOffsetQueue.OffsetListComparator uut = boq.new OffsetListComparator();\n String token = String.format(\"term-%d:zone-%d\", 0, 0);\n \n try {\... | {
"fields": [
{
"declarator": "serialVersionUID = 452499360525244451L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 452499360525244451L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "offsets... | {
"body": "@Override\n public OffsetList addOffset(TermAndZone termAndZone, T offset) {\n String key = termAndZone.getToken();\n queue.remove(key);\n \n List<T> offsets = offsetsMap.remove(key);\n if (null == offsets) {\n offsets = new ArrayList<>();\n }\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_574 | {
"fields": [
{
"declarator": "evaluator",
"modifier": "private",
"original_string": "private WrappedContentOrderedEvaluator evaluator;",
"type": "WrappedContentOrderedEvaluator",
"var_name": "evaluator"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/fun... | {
"body": "@Test\n public void evaluate_notEnoughOffsetsTest() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n evaluator = new WrappedContentOrderedEvaluator(null, 1, new HashMap<>(), \"a\", \"b\", \"c\");\n \n Assert.assertTrue(!evaluator.evaluate(offsets));\n }",
... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ContentOrderedEvaluator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ContentOrderedEvaluator.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "@Override\n protected boolean evaluate(List<List<TermWeightPosition>> offsets) {\n if (offsets.isEmpty() || offsets.size() < terms.length) {\n return false;\n }\n \n NavigableSet<EvaluateTermPosition> termPositions = new TreeSet<>();\n int direction = FORWAR... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_827 | {
"fields": [
{
"declarator": "instance = new InMemoryInstance(RangeStreamTest.class.toString())",
"modifier": "private static",
"original_string": "private static InMemoryInstance instance = new InMemoryInstance(RangeStreamTest.class.toString());",
"type": "InMemoryInstance",
"var_n... | {
"body": "@Test\n public void testPrune() throws Exception {\n String originalQuery = \"FOO=='bag' || FOO=='qwertylikeskeyboards'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n config.setBeginDate(new Date(0));\n config.setEndDate(new Date(System.c... | {
"fields": [
{
"declarator": "MAX_MEDIAN = 20",
"modifier": "private static final",
"original_string": "private static final int MAX_MEDIAN = 20;",
"type": "int",
"var_name": "MAX_MEDIAN"
},
{
"declarator": "log = ThreadConfigurableLogger.getLogger(RangeStream.class)",... | {
"body": "public CloseableIterable<QueryPlan> streamPlans(JexlNode script) {\n JexlNode node = TreeFlatteningRebuildingVisitor.flatten(script);\n \n tree = node;\n \n if (!collapseUids && config.getParseTldUids()) {\n collapseUids = !(EvaluationRendering.canDisableEvalua... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_15 | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(FlagMaker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(FlagMaker.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@Test\n public void testFlagCountExceeded() throws Exception {\n log.info(\"----- testFlagCountExceeded -----\");\n File f = setUpFlagDir();\n \n fmc.setTimeoutMilliSecs(0);\n \n // two days, 5 files each day, two folders in fmc = 20 flags\n LongRange r... | {
"fields": [
{
"declarator": "cc = new GzipCodec()",
"modifier": "private static final",
"original_string": "private static final CompressionCodec cc = new GzipCodec();",
"type": "CompressionCodec",
"var_name": "cc"
},
{
"declarator": "ct = CompressionType.BLOCK",
... | {
"body": "protected void processFlags() throws IOException {\n FileSystem fs = getHadoopFS();\n log.trace(\"Querying for files on {}\", fs.getUri().toString());\n \n for (FlagDataTypeConfig fc : fmc.getFlagConfigs()) {\n String dataName = fc.getDataName();\n fd.setup... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_299 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test11() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"(FOO == 'bar' || FOO != 'bar')\");\n Assert.assertTrue(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test1... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitor.java",
"identifier": "HasTopLevelNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)",
... | {
"body": "public static Boolean hasTopLevelNegation(ASTJexlScript script) {\n HasTopLevelNegationVisitor visitor = new HasTopLevelNegationVisitor();\n \n return visitor.recurseRoot(script);\n }",
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_763 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test\n public void testUnfieldedFunctions() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n \n // parameters to functions do not have to be escaped\n Assert.assertEquals(\"[AND,field:selector][posFilter: filter(true, AND, _ANYFIELD_, tes... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LuceneQueryParser.class.getName())",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LuceneQueryParser.class.getName());",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public datawave.query.language.tree.QueryNode parse(String query) throws ParseException {\n query = query.replaceAll(\"\\\\u0093\", \"\\\"\"); // replace open smart quote 147\n query = query.replaceAll(\"\\\\u0094\", \"\\\"\"); // replace close smart quote 148\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_333 | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableExpansionVisitorTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableExpansionVisitorTest.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Test\n public void testDelayed() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper.parseJexlQuery(\"UUID == 'capone' && (QUOTE == 'kind' || \"\n + \"((ASTDelayedPredicate = true) && BIRTH_DATE == '123'))\");\n \n ShardQueryConfiguration config = Ea... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableExpansionVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableExpansionVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static ASTJexlScript expand(ASTJexlScript script, ShardQueryConfiguration config, MetadataHelper helper) {\n ExecutableExpansionVisitor visitor = new ExecutableExpansionVisitor(config, helper);\n return (ASTJexlScript) script.jjtAccept(visitor, null);\n }",
"class_method_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_626 | {
"fields": [
{
"declarator": "log = Logger.getLogger(DiscoveryIteratorTest.class)",
"modifier": "static final",
"original_string": "static final Logger log = Logger.getLogger(DiscoveryIteratorTest.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "warehouse/query-co... | {
"body": "@Test\n public void testHappyPath() throws Throwable {\n Connector con = new InMemoryInstance(\"DiscoveryIteratorTest\").getConnector(\"root\", new PasswordToken(\"\"));\n con.tableOperations().create(\"index\");\n writeSample(con.createBatchWriter(\"index\", new BatchWriterConfig()... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DiscoveryIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DiscoveryIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Override\n public void next() throws IOException {\n tk = null;\n tv = null;\n \n while (itr.hasTop() && tk == null) {\n Multimap<String,TermInfo> terms = aggregateDate();\n if (terms.isEmpty()) {\n if (log.isTraceEnabled())\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_276 | {
"fields": [
{
"declarator": "visitor",
"modifier": "",
"original_string": "PushdownNegationVisitor visitor;",
"type": "PushdownNegationVisitor",
"var_name": "visitor"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/PushdownNegationVisitorTest.j... | {
"body": "@Test\n public void testMixedBoundedRanges() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"(F3 == 'v3' || !((F1 >= 'v1' && F2 <= 'v2') || !(F1 >= 'v1' && F1 <= 'v2')))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/PushdownNegationVisitor.java",
"identifier": "PushdownNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PushdownNegationVisitor.pushdownNegations(JexlNode tree)",
"constructor":... | {
"body": "public static JexlNode pushdownNegations(JexlNode tree) {\n // flatten the input\n JexlNode flattened = TreeFlatteningRebuildingVisitor.flatten(tree);\n \n flattened.jjtAccept(new PushdownNegationVisitor(), new NegationState(false));\n \n // flatten the result\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_919 | {
"fields": [
{
"declarator": "log = Logger.getLogger(AccumuloIndexAgeDisplayTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(AccumuloIndexAgeDisplayTest.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "@Test\n public void oneHourOldDataIntoDefaultBucketLogOutputTest() {\n // All the data is \"new\" so none should be ready to be aged-off\n loadOneHourData();\n completeSetup(new Integer[0]);\n \n String expectedLogSummary = getOneHourSimulatedLogOutput();\n Stri... | {
"fields": [
{
"declarator": "log = Logger.getLogger(AccumuloIndexAgeDisplay.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(AccumuloIndexAgeDisplay.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public String logAgeSummary() {\n \n StringBuilder sb = new StringBuilder();\n for (int ii = buckets.length - 1; ii >= 0; --ii) {\n sb.append(String.format(\"\\nIndexes older than %1$-3d %2$-6s %3$10d\", buckets[ii], \"days:\", dataBuckets[ii].size()));\n }\n s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_364 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/TreeFlatteningRebuildingVisitorTest.java",
"identifier": "TreeFlatteningRebuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void depthNoStackTraceOrTest() throws Exception {\n final int numTerms = 10000;\n final StringBuilder sb = new StringBuilder(13 * numTerms); // 13 == \"abc_\" + 5 + \" OR \"\n sb.append(\"abc_\" + StringUtils.leftPad(Integer.toString(numTerms, 10), 5, '0'));\n ... | {
"fields": [
{
"declarator": "treeFlatteningRebuilder",
"modifier": "final private",
"original_string": "final private TreeFlatteningRebuilder treeFlatteningRebuilder;",
"type": "TreeFlatteningRebuilder",
"var_name": "treeFlatteningRebuilder"
}
],
"file": "warehouse/query-co... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T flattenAll(T node) {\n return TreeFlatteningRebuilder.flattenAll(node);\n }",
"class_method_signature": "TreeFlatteningRebuildingVisitor.flattenAll(T node)",
"constructor": false,
"full_signature": "@SuppressWarnings... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_734 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private LuceneToJexlControlledQueryParser parser;",
"type": "LuceneToJexlControlledQueryParser",
"var_name": "parser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/pa... | {
"body": "@Test\n public void testTransformsLowerCaseBeforeComparingAgainstAllowed() throws ParseException {\n parser = new LuceneToJexlControlledQueryParser();\n Set<String> allowedFields = new HashSet<>();\n allowedFields.add(\"FIELD1\");\n allowedFields.add(\"FIELD2\");\n all... | {
"fields": [
{
"declarator": "includedValues = new HashMap<>()",
"modifier": "private",
"original_string": "private Map<String,Set<String>> includedValues = new HashMap<>();",
"type": "Map<String,Set<String>>",
"var_name": "includedValues"
},
{
"declarator": "excludedV... | {
"body": "@Override\n public QueryNode parse(String query) throws ParseException {\n \n StringBuilder sb = new StringBuilder();\n boolean addedFirstInclude = false;\n for (Map.Entry<String,Set<String>> entry : includedValues.entrySet()) {\n String field = entry.getKey();\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_42 | {
"fields": [
{
"declarator": "filter",
"modifier": "",
"original_string": "BloomFilter<String> filter;",
"type": "BloomFilter<String>",
"var_name": "filter"
},
{
"declarator": "logger",
"modifier": "",
"original_string": "Logger logger;",
"type": "Log... | {
"body": "@Test\n public void testTokenize_LowDiskSpace() throws Exception {\n // Create test input\n final NormalizedContentInterface nci = new NormalizedFieldAndValue(\"TEST\", \"test\");\n \n // Calculate the expected number of n-grams\n final String fieldValue = nci.getIndex... | {
"fields": [
{
"declarator": "log = Logger.getLogger(NGramTokenizationStrategy.class)",
"modifier": "private final",
"original_string": "private final Logger log = Logger.getLogger(NGramTokenizationStrategy.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "public int tokenize(final NormalizedContentInterface content, int maxNGramLength) throws TokenizationException {\n // Initialize return value and try tokenization using the parent\n int ngramCount = super.tokenize(content, maxNGramLength);\n \n // If the parent did not tokenize,... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_221 | {
"fields": [
{
"declarator": "testRecord",
"modifier": "protected static",
"original_string": "protected static byte[] testRecord;",
"type": "byte[]",
"var_name": "testRecord"
}
],
"file": "warehouse/ingest-json/src/test/java/datawave/ingest/json/config/helper/JsonIngestHelp... | {
"body": "@Test\n public void testGetEventFieldsGROUPED() throws Exception {\n JsonIngestHelper ingestHelper = init(initConfig(FlattenMode.GROUPED));\n \n RawRecordContainer event = new RawRecordContainerImpl();\n event.setDate((new Date()).getTime());\n event.setRawData(testRec... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JsonIngestHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(JsonIngestHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@Override\n public Multimap<String,NormalizedContentInterface> getEventFields(RawRecordContainer event) {\n \n if (null == flattener) {\n throw new IllegalStateException(\"JsonObjectFlattener was not initialized. Method 'setup' must be invoked first\");\n }\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_671 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryIteratorTest.java",
"identifier": "QueryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsDocumentSpecificRange_withDocRange() {\n Key start = new Key(\"20190314_0\", \"dataType\\0doc0\");\n Key end = new Key(\"20190314_0\", \"dataType\\0doc0\\0\");\n Range docRange = new Range(start, end);\n assertTrue(QueryIterator.isDocumentSpecificRan... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "source... | {
"body": "public static boolean isDocumentSpecificRange(Range r) {\n Preconditions.checkNotNull(r);\n \n // Also @see datawave.query.index.lookup.TupleToRange\n // We have already made the assertion that the client is sending us\n // an inclusive start key due to the inability to a... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_558 | {
"fields": [
{
"declarator": "aggregator",
"modifier": "private",
"original_string": "private IdentityAggregator aggregator;",
"type": "IdentityAggregator",
"var_name": "aggregator"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/IdentityAggreg... | {
"body": "@Test\n public void apply_testSeek() throws IOException {\n aggregator = new IdentityAggregator(null, null, 1);\n TreeMap<Key,Value> treeMap = Maps.newTreeMap();\n treeMap.put(getFi(\"123\", \"FIELD1\", \"VALUE1\", \"dataType1\", \"123.345.456\", 10), new Value());\n treeMap.... | {
"fields": [
{
"declarator": "fieldsToKeep",
"modifier": "protected",
"original_string": "protected Set<String> fieldsToKeep;",
"type": "Set<String>",
"var_name": "fieldsToKeep"
},
{
"declarator": "filter",
"modifier": "protected",
"original_string": "prote... | {
"body": "@Override\n public Key apply(SortedKeyValueIterator<Key,Value> itr) throws IOException {\n Key key = itr.getTopKey();\n Text row = key.getRow();\n ByteSequence pointer = parsePointer(key.getColumnQualifierData());\n while (itr.hasTop() && samePointer(row, pointer, itr.getTopK... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_108 | {
"fields": [
{
"declarator": "NUM_REDUCERS = 31",
"modifier": "public static final",
"original_string": "public static final int NUM_REDUCERS = 31;",
"type": "int",
"var_name": "NUM_REDUCERS"
}
],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/partiti... | {
"body": "@Test\n public void testGetPartition() throws Exception {\n Configuration conf = new Configuration();\n String tableName = \"tableX\";\n conf.set(tableName + \".\" + LocalityGroupPartitioner.COLUMN_FAMILIES, \"CITY,STATE\");\n \n LocalityGroupPartitioner partitioner = ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LocalityGroupPartitioner.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LocalityGroupPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@Override\n public int getPartition(BulkIngestKey bKey, Value value, int reducers) {\n Text columnFamily = bKey.getKey().getColumnFamily();\n int index = colFams.indexOf(columnFamily);\n if (index == -1) {\n if (!hasSeenUnknownColFams) {\n log.warn(\"Unexpe... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_54 | {
"fields": [
{
"declarator": "EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0)",
"modifier": "public static",
"original_string": "public static org.apache.hadoop.util.bloom.Key EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0);",
"type": "org.apach... | {
"body": "@Test\n public void testIsRangeInBloomFilter() {\n // key should only be in bloom filter if it contains both the field name (cf) and field value (row)\n org.apache.accumulo.core.data.Key cbKey = new org.apache.accumulo.core.data.Key();\n Assert.assertFalse(\"empty key should not be ... | {
"fields": [
{
"declarator": "EMPTY_BYTES = new byte[0]",
"modifier": "private static final",
"original_string": "private static final byte[] EMPTY_BYTES = new byte[0];",
"type": "byte[]",
"var_name": "EMPTY_BYTES"
}
],
"file": "warehouse/ingest-core/src/main/java/datawave/i... | {
"body": "static boolean isRangeInBloomFilter(Range range) {\n \n /**\n * If the range has no start key or no end key, then ignore the bloom filters\n */\n if (range.getStartKey() == null || range.getEndKey() == null) {\n return false;\n }\n \n /**... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_722 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private LuceneToJexlQueryParser parser;",
"type": "LuceneToJexlQueryParser",
"var_name": "parser"
},
{
"declarator": "anyField = Constants.ANY_FIELD",
"modifier": "private static fi... | {
"body": "@Test\n public void testTokenizedFieldNoAnalyzer() throws ParseException {\n parser.setAnalyzer(null);\n Assert.assertEquals(\"TOKFIELD == '1234 5678 to bird'\", parseQuery(\"TOKFIELD:1234\\\\ 5678\\\\ to\\\\ bird\"));\n Assert.assertEquals(\"TOKFIELD == '1234 5678 to bird'\", parse... | {
"fields": [
{
"declarator": "DEFAULT_TOKENIZED_FIELDS = {\"TOKFIELD\"}",
"modifier": "private static final",
"original_string": "private static final String[] DEFAULT_TOKENIZED_FIELDS = {\"TOKFIELD\"};",
"type": "String[]",
"var_name": "DEFAULT_TOKENIZED_FIELDS"
},
{
... | {
"body": "public void setAnalyzer(Analyzer analyzer) {\n this.analyzer = analyzer;\n }",
"class_method_signature": "LuceneToJexlQueryParser.setAnalyzer(Analyzer analyzer)",
"constructor": false,
"full_signature": "public void setAnalyzer(Analyzer analyzer)",
"identifier": "setAnalyzer",
"invocati... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1039 | {
"fields": [
{
"declarator": "PROXIED_ENTITIES_HEADER = new HttpString(DatawaveAuthenticationMechanism.PROXIED_ENTITIES_HEADER)",
"modifier": "private static final",
"original_string": "private static final HttpString PROXIED_ENTITIES_HEADER = new HttpString(DatawaveAuthenticationMechanism.PROX... | {
"body": "@Test\n public void testNonSSLSimpleLoginFails() throws Exception {\n System.clearProperty(\"dw.trusted.header.authentication\");\n datawaveAuthenticationMechanism = new DatawaveAuthenticationMechanism();\n \n httpRequestHeaders.add(SUBJECT_DN_HEADER, testUserCert.getSubjectD... | {
"fields": [
{
"declarator": "PROXIED_ENTITIES_HEADER = \"X-ProxiedEntitiesChain\"",
"modifier": "public static final",
"original_string": "public static final String PROXIED_ENTITIES_HEADER = \"X-ProxiedEntitiesChain\";",
"type": "String",
"var_name": "PROXIED_ENTITIES_HEADER"
... | {
"body": "@Override\n public AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) {\n // Pull proxied entity info from the headers. If proxied entities are there, but proxied issuers are missing, then fail authentication immediately.\n String prox... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_688 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/logic/NegationFilterTest.java",
"identifier": "NegationFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContains() throws Throwable {\n List<String> filterSet1 = Lists.newArrayList(\"a\", \"b\");\n Itr<String> f1 = new Itr<>(filterSet1);\n List<String> filterSet2 = Lists.newArrayList(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\");\n Itr<String> f2 = new Itr<>... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/iterator/logic/NegationFilter.java",
"identifier": "NegationFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "NegationFilter.isFiltered(T t, TreeMultimap<T,NestedIterator<T>> filters, Util.Transformer<T> tr... | {
"body": "public static <T extends Comparable<T>> boolean isFiltered(T t, TreeMultimap<T,NestedIterator<T>> filters, Util.Transformer<T> transformer) {\n // quick check to see if we already know we're supposed to be filtered\n if (filters.containsKey(t)) {\n return true;\n }\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_372 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/IteratorBuildingVisitorTest.java",
"identifier": "IteratorBuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildLiteralRange_leadingWildcardTest() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"FOO =~ '.*bar'\");\n List<ASTERNode> erNodes = JexlASTHelper.getERNodes(query);\n LiteralRange<?> range = IteratorBuildingVisitor.buildLiteralRa... | {
"fields": [
{
"declarator": "log = Logger.getLogger(IteratorBuildingVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(IteratorBuildingVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private LiteralRange<?> buildLiteralRange(JexlNode source) {\n if (source instanceof ASTERNode)\n return buildLiteralRange(((ASTERNode) source));\n else if (source instanceof ASTNRNode)\n return buildLiteralRange(((ASTNRNode) source));\n else\n return n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_667 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationT... | {
"body": "@Test\n public void testIsTldQuery() {\n Assert.assertFalse(config.isTldQuery());\n \n config.setTldQuery(true);\n Assert.assertTrue(config.isTldQuery());\n }",
"class_method_signature": "ShardQueryConfigurationTest.testIsTldQuery()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "PARAM_VALUE_SEP_STR = new String(new char[] {Constants.PARAM_VALUE_SEP})",
"modifier": "public static final",
"original_string": "public static final String PARAM_VALUE_SEP_STR = new String(new char[] {Constants.PARAM_VALUE_SEP});",
"type": "String",
"v... | {
"body": "public boolean isTldQuery() {\n return tldQuery;\n }",
"class_method_signature": "ShardQueryConfiguration.isTldQuery()",
"constructor": false,
"full_signature": "public boolean isTldQuery()",
"identifier": "isTldQuery",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_237 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckFileWritable() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(true);\n expect(file.isDirectory()).andReturn(false);\n expect(file.canRead()).andReturn(true);\n expect(file.canWrite()).andReturn(false);\... | {
"fields": [
{
"declarator": "NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\"",
"modifier": "private static final",
"original_string": "private static final String NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\";",
"type": "String",
... | {
"body": "public static String checkFile(final File file, final boolean checkWrite) {\n if (file == null)\n throw new IllegalArgumentException(NULL_PARAMS);\n \n if (!file.exists())\n return String.format(FILE_NO_EXIST, file);\n if (file.isDirectory())\n r... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_958 | {
"fields": [
{
"declarator": "rem",
"modifier": "private static",
"original_string": "private static RESTExceptionMapper rem;",
"type": "RESTExceptionMapper",
"var_name": "rem"
}
],
"file": "web-services/common-util/src/test/java/datawave/webservice/common/exception/RESTExce... | {
"body": "@Test\n public void testToResponse_EJBAccessException2() {\n Exception e = new EJBAccessException(\"Caller is legit\");\n StackTraceElement[] traceArr = new StackTraceElement[1];\n traceArr[0] = new StackTraceElement(\"dummyClass\", \"dummyMethod\", null, 0);\n \n e.se... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "RESPONSE_ORIGIN = null",
"modifier... | {
"body": "@Override\n public Response toResponse(Exception e) {\n \n synchronized (lock) {\n if (null == RESPONSE_ORIGIN) {\n RESPONSE_ORIGIN = System.getProperty(\"cluster.name\") + \"/\" + System.getProperty(\"jboss.host.name\");\n }\n }\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_325 | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableExpansionVisitorTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableExpansionVisitorTest.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Test\n public void testMinimumExpansionParse() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper\n .parseJexlQuery(\"UUID == 'capone' && (filter:includeRegex(QUOTE,'.*kind.*') || QUOTE == 'kind' || BIRTH_DATE == '123')\");\n ShardQueryConfiguration config... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableExpansionVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableExpansionVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static ASTJexlScript expand(ASTJexlScript script, ShardQueryConfiguration config, MetadataHelper helper) {\n ExecutableExpansionVisitor visitor = new ExecutableExpansionVisitor(config, helper);\n return (ASTJexlScript) script.jjtAccept(visitor, null);\n }",
"class_method_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_775 | {
"fields": [
{
"declarator": "equality = new TLDEquality()",
"modifier": "private",
"original_string": "private TLDEquality equality = new TLDEquality();",
"type": "TLDEquality",
"var_name": "equality"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/function/... | {
"body": "@Test\n public void testSameParent() {\n Key docKey = new Key(\"row\", \"parent.document.id\");\n Key otherKey = new Key(\"row\", \"parent.document.id\");\n assertTrue(equality.partOf(docKey, otherKey));\n assertTrue(equality.partOf(otherKey, docKey));\n }",
"class_metho... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/function/TLDEquality.java",
"identifier": "TLDEquality",
"interfaces": "implements Equality",
"methods": [
{
"class_method_signature": "TLDEquality.partOf(Key key, Key other)",
"constructor": false,
"full_signatur... | {
"body": "@Override\n public boolean partOf(Key key, Key other) {\n ByteSequence docCF = TLD.estimateRootPointerFromId(key.getColumnFamilyData());\n ByteSequence otherCF = TLD.estimateRootPointerFromId(other.getColumnFamilyData());\n return otherCF.equals(docCF);\n }",
"class_method_sign... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_260 | {
"fields": [
{
"declarator": "visitor",
"modifier": "",
"original_string": "PushdownNegationVisitor visitor;",
"type": "PushdownNegationVisitor",
"var_name": "visitor"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/PushdownNegationVisitorTest.j... | {
"body": "@Test\n public void testAnd() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1' && F2 == 'v2')\");\n visitor.visit(query, null);\n Assert.assertEquals(\"((!(F1 == 'v1') || !(F2 == 'v2')))\", JexlStringBuildingVisitor.buildQuery(query));\n ... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/PushdownNegationVisitor.java",
"identifier": "PushdownNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PushdownNegationVisitor.pushdownNegations(JexlNode tree)",
"constructor":... | {
"body": "@Override\n public Object visit(ASTNotNode node, Object data) {\n // if there is already a negation passed down it should negate this node and continue down the tree to check for other negations\n if (data != null && ((NegationState) data).isNegated()) {\n JexlNode nextNode = dr... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_630 | {
"fields": [
{
"declarator": "filter",
"modifier": "private",
"original_string": "private TLDEventDataFilter filter;",
"type": "TLDEventDataFilter",
"var_name": "filter"
},
{
"declarator": "mockScript",
"modifier": "private",
"original_string": "private AST... | {
"body": "@Test\n public void getCurrentField_standardTest() {\n expect(mockScript.jjtGetNumChildren()).andReturn(0).anyTimes();\n expect(mockScript.jjtAccept(isA(EventDataQueryExpressionVisitor.class), eq(\"\"))).andReturn(null);\n \n replayAll();\n \n // expected key st... | {
"fields": [
{
"declarator": "FI_CF = new Text(\"fi\").getBytes()",
"modifier": "public static final",
"original_string": "public static final byte[] FI_CF = new Text(\"fi\").getBytes();",
"type": "byte[]",
"var_name": "FI_CF"
},
{
"declarator": "TF_CF = Constants.TERM... | {
"body": "protected String getCurrentField(Key current) {\n ByteSequence cf = current.getColumnFamilyData();\n \n if (WritableComparator.compareBytes(cf.getBackingArray(), 0, 2, FI_CF, 0, 2) == 0) {\n ArrayList<Integer> nullIndexes = TLD.instancesOf(0, cf, 1);\n final int s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_519 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConjunctionOfNEAndNestedNeAndEQ() throws ParseException {\n String queryString = \"FOO != BAR && (BAR != FOO && BAR == CAT)\";\n String expectedQuery = \"!(FOO == BAR) && (!(BAR == FOO) && BAR == CAT)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(q... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RewriteNegationsVisitor.java",
"identifier": "RewriteNegationsVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"fu... | {
"body": "public static <T extends JexlNode> T rewrite(T node) {\n node.jjtAccept(new RewriteNegationsVisitor(), null);\n return node;\n }",
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"full_signature": "public static T rewrite(T node)",
"identi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_149 | {
"fields": [
{
"declarator": "FILE_SYSTEM_URI = URI.create(\"file:///\")",
"modifier": "protected static final",
"original_string": "protected static final URI FILE_SYSTEM_URI = URI.create(\"file:///\");",
"type": "URI",
"var_name": "FILE_SYSTEM_URI"
},
{
"declarator":... | {
"body": "@Test\n public void testMarkJobDirectoryFailedFailedRenameAndCreate() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testMarkJobDirectoryFailedFailedRenameAndCreate called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.cl... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BulkIngestMapFileLoader.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(BulkIngestMapFileLoader.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public boolean markJobDirectoryFailed(URI workingHdfs, Path jobDirectory) {\n boolean success = false;\n try {\n FileSystem fs = getFileSystem(workingHdfs);\n success = fs.rename(new Path(jobDirectory, LOADING_FILE_MARKER), new Path(jobDirectory, FAILED_FILE_MARKER));\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_978 | {
"fields": [
{
"declarator": "USER_DN = \"userDN\"",
"modifier": "private static final",
"original_string": "private static final String USER_DN = \"userDN\";",
"type": "String",
"var_name": "USER_DN"
},
{
"declarator": "ISSUER_DN = \"issuerDN\"",
"modifier": "pr... | {
"body": "@Test\n public void testUnionWithBothEmptyAuthorizations() {\n assertEquals(new Authorizations(), AuthorizationsUtil.union(new Authorizations(), new Authorizations()));\n }",
"class_method_signature": "AuthorizationsUtilTest.testUnionWithBothEmptyAuthorizations()",
"constructor": false,
... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Authorizations union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2) {\n LinkedList<byte[]> aggregatedAuthorizations = Lists.newLinkedList();\n addTo(aggregatedAuthorizations, authorizations1);\n addTo(aggregatedAuthorizations, authorizations2);\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_581 | {
"fields": [
{
"declarator": "evaluator",
"modifier": "private",
"original_string": "private WrappedContentOrderedEvaluator evaluator;",
"type": "WrappedContentOrderedEvaluator",
"var_name": "evaluator"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/fun... | {
"body": "@Test\n public void evaluate_pruneTopAndBottomTest() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(3, 4, 5, 6);\n List<TermWeightPosition> offsetsB = asList(7, 9, 22);\n List<TermWeightPosition> offsetsC = asList(... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ContentOrderedEvaluator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ContentOrderedEvaluator.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "@Override\n protected boolean evaluate(List<List<TermWeightPosition>> offsets) {\n if (offsets.isEmpty() || offsets.size() < terms.length) {\n return false;\n }\n \n NavigableSet<EvaluateTermPosition> termPositions = new TreeSet<>();\n int direction = FORWAR... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_997 | {
"fields": [
{
"declarator": "filter",
"modifier": "private",
"original_string": "private CreateQuerySessionIDFilter filter;",
"type": "CreateQuerySessionIDFilter",
"var_name": "filter"
},
{
"declarator": "request",
"modifier": "private",
"original_string":... | {
"body": "@Test\n public void filter() throws Exception {\n EasyMock.expect(method.getMethodAnnotations()).andReturn(new Annotation[] {annotation});\n replayAll();\n \n CreateQuerySessionIDFilter.QUERY_ID.set(\"1234\");\n filter.filter(request, response);\n \n NewC... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CreateQuerySessionIDFilter.class)",
"modifier": "private final",
"original_string": "private final Logger log = Logger.getLogger(CreateQuerySessionIDFilter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Override\n public void filter(ContainerRequestContext request, ContainerResponseContext response) throws IOException {\n ResourceMethodInvoker method = (ResourceMethodInvoker) request.getProperty(ResourceMethodInvoker.class.getName());\n \n GenerateQuerySessionId annotation = FindA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_647 | {
"fields": [
{
"declarator": "row = \"20190314\"",
"modifier": "private final",
"original_string": "private final String row = \"20190314\";",
"type": "String",
"var_name": "row"
},
{
"declarator": "field = \"FIELD_A\"",
"modifier": "private final",
"origin... | {
"body": "@Test\n public void testParseRootPointerFromId_String() {\n assertEquals(rootId, TLD.parseRootPointerFromId(rootId));\n assertEquals(rootId, TLD.parseRootPointerFromId(childId));\n assertEquals(rootId, TLD.parseRootPointerFromId(grandchildId));\n }",
"class_method_signature": "... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/tld/TLD.java",
"identifier": "TLD",
"interfaces": "",
"methods": [
{
"class_method_signature": "TLD.TLD()",
"constructor": true,
"full_signature": "private TLD()",
"identifier": "TLD",
"modifiers": "p... | {
"body": "public static ByteSequence parseRootPointerFromId(ByteSequence id) {\n ArrayList<Integer> dots = instancesOf('.', id);\n int stop;\n if (dots.size() > 2) {\n stop = dots.get(2);\n } else {\n stop = id.length();\n }\n return id.subSequence(0, s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.