id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_637 | {
"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_acceptGroupingFields() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"grouping:matchesInGroup(FOO, 'bar')\");\n expect(mockAttributeFactory.getTypeMetadata(\"FOO\", \"datatype\")).andReturn(Collections.emptyList()).anyTimes();\n ... | {
"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_119 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/NumShardsTest.java",
"identifier": "NumShardsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultipleNumShardsError() {\n Configuration conf = new Configuration();\n conf.set(ShardIdFactory.NUM_SHARDS, \"11\");\n conf.set(NumShards.ENABLE_MULTIPLE_NUMSHARDS, \"true\");\n NumShards numShards = new NumShards(conf);\n \n try {\n ... | {
"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 int getNumShards(long date) {\n if (!initialized) {\n configure();\n }\n return milliToNumShardsCache.floorEntry(date).getValue();\n }",
"class_method_signature": "NumShards.getNumShards(long date)",
"constructor": false,
"full_signature": "public int getNumS... | {
"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_549 | {
"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 transitiveEqualsParseWithEscapedRegexTest() throws Exception {\n String query = \"CITY == 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty\\\\.blah'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n ... | {
"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_725 | {
"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 testTokenizedFieldUnfieldedDisabled() throws ParseException {\n parser.setTokenizeUnfieldedQueries(false);\n Assert.assertEquals(\"_ANYFIELD_ == '1234 5678 to bird'\", parseQuery(\"1234\\\\ 5678\\\\ to\\\\ bird\"));\n Assert.assertEquals(Constants.ANY_FIELD + \" ... | {
"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_375 | {
"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 noAppliedMapping() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"NOMAPPINGNAME == 'baz'\");\n ASTJexlScript newScript = QueryModelVisitor.applyModel(script, model, allFields);\n assertScriptEquality(script, newScript);\n }",
... | {
"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_53 | {
"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 testIsKeyInBloomFilter() {\n // key should only be in bloom filter if it contains both the field name (cf) and field value (row)\n org.apache.accumulo.core.data.Key cbKey = new org.apache.accumulo.core.data.Key();\n Assert.assertFalse(\"empty key should not be in... | {
"fields": [
{
"declarator": "EMPTY_BYTES = new byte[0]",
"modifier": "private static final",
"original_string": "private static final byte[] EMPTY_BYTES = new byte[0];",
"type": "byte[]",
"var_name": "EMPTY_BYTES"
}
],
"file": "warehouse/ingest-core/src/main/java/datawave/i... | {
"body": "static boolean isKeyInBloomFilter(org.apache.accumulo.core.data.Key cbKey) {\n // if we have a row with the field name and a column familiy with the field value, then\n // we can use the bloom filter for this key\n return (cbKey.getRowData().length() > 0 && cbKey.getColumnFamilyData().... | {
"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_660 | {
"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_testAggregateFilter() throws IOException {\n EventDataQueryFilter mockFilter = EasyMock.createMock(EventDataQueryFilter.class);\n \n TypeMetadata typeMetadata = new TypeMetadata();\n AttributeFactory factory = new AttributeFactory(typeMetadata);\n ... | {
"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_230 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckDirCanRead() 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(false);\n replay(file);\n String err = Files.ch... | {
"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_949 | {
"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_ByQueryId() throws Exception {\n // Set local test arguments\n String sid = \"usersid\";\n String queryId = \"usersid\";\n \n // Set expectations\n expect(this.ejbContext.getCallerPrincipal()).andReturn(this.callerPrincipal);\n ... | {
"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 @POST\n @Path(\"/id/{id}\")\n @Interceptors({RequiredInterceptor.class, ResponseInterceptor.class})\n public BaseQueryMetricListResponse query(@PathParam(\"id\") @Required(\"id\") String id) {\n \n // Find out who/what called this method\n DatawavePrincipal dp = null... | {
"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_45 | {
"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_WeightedLengthPruningWithAllUnderweightValues() throws Exception {\n // Create test input\n final Vector<NormalizedContentInterface> ncis = new Vector<>();\n int fieldNameExtension = 1;\n ncis.add(this.createNormalizedFieldAndValue(fieldNameEx... | {
"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_699 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/tables/async/RangeDefinitionTest.java",
"identifier": "RangeDefinitionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void dayRangeTest() {\n Range dayRange = new Range(new Key(\"20190101_0\"), false, new Key(\"20190101\" + Constants.MAX_UNICODE_STRING), false);\n assertFalse(RangeDefinition.isDocSpecific(dayRange));\n }",
"class_method_signature": "RangeDefinitionTest.dayRangeTest()",... | {
"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_1028 | {
"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 normalizeDnWithCnLast() {\n assertEquals(NORMALIZED_SUBJECT_DN, DatawaveUsersRolesLoginModule.normalizeUsername(SUBJECT_DN_WITH_CN_LAST));\n }",
"class_method_signature": "DatawaveUsersRolesLoginModuleTest.normalizeDnWithCnLast()",
"constructor": false,
"full_signatur... | {
"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_363 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/TreeFlatteningRebuildingVisitorTest.java",
"identifier": "TreeFlatteningRebuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void flattenASTDelayedPredicateOrTest() throws Exception {\n String query = \"((ASTDelayedPredicate = true) || (GEO == '1f36c71c71c71c71c7' && (WKT_BYTE_LENGTH >= '+AE0' && WKT_BYTE_LENGTH < '+bE8'))) || GEO >= '1f36c71c71c71c71c7\\uDBFF\\uDFFF+AE0' || GEO < '1f36c71c71c71c71c8\\uD... | {
"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_733 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private LuceneToJexlControlledQueryParser parser;",
"type": "LuceneToJexlControlledQueryParser",
"var_name": "parser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/pa... | {
"body": "@Test\n public void testAllowedAnyfieldWithEmptyAllowedFields() throws ParseException {\n parser = new LuceneToJexlControlledQueryParser();\n parser.setAllowAnyField(true);\n parser.setIncludedValues(ImmutableMap.<String,Set<String>> of());\n parser.setAllowedFields(Immutable... | {
"fields": [
{
"declarator": "includedValues = new HashMap<>()",
"modifier": "private",
"original_string": "private Map<String,Set<String>> includedValues = new HashMap<>();",
"type": "Map<String,Set<String>>",
"var_name": "includedValues"
},
{
"declarator": "excludedV... | {
"body": "@Override\n public void setIncludedValues(Map<String,Set<String>> includedValues) {\n this.includedValues = includedValues;\n }",
"class_method_signature": "LuceneToJexlControlledQueryParser.setIncludedValues(Map<String,Set<String>> includedValues)",
"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_226 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEnsureDirString() throws Exception {\n Files.ensureDir(\"file\");\n }",
"class_method_signature": "FilesTest.testEnsureDirString()",
"constructor": false,
"full_signature": "@Test public void testEnsureDirString()",
"identifier": "testEnsureDirString",
"invoca... | {
"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 void ensureDir(final String dir) {\n ensureDir(dir, false);\n }",
"class_method_signature": "Files.ensureDir(final String dir)",
"constructor": false,
"full_signature": "public static void ensureDir(final String dir)",
"identifier": "ensureDir",
"invocations": [
"ensur... | {
"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_676 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildFieldDataTypeMapFromMultiValueString() {\n String multiValueData = \"k:v;key:value\";\n Map<String,Set<String>> expectedDataTypeMap = new HashMap<>();\n expectedDataTypeMap.put(\"k\", Sets.newHashSet(\"v\"));\n expectedDataTypeMap.put(\"key\", Set... | {
"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_158 | {
"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 testRecordWriterClose() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterClose called...\");\n \n try {\n \n CBMutationOutputFormatter uut = new CBMutationOutputFormatter();\n... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CBMutationOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CBMutationOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
}
],
"fi... | {
"body": "@Override\n public RecordWriter<Text,Mutation> getRecordWriter(TaskAttemptContext attempt) throws IOException {\n return new CBRecordWriter(super.getRecordWriter(attempt), attempt);\n }",
"class_method_signature": "CBMutationOutputFormatter.getRecordWriter(TaskAttemptContext attempt)",
"co... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_508 | {
"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 testDoubleEndedWildCard2() 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 ... | {
"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_764 | {
"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 testFunctionTooDeep1() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n luceneParser.parse(\"fielda:selectora OR (fieldb:selectorb AND #isnull(nullfield))\");\n }",
"class_method_signature": "Tes... | {
"fields": [
{
"declarator": "log = Logger.getLogger(LuceneQueryParser.class.getName())",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(LuceneQueryParser.class.getName());",
"type": "Logger",
"var_name": "log"
},
{
"decl... | {
"body": "@Override\n public datawave.query.language.tree.QueryNode parse(String query) throws ParseException {\n query = query.replaceAll(\"\\\\u0093\", \"\\\"\"); // replace open smart quote 147\n query = query.replaceAll(\"\\\\u0094\", \"\\\"\"); // replace close smart quote 148\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_334 | {
"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 testDelayedDoubleExpansion() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper.parseJexlQuery(\"UUID == 'capone' && (((ASTDelayedPredicate = true) && QUOTE == 'kind') || \"\n + \"((ASTDelayedPredicate = true) && BIRTH_DATE == '123'))\");\n ... | {
"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_12 | {
"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 testUnsetFlagFileTimeStamps() throws Exception {\n log.info(\"----- testUnsetFlagFileTimeStamps -----\");\n File f = setUpFlagDir();\n // two days, 5 files each day, two folders in fmc = 20 flags\n LongRange range = createTestFiles(2, 5);\n fmc.se... | {
"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_621 | {
"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 testHeadSet() {\n int end = sortedOrder.length / 3;\n try {\n SortedSet<byte[]> subSet = set.headSet(data[sortedOrder[end]]);\n SortedSet<byte[]> expected = new TreeSet<>(set.comparator());\n for (int i = 0; i < end; i++) {\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> headSet(E toElement) {\n return set.headSet(toElement);\n }",
"class_method_signature": "BufferedFileBackedSortedSet.headSet(E toElement)",
"constructor": false,
"full_signature": "@Override public SortedSet<E> headSet(E toElement)",
"identifier": "headS... | {
"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_271 | {
"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 testExceededOrPropertyMarkerPropagate() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!((ExceededOrThresholdMarkerJexlNode = true) && (F1 == 'v1' || F2 == 'v2'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/PushdownNegationVisitor.java",
"identifier": "PushdownNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PushdownNegationVisitor.pushdownNegations(JexlNode tree)",
"constructor":... | {
"body": "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_436 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testDistributeOrTermsWithFlatten() throws ParseException {\n String original = \"(a || b) && (c || d) && (e || f)\";\n String expected = \"((c || d) && (e || f) && a) || ((c || d) && (e || f) && b)\";\n // The OR node's terms are distributed throughout the AND no... | {
"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_965 | {
"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 testBuildNormalizedProxyDNTooFewSubjects() {\n DnUtils.buildNormalizedProxyDN(\"SDN\", \"IDN\", \"SDN2\", \"IDN2<IDN3>\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedProxyDNTooFewSubjects()",
"constructor":... | {
"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_820 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IntersectionTest.java",
"identifier": "IntersectionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersection_DifferentShardStreams() {\n // Build a peeking iterator for a left side term\n List<IndexMatch> leftMatches = buildIndexMatches(\"FIELD\", \"VALUE\", \"doc1\", \"doc2\", \"doc3\");\n IndexInfo left = new IndexInfo(leftMatches);\n left.setN... | {
"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 boolean hasNext() {\n return next != null;\n }",
"class_method_signature": "Intersection.hasNext()",
"constructor": false,
"full_signature": "@Override public boolean hasNext()",
"identifier": "hasNext",
"invocations": [],
"modifiers": "@Override public",
"para... | {
"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_123 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/content/BoundedOffsetQueueTest.java",
"identifier": "BoundedOffsetQueueTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddOffset() {\n \n BoundedOffsetQueue uut = new BoundedOffsetQueue(20);\n \n for (int offset = 0; offset < uut.getCapacity(); offset++) {\n \n String token = String.format(\"term-%d:zone-%d\", offset, offset);\n \n ... | {
"fields": [
{
"declarator": "serialVersionUID = 452499360525244451L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 452499360525244451L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "offsets... | {
"body": "@Override\n public OffsetList addOffset(TermAndZone termAndZone, T offset) {\n String key = termAndZone.getToken();\n queue.remove(key);\n \n List<T> offsets = offsetsMap.remove(key);\n if (null == offsets) {\n offsets = new ArrayList<>();\n }\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_573 | {
"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_alternatingExtremesREVERSETest() {\n // 102->101->100\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(100, 200, 300, 500, 601);\n List<TermWeightPosition> offsetsB = asList(1, 5, 29, 87, 1... | {
"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_86 | {
"fields": [
{
"declarator": "agg = new CardinalityAggregator()",
"modifier": "final",
"original_string": "final PropogatingCombiner agg = new CardinalityAggregator();",
"type": "PropogatingCombiner",
"var_name": "agg"
}
],
"file": "warehouse/ingest-core/src/test/java/datawa... | {
"body": "@Test\n public void testResetPropagate() {\n agg.reset();\n assertTrue(agg.propogateKey());\n agg.setPropogate(false);\n assertFalse(agg.propogateKey());\n agg.reset();\n assertTrue(agg.propogateKey());\n }",
"class_method_signature": "CardinalityAggregator... | {
"fields": [
{
"declarator": "EMPTY_VALUE = new Value(new byte[0])",
"modifier": "public static final",
"original_string": "public static final Value EMPTY_VALUE = new Value(new byte[0]);",
"type": "Value",
"var_name": "EMPTY_VALUE"
},
{
"declarator": "log = Logger.get... | {
"body": "@Override\n public void reset() {\n if (log.isDebugEnabled())\n log.debug(\"Resetting CardinalityAggregator\");\n this.propogate = true;\n }",
"class_method_signature": "CardinalityAggregator.reset()",
"constructor": false,
"full_signature": "@Override public void reset... | {
"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_1004 | {
"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 testReverseMappingParse() throws Exception {\n EasyMock.expect(System.currentTimeMillis()).andReturn(TIMESTAMP);\n PowerMock.replayAll();\n Key k = ModelKeyParser.createKey(REVERSE_FIELD_MAPPING, MODEL_NAME);\n PowerMock.verifyAll();\n Assert.assert... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static Key createKey(FieldMapping mapping, String modelName) {\n ColumnVisibility cv = new ColumnVisibility(mapping.getColumnVisibility());\n \n String inName = Direction.REVERSE.equals(mapping.getDirection()) ? mapping.getFieldName() : mapping.getModelFieldName();\n Stri... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_69 | {
"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 testAreAggregatorsConfigured() throws AccumuloSecurityException, TableNotFoundException, AccumuloException {\n \n AbstractTableConfigHelperTest.logger.info(\"AbstractTableConfigHelperTest.testAreAggregatorsConfigured() 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": "protected boolean areAggregatorsConfigured(String tableName, List<CombinerConfiguration> aggregators, TableOperations tops) throws TableNotFoundException {\n boolean aggregatorsConfigured = false;\n Map<String,String> props = generateInitialTableProperties();\n props.putAll(generateAgg... | {
"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_898 | {
"fields": [
{
"declarator": "testKeyHelper",
"modifier": "private",
"original_string": "private EdgeTableTestKeyHelper testKeyHelper;",
"type": "EdgeTableTestKeyHelper",
"var_name": "testKeyHelper"
},
{
"declarator": "decoder",
"modifier": "private",
"orig... | {
"body": "@Test\n public void extractsEachStatsType() {\n for (EdgeKey.STATS_TYPE statsType : EdgeKey.STATS_TYPE.values()) {\n Assert.assertEquals(statsType, EdgeKeyDecoder.determineStatsType(new Text(\"STATS/\" + statsType.name() + \"/CATEGORY\")));\n Assert.assertEquals(statsType, E... | {
"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_932 | {
"fields": [
{
"declarator": "baseQueryResponse",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private BaseQueryResponse baseQueryResponse;",
"type": "BaseQueryResponse",
"var_name": "baseQueryResponse"
},
{
"declarator": "decodedFormParameters",
... | {
"body": "@Test\n public void testPostProcess_BaseQueryResponse() throws Exception {\n QueryMetricsEnrichmentInterceptor subject = new QueryMetricsEnrichmentInterceptor();\n \n // Set expectations\n expect(responseContext.getHeaders()).andReturn(writeHeaders);\n expect(writeHead... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryMetricsEnrichmentInterceptor.class)",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(QueryMetricsEnrichmentInterceptor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public void filter(ContainerRequestContext request) throws IOException {\n // Just call the parent doPreProcess so that we save stats for this call and look them up in the postProcess/write\n doPreProcess((PreMatchContainerRequestContext) request);\n }",
"class_method_sign... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_461 | {
"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 testGroupingFunctionRegex() throws Exception {\n String originalQuery = \"grouping:matchesInGroup(FOO, 'abc.*')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.... | {
"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_524 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleLE() 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_174 | {
"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 testGetFileStatus() {\n logger.info(\"testGetFileStatus called...\");\n setSplitsCacheDir();\n setupConfiguration();\n try {\n TableSplitsCache uut = new TableSplitsCache(createMockJobConf());\n FileStatus fileStatus = uut.getFileStat... | {
"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 FileStatus getFileStatus() {\n FileStatus splitsStatus = null;\n try {\n splitsStatus = FileSystem.get(this.splitsPath.toUri(), conf).getFileStatus(this.splitsPath);\n } catch (IOException ex) {\n String logMessage = ex instanceof FileNotFoundException ? \"... | {
"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_877 | {
"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 testWritable() throws IOException {\n UID a = new HashUID(data.getBytes(), (Date) null) {};\n \n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(baos);\n a.write(out);\n out.close();\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 4016018180334520481L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 4016018180334520481L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAU... | {
"body": "public void readFields(DataInput in) throws IOException {\n HashUID input = HashUID.parse(in.readUTF());\n this.optionalPrefix = input.optionalPrefix;\n this.h1 = input.h1;\n this.h2 = input.h2;\n this.time = input.time;\n this.extra = input.extra;\n }",
"clas... | {
"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_1053 | {
"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 testColumnThatNeedEscapingInOrderBy() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar\", null, null, \"foo.bar\", \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`foo.bar` FROM v WHERE _user_ = 'me' ORDER BY `foo.bar`\", sql);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_318 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidERWithCacheHit() throws ParseException {\n String queryString = \"BAR == '1' && FOO =~ '1234.*\\\\d' && FOO2 =~ '1234.*\\\\d'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(script);\n }",
"class_me... | {
"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_748 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/jexl/JexlNodeSetTest.java",
"identifier": "JexlNodeSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDirectAddAll() {\n JexlNode node1 = JexlNodeFactory.buildEQNode(\"FOO\", \"bar\");\n JexlNode node2 = JexlNodeFactory.buildEQNode(\"FOO2\", \"bar2\");\n JexlNodeSet nodeSet = new JexlNodeSet();\n nodeSet.add(node1);\n nodeSet.add(node2);\n ... | {
"fields": [
{
"declarator": "useSourceNodeForKeys = false",
"modifier": "private",
"original_string": "private boolean useSourceNodeForKeys = false;",
"type": "boolean",
"var_name": "useSourceNodeForKeys"
},
{
"declarator": "nodeMap",
"modifier": "protected fina... | {
"body": "private boolean directAddAll(JexlNodeSet other) {\n boolean modified = false;\n Set<Map.Entry<String,JexlNode>> otherEntries = other.nodeMap.entrySet();\n for (Map.Entry<String,JexlNode> entry : otherEntries) {\n if (directAdd(entry.getKey(), entry.getValue())) {\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_477 | {
"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 falseDoubleAndRewriteTest() throws ParseException {\n String query = \"FIELD1 == 'x' && _NOFIELD_ == 'y' && FIELD2 == 'y'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n JexlNode reduced = QueryPruningVisitor.reduce(script, true);\n \n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static JexlNode reduce(JexlNode node, boolean showPrune) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(true, showPrune);\n \n String before = null;\n String after;\n \n if (showPrune) {\n before = JexlStringBuildingVisitor.buildQuery(n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_2 | {
"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 testCall() 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 FlagEntryMover instance = new FlagEntryMover(direc... | {
"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_924 | {
"fields": [
{
"declarator": "TYPE1 = \"/type1-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String TYPE1 = \"/type1-config.xml\";",
"type": "String",
"var_name": "TYPE1"
},
{
"declarator": "TYPE2 = \"/type2-config.xml\"",
... | {
"body": "@Test\n public void shouldDetectRightOnlySettings() {\n CompareResult result = compare.run(type1Conf, type2Conf);\n assertTrue(result.getRightOnly().contains(\"only.type2.value\"));\n }",
"class_method_signature": "DataTypeConfigCompareTest.shouldDetectRightOnlySettings()",
"constru... | {
"fields": [
{
"declarator": "PREFIX = \"data.name\"",
"modifier": "public static final",
"original_string": "public static final String PREFIX = \"data.name\";",
"type": "String",
"var_name": "PREFIX"
}
],
"file": "warehouse/ops-tools/config-compare/src/main/java/datawave/c... | {
"body": "public CompareResult run(Configuration left, Configuration right) {\n SortedSet<String> same = new TreeSet<>();\n SortedSet<String> diff = new TreeSet<>();\n SortedSet<String> leftOnly = new TreeSet<>();\n SortedSet<String> rightOnly = new TreeSet<>();\n \n String ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_861 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsJEXLQuery3() {\n \n DatawaveSelectorExtractor extractor = new DatawaveSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"FIELD1 == 'selector1' || _ANY_FIELD_ == 'selector2' || (_ANY_FIELD_ == 'selector3' && _ANY_FIELD_ == ... | {
"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_498 | {
"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 LTTest() throws ParseException {\n String query = \"FIELD < 'x'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.getState(script), QueryPruningVisitor.TruthState.UNKNOWN);\n \n Assert.assertE... | {
"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_162 | {
"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 testRecordWriterWriteWithUpdatesAndTypes() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithUpdatesAndTypes called...\");\n \n try {\n \n CBMutationOutputFormatter uu... | {
"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_532 | {
"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 parse2TrailingBackslashesEquals() throws Exception {\n String query = \"CITY == 'city\\\\\\\\\\\\\\\\'\";\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_1045 | {
"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 testEmptyFields() throws Exception {\n String sql = crq.generateSql(\"v\", \"\", null, null, null, \"me\", null);\n Assert.assertEquals(\"SELECT * FROM v WHERE _user_ = 'me'\", sql);\n }",
"class_method_signature": "CachedRunningQueryTest.testEmptyFields()",
"con... | {
"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_28 | {
"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 shouldFailOnIncorrectConfig1() {\n conf.set(dataType.typeName() + IngestFieldFilter.FILTER_FIELD_NAME_SUFFIX, \"TOO:MANY:TOKENS,NAME:NICKNAME\");\n \n filter.setup(conf);\n }",
"class_method_signature": "IngestField... | {
"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_973 | {
"fields": [
{
"declarator": "USER_DN = \"userDN\"",
"modifier": "private static final",
"original_string": "private static final String USER_DN = \"userDN\";",
"type": "String",
"var_name": "USER_DN"
},
{
"declarator": "ISSUER_DN = \"issuerDN\"",
"modifier": "pr... | {
"body": "@Test\n public void testMergeAuthorizations() {\n HashSet<Authorizations> expected = Sets.newHashSet(new Authorizations(\"A\", \"C\"), new Authorizations(\"A\"));\n assertEquals(expected, AuthorizationsUtil.mergeAuthorizations(methodAuths, userAuths));\n }",
"class_method_signature": ... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Set<Authorizations> mergeAuthorizations(String requestedAuths, Collection<? extends Collection<String>> userAuths) {\n HashSet<String> requested = null;\n if (!StringUtils.isEmpty(requestedAuths)) {\n requested = new HashSet<>(splitAuths(requestedAuths));\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_420 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceRangeWithAnchorTerm() throws ParseException {\n String originalQuery = \"(NUM >= '+aE1' && NUM <= '+aE4') && TACO == 'tacocat'\";\n // Ordering of query terms is not deterministic\n String expectedQuery = \"TACO == 'tacocat' && (NUM >= '+aE1' && NUM <... | {
"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_565 | {
"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_buildDocKeepFilteredOut() 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(... | {
"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_135 | {
"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 testCleanUpJobDirectoryHappyPath() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testCleanUpJobDirectoryUnableToMakeDirectory called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.class.getResource(\"... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BulkIngestMapFileLoader.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(BulkIngestMapFileLoader.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public void cleanUpJobDirectory(Path mapFilesDir) throws IOException {\n Path jobDirectory = mapFilesDir.getParent();\n \n FileSystem destFs = getFileSystem(destHdfs);\n \n FileStatus[] failedDirs = destFs.globStatus(new Path(mapFilesDir, \"failures/*/*\"));\n bool... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_836 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompareToWithDifferentUids() {\n IndexMatch left = new IndexMatch(\"uid0\");\n IndexMatch right = new IndexMatch(\"uid2\");\n \n assertEquals(-2, left.compareTo(right));\n assertEquals(2, right.compareTo(left));\n }",
"class_method_signatur... | {
"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_90 | {
"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 testCreatesReverseIndexedField() throws IOException {\n setupMocks();\n \n helper.addReverseIndexedField(FIELD_TO_COUNT);\n RawRecordMetadata eventMetadata = new EventMetadata(null, METADATA_TABLE_NAME, LOADDATES_TABLE_NAME, INDEX_TABLE_NAME, RINDEX_TABLE_... | {
"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_1012 | {
"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 testKeyWithNoDirection() throws Exception {\n // Test key with no direction\n Key keyNoDirection = new Key(MODEL_FIELD_NAME, MODEL_NAME, FIELD_NAME, COLVIZ, TIMESTAMP);\n ModelKeyParser.parseKey(keyNoDirection, AUTHS);\n... | {
"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_359 | {
"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 testMultipleNormalizersForExceededRegex() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new LcNoDiacriticsType(), new NoOpType()));\n \n config.setQueryFieldsDatatypes(data... | {
"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_709 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testMismatchAttribute1Source() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST7' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'BLAH1-BL... | {
"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_284 | {
"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 testApplyDeMorgansNegateAndRoot() {\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.a... | {
"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_1065 | {
"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 testIsFunction() throws Exception {\n Object result = Whitebox.invokeMethod(crq, \"isFunction\", \"MIN(foo.bar)\");\n Assert.assertTrue((Boolean) result);\n result = Whitebox.invokeMethod(crq, \"isFunction\", \"COUNT(foo.bar)\");\n Assert.assertTrue((Boole... | {
"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": "private boolean isFunction(String field) {\n if (field.contains(LPAREN) && field.contains(RPAREN) && field.indexOf(LPAREN) > 0) {\n boolean matches = false;\n for (String pattern : allowedFunctions) {\n matches = field.matches(pattern);\n if (match... | {
"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_791 | {
"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 testSubstringNonAncestorUids1() {\n uids1.add(new IndexMatch(\"a.b.c.10.1\", node1));\n uids2.add(new IndexMatch(\"a.b.c.1\", node2));\n \n Set<IndexMatch> result = intersector.intersect(uids1, uids2, Collections.EMPTY_LIST);\n \n Assert.asse... | {
"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_841 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/CreateUidsIteratorTest.java",
"identifier": "CreateUidsIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseDataType() {\n assertEquals(\"datatype\", CreateUidsIterator.parseDataType(new Key(\"row\", \"cf\", \"shard_1\\u0000datatype\")));\n }",
"class_method_signature": "CreateUidsIteratorTest.testParseDataType()",
"constructor": false,
"full_signature": "@Test pub... | {
"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 String parseDataType(Key k) {\n ByteSequence colq = k.getColumnQualifierData();\n return new String(colq.subSequence(lastNull(colq) + 1, colq.length()).toArray());\n }",
"class_method_signature": "CreateUidsIterator.parseDataType(Key k)",
"constructor": false,
"full_sig... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_142 | {
"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 testTakeOwnershipJobDirectoryHappyPath() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testTakeOwnershipJobDirectoryHappyPath called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.class.getResource(\"... | {
"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_512 | {
"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 testMixedEventNonEvent() throws ParseException {\n String query = \"filter:includeRegex(EVENT_FIELD || NON_EVENT_FIELD,'all_.*?')\";\n \n Set<String> indexOnlyFields = Sets.newHashSet();\n indexOnlyFields.add(\"NON_EVENT_FIELD\");\n \n JexlNo... | {
"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_457 | {
"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 testAndSameGroupingOnKey() throws Exception {\n String originalQuery = \"FOO == 'abc' && FOO == 'def'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpress... | {
"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_904 | {
"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 testDecodeDurationHistogramWithProtoValue() {\n // only set 3 durations instead of the expected 7\n List<Long> incompleteList = createIncompleteHistogram();\n \n EdgeData.EdgeValue.Builder builder = EdgeData.EdgeValue.newBuilder();\n builder.addAllD... | {
"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_1032 | {
"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 testEvict() throws Exception {\n Principal expected = cache.asMap().keySet().stream().filter(p -> p.getName().startsWith(\"user2\")).findFirst().orElse(null);\n assertNotNull(expected);\n assertEquals(3, cache.size());\n ccb.evict(\"user2<issuer2>\");\n ... | {
"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(\"/{dn}/evict\")\n @Produces({\"text/plain\"})\n @JmxManaged\n public String evict(@PathParam(\"dn\") String dn) {\n \n String result = \"Evicted \" + dn + \" from the credentials cache.\";\n if (!cachedDatawaveUserServiceInstance.isUnsatisfied()) {\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_683 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFetchDataTypeKeysFromNullString() {\n String data = null;\n Set<String> expectedDataTypeKeys = Sets.newHashSet();\n Set<String> dataTypeKeys = QueryOptions.fetchDataTypeKeys(data);\n assertEquals(\"Failed to parse null option string\", expectedDataType... | {
"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_379 | {
"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 multipleMappings() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO == 'baz' && FIELD == 'taco' && OUT == 2\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"(BAR1 == 'baz' || BAR2 == 'baz') && FIELD == 'taco' && IN =... | {
"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_729 | {
"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 testRegex() throws ParseException {\n Assert.assertEquals(\"F =~ 'test.[abc]?ing'\", parser.parse(\"F:/test.[abc]?ing/\").getOriginalQuery());\n Assert.assertEquals(\"F =~ 'test./[abc]?ing'\", parser.parse(\"F:/test.\\\\/[abc]?ing/\").getOriginalQuery());\n Asser... | {
"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_396 | {
"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 testSubstitutionsEverywhere() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"AG.getValuesForGroups(grouping:getGroupsForMatchesInGroup(NAM, 'MEADOW', GEN, 'FEMALE')) < 19\");\n ASTJexlScript expectedScript = JexlASTHelper\n ... | {
"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_545 | {
"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 parse2InteriorBackslashesRegex() throws Exception {\n String query = \"CITY =~ 'ci\\\\\\\\\\\\\\\\ty'\";\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_115 | {
"fields": [
{
"declarator": "TEST_TYPE = \"test\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TYPE = \"test\";",
"type": "String",
"var_name": "TEST_TYPE"
},
{
"declarator": "TEST_UID = UID.builder().newId()",
"modi... | {
"body": "@Test\n public void testSingleEvent() {\n ExtendedDataTypeHandler<Text,BulkIngestKey,Value> handler = new FacetHandler<>();\n handler.setup(ctx);\n \n helper.setup(ctx.getConfiguration());\n \n Multimap<String,NormalizedContentInterface> fields = TestData.getDat... | {
"fields": [
{
"declarator": "log = Logger.getLogger(FacetHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(FacetHandler.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "FACET_TA... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n markingFunctions = MarkingFunctions.Factory.createMarkingFunctions();\n \n taskAttemptContext = context;\n \n Configuration conf = context.getConfiguration();\n \n final String t = Configuratio... | {
"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_816 | {
"fields": [
{
"declarator": "queryNode = null",
"modifier": "private",
"original_string": "private JexlNode queryNode = null;",
"type": "JexlNode",
"var_name": "queryNode"
},
{
"declarator": "config",
"modifier": "private",
"original_string": "private Shar... | {
"body": "@Test\n public void testApplyWithDayRange() {\n String shard = \"20190314\";\n IndexInfo indexInfo = new IndexInfo(-1);\n indexInfo.applyNode(queryNode);\n Tuple2<String,IndexInfo> tuple = new Tuple2<>(shard, indexInfo);\n \n // Build expected shard ranges\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TupleToRange.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TupleToRange.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "currentS... | {
"body": "public Iterator<QueryPlan> apply(Tuple2<String,IndexInfo> tuple) {\n String shard = tuple.first();\n IndexInfo indexInfo = tuple.second();\n \n JexlNode queryNode = currentScript;\n if (log.isTraceEnabled() && indexInfo.getNode() != null) {\n log.trace(\"Got it... | {
"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_953 | {
"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_EJBException2() {\n Exception e = new EJBException(new QueryException());\n StackTraceElement[] traceArr = new StackTraceElement[1];\n traceArr[0] = new StackTraceElement(\"dummyClass\", \"dummyMethod\", null, 0);\n \n e.setStackTrace... | {
"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_400 | {
"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 testSpecialCharAppliedToNumericQuery() throws ParseException {\n model.addTermToModel(\"FOO1\", \"1BAR\");\n model.addTermToModel(\"FOO1\", \"2BAR\");\n \n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO1 == 'baz'\");\n ASTJexlScript expec... | {
"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_1024 | {
"fields": [
{
"declarator": "BLACKLIST_ROLE = \"BLACKLIST_ROLE\"",
"modifier": "private static final",
"original_string": "private static final String BLACKLIST_ROLE = \"BLACKLIST_ROLE\";",
"type": "String",
"var_name": "BLACKLIST_ROLE"
},
{
"declarator": "datawaveLog... | {
"body": "@Test\n public void testGetRoleSets() throws Exception {\n DatawaveCredential datawaveCredential = new DatawaveCredential(testUserCert, null, null);\n callbackHandler.name = datawaveCredential.getUserName();\n callbackHandler.credential = datawaveCredential;\n \n Strin... | {
"fields": [
{
"declarator": "identity",
"modifier": "private",
"original_string": "private Principal identity;",
"type": "Principal",
"var_name": "identity"
},
{
"declarator": "certificateCredential",
"modifier": "private",
"original_string": "private X509... | {
"body": "@Override\n protected Group[] getRoleSets() throws LoginException {\n Group groups[];\n try {\n Set<String> roles = new TreeSet<>();\n String targetUser = getUsername();\n DatawavePrincipal principal = (DatawavePrincipal) getIdentity();\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_695 | {
"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 testScannerSessionWithBatchResourceHighMaxResults() throws TableNotFoundException {\n Set<Authorizations> auths = new HashSet<>();\n auths.add(new Authorizations());\n ScannerSession ss = new ScannerSession(\"testTable\", auths, resourceQueue, 5000000, null);\n ... | {
"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_49 | {
"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 testIsKeyInBloomFilter() {\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(... | {
"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": "static boolean isKeyInBloomFilter(org.apache.accumulo.core.data.Key cbKey) {\n byte[] cf = cbKey.getColumnFamilyData().getBackingArray();\n // if we have a column family with the field name and a column qualifier with the field value, then\n // we can use the bloom filter for this key\... | {
"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_380 | {
"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 multipleMappingsWithBounds() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO > 'a' && FOO < 'z'\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"(BAR1 > 'a' && BAR1 < 'z') || (BAR2 > 'a' && BAR2 < 'z')\");\n ... | {
"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_800 | {
"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 testMultipleBranchesCommonAncestor() {\n uids2.add(new IndexMatch(\"a.b.c\", node1));\n uids2.add(new IndexMatch(\"a.b.c.2\", node1));\n uids2.add(new IndexMatch(\"a.b.c.1\", node1));\n uids1.add(new IndexMatch(\"a.b.c.1\", node2));\n uids1.add(new ... | {
"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_103 | {
"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(expected = RuntimeException.class)\n public void testEmptySplitsThrowsException() throws IOException, URISyntaxException {\n mockContextForLocalCacheFile(createUrl(\"trimmed_empty_splits.txt\"));\n getPartition();\n }",
"class_method_signature": "MultiTableRangePartitionerTest.t... | {
"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_553 | {
"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 parseEqualsWithEscapedQuoteTest() throws Exception {\n String query = \"CITY == 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty\\\\\\\\.bl\\\\'ah'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQueryWithoutParse... | {
"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_416 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RootNegationCheckVisitorTest.java",
"identifier": "RootNegationCheckVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDoubleNegatedNR() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"!(FOO !~ 'bar.*')\");\n Assert.assertFalse(RootNegationCheckVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "RootNegationCheckVisitorTest.tes... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RootNegationCheckVisitor.java",
"identifier": "RootNegationCheckVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RootNegationCheckVisitor.hasTopLevelNegation(JexlNode script)",
"constr... | {
"body": "public static Boolean hasTopLevelNegation(JexlNode script) {\n RootNegationCheckVisitor visitor = new RootNegationCheckVisitor();\n \n // ensure all negations are pushed down\n JexlNode pushedDownTree = PushdownNegationVisitor.pushdownNegations(script);\n return !visitor.... | {
"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_945 | {
"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": "@Test\n public void testCancelUserQuery_CacheReturnsNonRunningQuery() throws Exception {\n // Set expectations\n UUID queryId = UUID.randomUUID();\n expect(this.altCache.get(queryId.toString())).andReturn(PowerMock.createMock(RunningQuery.class));\n \n // Run the test\... | {
"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 cancelUserQuery(String id) throws Exception {\n AbstractRunningQuery arq = cache.get(id);\n if (arq != null) {\n try {\n @SuppressWarnings(\"unused\")\n Void... | {
"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_1073 | {
"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 = NoResultsException.class)\n public void testNoResults() throws Exception {\n Job mockJob = createMock(Job.class);\n bean.setJob(mockJob);\n \n MapReduceJobConfiguration cfg = new MapReduceJobConfiguration() {\n @Override\n public final v... | {
"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_338 | {
"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 testSimpleCase() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new LcNoDiacriticsType()));\n \n helper.setIndexedFields(dataTypes.keySet());\n helper.setIndexOnlyFie... | {
"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_292 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test4() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO == 'bar' && FOO == 'bar'\");\n Assert.assertFalse(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test4()... | {
"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_768 | {
"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 testFunctionInsufficientTerms() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n luceneParser.parse(\"#isnull(field) #include(field, test[abc]*.*)\");\n }",
"class_method_signature": "TestLuceneQ... | {
"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_787 | {
"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 testChildReject() {\n Key key = new Key(\"abc\", \"1234.123.12345\");\n Key other = new Key(\"abc\", \"1234.123.12345.1\");\n assertFalse(equality.partOf(key, other));\n }",
"class_method_signature": "AncestorEqualityTest.testChildReject()",
"constructor":... | {
"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_504 | {
"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 LTNoFieldTest() throws ParseException {\n String query = \"_NOFIELD_ < 'x'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, QueryPruningVisitor.getState(script));\n \n Asser... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_154 | {
"fields": [
{
"declarator": "CONFIG_LOC = \"/datawave/ingest/mapreduce/job/metrics/test-metrics-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String CONFIG_LOC = \"/datawave/ingest/mapreduce/job/metrics/test-metrics-config.xml\";",
"type": "S... | {
"body": "@Test\n public void shouldConfigureAggregators() throws Exception {\n String table = MetricsConfiguration.getTable(conf);\n \n configHelper.configure(tops);\n IteratorSetting is = tops.getIteratorSetting(table, \"sum\", IteratorScope.scan);\n \n assertEquals(Sum... | {
"fields": [
{
"declarator": "tableName",
"modifier": "private",
"original_string": "private String tableName;",
"type": "String",
"var_name": "tableName"
},
{
"declarator": "conf",
"modifier": "private",
"original_string": "private Configuration conf;",
... | {
"body": "@Override\n public void configure(TableOperations tops) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {\n if (MetricsConfiguration.isEnabled(conf)) {\n try {\n String table = MetricsConfiguration.getTable(conf);\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_857 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsTripleNegation() {\n \n DatawaveSelectorExtractor extractor = new DatawaveSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"FIELD1:selector1 NOT (selector2 NOT (selector3 NOT selector4))\");\n List<String> selector... | {
"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_912 | {
"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 testFetchDateTypeOfKey() {\n Key k1 = new Key(new Text(\"A\\0B\"), new Text(\"type/relationA-relationB\"), new Text(\"19700101/attr1-attr1/attr2/attr3/A\"));\n \n Key k2 = new Key(new Text(\"A\\0B\"), new Text(\"type/relationA-relationB\"), new Text(\"19700101/at... | {
"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 DATE_TYPE getDateType() {\n return dateType;\n }",
"class_method_signature": "EdgeKey.getDateType()",
"constructor": false,
"full_signature": "public DATE_TYPE getDateType()",
"identifier": "getDateType",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return... | {
"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_441 | {
"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 test() throws Exception {\n String originalQuery = \"FOO == 'abc'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilters(script, attrFactory);\n ... | {
"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_206 | {
"fields": [
{
"declarator": "TNAME = \"s\"",
"modifier": "private static final",
"original_string": "private static final String TNAME = \"s\";",
"type": "String",
"var_name": "TNAME"
},
{
"declarator": "testTServers",
"modifier": "private",
"original_stri... | {
"body": "@Test\n public void testLopsidedBalance() {\n // Start out with 255 tablet servers. Later, we'll add more\n final int NUM_TSERVERS = 255;\n TServerInstance tsi = null;\n for (int i = 0; i < NUM_TSERVERS; ++i) {\n tsi = testTServers.addTServer(\"127.0.0.1\");\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ShardedTableTabletBalancer.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ShardedTableTabletBalancer.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public synchronized void getAssignments(SortedMap<TServerInstance,TabletServerStatus> current, Map<KeyExtent,TServerInstance> unassigned,\n Map<KeyExtent,TServerInstance> assignments) {\n // During getAssignments, we'll just partition using the shard's day.\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_656 | {
"fields": [
{
"declarator": "row = \"20190314\"",
"modifier": "private final",
"original_string": "private final String row = \"20190314\";",
"type": "String",
"var_name": "row"
},
{
"declarator": "field = \"FIELD_A\"",
"modifier": "private final",
"origin... | {
"body": "@Test\n public void testLastInstancesOfWithRepeat() {\n ByteSequence bytes = new ArrayByteSequence(\"how.many.dots.do.we.have?\");\n ArrayList<Integer> expectedPositions = Lists.newArrayList(19, 16, 13);\n ArrayList<Integer> instances = TLD.lastInstancesOf('.', bytes, 3);\n a... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/tld/TLD.java",
"identifier": "TLD",
"interfaces": "",
"methods": [
{
"class_method_signature": "TLD.TLD()",
"constructor": true,
"full_signature": "private TLD()",
"identifier": "TLD",
"modifiers": "p... | {
"body": "public static ArrayList<Integer> lastInstancesOf(int b, ByteSequence sequence, int repeat) {\n ArrayList<Integer> positions = Lists.newArrayList();\n for (int i = sequence.length() - 1; i >= 0 && positions.size() != repeat; --i) {\n if (sequence.byteAt(i) == b) {\n p... | {
"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_65 | {
"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 testSetPropertyIfNecessaryWithExistingValue() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n AbstractTableConfigHelperTest.logger.info(\"AbstractTableConfigHelperTest.testSetPropertyIfNecessary() 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_1008 | {
"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 testReverseCreateDeleteMutation() throws Exception {\n EasyMock.expect(System.currentTimeMillis()).andReturn(TIMESTAMP);\n PowerMock.replayAll();\n Mutation m = ModelKeyParser.createDeleteMutation(REVERSE_FIELD_MAPPING, MODEL_NAME);\n PowerMock.verifyAll()... | {
"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 createDeleteMutation(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().tri... | {
"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_343 | {
"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 testIpAddressCase() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new LcNoDiacriticsType(), new LcType()));\n dataTypes.putAll(\"IP\", Sets.newHashSet(new LcNoDiacriticsType(), ne... | {
"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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.