id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_293 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test5() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO == 'bar' && FOO != 'bar'\");\n Assert.assertTrue(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test5()"... | {
"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_769 | {
"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 testFunctionEscaping1() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n Assert.assertEquals(\"[AND,field:selector][posFilter: filter(true, AND, field, fn(xxx,yyy))]\",\n luceneParser.parse(\"field:selector AND... | {
"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_786 | {
"fields": [
{
"declarator": "equality",
"modifier": "private",
"original_string": "private AncestorEquality equality;",
"type": "AncestorEquality",
"var_name": "equality"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/function/AncestorEqualityTest.java",
... | {
"body": "@Test\n public void testSubstringReject() {\n Key key = new Key(\"abc\", \"1234.123.12345\");\n Key other = new Key(\"abc\", \"1234.123.1234\");\n assertFalse(equality.partOf(key, other));\n }",
"class_method_signature": "AncestorEqualityTest.testSubstringReject()",
"construc... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/function/AncestorEquality.java",
"identifier": "AncestorEquality",
"interfaces": "implements Equality",
"methods": [
{
"class_method_signature": "AncestorEquality.partOf(Key key, Key other)",
"constructor": false,
... | {
"body": "@Override\n public boolean partOf(Key key, Key other) {\n String docId = key.getColumnFamily().toString();\n String otherId = other.getColumnFamily().toString();\n return docId.startsWith(otherId + DEFAULT_SEPARATOR) || docId.equals(otherId);\n }",
"class_method_signature": "An... | {
"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_801 | {
"fields": [
{
"declarator": "intersector",
"modifier": "private",
"original_string": "private AncestorUidIntersector intersector;",
"type": "AncestorUidIntersector",
"var_name": "intersector"
},
{
"declarator": "uids1",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testEmptyUids1() {\n uids2.add(new IndexMatch(\"a.b.c\", node1));\n \n Set<IndexMatch> result = intersector.intersect(uids1, uids2, Collections.EMPTY_LIST);\n \n Assert.assertNotNull(result);\n Assert.assertTrue(\"expected size 0, got \" + re... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/ancestor/AncestorUidIntersector.java",
"identifier": "AncestorUidIntersector",
"interfaces": "implements UidIntersector",
"methods": [
{
"class_method_signature": "AncestorUidIntersector.intersect(Set<IndexMatch> uids1, Set<I... | {
"body": "@Override\n public Set<IndexMatch> intersect(Set<IndexMatch> uids1, Set<IndexMatch> uids2, List<JexlNode> delayedNodes) {\n /*\n * C) Both are small, so we have an easy case where we can prune much of this sub query. Must propagate delayed nodes, though.\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_102 | {
"fields": [
{
"declarator": "TABLE_NAME = \"abc\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_NAME = \"abc\";",
"type": "String",
"var_name": "TABLE_NAME"
},
{
"declarator": "configuration",
"modifier": "",
"... | {
"body": "@Test\n public void testGoodSplitsFile() throws IOException, URISyntaxException {\n mockContextForLocalCacheFile(createUrl(\"trimmed_splits.txt\"));\n Assert.assertEquals(5, getPartition());\n }",
"class_method_signature": "MultiTableRangePartitionerTest.testGoodSplitsFile()",
"cons... | {
"fields": [
{
"declarator": "PREFIX = MultiTableRangePartitioner.class.getName()",
"modifier": "private static final",
"original_string": "private static final String PREFIX = MultiTableRangePartitioner.class.getName();",
"type": "String",
"var_name": "PREFIX"
},
{
"d... | {
"body": "@Override\n public int getPartition(BulkIngestKey key, Value value, int numPartitions) {\n readCacheFilesIfNecessary();\n \n String tableName = key.getTableName().toString();\n Text[] cutPointArray = splitsByTable.get().get(tableName);\n \n if (null == cutPointA... | {
"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_552 | {
"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 parseRegexWithEscapedQuoteAndBackslashesTest() throws Exception {\n String query = \"CITY =~ 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty\\\\\\\\.bl\\\\\\\\\\\\'ah'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.b... | {
"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_417 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceTwoRanges() throws ParseException {\n String originalQuery = \"NUM >= '+aE2' && NUM <= '+aE5'\";\n String expectedQuery = \"(NUM >= '+aE2' && NUM <= '+aE5')\";\n \n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n AS... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(RangeCoalescingVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(RangeCoalescingVisitor.class);",
"type": "Logger",
"var... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T coalesceRanges(T script) {\n RangeCoalescingVisitor visitor = new RangeCoalescingVisitor();\n \n return (T) script.jjtAccept(visitor, null);\n }",
"class_method_signature": "RangeCoalescingVisitor.coalesceR... | {
"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_944 | {
"fields": [
{
"declarator": "query = null",
"modifier": "private",
"original_string": "private RunningQuery query = null;",
"type": "RunningQuery",
"var_name": "query"
},
{
"declarator": "bean = null",
"modifier": "private",
"original_string": "private Que... | {
"body": "@SuppressWarnings({\"rawtypes\", \"unchecked\"})\n @Test\n public void testListRunningQueries() throws Exception {\n // Set expectations\n expect(altCache.iterator()).andReturn((Iterator<RunningQuery>) new HashMap().values().iterator());\n Map<String,Pair<QueryLogic<?>,Connector>... | {
"fields": [
{
"declarator": "cache",
"modifier": "@Inject\n private",
"original_string": "@Inject\n private QueryCache cache;",
"type": "QueryCache",
"var_name": "cache"
},
{
"declarator": "query",
"modifier": "@Inject\n private",
"original_string... | {
"body": "@RolesAllowed({\"Administrator\", \"JBossAdministrator\"})\n @JmxManaged\n public String listRunningQueries() {\n RunningQueries rq = getRunningQueries();\n StringBuilder buf = new StringBuilder();\n for (String query : rq.getQueries()) {\n buf.append(query).append(\"\... | {
"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_694 | {
"fields": [
{
"declarator": "PASSWORD = \"\"",
"modifier": "private static final",
"original_string": "private static final String PASSWORD = \"\";",
"type": "String",
"var_name": "PASSWORD"
},
{
"declarator": "instance",
"modifier": "private static",
"ori... | {
"body": "@Test\n public void testScannerSessionWithBatchResourceLowMaxResults() throws TableNotFoundException {\n Set<Authorizations> auths = new HashSet<>();\n auths.add(new Authorizations());\n ScannerSession ss = new ScannerSession(\"testTable\", auths, resourceQueue, 5, null);\n s... | {
"fields": [
{
"declarator": "lastSeenKey",
"modifier": "protected",
"original_string": "protected Key lastSeenKey;",
"type": "Key",
"var_name": "lastSeenKey"
},
{
"declarator": "ranges",
"modifier": "protected",
"original_string": "protected ConcurrentLink... | {
"body": "public void setResourceClass(Class<? extends AccumuloResource> clazz) {\n delegatedResourceInitializer = clazz;\n }",
"class_method_signature": "ScannerSession.setResourceClass(Class<? extends AccumuloResource> clazz)",
"constructor": false,
"full_signature": "public void setResourceClass(C... | {
"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_1025 | {
"fields": [
{
"declarator": "NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, c=us\"",
"modifier": "private static final",
"original_string": "private static final String NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, ... | {
"body": "@Test\n public void testSuccessfulLogin() throws Exception {\n String name = testUserCert.getSubjectDN().getName() + \"<\" + testUserCert.getIssuerDN().getName() + \">\";\n callbackHandler.setSecurityInfo(new SimplePrincipal(name), new DatawaveCredential(testUserCert.getSubjectDN().getName... | {
"fields": [
{
"declarator": "createSimplePrincipal = new ThreadLocal<>()",
"modifier": "private",
"original_string": "private ThreadLocal<Boolean> createSimplePrincipal = new ThreadLocal<>();",
"type": "ThreadLocal<Boolean>",
"var_name": "createSimplePrincipal"
}
],
"file":... | {
"body": "@Override\n public boolean login() throws LoginException {\n boolean success = super.login();\n \n int roleCount = 0;\n Group[] roleSets = getRoleSets();\n if (roleSets != null) {\n for (Group roleSet : roleSets) {\n for (Enumeration<? extends... | {
"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_48 | {
"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_StrategyStack() throws Exception {\n // Create test input\n final Vector<NormalizedContentInterface> ncis = new Vector<>();\n int fieldNameExtension = 1;\n ncis.add(this.createNormalizedFieldAndValue(fieldNameExtension++, 5));\n ncis.ad... | {
"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_381 | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Test\n public void multipleMappingsWithBoundsIdentity() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"CYCLIC_FIELD > 'a' && CYCLIC_FIELD < 'z'\");\n ASTJexlScript expectedScript = JexlASTHelper\n .parseJexlQuery(\"(CYCLIC_FIELD > 'a... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "l... | {
"body": "public static ASTJexlScript applyModel(ASTJexlScript script, QueryModel queryModel, Set<String> validFields) {\n QueryModelVisitor visitor = new QueryModelVisitor(queryModel, validFields);\n \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_544 | {
"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 parse2InteriorBackslashesEquals() throws Exception {\n String query = \"CITY == 'ci\\\\\\\\\\\\\\\\ty'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assertEquals(q... | {
"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_114 | {
"fields": [
{
"declarator": "NUM_REDUCERS = 1000",
"modifier": "private static final",
"original_string": "private static final int NUM_REDUCERS = 1000;",
"type": "int",
"var_name": "NUM_REDUCERS"
}
],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/p... | {
"body": "@Test(expected = Exception.class)\n public void testNoMaxPartitions() {\n LimitedKeyPartitioner partitioner = new LimitedKeyPartitioner();\n partitioner.getPartition(createKeyFor(\"\"), new Value(), NUM_REDUCERS);\n }",
"class_method_signature": "LimitedKeyPartitionerTest.testNoMaxPar... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LimitedKeyPartitioner.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LimitedKeyPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "co... | {
"body": "@Override\n public int getPartition(BulkIngestKey bKey, Value value, int numPartitions) {\n // ensure this returns a positive value (note Math.abs does not always return a positive number, go figure)\n int partitioner = getKeyHashcode(bKey) & Integer.MAX_VALUE;\n return partitionLim... | {
"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_817 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/EntryParserTest.java",
"identifier": "EntryParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParse_skipNodeDelay() throws IOException {\n TreeMap<Key,Value> data = new TreeMap<>();\n List<String> docIds = Arrays.asList(\"doc1\", \"doc2\", \"doc3\", \"doc4\");\n Uid.List.Builder builder = Uid.List.newBuilder();\n builder.addAllUID(docIds);\n ... | {
"fields": [
{
"declarator": "currNode",
"modifier": "protected",
"original_string": "protected ASTEQNode currNode;",
"type": "ASTEQNode",
"var_name": "currNode"
},
{
"declarator": "fieldName",
"modifier": "protected",
"original_string": "protected String f... | {
"body": "@Override\n public Tuple2<String,IndexInfo> apply(Entry<Key,Value> entry) {\n IndexInfo info = new IndexInfo();\n try {\n info.readFields(new DataInputStream(new ByteArrayInputStream(entry.getValue().get())));\n } catch (IOException e) {\n return 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_952 | {
"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_WrappedQueryException() {\n Exception e = new WebApplicationException(new QueryException(\"top-level\", new QueryException(\"bottom-level\", \"567-8\"), \"123-4\"));\n StackTraceElement[] traceArr = new StackTraceElement[1];\n traceArr[0] = new Sta... | {
"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_401 | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Test\n public void testNullInQuery() throws ParseException {\n model.addTermToModel(\"FOO1\", \"1BAR\");\n model.addTermToModel(\"FOO1\", \"2BAR\");\n \n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO1 == 'baz' && FOO1 == null\");\n ASTJexlScript expectedSc... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "l... | {
"body": "public static ASTJexlScript applyModel(ASTJexlScript script, QueryModel queryModel, Set<String> validFields) {\n QueryModelVisitor visitor = new QueryModelVisitor(queryModel, validFields);\n \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_682 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFetchDataTypeKeysFromEmptyString() {\n String data = \"\";\n Set<String> expectedDataTypeKeys = Sets.newHashSet();\n Set<String> dataTypeKeys = QueryOptions.fetchDataTypeKeys(data);\n assertEquals(\"Failed to parse empty option string\", expectedDataTy... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryOptions.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryOptions.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "fileSyst... | {
"body": "public static Set<String> fetchDataTypeKeys(String data) {\n Set<String> keys = Sets.newHashSet();\n if (org.apache.commons.lang3.StringUtils.isNotBlank(data)) {\n String[] entries = StringUtils.split(data, ';');\n for (String entry : entries) {\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_1033 | {
"fields": [
{
"declarator": "ccb",
"modifier": "private",
"original_string": "private CredentialsCacheBean ccb;",
"type": "CredentialsCacheBean",
"var_name": "ccb"
},
{
"declarator": "authManager",
"modifier": "@Inject\n private",
"original_string": "@I... | {
"body": "@Test\n public void testListDNs() throws Exception {\n ArrayList<String> expectedDns = Lists.newArrayList(\"user2<issuer2>\", \"server1<issuer1>\", \"user1<issuer1>\");\n DnList dnList = ccb.listDNs(false);\n assertEquals(3, dnList.getDns().size());\n assertEquals(expectedDns... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected",
"original_string": "protected Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "authManager",
"modifier": ... | {
"body": "@GET\n @Path(\"/listDNs\")\n @Produces({\"text/plain\", \"application/xml\", \"text/xml\", \"application/json\", \"text/html\"})\n @JmxManaged\n public DnList listDNs(@QueryParam(\"localOnly\") boolean localOnly) {\n DnList result;\n if (!cachedDatawaveUserServiceInstance.isUnsati... | {
"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_378 | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Test\n public void singleTermMappingNot() throws ParseException {\n for (int i = 0; i < 1000; i++) {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO != 'baz'\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"(BAR1 != 'baz' && BAR2 != 'baz')\");... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "l... | {
"body": "public static ASTJexlScript applyModel(ASTJexlScript script, QueryModel queryModel, Set<String> validFields) {\n QueryModelVisitor visitor = new QueryModelVisitor(queryModel, validFields);\n \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_728 | {
"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 testIsNotNull() throws ParseException {\n Assert.assertEquals(\"F == 'S' && not(filter:isNull(FOO))\", parser.parse(\"F:S #ISNOTNULL(FOO)\").getOriginalQuery());\n }",
"class_method_signature": "TestLuceneToJexlQueryParser.testIsNotNull()",
"constructor": false,
"full... | {
"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": "@Override\n public QueryNode parse(String query) throws ParseException {\n JexlNode parsedQuery = convertToJexlNode(query);\n QueryNode node = new ServerHeadNode();\n node.setOriginalQuery(parsedQuery.toString());\n return node;\n }",
"class_method_signature": "LuceneToJ... | {
"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_397 | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Test\n public void testMoreMethods() throws ParseException {\n // @formatter:off\n String[] queries = {\n \"NAM.size()\",\n \"(NAM).size()\",\n \"(NAME).size()\",\n \"NAM.values()\",\n \"NAM.getGroupsForValue(FOO)\... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(QueryModelVisitor.class);",
"type": "Logger",
"var_name": "l... | {
"body": "public static ASTJexlScript applyModel(ASTJexlScript script, QueryModel queryModel, Set<String> validFields) {\n QueryModelVisitor visitor = new QueryModelVisitor(queryModel, validFields);\n \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_840 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/CreateUidsIteratorTest.java",
"identifier": "CreateUidsIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testShardEquals() {\n assertTrue(CreateUidsIterator.sameShard(new Key(\"row\", \"cf\", \"shard_1\"), new Key(\"row2\", \"cf2\", \"shard_1\\u0000fds\")));\n assertFalse(CreateUidsIterator.sameShard(new Key(\"row\", \"cf\", \"shard_1\"), new Key(\"row2\", \"cf2\", \"shard... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CreateUidsIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CreateUidsIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "public static boolean sameShard(Key ref, Key test) {\n ByteSequence refCq = ref.getColumnQualifierData();\n ByteSequence testCq = test.getColumnQualifierData();\n if (testCq.length() < refCq.length()) {\n return false;\n }\n for (int i = 0; i < refCq.length(); ... | {
"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_143 | {
"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 testTakeOwnershipJobDirectoryFailedOwnershipExchangeLoading() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testTakeOwnershipJobDirectoryFailedOwnershipExchangeLoading called...\");\n \n try {\n \n URL url = BulkIn... | {
"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 takeOwnershipJobDirectory(Path jobDirectory) {\n boolean success = false;\n try {\n FileSystem fs = getFileSystem(srcHdfs);\n \n try {\n success = fs.rename(new Path(jobDirectory, COMPLETE_FILE_MARKER), new Path(jobDirectory, LOAD... | {
"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_513 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleEQ() throws ParseException {\n String queryString = \"FOO == BAR\";\n String expectedQuery = \"FOO == BAR\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ASTJexlScript negatedScript = RewriteNegationsVisitor.rewrite(scrip... | {
"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_456 | {
"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 @Ignore\n // TODO: will we ever be able to get this to work?\n public void testRangeFunction() throws Exception {\n String originalQuery = \"f:between(BAZ,5,12)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter... | {
"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_905 | {
"fields": [
{
"declarator": "standardKey",
"modifier": "private",
"original_string": "private Key standardKey;",
"type": "Key",
"var_name": "standardKey"
},
{
"declarator": "standardValue",
"modifier": "private",
"original_string": "private Value standardV... | {
"body": "@Test\n public void testDecodeDurationHistogramWithNonProtoValue() {\n // only set 3 durations instead of the expected 7\n List<Long> incompleteList = createIncompleteHistogram();\n \n Value nonProtoValue = new Value(new SummingArrayCombiner.VarLongArrayEncoder().encode(incom... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ACTIVITY_HISTOGRAM_LENGTH = 24",
"... | {
"body": "public static List<Long> decodeDurationHistogram(Value value) {\n try {\n return decodeDurationHistogram(EdgeData.EdgeValue.parseFrom(value.get()).getDurationList());\n } catch (InvalidProtocolBufferException e) {\n // Probably an old edge value\n return decod... | {
"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_285 | {
"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 testApplyDeMorgansNegateOrRoot() {\n JexlNode child1 = JexlNodeFactory.buildEQNode(\"f1\", \"v1\");\n JexlNode child2 = JexlNodeFactory.buildEQNode(\"f2\", \"v2\");\n List<JexlNode> children = new ArrayList<>();\n children.add(child1);\n children.ad... | {
"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 applyDeMorgans(JexlNode root, boolean negateRoot) {\n if (root == null) {\n throw new IllegalArgumentException(\"root must not be null\");\n }\n \n if (root.jjtGetNumChildren() == 0) {\n throw new IllegalStateException(\"root must hav... | {
"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_1064 | {
"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 testUpdate() throws Exception {\n \n String sql = crq.generateSql(\"v\", \"foo.bar\", null, null, null, \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`foo.bar` FROM v WHERE _user_ = 'me'\", sql);\n \n PowerMock.field(CachedRun... | {
"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 boolean update(String fields, String conditions, String grouping, String order, Integer pagesize) throws SQLException {\n try {\n boolean mustInitialize = false;\n boolean fieldChanged = false;\n \n if (!StringUtils.equals(this.fields, fields) || th... | {
"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_790 | {
"fields": [
{
"declarator": "intersector",
"modifier": "private",
"original_string": "private AncestorUidIntersector intersector;",
"type": "AncestorUidIntersector",
"var_name": "intersector"
},
{
"declarator": "uids1",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testCommonUids1() {\n uids1.add(new IndexMatch(\"a.b.c.1.1\", node1));\n uids2.add(new IndexMatch(\"a.b.c\", node2));\n \n Set<IndexMatch> result = intersector.intersect(uids1, uids2, Collections.EMPTY_LIST);\n \n Assert.assertNotNull(result)... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/ancestor/AncestorUidIntersector.java",
"identifier": "AncestorUidIntersector",
"interfaces": "implements UidIntersector",
"methods": [
{
"class_method_signature": "AncestorUidIntersector.intersect(Set<IndexMatch> uids1, Set<I... | {
"body": "@Override\n public Set<IndexMatch> intersect(Set<IndexMatch> uids1, Set<IndexMatch> uids2, List<JexlNode> delayedNodes) {\n /*\n * C) Both are small, so we have an easy case where we can prune much of this sub query. Must propagate delayed nodes, though.\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_91 | {
"fields": [
{
"declarator": "FIELD_NAME = \"FIELD_NAME\"",
"modifier": "private static final",
"original_string": "private static final String FIELD_NAME = \"FIELD_NAME\";",
"type": "String",
"var_name": "FIELD_NAME"
},
{
"declarator": "FIELD_TO_COUNT = \"FIELD_1\"",
... | {
"body": "@Test\n public void testCreatesBoth() throws IOException {\n setupMocks();\n \n helper.addReverseIndexedField(FIELD_TO_COUNT);\n helper.addIndexedField(FIELD_TO_COUNT);\n \n RawRecordMetadata eventMetadata = new EventMetadata(null, METADATA_TABLE_NAME, LOADDATES... | {
"fields": [
{
"declarator": "compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI)",
"modifier": "private",
"original_string": "private MetadataWithMostRecentDate compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI);",
"type": ... | {
"body": "@Override\n public void addEvent(IngestHelperInterface helper, RawRecordContainer event, Multimap<String,NormalizedContentInterface> fields, long loadTimeInMillis) {\n addEvent(helper, event, fields, this.frequency, INCLUDE_LOAD_DATES, loadTimeInMillis);\n }",
"class_method_signature": "Even... | {
"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_1013 | {
"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 testKeyWithInvalidDirection() throws Exception {\n Key keyWrongDirection = new Key(MODEL_FIELD_NAME, MODEL_NAME, FIELD_NAME + ModelKeyParser.NULL_BYTE + \"someInvalidDirection\", COLVIZ, TIMESTAMP);\n ModelKeyParser.parseKey(ke... | {
"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_358 | {
"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 testFilterFunctionNormalizationWithUnIndexedNumeric() throws ParseException {\n // Empty field-datatype multi-map\n config.setQueryFieldsDatatypes(HashMultimap.create());\n \n String original = \"filter:includeRegex(NUM, '1')\";\n expandTerms(origin... | {
"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_708 | {
"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 testNoAttribute1Source() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST6' AND RELATION == 'REL1-REL2'\");\n String transformed = logic.getEventQuery(query);\n \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_972 | {
"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 testBuildNormalizedDNListSubjectDNInIssuer() {\n DnUtils.buildNormalizedDNList(\"SDN\", \"IDN\", \"SDN2\", \"CN=foo,OU=My Department\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedDNListSubjectDNInIssuer()",
... | {
"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_421 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceRangeWithAnchorTerm2() throws ParseException {\n String originalQuery = \"(FOO >= 'bar' && FOO <= 'bas') && TACO == 'tacocat'\";\n // Ordering of query terms is not deterministic\n String expectedQuery = \"TACO == 'tacocat' && (FOO >= 'bar' && FOO <= ... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(RangeCoalescingVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(RangeCoalescingVisitor.class);",
"type": "Logger",
"var... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T coalesceRanges(T script) {\n RangeCoalescingVisitor visitor = new RangeCoalescingVisitor();\n \n return (T) script.jjtAccept(visitor, null);\n }",
"class_method_signature": "RangeCoalescingVisitor.coalesceR... | {
"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_564 | {
"fields": [
{
"declarator": "aggregator",
"modifier": "private",
"original_string": "private TermFrequencyAggregator aggregator;",
"type": "TermFrequencyAggregator",
"var_name": "aggregator"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/Term... | {
"body": "@Test\n public void apply_buildDocKeep() throws IOException, ParseException {\n Document doc = new Document();\n AttributeFactory attributeFactory = new AttributeFactory(new TypeMetadata());\n \n TreeMap<Key,Value> treeMap = Maps.newTreeMap();\n treeMap.put(getTF(\"123... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/functions/TermFrequencyAggregator.java",
"identifier": "TermFrequencyAggregator",
"interfaces": "",
"methods": [
{
"class_method_signature": "TermFrequencyAggregator.TermFrequencyAggregator(Set<String> fieldsToKeep, Even... | {
"body": "@Override\n public Key apply(SortedKeyValueIterator<Key,Value> itr, Document doc, AttributeFactory attrs) throws IOException {\n Key key = super.apply(itr, doc, attrs);\n \n // only return a key if something was added to the document, documents that only contain Document.DOCKEY_FIEL... | {
"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_134 | {
"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 testHandlerListNormalizedAlphanumWithEmptyEntry() throws Exception {\n \n ctx.getConfiguration().set(\"test\" + \".\" + ALPHANUM_LIST + BaseIngestHelper.FIELD_TYPE, LcNoDiacriticsType.class.getName());\n ctx.getConfiguration().set(\"test\" + \".\" + ContentBaseIn... | {
"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_837 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompareToWithDifferentShards() {\n JexlNode eqNode = JexlNodeFactory.buildEQNode(\"FIELD\", \"value\");\n \n IndexMatch left = new IndexMatch(\"uid0\", eqNode, \"20190413_0\");\n IndexMatch right = new IndexMatch(\"uid0\", eqNode, \"20190413_1\");\n ... | {
"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": "@Override\n public int compareTo(IndexMatch other) {\n Preconditions.checkNotNull(other);\n return uid.compareTo(other.uid);\n }",
"class_method_signature": "IndexMatch.compareTo(IndexMatch other)",
"constructor": false,
"full_signature": "@Override public int compareTo(IndexMatch... | {
"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_1044 | {
"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 testNullFields() throws Exception {\n String sql = crq.generateSql(\"v\", null, null, null, null, \"me\", null);\n Assert.assertEquals(\"SELECT * FROM v WHERE _user_ = 'me'\", sql);\n }",
"class_method_signature": "CachedRunningQueryTest.testNullFields()",
"const... | {
"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_29 | {
"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(expected = IllegalArgumentException.class)\n public void shouldFailOnIncorrectConfig2() {\n conf.set(dataType.typeName() + IngestFieldFilter.FILTER_FIELD_VALUE_SUFFIX, \"COUNT:DOES&NOT&MATCH\");\n \n filter.setup(conf);\n }",
"class_method_signature": "IngestFieldFilterTe... | {
"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 setup(Configuration conf) {\n fieldNameFilters = new FieldConfiguration();\n fieldNameFilters.load(conf.get(dataType.typeName() + FILTER_FIELD_SUFFIX), false);\n fieldNameFilters.load(conf.get(dataType.typeName() + FILTER_FIELD_NAME_SUFFIX), false);\n logger.info(\"F... | {
"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_476 | {
"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 falseDoubleAndTest() throws ParseException {\n String query = \"FIELD1 == 'x' && _NOFIELD_ == 'y' && FIELD2 == 'y'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, QueryPruningVisitor.get... | {
"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_925 | {
"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": "@Test\n public void testToEntry() {\n Abdera abdera = new Abdera();\n String host = \"hostForTests\";\n String port = \"portForTests\";\n \n IRI iri = new IRI(\"https://hostForTests:portForTests/DataWave/Atom/null/null\");\n \n Entry entry = kv.toEntry(ab... | {
"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 Entry toEntry(Abdera abdera, String host, String port) {\n \n String id = MessageFormat.format(ENTRY_ID_FORMAT, host, port, this.getCollectionName(), this.getId());\n String link = MessageFormat.format(LINK_FORMAT, host, port, this.getUuid());\n String title = MessageForm... | {
"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_3 | {
"fields": [
{
"declarator": "directoryCache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(10, TimeUnit.MINUTES)\n .concurrencyLevel(10).build()",
"modifier": "private static final",
"original_string": "private static final Cache<Path,Path> directoryCache = Ca... | {
"body": "@Test\n public void testConflict() throws Exception {\n \n Path file = getTestFile(fs);\n \n InputFile entry = new InputFile(\"foo\", file, 0, 0, 0, fmc.getBaseHDFSDir());\n createTrackedDirs(fs, entry);\n \n fs.copyFromLocalFile(file, entry.getFlagging()... | {
"fields": [
{
"declarator": "log = Logger.getLogger(FlagEntryMover.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(FlagEntryMover.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "CHKS... | {
"body": "@Override\n public InputFile call() throws IOException {\n \n // Create the flagging, flagged and loaded directory if they do not exist\n Path dstFlagging = checkParent(entry.getFlagging());\n Path dstFlagged = checkParent(entry.getFlagged());\n Path dstLoaded = checkP... | {
"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_860 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsJEXLQuery2() {\n \n DatawaveSelectorExtractor extractor = new DatawaveSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"FIELD1 == 'selector1' && _ANY_FIELD_ == 'selector2' && _ANY_FIELD_ == 'selector3'\");\n List<S... | {
"fields": [
{
"declarator": "luceneToJexlParser = new LuceneToJexlQueryParser()",
"modifier": "private",
"original_string": "private LuceneToJexlQueryParser luceneToJexlParser = new LuceneToJexlQueryParser();",
"type": "LuceneToJexlQueryParser",
"var_name": "luceneToJexlParser"
... | {
"body": "@Override\n public List<String> extractSelectors(Query query) throws IllegalArgumentException {\n List<String> selectorList = new ArrayList<>();\n List<ASTEQNode> eqNodes = null;\n QueryNode node = null;\n ASTJexlScript jexlScript = null;\n \n try {\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_499 | {
"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 RETest() throws ParseException {\n String query = \"FIELD =~ 'x'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getState(script));\n \n Assert.assert... | {
"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_163 | {
"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 testRecordWriterWriteWithUpdatesWithColFamilyTyped() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithUpdatesWithColFamilyTyped called...\");\n \n try {\n \n CBMutati... | {
"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_533 | {
"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 parse2TrailingBackslashesRegex() throws Exception {\n String query = \"CITY =~ 'city\\\\\\\\\\\\\\\\'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assertEquals(qu... | {
"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_1052 | {
"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 testWhereClauseWithBackTicks() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar\", \"`foo.bar` = 'ABC'\", null, null, \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`foo.bar` FROM v WHERE _user_ = 'me' AND (`foo.bar` = 'ABC')\", s... | {
"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_319 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = PatternSyntaxException.class)\n public void testInvalidER() throws ParseException {\n String queryString = \"BAR == '1' && FOO =~ '1234.**'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(script);\n }",
"class_... | {
"fields": [
{
"declarator": "patternCache",
"modifier": "private",
"original_string": "private Map<String,Pattern> patternCache;",
"type": "Map<String,Pattern>",
"var_name": "patternCache"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/ValidPa... | {
"body": "public static void check(JexlNode node) {\n ValidPatternVisitor visitor = new ValidPatternVisitor();\n node.jjtAccept(visitor, null);\n }",
"class_method_signature": "ValidPatternVisitor.check(JexlNode node)",
"constructor": false,
"full_signature": "public static void check(JexlNode... | {
"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_749 | {
"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 testFunctionArgumentEscaping() throws ParseException {\n Assert.assertEquals(\"[AND,Field:Selector][posFilter: filter(true, AND, FIELD1, rege(x), FIELD2, rege(x))]\",\n queryParser.parse(\"Field:Selector AND #INCLUDE(AND, FIELD1, 'rege(x)', FIELD2, 'rege... | {
"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_899 | {
"fields": [
{
"declarator": "testKeyHelper",
"modifier": "private",
"original_string": "private EdgeTableTestKeyHelper testKeyHelper;",
"type": "EdgeTableTestKeyHelper",
"var_name": "testKeyHelper"
},
{
"declarator": "decoder",
"modifier": "private",
"orig... | {
"body": "@Test(expected = EnumConstantNotPresentException.class)\n public void throwsExceptionForInvalidStatsType() {\n EdgeKeyDecoder.determineStatsType(new Text(\"STATS//CATEGORY\"));\n }",
"class_method_signature": "EdgeKeyDecoderTest.throwsExceptionForInvalidStatsType()",
"constructor": false,
... | {
"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 STATS_TYPE determineStatsType(Text colFam) {\n int offset = STATS_BYTES.length + 1;\n int secondSlashIndex = 0;\n int numCharsToCheck = Math.min(offset + 1 + STATS_TYPE.getMaxLength(), colFam.getLength());\n \n // faster to just compare bytes with STATS/stat... | {
"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_933 | {
"fields": [
{
"declarator": "auths = new Authorizations(\"AUTHS\")",
"modifier": "private final",
"original_string": "private final Authorizations auths = new Authorizations(\"AUTHS\");",
"type": "Authorizations",
"var_name": "auths"
},
{
"declarator": "key1 = new Key... | {
"body": "@Test\n public void testInitialize() throws Exception {\n \n List<BaseQueryLogic<?>> logics = new ArrayList<>();\n logics.add(new TestQueryLogic());\n logics.add(new TestQueryLogic2());\n \n QueryImpl settings = new QueryImpl();\n settings.setPagesize(100... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CompositeQueryLogic.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(CompositeQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public GenericQueryConfiguration initialize(Connector connection, Query settings, Set<Authorizations> runtimeQueryAuthorizations) throws Exception {\n \n for (BaseQueryLogic<?> logic : queryLogics) {\n final BaseQueryLogic<?> queryLogic = logic;\n int coun... | {
"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_460 | {
"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 testGroupingFunction() throws Exception {\n String originalQuery = \"grouping:matchesInGroup(FOO, 'abc')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpr... | {
"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_525 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleNR() throws ParseException {\n String queryString = \"FOO !~ BAR\";\n String expectedQuery = \"!(FOO =~ BAR)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ASTJexlScript negatedScript = RewriteNegationsVisitor.rewrite(sc... | {
"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_175 | {
"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 testGetSplitsNoArgument() throws IOException {\n logger.info(\"testGetSplitsNoArgument called...\");\n setSplitsCacheDir();\n setupConfiguration();\n \n try {\n \n TableSplitsCache uut = new TableSplitsCache(createMockJobConf()... | {
"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_876 | {
"fields": [
{
"declarator": "data = \"20100901: the quick brown fox jumped over the lazy dog\"",
"modifier": "private",
"original_string": "private String data = \"20100901: the quick brown fox jumped over the lazy dog\";",
"type": "String",
"var_name": "data"
},
{
"d... | {
"body": "@Test\n public void testParse() {\n UID a = new HashUID(data.getBytes(), (Date) null) {};\n UID b = UID.parse(a.toString());\n assertEquals(a, b);\n assertEquals(b, a);\n assertEquals(0, a.compareTo(b));\n assertEquals(0, a.compare(a, b));\n a = new HashU... | {
"fields": [
{
"declarator": "serialVersionUID = 4016018180334520481L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 4016018180334520481L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAU... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static HashUID parse(String s) {\n return parse(s, -1);\n }",
"class_method_signature": "HashUID.parse(String s)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public static HashUID parse(String s)",
"identifier": "... | {
"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_87 | {
"fields": [
{
"declarator": "FIELD_NAME = \"FIELD_NAME\"",
"modifier": "private static final",
"original_string": "private static final String FIELD_NAME = \"FIELD_NAME\";",
"type": "String",
"var_name": "FIELD_NAME"
},
{
"declarator": "FIELD_TO_COUNT = \"FIELD_1\"",
... | {
"body": "@Test\n public void testCreatesIndexedField() throws IOException {\n setupMocks();\n \n helper.addIndexedField(FIELD_TO_COUNT);\n RawRecordMetadata eventMetadata = new EventMetadata(null, METADATA_TABLE_NAME, LOADDATES_TABLE_NAME, INDEX_TABLE_NAME, RINDEX_TABLE_NAME, true);\n... | {
"fields": [
{
"declarator": "compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI)",
"modifier": "private",
"original_string": "private MetadataWithMostRecentDate compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI);",
"type": ... | {
"body": "@Override\n public void addEvent(IngestHelperInterface helper, RawRecordContainer event, Multimap<String,NormalizedContentInterface> fields, long loadTimeInMillis) {\n addEvent(helper, event, fields, this.frequency, INCLUDE_LOAD_DATES, loadTimeInMillis);\n }",
"class_method_signature": "Even... | {
"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_1005 | {
"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 testForwardCreateMutation() throws Exception {\n EasyMock.expect(System.currentTimeMillis()).andReturn(TIMESTAMP);\n PowerMock.replayAll();\n Mutation m = ModelKeyParser.createMutation(FORWARD_FIELD_MAPPING, MODEL_NAME);\n PowerMock.verifyAll();\n 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 Mutation createMutation(FieldMapping mapping, String modelName) {\n ColumnVisibility cv = new ColumnVisibility(mapping.getColumnVisibility());\n Mutation m;\n String dataType = StringUtils.isEmpty(mapping.getDatatype()) ? \"\" : NULL_BYTE + mapping.getDatatype().trim();\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_68 | {
"fields": [
{
"declarator": "BAD_TABLE_NAME = \"VERY_BAD_TABLE_NAME\"",
"modifier": "private static final",
"original_string": "private static final String BAD_TABLE_NAME = \"VERY_BAD_TABLE_NAME\";",
"type": "String",
"var_name": "BAD_TABLE_NAME"
},
{
"declarator": "l... | {
"body": "@Test\n public void testSetPropertyIfNecessaryWithBadTableName() throws AccumuloSecurityException, AccumuloException {\n \n AbstractTableConfigHelperTest.logger.info(\"AbstractTableConfigHelperTest.testSetPropertyIfNecessaryWithBadTableName() called.\");\n \n try {\n ... | {
"fields": [],
"file": "warehouse/ingest-core/src/main/java/datawave/ingest/table/config/AbstractTableConfigHelper.java",
"identifier": "AbstractTableConfigHelper",
"interfaces": "implements TableConfigHelper",
"methods": [
{
"class_method_signature": "AbstractTableConfigHelper.setup(String tableNa... | {
"body": "public static void setPropertyIfNecessary(String tableName, String propertyName, String propertyValue, TableOperations tops, Logger log)\n throws AccumuloException, AccumuloSecurityException, TableNotFoundException {\n \n boolean propertySet = false;\n for (Entry<Str... | {
"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_437 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testDistributeLargestOrTerms() throws ParseException {\n String original = \"(a || b) && (c || d) && (e || f || g)\";\n String expected = \"((c || d) && (e || f || g) && a) || ((c || d) && (e || f || g) && b)\";\n // Without flatten the first OR node's terms are ... | {
"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_964 | {
"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 testBuildNormalizedProxyDNTooFewIssuers() {\n DnUtils.buildNormalizedProxyDN(\"SDN\", \"IDN\", \"SDN2<SDN3>\", \"IDN2\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedProxyDNTooFewIssuers()",
"constructor": f... | {
"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 buildNormalizedProxyDN(String subjectDN, String issuerDN, String proxiedSubjectDNs, String proxiedIssuerDNs) {\n StringBuilder sb = new StringBuilder();\n for (String escapedDN : buildNormalizedDNList(subjectDN, issuerDN, proxiedSubjectDNs, proxiedIssuerDNs)) {\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_821 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IntersectionTest.java",
"identifier": "IntersectionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersection_EmptyExceededValueThreshold() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"THIS_FIELD == 20\");\n ScannerStream scannerStream = ScannerStream.exceededValueThreshold(Collections.emptyIterator(), script);\n List<?... | {
"fields": [
{
"declarator": "children",
"modifier": "private",
"original_string": "private TreeMultimap<String,IndexStream> children;",
"type": "TreeMultimap<String,IndexStream>",
"var_name": "children"
},
{
"declarator": "context",
"modifier": "private final",
... | {
"body": "@Override\n public StreamContext context() {\n return context;\n }",
"class_method_signature": "Intersection.context()",
"constructor": false,
"full_signature": "@Override public StreamContext context()",
"identifier": "context",
"invocations": [],
"modifiers": "@Override public",
... | {
"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_122 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/NumShardsTest.java",
"identifier": "NumShardsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUpdateCache() throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException, IOException,\n ParseException {\n // configure mock accumulo instance and populate with a couple of multiple numshards entries\n Passw... | {
"fields": [
{
"declarator": "log = Logger.getLogger(NumShards.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(NumShards.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DEFAULT_NUM_SH... | {
"body": "public void updateCache() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException {\n FileSystem fs = this.numShardsCachePath.getFileSystem(this.conf);\n String metadataTableName = ConfigurationHelper.isNull(this.conf, ShardedDataTypeHandler.METADATA_TABLE_NAM... | {
"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_572 | {
"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_alternatingExtremesFORWARDTest() {\n // 20->21->22\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(1, 10, 20);\n List<TermWeightPosition> offsetsB = asList(21, 24, 30);\n List<TermW... | {
"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_765 | {
"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(expected = ParseException.class)\n public void testFunctionTooDeep2() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n luceneParser.parse(\"fielda:selectora OR (fieldb:selectorb AND #isnull(nullfield)) OR fieldc:selectorc\");\n }",
"class_met... | {
"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_335 | {
"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 testSingleOr() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper.parseJexlQuery(\"UUID == 'capone' && (QUOTE =='kind' || BIRTH_DATE == '123')\");\n \n // grab the reference to the QUOTE=='kind' eqnode\n JexlNode quoteNode = queryTree.jjtGetChild... | {
"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_13 | {
"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 testFolderTimeStamps() throws Exception {\n log.info(\"----- testFolderTimeStamps -----\");\n File f = setUpFlagDir();\n // two days, 5 files each day, two folders in fmc = 20 flags\n LongRange range = createTestFiles(2, 5, true);\n fmc.setSetFlag... | {
"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_620 | {
"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 testSubSet() {\n int start = sortedOrder.length / 3;\n int end = start * 2;\n try {\n SortedSet<byte[]> subSet = set.subSet(data[sortedOrder[start]], data[sortedOrder[end]]);\n SortedSet<byte[]> expected = new TreeSet<>(set.comparator());\n ... | {
"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 SortedSet<E> subSet(E fromElement, E toElement) {\n return set.subSet(fromElement, toElement);\n }",
"class_method_signature": "BufferedFileBackedSortedSet.subSet(E fromElement, E toElement)",
"constructor": false,
"full_signature": "@Override public SortedSet<E> subSe... | {
"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_270 | {
"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 testEvaluationOnlyPropertyMarkerPropagate() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!((ASTEvaluationOnly = true) && (F1 == 'v1' || F2 == 'v2'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Asse... | {
"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_159 | {
"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 testRecordWriterWriteWithoutTableName() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithoutTableName called...\");\n \n try {\n \n CBMutationOutputFormatter uut = ne... | {
"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_509 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file":... | {
"body": "@Test\n public void testEndWildcard() throws ParseException {\n String query = \"_ANYFIELD_=='email' and ANOTHER_FIELD=='blah' and filter:includeRegex(FIELDA,'all_.*?')\";\n \n Set<String> indexOnlyFields = Sets.newHashSet();\n indexOnlyFields.add(\"FIELDA\");\n \n ... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(RegexFunctionVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(RegexFunctionVisitor.class);",
"type": "Logger",
"var_nam... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandRegex(ShardQueryConfiguration config, MetadataHelper metadataHelper, Set<String> nonEventFields, T script) {\n RegexFunctionVisitor visitor = new RegexFunctionVisitor(config, metadataHelper, nonEventFields);\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_44 | {
"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_WeightedLengthPruningWithUndefinedMaxNGramCount() throws Exception {\n // Create test input\n final Vector<NormalizedContentInterface> ncis = new Vector<>();\n int fieldNameExtension = 1;\n ncis.add(this.createNormalizedFieldAndValue(fieldName... | {
"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_1029 | {
"fields": [
{
"declarator": "NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, c=us\"",
"modifier": "private static final",
"original_string": "private static final String NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, ... | {
"body": "@Test\n public void normalizeDnWithCnFirst() {\n assertEquals(NORMALIZED_SUBJECT_DN, DatawaveUsersRolesLoginModule.normalizeUsername(SUBJECT_DN_WITH_CN_FIRST));\n }",
"class_method_signature": "DatawaveUsersRolesLoginModuleTest.normalizeDnWithCnFirst()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "createSimplePrincipal = new ThreadLocal<>()",
"modifier": "private",
"original_string": "private ThreadLocal<Boolean> createSimplePrincipal = new ThreadLocal<>();",
"type": "ThreadLocal<Boolean>",
"var_name": "createSimplePrincipal"
}
],
"file":... | {
"body": "protected static String normalizeUsername(String username) {\n StringBuilder result = new StringBuilder();\n \n String[] splitDns = DnUtils.splitProxiedSubjectIssuerDNs(username);\n for (int i = 0; i < splitDns.length; i++) {\n if (i > 0) {\n result.app... | {
"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_698 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/tables/async/RangeDefinitionTest.java",
"identifier": "RangeDefinitionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shardRangeTest() {\n Range shardRange = new Range(new Key(\"20190101_0\"), false, new Key(\"20190101_0\\u0000\"), false);\n assertFalse(RangeDefinition.isDocSpecific(shardRange));\n }",
"class_method_signature": "RangeDefinitionTest.shardRangeTest()",
"constructo... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/tables/async/RangeDefinition.java",
"identifier": "RangeDefinition",
"interfaces": "",
"methods": [
{
"class_method_signature": "RangeDefinition.isDocSpecific(Range range)",
"constructor": false,
"full_signature":... | {
"body": "public static boolean isDocSpecific(Range range) {\n return QueryIterator.isDocumentSpecificRange(range);\n }",
"class_method_signature": "RangeDefinition.isDocSpecific(Range range)",
"constructor": false,
"full_signature": "public static boolean isDocSpecific(Range range)",
"identifier":... | {
"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_362 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/TreeFlatteningRebuildingVisitorTest.java",
"identifier": "TreeFlatteningRebuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void dontFlattenASTDelayedPredicateAndTest() throws Exception {\n String query = \"((ASTDelayedPredicate = true) && (GEO == '1f36c71c71c71c71c7' && (WKT_BYTE_LENGTH >= '+AE0' && WKT_BYTE_LENGTH < '+bE8'))) && GEO >= '1f36c71c71c71c71c7\\uDBFF\\uDFFF+AE0' && GEO < '1f36c71c71c71c71c... | {
"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 flatten(T node) {\n return TreeFlatteningRebuilder.flatten(node);\n }",
"class_method_signature": "TreeFlatteningRebuildingVisitor.flatten(T node)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchec... | {
"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_732 | {
"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 testParseRegexsWithEscapes() throws ParseException {\n Assert.assertEquals(\"F == '6515' && FOOBAR =~ 'Foo/5\\\\.0 \\\\(ibar.*?'\", parser.parse(\"F:6515 and FOOBAR:Foo\\\\/5.0\\\\ \\\\(ibar*\").getOriginalQuery());\n Assert.assertEquals(\"FOO == 'bar' && BAZ =~ 'Foo Fo... | {
"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": "@Override\n public QueryNode parse(String query) throws ParseException {\n JexlNode parsedQuery = convertToJexlNode(query);\n QueryNode node = new ServerHeadNode();\n node.setOriginalQuery(parsedQuery.toString());\n return node;\n }",
"class_method_signature": "LuceneToJ... | {
"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_227 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckDirString() throws Exception {\n String ret = Files.checkDir(\"file\");\n assertNull(ret);\n }",
"class_method_signature": "FilesTest.testCheckDirString()",
"constructor": false,
"full_signature": "@Test public void testCheckDirString()",
"identifier... | {
"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 checkDir(final String dir) {\n return checkDir(dir, false);\n }",
"class_method_signature": "Files.checkDir(final String dir)",
"constructor": false,
"full_signature": "public static String checkDir(final String dir)",
"identifier": "checkDir",
"invocations": [
... | {
"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_677 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildFieldDataTypeMapFromEmptyString() {\n String emptyData = \"\";\n Map<String,Set<String>> expectedDataTypeMap = new HashMap<>();\n Map<String,Set<String>> fieldDataTypeMap = QueryOptions.buildFieldDataTypeMap(emptyData);\n assertEquals(\"Failed to ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryOptions.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryOptions.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "fileSyst... | {
"body": "public static Map<String,Set<String>> buildFieldDataTypeMap(String data) {\n \n Map<String,Set<String>> mapping = new HashMap<>();\n \n if (org.apache.commons.lang3.StringUtils.isNotBlank(data)) {\n String[] entries = StringUtils.split(data, ';');\n for (St... | {
"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_948 | {
"fields": [
{
"declarator": "subject = new QueryMetricsBean()",
"modifier": "@TestSubject",
"original_string": "@TestSubject\n QueryMetricsBean subject = new QueryMetricsBean();",
"type": "QueryMetricsBean",
"var_name": "subject"
},
{
"declarator": "callerPrincipal... | {
"body": "@Test\n public void testQuery_TotalQueriesSummary() throws Exception {\n // Set local test arguments\n Date beginDate = new Date(System.currentTimeMillis() - 2000);\n Date endDate = new Date(System.currentTimeMillis() - 1000);\n \n // Set expectations\n expect(t... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryMetricsBean.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryMetricsBean.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@GET\n @Path(\"/summary\")\n @Interceptors(ResponseInterceptor.class)\n public QueryMetricsSummaryResponse getTotalQueriesSummaryCounts(\n @QueryParam(\"begin\") @DateFormat(defaultTime = \"000000\", defaultMillisec = \"000\") Date begin, @QueryParam(\"end\") @DateFormat(\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_724 | {
"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 testTokenizedUnfieldedSlopPhrase() throws ParseException {\n parser.setTokenizeUnfieldedQueries(true);\n // verify that new slop is calculated properly.\n Assert.assertEquals(\"content:within(3, termOffsetMap, 'portable', 'document')\", parseQuery(\"\\\"portable ... | {
"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 setTokenizeUnfieldedQueries(boolean tokenizeUnfieldedQueries) {\n this.tokenizeUnfieldedQueries = tokenizeUnfieldedQueries;\n }",
"class_method_signature": "LuceneToJexlQueryParser.setTokenizeUnfieldedQueries(boolean tokenizeUnfieldedQueries)",
"constructor": false,
"full_signat... | {
"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_374 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/IteratorBuildingVisitorTest.java",
"identifier": "IteratorBuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildLiteralRange_phraseTest() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"FOO =~ 'barbaz'\");\n List<ASTERNode> erNodes = JexlASTHelper.getERNodes(query);\n LiteralRange<?> range = IteratorBuildingVisitor.buildLiteralRange(erNo... | {
"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_52 | {
"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 testTransformKey() {\n // key should only be in bloom filter if it is a field index column (cf = 'fi\\x00'...) and\n // contains both the field name (cf) and field value (cq)\n org.apache.accumulo.core.data.Key cbKey = new org.apache.accumulo.core.data.Key();\n ... | {
"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"
},
{
"declarator": "FIELD_INDEX_PREFIX = new byte[] {'... | {
"body": "@Override\n public org.apache.hadoop.util.bloom.Key transform(org.apache.accumulo.core.data.Key cbKey) {\n \n if (isKeyInBloomFilter(cbKey)) {\n byte keyData[];\n \n // The column qualifier contains the field value\n ByteSequence cq = cbKey.getCo... | {
"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_661 | {
"fields": [
{
"declarator": "aggregator",
"modifier": "private",
"original_string": "private TLDFieldIndexAggregator aggregator;",
"type": "TLDFieldIndexAggregator",
"var_name": "aggregator"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/tld/TLDFieldIndexAg... | {
"body": "@Test\n public void apply_testNormal() throws IOException {\n TreeMap<Key,Value> treeMap = Maps.newTreeMap();\n treeMap.put(getFi(\"123\", \"FIELD1\", \"VALUE1\", \"dataType1\", \"123.345.456\", 10), new Value());\n treeMap.put(getFi(\"123\", \"FIELD1\", \"VALUE1\", \"dataType1\", \... | {
"fields": [
{
"declarator": "fieldsToAggregate",
"modifier": "private",
"original_string": "private Set<String> fieldsToAggregate;",
"type": "Set<String>",
"var_name": "fieldsToAggregate"
},
{
"declarator": "attrFilter",
"modifier": "private",
"original_st... | {
"body": "public Key apply(SortedKeyValueIterator<Key,Value> itr, Document d, AttributeFactory af) throws IOException {\n Key key = itr.getTopKey();\n ByteSequence parentId = parseRootPointerFromFI(key.getColumnQualifierData());\n Text row = key.getRow();\n ByteSequence docId = 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_231 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckDirCanExecute() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(true);\n expect(file.isDirectory()).andReturn(true);\n expect(file.canRead()).andReturn(true);\n expect(file.canExecute()).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 checkDir(final String dir) {\n return checkDir(dir, false);\n }",
"class_method_signature": "Files.checkDir(final String dir)",
"constructor": false,
"full_signature": "public static String checkDir(final String dir)",
"identifier": "checkDir",
"invocations": [
... | {
"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_118 | {
"fields": [
{
"declarator": "conf",
"modifier": "private",
"original_string": "private Configuration conf;",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "handler",
"modifier": "private",
"original_string": "private DateIndexDataTypeHandl... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testMissingConfigSetup() {\n DateIndexDataTypeHandler<Text> handler = new DateIndexDataTypeHandler<>();\n handler.setup(new TaskAttemptContextImpl(new Configuration(), new TaskAttemptID()));\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(DateIndexDataTypeHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(DateIndexDataTypeHandler.class);",
"type": "Logger",
... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n this.taskAttemptContext = context;\n this.conf = context.getConfiguration();\n this.shardIdFactory = new ShardIdFactory(conf);\n \n String tableName = conf.get(DATEINDEX_TNAME, null);\n if (null == ta... | {
"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_548 | {
"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 transitiveRegexParseTest() throws Exception {\n String query = \"CITY =~ 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty\\\\.blah'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n JexlNode ne... | {
"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_1068 | {
"fields": [
{
"declarator": "bean = new TestMapReduceBean()",
"modifier": "@TestSubject\n private",
"original_string": "@TestSubject\n private TestMapReduceBean bean = new TestMapReduceBean();",
"type": "TestMapReduceBean",
"var_name": "bean"
},
{
"declarator": ... | {
"body": "@Test\n public void testListConfiguredMapReduceJobs() throws Exception {\n \n replayAll();\n List<MapReduceJobDescription> configs = bean.listConfiguredMapReduceJobs(\"none\");\n verifyAll();\n \n assertEquals(1, configs.size());\n assertEquals(\"TestJob\... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ctx",
"modifier": "@Resource\n ... | {
"body": "@GET\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\", \"application/x-protobuf\",\n \"application/x-protostuff\"})\n @javax.ws.rs.Path(\"/listConfigurations\")\n @GZIP\n public List<MapReduceJobDescription> ... | {
"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_323 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = PatternSyntaxException.class)\n public void testFilterFunctionIncludeRegex() throws ParseException {\n String queryString = \"A == '1' && filter:includeRegex(B,'*2*')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(... | {
"fields": [
{
"declarator": "patternCache",
"modifier": "private",
"original_string": "private Map<String,Pattern> patternCache;",
"type": "Map<String,Pattern>",
"var_name": "patternCache"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/ValidPa... | {
"body": "public static void check(JexlNode node) {\n ValidPatternVisitor visitor = new ValidPatternVisitor();\n node.jjtAccept(visitor, null);\n }",
"class_method_signature": "ValidPatternVisitor.check(JexlNode node)",
"constructor": false,
"full_signature": "public static void check(JexlNode... | {
"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_289 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test1() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO != 'bar'\");\n Assert.assertTrue(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test1()",
"constructor... | {
"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_773 | {
"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 testSmartQuoteReplacement() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n String s = \"\\u0093see jane run\\u0094\";\n Assert.assertEquals(\"[ADJ2,see,jane,run]\", luceneParser.parse(s).getContents());\n }",
"class_met... | {
"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_266 | {
"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 testGuarantees() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1' && F2 == 'v2' && (F3 == 'v3' || F4 == 'v4'))\");\n String orig = JexlStringBuildingVisitor.buildQuery(query);\n JexlNode result = PushdownNegationVisitor.... | {
"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_636 | {
"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 apply_acceptSuperRejectTest() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"FOO == 'bar'\");\n \n expect(mockAttributeFactory.getTypeMetadata(\"FOO\", \"datatype\")).andReturn(Collections.emptyList());\n \n replayAll... | {
"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": "@Override\n public boolean apply(Entry<Key,String> input) {\n return apply(input, true);\n }",
"class_method_signature": "TLDEventDataFilter.apply(Entry<Key,String> input)",
"constructor": false,
"full_signature": "@Override public boolean apply(Entry<Key,String> input)",
"identifier":... | {
"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_909 | {
"fields": [
{
"declarator": "refBuilder",
"modifier": "",
"original_string": "EdgeKeyBuilder refBuilder;",
"type": "EdgeKeyBuilder",
"var_name": "refBuilder"
},
{
"declarator": "refStatsBase",
"modifier": "",
"original_string": "Key refStatsBase;",
"... | {
"body": "@Test\n public void testNewBuilder() {\n verifyEdgeKey(refBuilder.build());\n }",
"class_method_signature": "EdgeKeyTest.testNewBuilder()",
"constructor": false,
"full_signature": "@Test public void testNewBuilder()",
"identifier": "testNewBuilder",
"invocations": [
"verifyEdgeKe... | {
"fields": [
{
"declarator": "format",
"modifier": "private final",
"original_string": "private final EDGE_FORMAT format;",
"type": "EDGE_FORMAT",
"var_name": "format"
},
{
"declarator": "statsType",
"modifier": "private final",
"original_string": "private ... | {
"body": "public static EdgeKeyBuilder newBuilder() {\n return new EdgeKeyBuilder();\n }",
"class_method_signature": "EdgeKey.newBuilder()",
"constructor": false,
"full_signature": "public static EdgeKeyBuilder newBuilder()",
"identifier": "newBuilder",
"invocations": [],
"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_908 | {
"fields": [
{
"declarator": "standardKey",
"modifier": "private",
"original_string": "private Key standardKey;",
"type": "Key",
"var_name": "standardKey"
},
{
"declarator": "standardValue",
"modifier": "private",
"original_string": "private Value standardV... | {
"body": "@Test\n public void testReadNullDuration() {\n List<Long> oldAsList = EdgeValueHelper.decodeDurationHistogram(NULL_VALUE);\n assertEquals(EdgeValueHelper.DURATION_HISTOGRAM_LENGTH, oldAsList.size());\n }",
"class_method_signature": "EdgeValueHelperTest.testReadNullDuration()",
"cons... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ACTIVITY_HISTOGRAM_LENGTH = 24",
"... | {
"body": "public static List<Long> decodeDurationHistogram(Value value) {\n try {\n return decodeDurationHistogram(EdgeData.EdgeValue.parseFrom(value.get()).getDurationList());\n } catch (InvalidProtocolBufferException e) {\n // Probably an old edge value\n return decod... | {
"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_1069 | {
"fields": [
{
"declarator": "bean = new TestMapReduceBean()",
"modifier": "@TestSubject\n private",
"original_string": "@TestSubject\n private TestMapReduceBean bean = new TestMapReduceBean();",
"type": "TestMapReduceBean",
"var_name": "bean"
},
{
"declarator": ... | {
"body": "@Test(expected = BadRequestException.class)\n public void testSubmitInvalidJobName() throws Exception {\n expect(ctx.getCallerPrincipal()).andReturn(principal);\n replayAll();\n \n bean.submit(\"BadJobName\", null);\n verifyAll();\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ctx",
"modifier": "@Resource\n ... | {
"body": "@POST\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\", \"application/x-protobuf\",\n \"application/x-protostuff\"})\n @javax.ws.rs.Path(\"/submit\")\n @GZIP\n public GenericResponse<String> submit(@FormParam... | {
"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_322 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = PatternSyntaxException.class)\n public void testInvalidNR() throws ParseException {\n String queryString = \"BAR == '1' && FOO !~ '1234.**'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(script);\n }",
"class_... | {
"fields": [
{
"declarator": "patternCache",
"modifier": "private",
"original_string": "private Map<String,Pattern> patternCache;",
"type": "Map<String,Pattern>",
"var_name": "patternCache"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/ValidPa... | {
"body": "public static void check(JexlNode node) {\n ValidPatternVisitor visitor = new ValidPatternVisitor();\n node.jjtAccept(visitor, null);\n }",
"class_method_signature": "ValidPatternVisitor.check(JexlNode node)",
"constructor": false,
"full_signature": "public static void check(JexlNode... | {
"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_288 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO == 'bar'\");\n Assert.assertFalse(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test()",
"constructor"... | {
"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_772 | {
"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 testSpaceAfterColon() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n Assert.assertEquals(\"[AND,field1:selector1,field2:selector2]\", luceneParser.parse(\"field1: selector1 field2: selector2\").getContents());\n }",
"class_met... | {
"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_267 | {
"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 testNestedOr() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1' || F2 == 'v2' || (F3 == 'v3' && F4 == 'v4'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert.assertEquals(\"((!(F1 == 'v1... | {
"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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.