id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_291 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test3() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"(FOO != 'bar')\");\n Assert.assertTrue(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test3()",
"construct... | {
"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_442 | {
"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 testNegation() throws Exception {\n String originalQuery = \"FOO != 'abc'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilters(script, attrFacto... | {
"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_911 | {
"fields": [
{
"declarator": "refBuilder",
"modifier": "",
"original_string": "EdgeKeyBuilder refBuilder;",
"type": "EdgeKeyBuilder",
"var_name": "refBuilder"
},
{
"declarator": "refStatsBase",
"modifier": "",
"original_string": "Key refStatsBase;",
"... | {
"body": "@Test(expected = IllegalStateException.class)\n public void testBlankKey() {\n Key blankStats = new Key(new Text(\"\"), refStatsBase.getColumnFamily(), refStatsBase.getColumnQualifier(), refStatsBase.getColumnVisibility());\n EdgeKey.decode(blankStats);\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "format",
"modifier": "private final",
"original_string": "private final EDGE_FORMAT format;",
"type": "EDGE_FORMAT",
"var_name": "format"
},
{
"declarator": "statsType",
"modifier": "private final",
"original_string": "private ... | {
"body": "public static EdgeKey decode(Key key) {\n return decode(key, EdgeKey.newBuilder().unescape());\n }",
"class_method_signature": "EdgeKey.decode(Key key)",
"constructor": false,
"full_signature": "public static EdgeKey decode(Key key)",
"identifier": "decode",
"invocations": [
"decode... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_854 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsLuceneQuery3() {\n \n DatawaveSelectorExtractor extractor = new DatawaveSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"FIELD1:selector1 OR selector2 OR (selector3 AND selector4)\");\n List<String> selectorList =... | {
"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_507 | {
"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 testDoubleEndedWildCard() 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_157 | {
"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 testGetRecordWriter() throws IOException {\n \n CBMutationOutputFormatterTest.logger.info(\"testGetRecordWriter called...\");\n \n try {\n \n CBMutationOutputFormatter uut = new CBMutationOutputFormatter();\n \n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CBMutationOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CBMutationOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
}
],
"fi... | {
"body": "@Override\n public RecordWriter<Text,Mutation> getRecordWriter(TaskAttemptContext attempt) throws IOException {\n return new CBRecordWriter(super.getRecordWriter(attempt), attempt);\n }",
"class_method_signature": "CBMutationOutputFormatter.getRecordWriter(TaskAttemptContext attempt)",
"co... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_340 | {
"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 testNoOp() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.put(\"NOOP\", new NoOpType());\n \n helper.setIndexedFields(dataTypes.keySet());\n helper.setIndexOnlyFields(dataTypes.keySet());\n h... | {
"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_710 | {
"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 testMismatchRelationshipSource() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST7' AND RELATION == 'NOREL1-NOREL2' AND ATTRIBUTE1 == 'SO... | {
"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_66 | {
"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 testSetPropertyIfNecessaryWithExistingProperty() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n AbstractTableConfigHelperTest.logger.info(\"AbstractTableConfigHelperTest.testSetPropertyIfNecessaryWithExistingProperty() called.\");\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_89 | {
"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 testCreatesTermFrequencyForLists() throws IOException {\n setupAbstractContentIngestHelper(false, true);\n setupMocks();\n \n RawRecordMetadata eventMetadata = new EventMetadata(null, METADATA_TABLE_NAME, LOADDATES_TABLE_NAME, INDEX_TABLE_NAME, RINDEX_TABL... | {
"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_205 | {
"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 testLargeRebalance() {\n // Start out with 255 tablet servers. Later, we'll add more.\n final int NUM_TSERVERS = 255;\n for (int i = 0; i < NUM_TSERVERS; ++i) {\n testTServers.addTServer(\"127.0.0.1\");\n }\n \n // Come up with ext... | {
"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_655 | {
"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 testLastInstancesOf() {\n ByteSequence bytes = new ArrayByteSequence(\"how.many.dots.do.we.have?\");\n ArrayList<Integer> expectedPositions = Lists.newArrayList(19, 16, 13, 8, 3);\n ArrayList<Integer> instances = TLD.lastInstancesOf('.', bytes, -1);\n asse... | {
"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_985 | {
"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 testMinimizeWithMultipleSubsets() {\n LinkedHashSet<Authorizations> testSet = new LinkedHashSet<>();\n testSet.add(new Authorizations(\"A\", \"B\", \"C\", \"D\"));\n testSet.add(new Authorizations(\"B\", \"C\"));\n testSet.add(new Authorizations(\"A\", \"B... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Collection<Authorizations> minimize(Collection<Authorizations> authorizations) {\n return AuthorizationsMinimizer.minimize(authorizations);\n }",
"class_method_signature": "AuthorizationsUtil.minimize(Collection<Authorizations> authorizations)",
"constructor": false,
"full_sig... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_439 | {
"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 testGlobalIndex() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(baseQuery);\n \n replayAll();\n \n // global index\n Assert.assertEquals(expectedPreGlobalState, ExecutableDeterminationVisitor.getState(query, con... | {
"fields": [
{
"declarator": "helper",
"modifier": "protected",
"original_string": "protected MetadataHelper helper;",
"type": "MetadataHelper",
"var_name": "helper"
},
{
"declarator": "config",
"modifier": "protected",
"original_string": "protected ShardQu... | {
"body": "public static JexlNode pushdownPredicates(JexlNode queryTree, boolean forFieldIndex, ShardQueryConfiguration config, Set<String> indexedFields,\n Set<String> indexOnlyFields, Set<String> nonEventFields, MetadataHelper helper) {\n PushdownUnexecutableNodesVisitor visitor = new Push... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_593 | {
"fields": [
{
"declarator": "log = Logger.getLogger(UniqueTransformTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(UniqueTransformTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Test\n public void testUniquenessWithTwoGroupsAndSeparateGroup() {\n // create document two fields as follows:\n // field1.group1\n // field1.group2\n // field2.group1\n // field2.group2\n // field3.group3\n Document d = new Document();\n d.put(\"... | {
"fields": [
{
"declarator": "log = Logger.getLogger(GroupingTransform.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(GroupingTransform.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "List<FieldSet> getOrderedFieldSets(Document document) {\n Set<Multimap<String,String>> fieldSets = getFieldSets(document);\n List<FieldSet> orderedFieldSets = new ArrayList<>(fieldSets.size());\n for (Multimap<String,String> fieldSet : fieldSets) {\n FieldSet orderedFieldSet... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_31 | {
"fields": [
{
"declarator": "dataType = new Type(\"dt1\", null, null, null, 10, null)",
"modifier": "private",
"original_string": "private Type dataType = new Type(\"dt1\", null, null, null, 10, null);",
"type": "Type",
"var_name": "dataType"
},
{
"declarator": "conf"... | {
"body": "@Test\n public void shouldNotDropAliasIfNotEqual() {\n fields.put(\"LAST_NAME\", \"Test\");\n fields.put(\"ALIAS\", \"Testy\");\n \n filter.apply(fields);\n \n assertFieldKept(fields, \"LAST_NAME\");\n assertFieldKept(fields, \"ALIAS\");\n }",
"class... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(IngestFieldFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(IngestFieldFilter.class);",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public void apply(Multimap<String,?> fields) {\n // for the field name filters, remove the drop fields if the keep fields exist\n for (FieldFilter filter : fieldNameFilters) {\n if (fields.keySet().containsAll(filter.getKeepFields())) {\n if (logger.isTraceEnabled())... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_747 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/jexl/JexlNodeSetTest.java",
"identifier": "JexlNodeSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals() {\n JexlNodeSet prime = new JexlNodeSet();\n \n assertFalse(prime.equals(null));\n assertTrue(prime.equals(prime));\n \n JexlNodeSet other = new JexlNodeSet();\n other.add(JexlNodeFactory.buildEQNode(\"FOO\", \"bar\"));\n ... | {
"fields": [
{
"declarator": "useSourceNodeForKeys = false",
"modifier": "private",
"original_string": "private boolean useSourceNodeForKeys = false;",
"type": "boolean",
"var_name": "useSourceNodeForKeys"
},
{
"declarator": "nodeMap",
"modifier": "protected fina... | {
"body": "@Override\n public boolean equals(Object o) {\n if (o == null)\n return false;\n \n // Check for the same memory address.\n if (this == o)\n return true;\n \n if (o instanceof JexlNodeSet) {\n JexlNodeSet other = (JexlNodeSet) o;... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_317 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidER() throws ParseException {\n String queryString = \"BAR == '1' && FOO =~ '1234.*\\\\d'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(script);\n }",
"class_method_signature": "ValidPatternVisitor... | {
"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_602 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/regex/RegexTrieTest.java",
"identifier": "RegexTrieTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTrie() {\n String[] strings = new String[] {\"\", \"A\", \"AB\", \"ABCDEF\", \"BC\", \"BB\"};\n String[] other = new String[] {\"AA\", \"B\", \"BBB\", \"BCB\", \"ABC\", \"ABCD\", \"ABCDE\", \"ABCDEFF\", \"C\"};\n RegexTrie trie = new RegexTrie(Arrays.asList(s... | {
"fields": [
{
"declarator": "root = new Node()",
"modifier": "final",
"original_string": "final Node root = new Node();",
"type": "Node",
"var_name": "root"
},
{
"declarator": "CHARS_TO_ESCAPE = new char[] {'\\\\', '.', '[', ']', '{', '}', '(', ')', '<', '>', '*', '+'... | {
"body": "public boolean contains(final String string) {\n // starting with the root node\n Node current = root;\n final int length = string.length();\n \n // for each character in the string\n for (int i = 0; i < length; i++) {\n // get the node for this characte... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_252 | {
"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 testEq() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1')\");\n String base = JexlStringBuildingVisitor.buildQuery(query);\n visitor.visit(query, null);\n Assert.assertEquals(base, JexlStringBuildingVisitor.build... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/PushdownNegationVisitor.java",
"identifier": "PushdownNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PushdownNegationVisitor.pushdownNegations(JexlNode tree)",
"constructor":... | {
"body": "@Override\n public Object visit(ASTNotNode node, Object data) {\n // if there is already a negation passed down it should negate this node and continue down the tree to check for other negations\n if (data != null && ((NegationState) data).isNegated()) {\n JexlNode nextNode = dr... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_481 | {
"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 branchedRewriteTest() throws ParseException {\n String subtree = \"_NOFIELD_ == 'y' && FIELD2 == 'z'\";\n String query = \"FIELD1 == 'x' || (\" + subtree + \")\";\n \n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n JexlNode reduced = ... | {
"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_878 | {
"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 testMiscellaneous() {\n HashUIDBuilder builder = new HashUIDBuilder();\n HashUID result1 = builder.newId((byte[]) null);\n assertNotNull(result1);\n \n HashUID result2 = HashUIDBuilder.newId((HashUID) null, (String) null);\n assertNull(result... | {
"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 int getTime() {\n return time;\n }",
"class_method_signature": "HashUID.getTime()",
"constructor": false,
"full_signature": "public int getTime()",
"identifier": "getTime",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int ge... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_897 | {
"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 determinesStandardEdgeFormat() {\n Assert.assertEquals(EdgeKey.EDGE_FORMAT.STANDARD, EdgeKeyDecoder.determineEdgeFormat(new Text(\"TYPE/RELATIONSHIP/CATEGORY\")));\n Assert.assertEquals(EdgeKey.EDGE_FORMAT.STANDARD, EdgeKeyDecoder.determineEdgeFormat(new Text(\"TYPE/REL... | {
"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 EDGE_FORMAT determineEdgeFormat(Text colFam) {\n if (WritableComparator.compareBytes(colFam.getBytes(), 0, STATS_BYTES.length, STATS_BYTES, 0, STATS_BYTES.length) == 0) {\n return EDGE_FORMAT.STATS;\n } else {\n return EDGE_FORMAT.STANDARD;\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_194 | {
"fields": [
{
"declarator": "DEFAULT_PARTITION = 3",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PARTITION = 3;",
"type": "int",
"var_name": "DEFAULT_PARTITION"
},
{
"declarator": "NUM_REDUCERS = 100",
"modifier": "publ... | {
"body": "@Test\n public void testGetCategoryForNonMember() throws Exception {\n PartitionerCache partitionerCache = new PartitionerCache(conf);\n Assert.assertNull(PartitionerCache.getCategory(conf, new Text(\"table1\")));\n }",
"class_method_signature": "PartitionerCacheTest.testGetCategoryFo... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DelegatingPartitioner.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(DelegatingPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public static Text getCategory(Configuration conf, Text tableName) {\n String categoryName = conf.get(PREFIX_SHARED_MEMBERSHIP + tableName);\n return categoryName == null ? null : new Text(categoryName);\n }",
"class_method_signature": "PartitionerCache.getCategory(Configuration conf, Te... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_301 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test13() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"(FOO == 'bar' && (FOO == 'bar' && FOO != 'bar'))\");\n Assert.assertTrue(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegatio... | {
"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_751 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test\n public void testEscapeBackslash() throws ParseException {\n // user types ab\\\\cd\\\\e to search for ab\\cd\\e\n Assert.assertEquals(\"ab\\\\\\\\cd\\\\\\\\e\", queryParser.parse(\"ab\\\\\\\\cd\\\\\\\\e\").getContents());\n \n // user types ab\\\\cde to search for ab\... | {
"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_27 | {
"fields": [
{
"declarator": "dataType = new Type(\"dt1\", null, null, null, 10, null)",
"modifier": "private",
"original_string": "private Type dataType = new Type(\"dt1\", null, null, null, 10, null);",
"type": "Type",
"var_name": "dataType"
},
{
"declarator": "conf"... | {
"body": "@Test\n public void shouldNotDropAnythingIfFieldsDoNotMatchRules() {\n fields.put(\"FIRST_NAME\", \"Tommy\");\n fields.put(\"LAST_NAME\", \"Test\");\n fields.put(\"DATE_OF_BIRTH\", \"50 years ago in a galaxy far, far away\");\n \n filter.apply(fields);\n \n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(IngestFieldFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(IngestFieldFilter.class);",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public void apply(Multimap<String,?> fields) {\n // for the field name filters, remove the drop fields if the keep fields exist\n for (FieldFilter filter : fieldNameFilters) {\n if (fields.keySet().containsAll(filter.getKeepFields())) {\n if (logger.isTraceEnabled())... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_244 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMvDestExistsOverwrite() throws Exception {\n File src = mock(File.class);\n File dest = mock(File.class);\n File parent = mock(File.class);\n expect(src.exists()).andReturn(true).anyTimes();\n expect(src.isDirectory()).andReturn(false).anyTimes(... | {
"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 mv(final String src, final String dest) {\n if (src == null || dest == null)\n throw new IllegalArgumentException(NULL_PARAMS);\n return mv(new File(src), new File(dest));\n }",
"class_method_signature": "Files.mv(final String src, final String dest)",
"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_614 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/GeoWaveUtilsTest.java",
"identifier": "GeoWaveUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void decomposeRangeTest() {\n // String, String\n List<ByteArray> byteArrayIds = GeoWaveUtils.decomposeRange(\"0200\", \"0207\").stream().map(ByteArray::new).collect(Collectors.toList());\n Collections.sort(byteArrayIds);\n Assert.assertEquals(2, byteArrayIds.s... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/util/GeoWaveUtils.java",
"identifier": "GeoWaveUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "GeoWaveUtils.initLongBuffer(ByteBuffer longBuffer)",
"constructor": false,
"full_signature": "priv... | {
"body": "public static List<byte[]> decomposeRange(String startGeohash, String endGeohash) {\n return decomposeRange(startGeohash, endGeohash, null);\n }",
"class_method_signature": "GeoWaveUtils.decomposeRange(String startGeohash, String endGeohash)",
"constructor": false,
"full_signature": "public... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_497 | {
"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 LETest() throws ParseException {\n String query = \"FIELD <= 'x'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getState(script));\n \n Assert.assert... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_182 | {
"fields": [
{
"declarator": "JOB_ID = \"job_201109071404_1\"",
"modifier": "private static final",
"original_string": "private static final String JOB_ID = \"job_201109071404_1\";",
"type": "String",
"var_name": "JOB_ID"
},
{
"declarator": "filenames = new ArrayList<>... | {
"body": "@Test\n public void testSetCompressionType() {\n \n MultiRFileOutputFormatterTest.logger.info(\"testSetCompressionTypeWithBadType called...\");\n \n try {\n \n String compressionKey = String.format(\"%s.compression\", MultiRFileOutputFormatter.class.getN... | {
"fields": [
{
"declarator": "log = Logger.getLogger(MultiRFileOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(MultiRFileOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static void setCompressionType(Configuration conf, String compressionType) {\n if (compressionType != null) {\n if (!(\"snappy\".equals(compressionType) || \"lzo\".equals(compressionType) || \"gz\".equals(compressionType) || \"none\".equals(compressionType)))\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_478 | {
"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 unknownOrTest() throws ParseException {\n String query = \"FIELD1 == 'x' || _NOFIELD_ == 'y'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getState(script));\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_881 | {
"fields": [],
"file": "warehouse/core/src/test/java/datawave/util/TextUtilTest.java",
"identifier": "TextUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAppendNullByte() {\n Text text = new Text(new byte[] {1, 2, 3});\n TextUtil.appendNullByte(text);\n Assert.assertEquals(4, text.getLength());\n Assert.assertEquals(0, text.getBytes()[3]);\n }",
"class_method_signature": "TextUtilTest.testAppendNul... | {
"fields": [
{
"declarator": "nullByte = {0}",
"modifier": "private static final",
"original_string": "private static final byte[] nullByte = {0};",
"type": "byte[]",
"var_name": "nullByte"
}
],
"file": "warehouse/core/src/main/java/datawave/util/TextUtil.java",
"identifie... | {
"body": "public static void appendNullByte(Text text) {\n text.append(nullByte, 0, nullByte.length);\n }",
"class_method_signature": "TextUtil.appendNullByte(Text text)",
"constructor": false,
"full_signature": "public static void appendNullByte(Text text)",
"identifier": "appendNullByte",
"invo... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_70 | {
"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 testAreLocalityGroupsConfigured() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n AbstractTableConfigHelperTest.logger.info(\"AbstractTableConfigHelperTest.testAreLocalityGroupsConfigured() 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 areLocalityGroupsConfigured(String tableName, Map<String,Set<Text>> newLocalityGroups, TableOperations tops) throws AccumuloException,\n TableNotFoundException, AccumuloSecurityException {\n Map<String,Set<Text>> localityGroups = tops.getLocalityGroups(tableName)... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_706 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test\n public void testEnrichNoEnrich() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST4' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n \n String transformed = ... | {
"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_356 | {
"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 testFilterFunctionNormalizationWithNoPattern() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"IP\", Sets.newHashSet(new IpAddressType(), new LcNoDiacriticsType()));\n \n helper.setIndexedFields(da... | {
"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_643 | {
"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 testParsePointerFromFI() {\n Key fiKey = buildFiKey(rootId);\n ByteSequence parsed = TLD.parsePointerFromFI(fiKey.getColumnQualifierData());\n ByteSequence expected = new ArrayByteSequence(datatype + '\\u0000' + rootId);\n assertEquals(expected, parsed);\n... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/tld/TLD.java",
"identifier": "TLD",
"interfaces": "",
"methods": [
{
"class_method_signature": "TLD.TLD()",
"constructor": true,
"full_signature": "private TLD()",
"identifier": "TLD",
"modifiers": "p... | {
"body": "public static ByteSequence parsePointerFromFI(ByteSequence cq) {\n ArrayList<Integer> nulls = lastInstancesOf(0, cq, 2);\n final int start = nulls.get(1) + 1, stop = cq.length();\n return cq.subSequence(start, stop);\n }",
"class_method_signature": "TLD.parsePointerFromFI(ByteSequ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_213 | {
"fields": [
{
"declarator": "jsonFile = \"/input/flattener-test.json\"",
"modifier": "protected static",
"original_string": "protected static String jsonFile = \"/input/flattener-test.json\";",
"type": "String",
"var_name": "jsonFile"
},
{
"declarator": "json",
... | {
"body": "@Test\n public void testFlattenModeSIMPLE() throws Exception {\n JsonObjectFlattener flattener = new JsonObjectFlattenerImpl.Builder().flattenMode(FlattenMode.SIMPLE).mapKeyValueNormalizer(noOpNormalizer).build();\n \n JsonParser parser = new JsonParser();\n JsonElement jsonE... | {
"fields": [
{
"declarator": "DEFAULT_PATH_DELIMITER = \".\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_PATH_DELIMITER = \".\";",
"type": "String",
"var_name": "DEFAULT_PATH_DELIMITER"
},
{
"declarator": "DEFAULT_OCCURRE... | {
"body": "@Override\n public Multimap<String,String> flatten(JsonObject object) throws IllegalStateException {\n Multimap<String,String> map = HashMultimap.create();\n flatten(object, map);\n return map;\n }",
"class_method_signature": "JsonObjectFlattenerImpl.flatten(JsonObject object)"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_839 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHashCode() {\n String uid = \"uid\";\n IndexMatch indexMatch = new IndexMatch(uid);\n assertEquals(uid.hashCode(), indexMatch.hashCode());\n }",
"class_method_signature": "IndexMatchTest.testHashCode()",
"constructor": false,
"full_signature": "@Test... | {
"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 hashCode() {\n return uid.hashCode();\n }",
"class_method_signature": "IndexMatch.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"invocations": [
"hashCode"
],
"modifiers": "@Override pu... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_993 | {
"fields": [
{
"declarator": "interceptor = null",
"modifier": "private",
"original_string": "private RequiredInterceptor interceptor = null;",
"type": "RequiredInterceptor",
"var_name": "interceptor"
},
{
"declarator": "ctx = null",
"modifier": "@Mock\n priva... | {
"body": "@Test\n public void testRequiredValidValuesWithFirstValidValue() throws Exception {\n method = TestClass.class.getMethod(\"testValidValudesMethod\", String.class);\n // String parameter\n EasyMock.expect(ctx.getParameters()).andReturn(new String[] {\"foo\"});\n EasyMock.expec... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "web-services/common-util/src/main/java/datawave/inte... | {
"body": "@AroundInvoke\n public Object checkRequiredParameters(InvocationContext ctx) throws Exception {\n // Check to see if any of the parameters are required\n Object[] methodParams = ctx.getParameters();\n if (null != methodParams && methodParams.length > 0) {\n Annotation[][]... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_585 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/GroupingRequiredFilterFunctionsTest.java",
"identifier": "GroupingRequiredFilterFunctionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMatchesInGroup() {\n // @formatter:off\n Assert.assertTrue(GroupingRequiredFilterFunctions.matchesInGroup(\n makeValueTuple(\"ALPHA.1,BAR,bar\"), \"bar\",\n makeValueTuple(\"GAMMA.1,BAZ,baz\"), \"baz\").size() == 2);\n \n ... | {
"fields": [
{
"declarator": "GROUPING_REQUIRED_FUNCTION_NAMESPACE = \"grouping\"",
"modifier": "public static final",
"original_string": "public static final String GROUPING_REQUIRED_FUNCTION_NAMESPACE = \"grouping\";",
"type": "String",
"var_name": "GROUPING_REQUIRED_FUNCTION_NAME... | {
"body": "public static Collection<?> matchesInGroup(Object... args) {\n // this is either '0', or it is the integer value of the last argument\n // when the argumentCount is odd\n int positionFromRight = 0;\n if (args.length % 2 != 0) { // it's odd\n Object lastArgument = args... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_458 | {
"fields": [
{
"declarator": "DATATYPE = \"ingest\"",
"modifier": "private static final",
"original_string": "private static final String DATATYPE = \"ingest\";",
"type": "String",
"var_name": "DATATYPE"
},
{
"declarator": "UID = \"uid\"",
"modifier": "private st... | {
"body": "@Test\n @Ignore\n // TODO: This may never happen - e.g: function expansion has happened by now.\n public void testAndSameGroupingOnQuery() throws Exception {\n String originalQuery = \"FOO.1 == 'abc' && FOO.2 == 'def'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQ... | {
"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_264 | {
"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 testNestedAnd() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1' && F2 == 'v2' && (F3 == 'v3' || F4 == 'v4'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert.assertEquals(\"((!(F1 == 'v... | {
"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_634 | {
"fields": [
{
"declarator": "filter",
"modifier": "private",
"original_string": "private TLDEventDataFilter filter;",
"type": "TLDEventDataFilter",
"var_name": "filter"
},
{
"declarator": "mockScript",
"modifier": "private",
"original_string": "private AST... | {
"body": "@Test\n public void getCurrentField_tfTest() {\n expect(mockScript.jjtGetNumChildren()).andReturn(0).anyTimes();\n expect(mockScript.jjtAccept(isA(EventDataQueryExpressionVisitor.class), eq(\"\"))).andReturn(null);\n \n replayAll();\n \n // expected key structur... | {
"fields": [
{
"declarator": "FI_CF = new Text(\"fi\").getBytes()",
"modifier": "public static final",
"original_string": "public static final byte[] FI_CF = new Text(\"fi\").getBytes();",
"type": "byte[]",
"var_name": "FI_CF"
},
{
"declarator": "TF_CF = Constants.TERM... | {
"body": "protected String getCurrentField(Key current) {\n ByteSequence cf = current.getColumnFamilyData();\n \n if (WritableComparator.compareBytes(cf.getBackingArray(), 0, 2, FI_CF, 0, 2) == 0) {\n ArrayList<Integer> nullIndexes = TLD.instancesOf(0, cf, 1);\n final int s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_321 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidNRWithCacheHit() 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_771 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test\n public void testFunctionCapitalization() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n Assert.assertEquals(\"[AND,field:selector][posFilter: filter(true, AND, field1, selector1, field2, selector2)]\",\n luceneParser.par... | {
"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_819 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/EntryParserTest.java",
"identifier": "EntryParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParse_NoDocIds_isShardRange() throws IOException {\n TreeMap<Key,Value> data = new TreeMap<>();\n Uid.List.Builder builder = Uid.List.newBuilder();\n builder.setCOUNT(30);\n builder.setIGNORE(true);\n Value hasDocs = new Value(builder.build().to... | {
"fields": [
{
"declarator": "currNode",
"modifier": "protected",
"original_string": "protected ASTEQNode currNode;",
"type": "ASTEQNode",
"var_name": "currNode"
},
{
"declarator": "fieldName",
"modifier": "protected",
"original_string": "protected String f... | {
"body": "@Override\n public Tuple2<String,IndexInfo> apply(Entry<Key,Value> entry) {\n IndexInfo info = new IndexInfo();\n try {\n info.readFields(new DataInputStream(new ByteArrayInputStream(entry.getValue().get())));\n } catch (IOException e) {\n return null;\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_399 | {
"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 contentFunctionMapping() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"content:phrase(FOO, termOffsetMap, 'a', 'little', 'phrase')\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"content:phrase(BAR1||BAR2, termOffset... | {
"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_663 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/composite/CompositeUtilsTest.java",
"identifier": "CompositeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void incrementTest() {\n String start = \"07393f\";\n String finish = \"073941\";\n \n List<String> result = new ArrayList<>();\n for (String next = start; next.compareTo(finish) <= 0; next = CompositeUtils.incrementBound(next)) {\n if (isVali... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CompositeUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CompositeUtils.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ALL_... | {
"body": "public static String incrementBound(String orig) {\n // increment string\n int[] codePoints = orig.codePoints().toArray();\n int length = codePoints.length;\n int lastCodePoint = codePoints[length - 1];\n while (lastCodePoint == Character.MAX_CODE_POINT) {\n if... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_233 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testCheckDirNull() throws Exception {\n File file = null;\n Files.checkDir(file);\n }",
"class_method_signature": "FilesTest.testCheckDirNull()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumen... | {
"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_50 | {
"fields": [
{
"declarator": "EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0)",
"modifier": "public static",
"original_string": "public static org.apache.hadoop.util.bloom.Key EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0);",
"type": "org.apach... | {
"body": "@Test\n public void testIsRangeInBloomFilter() {\n // key should only be in bloom filter if it 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.Ke... | {
"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 isRangeInBloomFilter(Range range) {\n \n /**\n * If the range has no start key or no end key, then ignore the bloom filters\n */\n if (range.getStartKey() == null || range.getEndKey() == null) {\n return false;\n }\n \n /**... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_726 | {
"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 testSkipTokenizedFields() throws ParseException {\n parser.setTokenizeUnfieldedQueries(false);\n Assert.assertEquals(Constants.ANY_FIELD + \" == '5678 1234 to bird'\", parseQuery(\"NOTOKEN:5678\\\\ 1234\\\\ to\\\\ bird\"));\n // test for case independence of fiel... | {
"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_376 | {
"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 singleMapping() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"OUT == 'baz'\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"IN == 'baz'\");\n ASTJexlScript actualScript = QueryModelVisitor.applyModel(script, mo... | {
"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_419 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceTwoRangesWithOneRangeInNestedAnd() throws ParseException {\n String originalQuery = \"(NUM > '+aE1' && FOO == 'ba') && NUM < '+aE5'\";\n String expectedQuery = \"FOO == 'ba' && (NUM > '+aE1' && NUM < '+aE5')\";\n \n ASTJexlScript script = JexlA... | {
"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_225 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void testEnsureDirException() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(false);\n expect(file.mkdirs()).andReturn(false);\n replay(file);\n Files.ensureDir(file);\n }",... | {
"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_675 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildFieldDataTypeMapFromSingleValueString() {\n String singleValueData = \"k:v;\";\n Map<String,Set<String>> expectedDataTypeMap = new HashMap<>();\n expectedDataTypeMap.put(\"k\", Sets.newHashSet(\"v\"));\n Map<String,Set<String>> fieldDataTypeMap = ... | {
"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_360 | {
"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 testMultipleNormalizersForBoundedRangeExceededThreshold() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new LcNoDiacriticsType(), new NoOpType()));\n \n config.setQueryFiel... | {
"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_730 | {
"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 testOpenEndedRanges() throws ParseException {\n Assert.assertEquals(\"(F >= 'lower')\", parser.parse(\"F:[lower TO *]\").getOriginalQuery());\n Assert.assertEquals(\"(F <= 'upper')\", parser.parse(\"F:[* TO upper]\").getOriginalQuery());\n Assert.assertEquals(\"(... | {
"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_46 | {
"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_WeightedLengthPruningWithMinorityOfOverweightValues() throws Exception {\n // Create test input\n final Vector<NormalizedContentInterface> ncis = new Vector<>();\n int fieldNameExtension = 1;\n ncis.add(this.createNormalizedFieldAndValue(field... | {
"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_858 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsWildcard() {\n \n DatawaveSelectorExtractor extractor = new DatawaveSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"FIELD1:selector1 AND selector.*\");\n List<String> selectorList = extractor.extractSelectors(q);... | {
"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_622 | {
"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 testTailSet() {\n int start = sortedOrder.length / 3;\n try {\n SortedSet<byte[]> subSet = set.tailSet(data[sortedOrder[start]]);\n SortedSet<byte[]> expected = new TreeSet<>(set.comparator());\n for (int i = start; i < sortedOrder.lengt... | {
"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> tailSet(E fromElement) {\n return set.tailSet(fromElement);\n }",
"class_method_signature": "BufferedFileBackedSortedSet.tailSet(E fromElement)",
"constructor": false,
"full_signature": "@Override public SortedSet<E> tailSet(E fromElement)",
"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_788 | {
"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 testGreatGrandChild() {\n Key key = new Key(\"abc\", \"parent.document.id.child.grandchild.greatgrandchild\");\n Key other = new Key(\"abc\", \"parent.document.id.child.grandchild\");\n assertTrue(equality.partOf(key, other));\n }",
"class_method_signature":... | {
"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_272 | {
"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 testExceededValuePropertyMarkerPropagate() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!((ExceededValueThresholdMarkerJexlNode = true) && (F1 == 'v1' || F2 == 'v2'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(que... | {
"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_11 | {
"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 testFlagFileTimeStamps() throws Exception {\n log.info(\"----- testFlagFileTimeStamps -----\");\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.setSetFlagFi... | {
"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_767 | {
"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 testFunctionWrongDepth2() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n luceneParser.parse(\"#include(field, test[abc]*.*)\");\n }",
"class_method_signature": "TestLuceneQueryParser.testFuncti... | {
"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_337 | {
"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 testNoReferenceOrReferenceExpressions() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper\n .parseJexlQuery(\"UUID == 'capone' && (filter:includeRegex(QUOTE,'.*kind.*') || QUOTE == 'kind' || BIRTH_DATE == '123')\");\n \n // strip... | {
"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_120 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/NumShardsTest.java",
"identifier": "NumShardsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultipleNumShardsCacheValidation() throws ParseException, IOException, InterruptedException {\n File multipleNumShardCache = File.createTempFile(\"numshards\", \".txt\");\n multipleNumShardCache.deleteOnExit();\n \n try (BufferedWriter writer = Files.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_570 | {
"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_traverseFailureFORWARDTest() {\n \n // offsets[0].size() <= offsets[N-1].size() will trigger forward-order traversal,\n // evaluating the document for the phrase \"a b c\", starting with 'a' at offset 10\n \n List<List<TermWeightPosition>> ... | {
"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_823 | {
"fields": [
{
"declarator": "instance = new InMemoryInstance(RangeStreamTest.class.toString())",
"modifier": "private static",
"original_string": "private static InMemoryInstance instance = new InMemoryInstance(RangeStreamTest.class.toString());",
"type": "InMemoryInstance",
"var_n... | {
"body": "@Test\n public void testShardAndDaysHint() throws Exception {\n String originalQuery = \"(FOO == 'bardy') && (SHARDS_AND_DAYS = '20190314_2,20190314_1')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n config.setBeginDate(new Date(0));\n co... | {
"fields": [
{
"declarator": "MAX_MEDIAN = 20",
"modifier": "private static final",
"original_string": "private static final int MAX_MEDIAN = 20;",
"type": "int",
"var_name": "MAX_MEDIAN"
},
{
"declarator": "log = ThreadConfigurableLogger.getLogger(RangeStream.class)",... | {
"body": "public CloseableIterable<QueryPlan> streamPlans(JexlNode script) {\n JexlNode node = TreeFlatteningRebuildingVisitor.flatten(script);\n \n tree = node;\n \n if (!collapseUids && config.getParseTldUids()) {\n collapseUids = !(EvaluationRendering.canDisableEvalua... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_989 | {
"fields": [
{
"declarator": "interceptor = null",
"modifier": "private",
"original_string": "private RequiredInterceptor interceptor = null;",
"type": "RequiredInterceptor",
"var_name": "interceptor"
},
{
"declarator": "ctx = null",
"modifier": "@Mock\n priva... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testRequiredWithEmptyStringParameter() throws Exception {\n method = TestClass.class.getMethod(\"testMethod\", String.class);\n // Empty String parameter\n EasyMock.expect(ctx.getParameters()).andReturn(new String[] {\"\... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "web-services/common-util/src/main/java/datawave/inte... | {
"body": "@AroundInvoke\n public Object checkRequiredParameters(InvocationContext ctx) throws Exception {\n // Check to see if any of the parameters are required\n Object[] methodParams = ctx.getParameters();\n if (null != methodParams && methodParams.length > 0) {\n Annotation[][]... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_966 | {
"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 testBuildNormalizedProxyDNSubjectEqualsIssuer() {\n DnUtils.buildNormalizedProxyDN(\"SDN\", \"IDN\", \"SDN2\", \"SDN2\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedProxyDNSubjectEqualsIssuer()",
"construct... | {
"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_435 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testDistributeOrTerms() throws ParseException {\n String original = \"a && b && c && d && (e || f)\";\n String expected = \"(a && b && c && d && e) || (a && b && c && d && f)\";\n // The OR node's terms are distributed throughout the AND nodes\n optimize(o... | {
"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_1007 | {
"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 testForwardCreateDeleteMutation() throws Exception {\n EasyMock.expect(System.currentTimeMillis()).andReturn(TIMESTAMP).times(2);\n PowerMock.replayAll();\n Mutation m = ModelKeyParser.createDeleteMutation(FORWARD_FIELD_MAPPING, MODEL_NAME);\n PowerMock.ve... | {
"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_659 | {
"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 testGetNextParentKey() {\n Key parentKey = buildEventDataKey(rootId);\n Key nextParent = TLD.getNextParentKey(parentKey);\n \n String cf = datatype + '\\u0000' + rootId + '.' + Constants.MAX_UNICODE_STRING;\n String cq = field + '\\u0000' + value;\n... | {
"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 Key getNextParentKey(Key docKey) {\n Text startCF = docKey.getColumnFamily();\n if (startCF.find(NULL) != -1) {\n // we have a start key with a document uid, add to the end of the cf to ensure we go to the next doc\n // parse out the uid\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_209 | {
"fields": [
{
"declarator": "jsonFile = \"/input/flattener-test.json\"",
"modifier": "protected static",
"original_string": "protected static String jsonFile = \"/input/flattener-test.json\";",
"type": "String",
"var_name": "jsonFile"
},
{
"declarator": "json",
... | {
"body": "@Test\n public void testFlattenWithBlacklist() throws Exception {\n JsonObjectFlattener flattener = new JsonObjectFlattenerImpl.Builder()\n .mapKeyBlacklist(new HashSet<>(Arrays.asList(\"ROOTOBJECT.NUMBER2\", \"ROOTOBJECT.STRING2\"))).pathDelimiter(\".\")\n ... | {
"fields": [
{
"declarator": "DEFAULT_PATH_DELIMITER = \".\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_PATH_DELIMITER = \".\";",
"type": "String",
"var_name": "DEFAULT_PATH_DELIMITER"
},
{
"declarator": "DEFAULT_OCCURRE... | {
"body": "@Override\n public Multimap<String,String> flatten(JsonObject object) throws IllegalStateException {\n Multimap<String,String> map = HashMultimap.create();\n flatten(object, map);\n return map;\n }",
"class_method_signature": "JsonObjectFlattenerImpl.flatten(JsonObject object)"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_85 | {
"fields": [
{
"declarator": "agg = new DateIndexDateAggregator()",
"modifier": "",
"original_string": "PropogatingCombiner agg = new DateIndexDateAggregator();",
"type": "PropogatingCombiner",
"var_name": "agg"
}
],
"file": "warehouse/ingest-core/src/test/java/datawave/inge... | {
"body": "@Test\n public void testIncrementalMerge2() throws Exception {\n Set<Integer> shards = new HashSet<>();\n for (int i = 0; i <= 20; i++) {\n shards.add(i);\n shards.add(i * 5);\n shards.add(i * 7);\n }\n List<Value> values = Lists.newArrayList(... | {
"fields": [],
"file": "warehouse/ingest-core/src/main/java/datawave/ingest/table/aggregator/DateIndexDateAggregator.java",
"identifier": "DateIndexDateAggregator",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateIndexDateAggregator.reduce(Key key, Iterator<Value> iter)",
"con... | {
"body": "@Override\n public Value reduce(Key key, Iterator<Value> iter) {\n byte[] finalBytes = new byte[0];\n int len = finalBytes.length;\n while (iter.hasNext()) {\n byte[] nextBytes = iter.next().get();\n len = (nextBytes.length > len ? nextBytes.length : len);\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_874 | {
"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 testDifference() {\n UID a = new HashUID(data.getBytes(), (Date) null) {};\n UID b = new HashUID(data2.getBytes(), (Date) null) {};\n assertTrue(!a.equals(b));\n assertTrue(!b.equals(a));\n a = new HashUID(data.getBytes(), null, \"blabla.blabla.blab... | {
"fields": [
{
"declarator": "serialVersionUID = 4016018180334520481L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 4016018180334520481L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAU... | {
"body": "@Override\n public boolean equals(Object other) {\n if (!(other instanceof HashUID)) {\n return false;\n }\n \n if (other == this) {\n return true;\n }\n \n HashUID o = (HashUID) other;\n EqualsBuilder equals = new EqualsBuild... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_527 | {
"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 testNormalizeLiteral() throws Throwable {\n LcNoDiacriticsType normalizer = new LcNoDiacriticsType();\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"F == 'aSTrInG'\");\n if (log.isDebugEnabled()) {\n PrintingVisitor.printQuery(script);\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 ASTReference normalizeLiteral(JexlNode literal, Type<?> normalizer) throws NormalizationException {\n String normalizedImg = normalizer.normalize(literal.image);\n ASTStringLiteral normalizedLiteral = new ASTStringLiteral(ParserTreeConstants.JJTSTRINGLITERAL);\n normalize... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_177 | {
"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 testGetSplitsWithArgumentThatDoesNotMatch() throws IOException {\n logger.info(\"testGetSplitsWithArgumentThatDoesNotMatch called...\");\n setSplitsCacheDir();\n setupConfiguration();\n \n try {\n \n TableSplitsCache uut = new ... | {
"fields": [
{
"declarator": "REFRESH_SPLITS = \"datawave.ingest.refresh.splits\"",
"modifier": "public static final",
"original_string": "public static final String REFRESH_SPLITS = \"datawave.ingest.refresh.splits\";",
"type": "String",
"var_name": "REFRESH_SPLITS"
},
{
... | {
"body": "public List<Text> getSplits(String table) throws IOException {\n if (null == this.splits)\n read();\n List<Text> tableSplits = this.splits.get(table);\n if (tableSplits == null) {\n return Collections.emptyList();\n }\n return tableSplits;\n }",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_198 | {
"fields": [
{
"declarator": "constraintChecker",
"modifier": "private",
"original_string": "private ConstraintChecker constraintChecker;",
"type": "ConstraintChecker",
"var_name": "constraintChecker"
},
{
"declarator": "emptyViz = new ColumnVisibility().getExpression(... | {
"body": "@Test\n public void shouldPassOnNotViolatedConstraint() {\n constraintChecker.check(new Text(\"eventTable\"), nonemptyViz);\n }",
"class_method_signature": "ConstraintCheckerTest.shouldPassOnNotViolatedConstraint()",
"constructor": false,
"full_signature": "@Test public void shouldPassOn... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ConstraintChecker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ConstraintChecker.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public void check(Text table, byte[] visibility) throws ConstraintViolationException {\n // fast return if we are not configured\n if (!isConfigured) {\n return;\n }\n \n Collection<VisibilityConstraint> tableConstraints = constraints.get(table);\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_462 | {
"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 testGroupingFunctionMulti() throws Exception {\n String originalQuery = \"grouping:matchesInGroup(FOO, 'abc.*', BAR, 'def')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpres... | {
"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_931 | {
"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 testPreProcess_HappyPath() throws Exception {\n QueryMetricsEnrichmentInterceptor subject = new QueryMetricsEnrichmentInterceptor();\n \n // Assign local variables\n URI requestUri = new URI(\"http://localhost/test\");\n \n // Set expectation... | {
"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_1050 | {
"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 testDateFunction() throws Exception {\n String startDateString = \"Tue Apr 8 10:30:57 GMT 2014\";\n String endDateString = \"Wed Apr 9 10:30:57 GMT 2014\";\n String UPTIME = \"UPTIME.\";\n String dateFormat = \"%a %b %e %H:%i:%s GMT %Y\";\n String c... | {
"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_161 | {
"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 testRecordWriterWriteWithTableNameWithUpdates() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithTableNameWithUpdates called...\");\n \n try {\n \n CBMutationOutputFo... | {
"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_531 | {
"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 parse1TrailingBackslashRegex() throws Exception {\n String query = \"CITY =~ 'city\\\\\\\\'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assertEquals(query, inter... | {
"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_862 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/DatawaveSelectorExtractorTest.java",
"identifier": "DatawaveSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extract10kSelectors() {\n \n List<String> uuids = new ArrayList<>();\n for (int i = 0; i < 10000; i++)\n uuids.add(\"_ANY_FIELD_ == '\" + UUID.randomUUID().toString() + \"'\");\n \n String query = String.join(\" || \", uuids);\n \n... | {
"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_1 | {
"fields": [
{
"declarator": "directoryCache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(10, TimeUnit.MINUTES).concurrencyLevel(10)\n .build()",
"modifier": "private static",
"original_string": "private static Cache<Path,Path> directoryCache = CacheBuilder.n... | {
"body": "@Test\n public void testFailCall() throws Exception {\n \n FileSystem fs = FileSystem.getLocal(new Configuration());\n \n Path file = getTestFile(fs);\n InputFile entry = new InputFile(\"foo\", file, 0, 0, 0, fmc.getBaseHDFSDir());\n \n // copy to the mov... | {
"fields": [
{
"declarator": "log = Logger.getLogger(SimpleMover.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(SimpleMover.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "entry",
... | {
"body": "@Override\n public InputFile call() throws IOException {\n final Path dst = this.entry.getTrackedDir(this.target);\n checkParent(dst);\n if (entry.getCurrentDir() == dst || (!fs.exists(dst) && fs.rename(entry.getCurrentDir(), dst))) {\n entry.updateCurrentDir(this.target)... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_927 | {
"fields": [
{
"declarator": "kv",
"modifier": "public",
"original_string": "public AtomKeyValueParser kv;",
"type": "AtomKeyValueParser",
"var_name": "kv"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_st... | {
"body": "@SuppressWarnings(\"static-access\")\n @Test\n public void testTooManyRowParts() {\n Key key = new Key(new Text(\"row1\\0row2and3\\0row4\"), new Text(\"fi\\0color\"), new Text(\"red\\0truck\\0t-uid001\"));\n byte[] vals = new byte[4];\n Value value = new Value(vals);\n try... | {
"fields": [
{
"declarator": "DELIMITER = \"\\0\"",
"modifier": "private static final",
"original_string": "private static final String DELIMITER = \"\\0\";",
"type": "String",
"var_name": "DELIMITER"
},
{
"declarator": "ENTRY_ID_FORMAT = \"https://{0}:{1}/DataWave/Ato... | {
"body": "public static AtomKeyValueParser parse(Key key, Value value) throws IOException {\n AtomKeyValueParser atom = new AtomKeyValueParser();\n \n String row = key.getRow().toString();\n int splitPoint = row.indexOf(DELIMITER);\n if (splitPoint != -1) {\n atom.setCol... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_474 | {
"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 falseAndRewriteTest() throws ParseException {\n String query = \"FIELD1 == 'x' && _NOFIELD_ == 'y'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n JexlNode reduced = QueryPruningVisitor.reduce(script, true);\n \n JexlEvaluation je... | {
"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_1046 | {
"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 testSelectStar() 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.testSelectStar()",
"cons... | {
"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_618 | {
"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 testIterator() {\n int index = 0;\n for (Iterator<byte[]> it = set.iterator(); it.hasNext();) {\n byte[] value = it.next();\n byte[] expected = data[sortedOrder[index++]];\n assertTrue(Arrays.equals(expected, value));\n }\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 Iterator<E> iterator() {\n // first lets compact down the sets if needed\n try {\n // if we have any persisted sets, then ensure we are persisted\n if (set.getSets().size() > 1) {\n persist();\n }\n } catch (IOExcept... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_248 | {
"fields": [
{
"declarator": "optionBuilder",
"modifier": "private",
"original_string": "private OptionBuilder optionBuilder;",
"type": "OptionBuilder",
"var_name": "optionBuilder"
}
],
"file": "warehouse/common/src/test/java/datawave/common/cl/OptionBuilderTest.java",
"id... | {
"body": "@Test\n public void testCreate() throws Exception {\n Option option = this.optionBuilder.create(\"opt\", \"desc\");\n assertEquals(option.getArgs(), 0);\n assertEquals(String.class, option.getType());\n assertEquals(option.getOpt(), \"opt\");\n assertEquals(option.getD... | {
"fields": [
{
"declarator": "args",
"modifier": "public",
"original_string": "public int args;",
"type": "int",
"var_name": "args"
},
{
"declarator": "valSeparator",
"modifier": "public",
"original_string": "public char valSeparator;",
"type": "char"... | {
"body": "public Option create(final String opt, final String desc) {\n return create(opt, null, desc);\n }",
"class_method_signature": "OptionBuilder.create(final String opt, final String desc)",
"constructor": false,
"full_signature": "public Option create(final String opt, final String desc)",
"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_835 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompareTo() {\n IndexMatch left = new IndexMatch(\"uid0\");\n IndexMatch right = new IndexMatch(\"uid0\");\n \n assertEquals(0, left.compareTo(right));\n assertEquals(0, right.compareTo(left));\n }",
"class_method_signature": "IndexMatchTes... | {
"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_566 | {
"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_testNormal() throws IOException {\n TreeMap<Key,Value> treeMap = Maps.newTreeMap();\n treeMap.put(getTF(\"123\", \"FIELD1\", \"VALUE1\", \"dataType1\", \"123.345.456\", 10), new Value());\n \n SortedKeyValueIterator<Key,Value> itr = new SortedMapIter... | {
"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_136 | {
"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 testCleanUpJobDirectoryMakesDirectory() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testCleanUpJobDirectoryMakesDirectory called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.class.getResource(\"/d... | {
"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_423 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceTwoRangesWithAnchorTerm2() throws ParseException {\n String originalQuery = \"NUM >= '+aE1' && (NUM <= '+aE4' && TACO == 'tacocat') && (FOO >= 'bar' && FOO <= 'bas')\";\n // Ordering of query terms is not deterministic, assert both possibilities\n Str... | {
"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_589 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/DatawaveInterpreterTest.java",
"identifier": "DatawaveInterpreterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void largeOrListTest() {\n List<String> uuids = new ArrayList<>();\n for (int i = 0; i < 1000000; i++)\n uuids.add(\"'\" + UUID.randomUUID().toString() + \"'\");\n \n String query = String.join(\" || \", uuids);\n \n DatawaveJexlContext... | {
"fields": [
{
"declarator": "resultMap",
"modifier": "protected",
"original_string": "protected Map<String,Object> resultMap;",
"type": "Map<String,Object>",
"var_name": "resultMap"
},
{
"declarator": "log = Logger.getLogger(DatawaveInterpreter.class)",
"modifie... | {
"body": "public static boolean isMatched(Object scriptExecuteResult) {\n boolean matched = false;\n if (scriptExecuteResult != null && Boolean.class.isAssignableFrom(scriptExecuteResult.getClass())) {\n matched = (Boolean) scriptExecuteResult;\n } else if (scriptExecuteResult != 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_970 | {
"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 testBuildNormalizedDNListTooFewSubjects() {\n DnUtils.buildNormalizedDNList(\"SDN\", \"IDN\", \"SDN2\", \"IDN2<IDN3>\");\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedDNListTooFewSubjects()",
"constructor": fa... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static Collection<String> buildNormalizedDNList(String subjectDN, String issuerDN, String proxiedSubjectDNs, String proxiedIssuerDNs) {\n subjectDN = normalizeDN(subjectDN);\n issuerDN = normalizeDN(issuerDN);\n List<String> dnList = new ArrayList<>();\n HashSet<String> s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1011 | {
"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 testForwardIndexOnlyCreateMutation() throws Exception {\n FieldMapping forwardMapping = new FieldMapping();\n forwardMapping.setColumnVisibility(\"PRIVATE\");\n forwardMapping.setDatatype(DATATYPE);\n forwardMapping.setDirection(FORWARD);\n forwardM... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static Mutation createMutation(FieldMapping mapping, String modelName) {\n ColumnVisibility cv = new ColumnVisibility(mapping.getColumnVisibility());\n Mutation m;\n String dataType = StringUtils.isEmpty(mapping.getDatatype()) ? \"\" : NULL_BYTE + mapping.getDatatype().trim();\n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_93 | {
"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 testWithExclusions() throws IOException {\n setupMocks();\n helper.addShardExclusionField(FIELD_TO_COUNT);\n RawRecordMetadata eventMetadata = new EventMetadata(null, METADATA_TABLE_NAME, LOADDATES_TABLE_NAME, INDEX_TABLE_NAME, RINDEX_TABLE_NAME, true);\n ... | {
"fields": [
{
"declarator": "compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI)",
"modifier": "private",
"original_string": "private MetadataWithMostRecentDate compositeFieldsInfo = new MetadataWithMostRecentDate(ColumnFamilyConstants.COLF_CI);",
"type": ... | {
"body": "@Override\n public void addEvent(IngestHelperInterface helper, RawRecordContainer event, Multimap<String,NormalizedContentInterface> fields, long loadTimeInMillis) {\n addEvent(helper, event, fields, this.frequency, INCLUDE_LOAD_DATES, loadTimeInMillis);\n }",
"class_method_signature": "Even... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.