id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_668 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationT... | {
"body": "@Test\n public void testCheckForNewAdditions() throws IOException {\n int expectedObjectCount = 175;\n ShardQueryConfiguration config = ShardQueryConfiguration.create();\n ObjectMapper mapper = new ObjectMapper();\n JsonNode root = mapper.readTree(mapper.writeValueAsString(co... | {
"fields": [
{
"declarator": "PARAM_VALUE_SEP_STR = new String(new char[] {Constants.PARAM_VALUE_SEP})",
"modifier": "public static final",
"original_string": "public static final String PARAM_VALUE_SEP_STR = new String(new char[] {Constants.PARAM_VALUE_SEP});",
"type": "String",
"v... | {
"body": "public static ShardQueryConfiguration create() {\n return new ShardQueryConfiguration();\n }",
"class_method_signature": "ShardQueryConfiguration.create()",
"constructor": false,
"full_signature": "public static ShardQueryConfiguration create()",
"identifier": "create",
"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_687 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/logic/NegationFilterTest.java",
"identifier": "NegationFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmpty() throws Throwable {\n List<String> filterSet1 = Lists.newArrayList(\"a\", \"b\");\n Itr<String> f1 = new Itr<>(filterSet1);\n List<String> filterSet2 = Lists.newArrayList(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\");\n Itr<String> f2 = new Itr<>(fi... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/iterator/logic/NegationFilter.java",
"identifier": "NegationFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "NegationFilter.isFiltered(T t, TreeMultimap<T,NestedIterator<T>> filters, Util.Transformer<T> tr... | {
"body": "public static <T extends Comparable<T>> boolean isFiltered(T t, TreeMultimap<T,NestedIterator<T>> filters, Util.Transformer<T> transformer) {\n // quick check to see if we already know we're supposed to be filtered\n if (filters.containsKey(t)) {\n return true;\n }\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1036 | {
"fields": [
{
"declarator": "PROXIED_ENTITIES_HEADER = new HttpString(DatawaveAuthenticationMechanism.PROXIED_ENTITIES_HEADER)",
"modifier": "private static final",
"original_string": "private static final HttpString PROXIED_ENTITIES_HEADER = new HttpString(DatawaveAuthenticationMechanism.PROX... | {
"body": "@Test\n public void testMissingIssuersHeader() {\n httpRequestHeaders.add(PROXIED_ENTITIES_HEADER, \"foo\");\n \n securityContext.authenticationFailed(\"X-ProxiedEntitiesChain supplied, but missing X-ProxiedIssuersChain is missing!\", \"DATAWAVE-AUTH\");\n expect(httpServerEx... | {
"fields": [
{
"declarator": "PROXIED_ENTITIES_HEADER = \"X-ProxiedEntitiesChain\"",
"modifier": "public static final",
"original_string": "public static final String PROXIED_ENTITIES_HEADER = \"X-ProxiedEntitiesChain\";",
"type": "String",
"var_name": "PROXIED_ENTITIES_HEADER"
... | {
"body": "@Override\n public AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) {\n // Pull proxied entity info from the headers. If proxied entities are there, but proxied issuers are missing, then fail authentication immediately.\n String prox... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_453 | {
"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 testAndNotInvert() throws Exception {\n String originalQuery = \"'abc' == FOO and not ('def' == FOO)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressi... | {
"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_900 | {
"fields": [
{
"declarator": "standardKey",
"modifier": "private",
"original_string": "private Key standardKey;",
"type": "Key",
"var_name": "standardKey"
},
{
"declarator": "standardValue",
"modifier": "private",
"original_string": "private Value standardV... | {
"body": "@Test\n public void testFillHistogramToExactSize() {\n // only set 3 durations instead of the expected 7\n List<Long> incompleteList = createIncompleteHistogram();\n \n assertEquals(3, incompleteList.size());\n \n EdgeValueHelper.fillHistogramGaps(incompleteList... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ACTIVITY_HISTOGRAM_LENGTH = 24",
"... | {
"body": "public static void fillHistogramGaps(List<Long> retLong, int desiredLength) {\n // check size of return list\n if (retLong.size() != desiredLength) {\n for (int ii = retLong.size(); ii < desiredLength; ii++) {\n retLong.add(0l);\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_845 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/cardinality/TestCardinalityRecord.java",
"identifier": "TestCardinalityRecord",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCartesianProductOfFields2() {\n \n Set<String> recordedFields = new HashSet<>();\n CardinalityRecord cr = new CardinalityRecord(recordedFields, CardinalityRecord.DateType.DOCUMENT);\n \n Map<String,List<String>> valueMap = new HashMap<>();\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "resultCardinalityValueFields = null",
... | {
"body": "public List<String> assembleValues(String field, Map<String,List<String>> valueMap) {\n \n List<String> values = new ArrayList<>();\n List<List<String>> valueLists = new ArrayList<>();\n Iterable<String> fieldSplit = Splitter.on(\"|\").split(field);\n \n int numSpl... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_146 | {
"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 testTakeOwnershipJobDirectoryFailedRenameLoadedDoesNotExists() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testTakeOwnershipJobDirectoryFailedRenameLoadedDoesNotExists called...\");\n \n try {\n \n URL url = Bulk... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BulkIngestMapFileLoader.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(BulkIngestMapFileLoader.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public boolean takeOwnershipJobDirectory(Path jobDirectory) {\n boolean success = false;\n try {\n FileSystem fs = getFileSystem(srcHdfs);\n \n try {\n success = fs.rename(new Path(jobDirectory, COMPLETE_FILE_MARKER), new Path(jobDirectory, LOAD... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_516 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConjunctionTwoNestedNE() throws ParseException {\n String queryString = \"(FOO != BAR && BAR != FOO)\";\n String expectedQuery = \"(!(FOO == BAR) && !(BAR == FOO))\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ASTJexlScript n... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RewriteNegationsVisitor.java",
"identifier": "RewriteNegationsVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"fu... | {
"body": "public static <T extends JexlNode> T rewrite(T node) {\n node.jjtAccept(new RewriteNegationsVisitor(), null);\n return node;\n }",
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"full_signature": "public static T rewrite(T node)",
"identi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_795 | {
"fields": [
{
"declarator": "intersector",
"modifier": "private",
"original_string": "private AncestorUidIntersector intersector;",
"type": "AncestorUidIntersector",
"var_name": "intersector"
},
{
"declarator": "uids1",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testReduceSingleUids2() {\n uids2.add(new IndexMatch(\"a.b.c.1\", node1));\n uids2.add(new IndexMatch(\"a.b.c.1.1\", node1));\n uids1.add(new IndexMatch(\"a.b.c.1.1.1\", node2));\n uids1.add(new IndexMatch(\"a.b.c.1.1.2\", node2));\n \n Set<I... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/ancestor/AncestorUidIntersector.java",
"identifier": "AncestorUidIntersector",
"interfaces": "implements UidIntersector",
"methods": [
{
"class_method_signature": "AncestorUidIntersector.intersect(Set<IndexMatch> uids1, Set<I... | {
"body": "@Override\n public Set<IndexMatch> intersect(Set<IndexMatch> uids1, Set<IndexMatch> uids2, List<JexlNode> delayedNodes) {\n /*\n * C) Both are small, so we have an easy case where we can prune much of this sub query. Must propagate delayed nodes, though.\n */\n \n //... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_280 | {
"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 testNENotNegated() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 == 'v1') && F2 != 'v2'\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert.assertEquals(\"!(F1 == 'v1') && F2 != 'v2'\", JexlStri... | {
"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_1061 | {
"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 testSumKeyword() throws Exception {\n String sql = crq.generateSql(\"v\", \"SUM(foo.bar)\", null, null, \"`foo.bar` DESC\", \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",SUM(`foo.bar`) FROM v WHERE _user_ = 'me' ORDER BY `foo.bar` DESC\", sql);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1016 | {
"fields": [
{
"declarator": "MODEL_NAME = \"MODEL\"",
"modifier": "private static final",
"original_string": "private static final String MODEL_NAME = \"MODEL\";",
"type": "String",
"var_name": "MODEL_NAME"
},
{
"declarator": "FIELD_NAME = \"field1\"",
"modifier... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testIndexOnlyOnAReverseKeyIsInvalid() throws Exception {\n // Test index_only on a reverse key.. reverse keys should not have index_only\n Key reverseIndexOnly = new Key(MODEL_FIELD_NAME, MODEL_NAME, FIELD_NAME + ModelKeyParser... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static FieldMapping parseKey(Key key, Set<Authorizations> auths) {\n FieldMapping mapping = new FieldMapping();\n String row = key.getRow().toString();\n String[] colf = key.getColumnFamily().toString().split(NULL_BYTE);\n String[] colq = key.getColumnQualifier().toString... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_218 | {
"fields": [
{
"declarator": "testRecord",
"modifier": "protected static",
"original_string": "protected static byte[] testRecord;",
"type": "byte[]",
"var_name": "testRecord"
}
],
"file": "warehouse/ingest-json/src/test/java/datawave/ingest/json/config/helper/JsonIngestHelp... | {
"body": "@Test\n public void testSetup() throws Exception {\n JsonIngestHelper ingestHelper = init(initConfig(FlattenMode.NORMAL));\n Assert.assertNotNull(ingestHelper.getEmbeddedHelper());\n }",
"class_method_signature": "JsonIngestHelperTest.testSetup()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JsonIngestHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(JsonIngestHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@Override\n public void setup(Configuration config) {\n super.setup(config);\n helper = new JsonDataTypeHelper();\n helper.setup(config);\n this.setEmbeddedHelper(helper);\n flattener = helper.newFlattener();\n }",
"class_method_signature": "JsonIngestHelper.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_648 | {
"fields": [
{
"declarator": "row = \"20190314\"",
"modifier": "private final",
"original_string": "private final String row = \"20190314\";",
"type": "String",
"var_name": "row"
},
{
"declarator": "field = \"FIELD_A\"",
"modifier": "private final",
"origin... | {
"body": "@Test\n public void testParseRootPointerFromId_ByteSequence() {\n assertEquals(root, TLD.parseRootPointerFromId(root));\n assertEquals(root, TLD.parseRootPointerFromId(child));\n assertEquals(root, TLD.parseRootPointerFromId(grandchild));\n }",
"class_method_signature": "TLDTes... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/tld/TLD.java",
"identifier": "TLD",
"interfaces": "",
"methods": [
{
"class_method_signature": "TLD.TLD()",
"constructor": true,
"full_signature": "private TLD()",
"identifier": "TLD",
"modifiers": "p... | {
"body": "public static ByteSequence parseRootPointerFromId(ByteSequence id) {\n ArrayList<Integer> dots = instancesOf('.', id);\n int stop;\n if (dots.size() > 2) {\n stop = dots.get(2);\n } else {\n stop = id.length();\n }\n return id.subSequence(0, s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_94 | {
"fields": [
{
"declarator": "COLUMN_FAMILY = new Text(\"yuuuup\")",
"modifier": "public static final",
"original_string": "public static final Text COLUMN_FAMILY = new Text(\"yuuuup\");",
"type": "Text",
"var_name": "COLUMN_FAMILY"
},
{
"declarator": "date = \"2014040... | {
"body": "@Test\n public void testCountsDownCorrectly() {\n MetadataCounterGroup counters = new MetadataCounterGroup(COLUMN_FAMILY);\n counters.addToCount(-5, dataType, fieldName, date);\n counters.addToCount(-5, dataType, fieldName, date);\n assertOneEntryWithExpectedCount(counters, -... | {
"fields": [
{
"declarator": "log = Logger.getLogger(MetadataCounterGroup.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(MetadataCounterGroup.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "public void addToCount(long countDelta, String dataType, String rowId, String date) {\n String hashMapKey = createKey(dataType, rowId, date);\n CountAndKeyComponents value = counts.get(hashMapKey);\n if (null == value) {\n counts.put(hashMapKey, new CountAndKeyComponents(dat... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_561 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/EvaluationPhaseFilterFunctionsTest.java",
"identifier": "EvaluationPhaseFilterFunctionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRightOf() {\n // @formatter:off\n String[] inputs = {\n \"NAME.grandparent_0.parent_0.child_0\",\n \"NAME.grandparent_0.parent_0.child_0\",\n \"NAME.gggparent.ggparent.grandparent_0.parent_0.child_0\"\n };\n ... | {
"fields": [
{
"declarator": "EVAL_PHASE_FUNCTION_NAMESPACE = \"filter\"",
"modifier": "public static final",
"original_string": "public static final String EVAL_PHASE_FUNCTION_NAMESPACE = \"filter\";",
"type": "String",
"var_name": "EVAL_PHASE_FUNCTION_NAMESPACE"
},
{
... | {
"body": "public static String getMatchToRightOfPeriod(String input, int pos) {\n int[] indices = indicesOf(input, '.');\n if (indices.length < pos + 1)\n throw new RuntimeException(\"Input\" + input + \" does not have a '.' at position \" + pos + \" from the right.\");\n return input... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_131 | {
"fields": [
{
"declarator": "conf = null",
"modifier": "private",
"original_string": "private Configuration conf = null;",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "ctx = null",
"modifier": "private",
"original_string": "private TaskA... | {
"body": "@Test\n public void testHandlerListNormalizedNumericWithSpace() throws Exception {\n \n ctx.getConfiguration().set(\"test\" + \".\" + NUMERIC_LIST + BaseIngestHelper.FIELD_TYPE, NumberType.class.getName());\n ctx.getConfiguration().set(\"test\" + \".\" + ContentBaseIngestHelper.LIST... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ContentIndexingColumnBasedHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ContentIndexingColumnBasedHandler.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n super.setup(context);\n contentHelper = getContentIndexingDataTypeHelper();\n tokenFieldNameSuffix = contentHelper.getTokenFieldNameDesignator();\n Preconditions.checkNotNull(tokenFieldNameSuffix);\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_998 | {
"fields": [
{
"declarator": "filter",
"modifier": "private",
"original_string": "private CreateQuerySessionIDFilter filter;",
"type": "CreateQuerySessionIDFilter",
"var_name": "filter"
},
{
"declarator": "request",
"modifier": "private",
"original_string":... | {
"body": "@Test\n public void filterNoQueryId() throws Exception {\n EasyMock.expect(method.getMethodAnnotations()).andReturn(new Annotation[] {annotation});\n // More method calls due to logging the error about QUERY_ID threadlocal not set.\n EasyMock.expect(method.getResourceClass()).andRet... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CreateQuerySessionIDFilter.class)",
"modifier": "private final",
"original_string": "private final Logger log = Logger.getLogger(CreateQuerySessionIDFilter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Override\n public void filter(ContainerRequestContext request, ContainerResponseContext response) throws IOException {\n ResourceMethodInvoker method = (ResourceMethodInvoker) request.getProperty(ResourceMethodInvoker.class.getName());\n \n GenerateQuerySessionId annotation = FindA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_832 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/IndexMatchTest.java",
"identifier": "IndexMatchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTypeSet() {\n String uid = \"uid\";\n JexlNode eqNode = JexlNodeFactory.buildEQNode(\"FIELD\", \"value\");\n IndexMatch indexMatch = new IndexMatch(uid, eqNode);\n \n assertEquals(IndexMatchType.OR, indexMatch.type);\n indexMatch.setType(... | {
"fields": [
{
"declarator": "shard",
"modifier": "protected",
"original_string": "protected String shard;",
"type": "String",
"var_name": "shard"
},
{
"declarator": "uid",
"modifier": "protected",
"original_string": "protected String uid;",
"type": "... | {
"body": "public void setType(IndexMatchType type) {\n this.type = type;\n }",
"class_method_signature": "IndexMatch.setType(IndexMatchType type)",
"constructor": false,
"full_signature": "public void setType(IndexMatchType type)",
"identifier": "setType",
"invocations": [],
"modifiers": "publi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_977 | {
"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 testUnionWithEmptyAuthorizations() {\n assertEquals(new Authorizations(\"A\", \"C\"), AuthorizationsUtil.union(new Authorizations(\"A\", \"C\"), new Authorizations()));\n }",
"class_method_signature": "AuthorizationsUtilTest.testUnionWithEmptyAuthorizations()",
"constru... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Authorizations union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2) {\n LinkedList<byte[]> aggregatedAuthorizations = Lists.newLinkedList();\n addTo(aggregatedAuthorizations, authorizations1);\n addTo(aggregatedAuthorizations, authorizations2);\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_424 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RangeCoalescingVisitorTest.java",
"identifier": "RangeCoalescingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoalesceManyNestedAndUnorderedTermsWithAnchorTerm() throws ParseException {\n // Should extract single NUM3 term, coalesce NUM and NUM2 terms into\n String originalQuery = \"TACO == 'tacocat' && (NUM >= '+aE1' && NUM2 >= '+aE2' && NUM3 == '+aE3' && NUM2 <= '+aE4' &&... | {
"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_1041 | {
"fields": [
{
"declarator": "auditBean",
"modifier": "private",
"original_string": "private AuditBean auditBean;",
"type": "AuditBean",
"var_name": "auditBean"
},
{
"declarator": "auditor",
"modifier": "private",
"original_string": "private TestAuditor aud... | {
"body": "@Test\n public void internalCallTest() {\n MultivaluedMap<String,String> paramsMap = new MultivaluedMapImpl<>();\n paramsMap.putAll(params);\n AuditParameters auditParams = new AuditParameters();\n auditParams.validate(params);\n auditBean.auditRest(paramsMap);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(AuditBean.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(AuditBean.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "auditService",... | {
"body": "@POST\n @Path(\"/audit\")\n @Consumes(\"*/*\")\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\", \"application/x-protobuf\",\n \"application/x-protostuff\"})\n @GZIP\n public VoidResponse auditRest(Multiva... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_865 | {
"fields": [
{
"declarator": "builder",
"modifier": "",
"original_string": "UIDBuilder<UID> builder;",
"type": "UIDBuilder<UID>",
"var_name": "builder"
},
{
"declarator": "data = \"20100901: the quick brown fox jumped over the lazy dog\"",
"modifier": "private",
... | {
"body": "@Test\n public void testDifference() {\n long timestamp = 1449585658444L;\n UID a = builder.newId(data.getBytes(), new Date(timestamp));\n UID b = builder.newId(data2.getBytes(), new Date(timestamp));\n assertTrue(!a.equals(b));\n assertTrue(!b.equals(a));\n a =... | {
"fields": [
{
"declarator": "serialVersionUID = 1856715886248436235L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1856715886248436235L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "TOO_B... | {
"body": "@Override\n public boolean equals(final Object other) {\n if (!(other instanceof SnowflakeUID)) {\n return false;\n }\n \n if (other == this) {\n return true;\n }\n \n return compareTo((UID) other) == 0;\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_166 | {
"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 testRecordWriterWriteWithUpdatesWithColFamilyTypedWithoutUID() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithUpdatesWithColFamilyTypedWithoutUID called...\");\n \n try {\n \n... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CBMutationOutputFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CBMutationOutputFormatter.class);",
"type": "Logger",
"var_name": "log"
}
],
"fi... | {
"body": "@Override\n public RecordWriter<Text,Mutation> getRecordWriter(TaskAttemptContext attempt) throws IOException {\n return new CBRecordWriter(super.getRecordWriter(attempt), attempt);\n }",
"class_method_signature": "CBMutationOutputFormatter.getRecordWriter(TaskAttemptContext attempt)",
"co... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_536 | {
"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 parse1LeadingBackslashEquals() 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_189 | {
"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 testRFileFileSizeLimit() throws IOException, InterruptedException {\n // each key we write is 16 characters total, so a limit of 32 should allow two keys per file\n MultiRFileOutputFormatter.setRFileLimits(conf, 0, 32);\n RecordWriter<BulkIngestKey,Value> writer ... | {
"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 setRFileLimits(Configuration conf, int maxEntries, long maxSize) {\n conf.setInt(MAX_RFILE_UNDEDUPPED_ENTRIES, maxEntries);\n conf.setLong(MAX_RFILE_UNCOMPRESSED_SIZE, maxSize);\n }",
"class_method_signature": "MultiRFileOutputFormatter.setRFileLimits(Configuration con... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_473 | {
"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 falseAndTest() throws ParseException {\n String query = \"FIELD1 == 'x' && _NOFIELD_ == 'y'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, 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_920 | {
"fields": [
{
"declarator": "log = Logger.getLogger(AccumuloIndexAgeDisplayTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(AccumuloIndexAgeDisplayTest.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "@Test\n public void assortedDataIntoThreeDayBucketLogOutputTest() {\n // Should identify data more than three days old in the log and deletion script\n loadAssortedData();\n completeSetup(new Integer[] {3});\n \n String expectedLogSummary = getAssortedDataThreeDaySimul... | {
"fields": [
{
"declarator": "log = Logger.getLogger(AccumuloIndexAgeDisplay.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(AccumuloIndexAgeDisplay.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public String logAgeSummary() {\n \n StringBuilder sb = new StringBuilder();\n for (int ii = buckets.length - 1; ii >= 0; --ii) {\n sb.append(String.format(\"\\nIndexes older than %1$-3d %2$-6s %3$10d\", buckets[ii], \"days:\", dataBuckets[ii].size()));\n }\n s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_6 | {
"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 testFlagMakerConfigArg() throws JAXBException, IOException {\n log.info(\"----- testFlagMakerConfigArg -----\");\n FlagMakerConfig flagMakerConfig = FlagMaker.getFlagMakerConfig(new String[] {\"-flagConfig\", TEST_CONFIG});\n assertEquals(CONFIG_FLAG_FILE_DIR, ... | {
"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": "static FlagMakerConfig getFlagMakerConfig(String[] args) throws JAXBException, IOException {\n String flagConfig = null;\n String baseHDFSDirOverride = null;\n String extraIngestArgsOverride = null;\n String flagFileDirectoryOverride = null;\n String flagMakerClass = 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_1057 | {
"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 testEscapingWithFunctions() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar, MIN(foo.bar), COUNT(foo.bar)\", \"COUNT(foo.bar) > 1\", \"MIN(foo.bar)\", \"COUNT(foo.bar)\", \"me\", null);\n Assert.assertEquals(\n \"SELECT \"\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_259 | {
"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 testTripleNegationNEq() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!!!(F1 != 'v1')\");\n visitor.visit(query, null);\n Assert.assertEquals(\"(F1 == 'v1')\", JexlStringBuildingVisitor.buildQuery(query));\n }",
"class_method... | {
"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_609 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/GeoWaveUtilsTest.java",
"identifier": "GeoWaveUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void decodePositionTest() {\n // String\n Assert.assertEquals(3, GeoWaveUtils.decodePosition(\"0103\"));\n \n // ByteArrayId\n Assert.assertEquals(123456, GeoWaveUtils.decodePosition(GeoWaveUtils.createByteArray(31, 123456)));\n }",
"class_method_si... | {
"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 long decodePosition(String geohash) {\n return geohash.equals(\"00\") ? 0L : Long.parseLong(geohash.substring(2), 16);\n }",
"class_method_signature": "GeoWaveUtils.decodePosition(String geohash)",
"constructor": false,
"full_signature": "public static long decodePosition(Stri... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_520 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleEQWithNestedConjunctionOfTwoNE() throws ParseException {\n String queryString = \"FOO == BAR && (BAR != FOO && BAR != CAT)\";\n String expectedQuery = \"FOO == BAR && (!(BAR == FOO) && !(BAR == CAT))\";\n ASTJexlScript script = JexlASTHelper.parseJexlQu... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RewriteNegationsVisitor.java",
"identifier": "RewriteNegationsVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"fu... | {
"body": "public static <T extends JexlNode> T rewrite(T node) {\n node.jjtAccept(new RewriteNegationsVisitor(), null);\n return node;\n }",
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"full_signature": "public static T rewrite(T node)",
"identi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_170 | {
"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(expected = Exception.class)\n public void testThrowsExceptionOnInconsistentConfig() throws Exception {\n conf.set(DelegatingPartitioner.TABLE_NAMES_WITH_CUSTOM_PARTITIONERS, \"table1,table2\"); // table 2 is here\n conf.set(PartitionerCache.PREFIX_DEDICATED_PARTITIONER + \"table1\", ... | {
"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": "@Override\n public void setConf(Configuration conf) {\n this.conf = conf;\n this.partitionerCache = new PartitionerCache(conf);\n \n try {\n createDelegatesForTables();\n } catch (ClassNotFoundException e) {\n log.error(e);\n // the val... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_873 | {
"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 testEquals() {\n UID a = new HashUID(data.getBytes(), (Date) null) {};\n UID b = new HashUID(data.getBytes(), (Date) null) {};\n assertTrue(a.equals(b));\n assertTrue(b.equals(a));\n assertTrue(a.getExtra() == null);\n a = new HashUID(data.ge... | {
"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_936 | {
"fields": [
{
"declarator": "settings = new QueryImpl()",
"modifier": "private final",
"original_string": "private final QueryImpl settings = new QueryImpl();",
"type": "QueryImpl",
"var_name": "settings"
},
{
"declarator": "connectionPriority = AccumuloConnectionFact... | {
"body": "@Test\n public void testConstructorWithNullConnector() throws Exception {\n Connector connector = null;\n DatawaveUser user = new DatawaveUser(userDN, UserType.USER, null, null, null, 0L);\n DatawavePrincipal principal = new DatawavePrincipal(Collections.singletonList(user));\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "log = Logger.getLogger(RunningQuery.class... | {
"body": "public Connector getConnection() {\n return connection;\n }",
"class_method_signature": "RunningQuery.getConnection()",
"constructor": false,
"full_signature": "public Connector getConnection()",
"identifier": "getConnection",
"invocations": [],
"modifiers": "public",
"parameters": ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_465 | {
"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 testMultiple() throws Exception {\n String originalQuery = \"FOO == 'abc' || BAR == 'def'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilters(s... | {
"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_1000 | {
"fields": [
{
"declarator": "filter",
"modifier": "private",
"original_string": "private CreateQuerySessionIDFilter filter;",
"type": "CreateQuerySessionIDFilter",
"var_name": "filter"
},
{
"declarator": "request",
"modifier": "private",
"original_string":... | {
"body": "@Test\n public void filterClientError() throws Exception {\n response.setStatusInfo(Response.Status.BAD_REQUEST);\n EasyMock.expect(method.getMethodAnnotations()).andReturn(new Annotation[] {annotation});\n replayAll();\n \n CreateQuerySessionIDFilter.QUERY_ID.set(\"12... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CreateQuerySessionIDFilter.class)",
"modifier": "private final",
"original_string": "private final Logger log = Logger.getLogger(CreateQuerySessionIDFilter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Override\n public void filter(ContainerRequestContext request, ContainerResponseContext response) throws IOException {\n ResourceMethodInvoker method = (ResourceMethodInvoker) request.getProperty(ResourceMethodInvoker.class.getName());\n \n GenerateQuerySessionId annotation = FindA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_82 | {
"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 testMerge() throws Exception {\n agg.reset();\n Set<Integer> shards = new HashSet<>();\n for (int i = 0; i <= 20; i++) {\n shards.add(i);\n shards.add(i * 3);\n shards.add(i * 5);\n }\n Collection<Value> values = Lis... | {
"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_824 | {
"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 testOrBothIndexed() throws Exception {\n String originalQuery = \"(FOO == 'bag' || FOO == 'ba')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n config.setBeginDate(new Date(0));\n config.setEndDate(new Date(System.curre... | {
"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_127 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/ShardedDataTypeHandlerTest.java",
"identifier": "ShardedDataTypeHandlerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testSetup() {\n Configuration conf = new Configuration();\n ShardedDataTypeHandler<Text> handler = new AbstractColumnBasedHandler<>();\n handler.setup(new TaskAttemptContextImpl(conf, new TaskAttemptID()));\n }",
"c... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ShardedDataTypeHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ShardedDataTypeHandler.class);",
"type": "Logger",
"var... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n markingFunctions = MarkingFunctions.Factory.createMarkingFunctions();\n \n Configuration conf = context.getConfiguration();\n shardIdFactory = new ShardIdFactory(conf);\n \n String tableName = conf.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_577 | {
"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_simpleSuccessDistance3Test() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(1);\n List<TermWeightPosition> offsetsB = asList(2);\n List<TermWeightPosition> offsetsC = asList(3);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ContentOrderedEvaluator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ContentOrderedEvaluator.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "@Override\n protected boolean evaluate(List<List<TermWeightPosition>> offsets) {\n if (offsets.isEmpty() || offsets.size() < terms.length) {\n return false;\n }\n \n NavigableSet<EvaluateTermPosition> termPositions = new TreeSet<>();\n int direction = FORWAR... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_598 | {
"fields": [
{
"declarator": "transformer",
"modifier": "private",
"original_string": "private DocumentTransformer transformer;",
"type": "DocumentTransformer",
"var_name": "transformer"
},
{
"declarator": "mockLogic",
"modifier": "@Mock\n private",
"ori... | {
"body": "@Test\n public void transform_primaryNoMatchSetTest() throws MarkingFunctions.Exception {\n Key key = new Key(\"shard\", \"dataType\" + Constants.NULL + \"uid\");\n Value value = new Value();\n AbstractMap.SimpleEntry<Key,Value> entry = new AbstractMap.SimpleEntry<>(key, value);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DocumentTransformerSupport.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DocumentTransformerSupport.class);",
"type": "Logger",
"var_name": "log"
}
],
"... | {
"body": "@Override\n public EventBase transform(Entry<Key,Value> entry) throws EmptyObjectException {\n \n Entry<Key,Document> documentEntry = deserializer.apply(entry);\n for (DocumentTransform transform : transforms) {\n if (documentEntry != null) {\n documentEntr... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_432 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testDisjunction() throws ParseException {\n String original = \"a || b || c\";\n optimize(original, original, true, false);\n }",
"class_method_signature": "BooleanOptimizationRebuildingVisitorTest.testDisjunction()",
"constructor": false,
"full_signature": "@T... | {
"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_961 | {
"fields": [],
"file": "web-services/common-util/src/test/java/datawave/security/util/DnUtilsTest.java",
"identifier": "DnUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetUserDnFromArray() {\n String userDnForTest = \"snd1\";\n String[] array = new String[] {userDnForTest, \"idn\"};\n String userDN = DnUtils.getUserDN(array);\n assertEquals(userDnForTest, userDN);\n }",
"class_method_signature": "DnUtilsTest.tes... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static String getUserDN(String[] dns) {\n return getUserDN(dns, false);\n }",
"class_method_signature": "DnUtils.getUserDN(String[] dns)",
"constructor": false,
"full_signature": "public static String getUserDN(String[] dns)",
"identifier": "getUserDN",
"invocations": [
"getU... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_625 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/sortedset/HdfsBackedSortedSetTest.java",
"identifier": "HdfsBackedSortedSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void persistCompactReloadTest() throws Exception {\n File tempDir = Files.createTempDir();\n tempDir.deleteOnExit();\n \n File[] dirs = new File[] {new File(tempDir, \"first\"), new File(tempDir, \"second\"), new File(tempDir, \"third\")};\n \n fo... | {
"fields": [
{
"declarator": "log = Logger.getLogger(HdfsBackedSortedSet.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(HdfsBackedSortedSet.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Override\n public void clear() {\n // This will be a new ArrayList<>() containing the same FileSortedSets\n List<FileSortedSet<E>> sortedSets = super.getSets();\n // Clear will call clear on each of the FileSortedSets, clear the container, and null the buffer\n super.clear()... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_275 | {
"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 testPartialBoundedRangePropagation() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"F3 == 'v3' || !(F1 >= 'v1' && F2 <= 'v2')\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert.assertEquals(\"F3 == '... | {
"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_760 | {
"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 testSlopQuery() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n \n Assert.assertEquals(\"[WITHIN10,quick,brown,fox]\", luceneParser.parse(\"\\\"quick brown fox\\\"~10\").getContents());\n Assert.assertEquals(\"quick~5\... | {
"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_330 | {
"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 testExceededThresholdExpansionInternal() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper\n .parseJexlQuery(\"UUID == 'capone' && (filter:includeRegex(QUOTE,'.*kind.*') || QUOTE == 'kind' || BIRTH_DATE == '123')\");\n \n // upda... | {
"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_16 | {
"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 testMaxFileLength() throws Exception {\n log.info(\"----- testMaxFileLength -----\");\n File f = setUpFlagDir();\n // two days, expectedMax + 20 files each day\n LongRange range = createTestFiles(2, 20, true);\n int total = 2 * 2 * 20;\n fm... | {
"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_449 | {
"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 testAndNegationTwo() throws Exception {\n String originalQuery = \"FOO == 'abc' && !(BAR == 'def')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpression... | {
"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_222 | {
"fields": [
{
"declarator": "testRecord",
"modifier": "protected static",
"original_string": "protected static byte[] testRecord;",
"type": "byte[]",
"var_name": "testRecord"
}
],
"file": "warehouse/ingest-json/src/test/java/datawave/ingest/json/config/helper/JsonIngestHelp... | {
"body": "@Test\n public void testGetEventFieldsFromRecordReaderGROUPED() throws Exception {\n Configuration conf = initConfig(FlattenMode.GROUPED);\n JsonRecordReader reader = initReader(false, conf);\n reader.setInputDate(System.currentTimeMillis());\n \n JsonIngestHelper inge... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JsonIngestHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(JsonIngestHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "... | {
"body": "@Override\n public Multimap<String,NormalizedContentInterface> getEventFields(RawRecordContainer event) {\n \n if (null == flattener) {\n throw new IllegalStateException(\"JsonObjectFlattener was not initialized. Method 'setup' must be invoked first\");\n }\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_388 | {
"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 identifiersWithMethodsInAndWithGT() throws ParseException {\n ASTJexlScript script = JexlASTHelper\n .parseJexlQuery(\"AGE.containsAll(filter:someFunction(BLAH, '1')) > 0 && AGE.containsAll(filter:someFunction(BOO, '1')) > 10\");\n ASTJexlScript e... | {
"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_672 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryIteratorTest.java",
"identifier": "QueryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsDocumentSpecificRange_withShardRange() {\n Key start = new Key(\"20190314_0\");\n Key end = new Key(\"20190314_0\");\n Range shardRange = new Range(start, end);\n assertFalse(QueryIterator.isDocumentSpecificRange(shardRange));\n }",
"class_metho... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "source... | {
"body": "public static boolean isDocumentSpecificRange(Range r) {\n Preconditions.checkNotNull(r);\n \n // Also @see datawave.query.index.lookup.TupleToRange\n // We have already made the assertion that the client is sending us\n // an inclusive start key due to the inability to a... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_41 | {
"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_LowMemory() throws Exception {\n // Create test input\n final NormalizedContentInterface nci = new NormalizedFieldAndValue(\"TEST\", \"test\");\n \n // Calculate the expected number of n-grams\n final String fieldValue = nci.getIndexedF... | {
"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_367 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/TreeFlatteningRebuildingVisitorTest.java",
"identifier": "TreeFlatteningRebuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void singleChildAndOrTest() throws Exception {\n JexlNode eqNode = JexlASTHelper.parseJexlQuery(\"FIELD == 'value'\");\n JexlNode and1 = JexlNodeFactory.createUnwrappedAndNode(Collections.singleton(eqNode));\n JexlNode or1 = JexlNodeFactory.createUnwrappedOrNode(Colle... | {
"fields": [
{
"declarator": "treeFlatteningRebuilder",
"modifier": "final private",
"original_string": "final private TreeFlatteningRebuilder treeFlatteningRebuilder;",
"type": "TreeFlatteningRebuilder",
"var_name": "treeFlatteningRebuilder"
}
],
"file": "warehouse/query-co... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T flatten(T node) {\n return TreeFlatteningRebuilder.flatten(node);\n }",
"class_method_signature": "TreeFlatteningRebuildingVisitor.flatten(T node)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchec... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_737 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/jexl/JexlNodeSetTest.java",
"identifier": "JexlNodeSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContains() {\n JexlNode node = JexlNodeFactory.buildEQNode(\"FOO\", \"bar\");\n JexlNodeSet nodeSet = new JexlNodeSet();\n nodeSet.add(node);\n assertTrue(nodeSet.contains(node));\n \n // Nope, it won't.\n assertFalse(nodeSet.conta... | {
"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 contains(Object o) {\n if (o instanceof JexlNode) {\n String nodeKey = buildKey((JexlNode) o);\n return nodeMap.containsKey(nodeKey);\n }\n return false;\n }",
"class_method_signature": "JexlNodeSet.contains(Object o)",
"constr... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_808 | {
"fields": [
{
"declarator": "queryNode = null",
"modifier": "private",
"original_string": "private JexlNode queryNode = null;",
"type": "JexlNode",
"var_name": "queryNode"
},
{
"declarator": "config",
"modifier": "private",
"original_string": "private Shar... | {
"body": "@Test\n public void testIsShardRange() {\n String shardRange = \"20190314_0\";\n String dayRange = \"20190314\";\n \n assertTrue(TupleToRange.isShardRange(shardRange));\n assertFalse(TupleToRange.isShardRange(dayRange));\n }",
"class_method_signature": "TupleToRan... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TupleToRange.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TupleToRange.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "currentS... | {
"body": "public static boolean isShardRange(String shard) {\n return shard.indexOf('_') >= 0;\n }",
"class_method_signature": "TupleToRange.isShardRange(String shard)",
"constructor": false,
"full_signature": "public static boolean isShardRange(String shard)",
"identifier": "isShardRange",
"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_664 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/composite/CompositeUtilsTest.java",
"identifier": "CompositeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void decrementTest() {\n String start = \"073940\";\n String finish = \"07393c\";\n \n List<String> result = new ArrayList<>();\n for (String next = start; next.compareTo(finish) >= 0; next = CompositeUtils.decrementBound(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 decrementBound(String orig) {\n // decrement string\n int[] codePoints = orig.codePoints().toArray();\n int length = codePoints.length;\n int lastCodePoint = codePoints[length - 1];\n while (lastCodePoint == Character.MIN_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_234 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckFileExists() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(false);\n replay(file);\n String err = Files.checkFile(file, true);\n assertEquals(err, \"File, 'EasyMock for class java.io.File' does not exi... | {
"fields": [
{
"declarator": "NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\"",
"modifier": "private static final",
"original_string": "private static final String NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\";",
"type": "String",
... | {
"body": "public static String checkFile(final File file, final boolean checkWrite) {\n if (file == null)\n throw new IllegalArgumentException(NULL_PARAMS);\n \n if (!file.exists())\n return String.format(FILE_NO_EXIST, file);\n if (file.isDirectory())\n r... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_721 | {
"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 moreOrTesting() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"(SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST1' AND RELATION == 'REL1-REL2' \"\n + \"AND ATTRI... | {
"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_371 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/IteratorBuildingVisitorTest.java",
"identifier": "IteratorBuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildLiteralRange_trailingWildcardTest() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"FOO =~ 'bar.*'\");\n List<ASTERNode> erNodes = JexlASTHelper.getERNodes(query);\n LiteralRange<?> range = IteratorBuildingVisitor.buildLiteralR... | {
"fields": [
{
"declarator": "log = Logger.getLogger(IteratorBuildingVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(IteratorBuildingVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private LiteralRange<?> buildLiteralRange(JexlNode source) {\n if (source instanceof ASTERNode)\n return buildLiteralRange(((ASTERNode) source));\n else if (source instanceof ASTNRNode)\n return buildLiteralRange(((ASTNRNode) source));\n else\n return n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_57 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(ShardTableConfigHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(ShardTableConfigHelperTest.class);",
"type": "Logger",
"var_name": "logger"
}... | {
"body": "@Test\n public void testSetupNothingDefinedInConfiguration() {\n \n ShardTableConfigHelperTest.logger.info(\"ShardTableConfigHelperTest.testSetupNothingDefinedInConfiguration called.\");\n \n try {\n \n ShardTableConfigHelper uut = new ShardTableConfigHe... | {
"fields": [
{
"declarator": "SHARDED_TABLET_BALANCER_CLASS = ShardedTableTabletBalancer.class.getName()",
"modifier": "protected static final",
"original_string": "protected static final String SHARDED_TABLET_BALANCER_CLASS = ShardedTableTabletBalancer.class.getName();",
"type": "String"... | {
"body": "@Override\n public void setup(String tableName, Configuration config, Logger log) throws IllegalArgumentException {\n \n this.log = log;\n this.conf = config;\n \n shardTableName = conf.get(ShardedDataTypeHandler.SHARD_TNAME, null);\n shardGidxTableName = conf.g... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_408 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RootNegationCheckVisitorTest.java",
"identifier": "RootNegationCheckVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWrappedNEq() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"!(FOO != 'bar')\");\n Assert.assertFalse(RootNegationCheckVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "RootNegationCheckVisitorTest.testWrappe... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RootNegationCheckVisitor.java",
"identifier": "RootNegationCheckVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RootNegationCheckVisitor.hasTopLevelNegation(JexlNode script)",
"constr... | {
"body": "public static Boolean hasTopLevelNegation(JexlNode script) {\n RootNegationCheckVisitor visitor = new RootNegationCheckVisitor();\n \n // ensure all negations are pushed down\n JexlNode pushedDownTree = PushdownNegationVisitor.pushdownNegations(script);\n return !visitor.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_799 | {
"fields": [
{
"declarator": "intersector",
"modifier": "private",
"original_string": "private AncestorUidIntersector intersector;",
"type": "AncestorUidIntersector",
"var_name": "intersector"
},
{
"declarator": "uids1",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testMultipleBranches() {\n uids2.add(new IndexMatch(\"a.b.c.2\", node1));\n uids2.add(new IndexMatch(\"a.b.c.1\", node1));\n uids1.add(new IndexMatch(\"a.b.c.1\", node2));\n uids1.add(new IndexMatch(\"a.b.c.2.1\", node2));\n \n Set<IndexMatch... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/ancestor/AncestorUidIntersector.java",
"identifier": "AncestorUidIntersector",
"interfaces": "implements UidIntersector",
"methods": [
{
"class_method_signature": "AncestorUidIntersector.intersect(Set<IndexMatch> uids1, Set<I... | {
"body": "@Override\n public Set<IndexMatch> intersect(Set<IndexMatch> uids1, Set<IndexMatch> uids2, List<JexlNode> delayedNodes) {\n /*\n * C) Both are small, so we have an easy case where we can prune much of this sub query. Must propagate delayed nodes, though.\n */\n \n //... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_263 | {
"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 testOrNE() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 != 'v1' || F2 != 'v2')\");\n visitor.visit(query, null);\n Assert.assertEquals(\"(((F1 == 'v1') && (F2 == 'v2')))\", JexlStringBuildingVisitor.buildQuery(query));\n ... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/PushdownNegationVisitor.java",
"identifier": "PushdownNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PushdownNegationVisitor.pushdownNegations(JexlNode tree)",
"constructor":... | {
"body": "@Override\n public Object visit(ASTNotNode node, Object data) {\n // if there is already a negation passed down it should negate this node and continue down the tree to check for other negations\n if (data != null && ((NegationState) data).isNegated()) {\n JexlNode nextNode = dr... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_633 | {
"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_fiGroupingTest() {\n expect(mockScript.jjtGetNumChildren()).andReturn(0).anyTimes();\n expect(mockScript.jjtAccept(isA(EventDataQueryExpressionVisitor.class), eq(\"\"))).andReturn(null);\n \n replayAll();\n \n // expected key ... | {
"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_326 | {
"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 testArbitraryNodeExpansionFailNoFlatten() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper\n .parseJexlQuery(\"UUID == 'capone' && (filter:includeRegex(QUOTE,'.*kind.*') || QUOTE == 'kind' || BIRTH_DATE == '123')\");\n ShardQueryConfig... | {
"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": "@Override\n public Object visit(ASTJexlScript node, Object data) {\n // no reason to go any further if the query is executable because that means there couldn't be a problem\n boolean executable = ExecutableDeterminationVisitor.isExecutable(node, config, helper);\n if (!executable) ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_776 | {
"fields": [
{
"declarator": "equality = new TLDEquality()",
"modifier": "private",
"original_string": "private TLDEquality equality = new TLDEquality();",
"type": "TLDEquality",
"var_name": "equality"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/function/... | {
"body": "@Test\n public void testDifferentParents() {\n Key docKey = new Key(\"row\", \"parent.document.id\");\n Key otherKey = new Key(\"row\", \"parent.document.id2\");\n assertFalse(equality.partOf(docKey, otherKey));\n assertFalse(equality.partOf(otherKey, docKey));\n }",
"cl... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/function/TLDEquality.java",
"identifier": "TLDEquality",
"interfaces": "implements Equality",
"methods": [
{
"class_method_signature": "TLDEquality.partOf(Key key, Key other)",
"constructor": false,
"full_signatur... | {
"body": "@Override\n public boolean partOf(Key key, Key other) {\n ByteSequence docCF = TLD.estimateRootPointerFromId(key.getColumnFamilyData());\n ByteSequence otherCF = TLD.estimateRootPointerFromId(other.getColumnFamilyData());\n return otherCF.equals(docCF);\n }",
"class_method_sign... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_849 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/core/iterators/DataWaveFieldIndexRangeIteratorJexlTest.java",
"identifier": "DataWaveFieldIndexRangeIteratorJexlTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nonnegatedRangesTest() {\n SortedSet<Range> sortedRanges = new TreeSet<>();\n \n sortedRanges.add(new Range(new Key(\"A\"), false, new Key(\"C\"), false));\n sortedRanges.add(new Range(new Key(\"E\"), false, new Key(\"G\"), true));\n sortedRanges.ad... | {
"fields": [
{
"declarator": "upperBound = null",
"modifier": "protected",
"original_string": "protected Text upperBound = null;",
"type": "Text",
"var_name": "upperBound"
},
{
"declarator": "upperInclusive = true",
"modifier": "protected",
"original_string... | {
"body": "@Override\n protected List<Range> buildBoundingFiRanges(Text rowId, Text fiName, Text fieldValue) {\n if (ANY_FINAME.equals(fiName)) {\n Key startKey = new Key(rowId, FI_START);\n Key endKey = new Key(rowId, FI_END);\n return new RangeSplitter(new Range(startKey, ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_638 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/ranges/RangeFactoryTest.java",
"identifier": "RangeFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildDocumentSpecificRange() {\n String shard = \"20190314_0\";\n String docId = \"docId0\";\n Range docRange = RangeFactory.createDocumentSpecificRange(shard, docId);\n \n String expectedEndKeyCF = docId + RangeFactory.NULL_BYTE_STRING;\n ... | {
"fields": [
{
"declarator": "NULL_BYTE_STRING = \"\\u0000\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE_STRING = \"\\u0000\";",
"type": "String",
"var_name": "NULL_BYTE_STRING"
},
{
"declarator": "MAX_UNICODE_STRING = ... | {
"body": "public static Range createDocumentSpecificRange(String shard, String docId) {\n Key start = new Key(shard, docId);\n Key end = start.followingKey(PartialKey.ROW_COLFAM);\n \n // Technically, we don't want to be inclusive of the start key,\n // however if we mark the start... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_792 | {
"fields": [
{
"declarator": "intersector",
"modifier": "private",
"original_string": "private AncestorUidIntersector intersector;",
"type": "AncestorUidIntersector",
"var_name": "intersector"
},
{
"declarator": "uids1",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testSubstringNonAncestorUids2() {\n uids1.add(new IndexMatch(\"a.b.c.1\", node1));\n uids2.add(new IndexMatch(\"a.b.c.10.1\", node2));\n \n Set<IndexMatch> result = intersector.intersect(uids1, uids2, Collections.EMPTY_LIST);\n \n Assert.asse... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/ancestor/AncestorUidIntersector.java",
"identifier": "AncestorUidIntersector",
"interfaces": "implements UidIntersector",
"methods": [
{
"class_method_signature": "AncestorUidIntersector.intersect(Set<IndexMatch> uids1, Set<I... | {
"body": "@Override\n public Set<IndexMatch> intersect(Set<IndexMatch> uids1, Set<IndexMatch> uids2, List<JexlNode> delayedNodes) {\n /*\n * C) Both are small, so we have an easy case where we can prune much of this sub query. Must propagate delayed nodes, though.\n */\n \n //... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_268 | {
"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 testNestedOrMixedCancels() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"!(F1 != 'v1' || !F2 == 'v2' || (F3 == 'v3' && F4 == 'v4'))\");\n JexlNode result = PushdownNegationVisitor.pushdownNegations(query);\n Assert.assertEquals(\"... | {
"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_287 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/GeoWavePruningVisitorTest.java",
"identifier": "GeoWavePruningVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void emptyRefExpTest() throws Exception {\n String query = \"geowave:intersects(GEO_FIELD, 'POLYGON((10 10, 20 10, 20 20, 10 20, 10 10))')\";\n ShardQueryConfiguration config = new ShardQueryConfiguration();\n \n // Get the expanded geowave terms, and add a ter... | {
"fields": [
{
"declarator": "prunedTerms",
"modifier": "private",
"original_string": "private Multimap<String,String> prunedTerms;",
"type": "Multimap<String,String>",
"var_name": "prunedTerms"
},
{
"declarator": "metadataHelper",
"modifier": "private",
"o... | {
"body": "public static <T extends JexlNode> T pruneTree(JexlNode node) {\n return pruneTree(node, null, null);\n }",
"class_method_signature": "GeoWavePruningVisitor.pruneTree(JexlNode node)",
"constructor": false,
"full_signature": "public static T pruneTree(JexlNode node)",
"identifier": "pruneT... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1066 | {
"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 testQuoteField() throws Exception {\n Object result = Whitebox.invokeMethod(crq, \"quoteField\", \"foo.bar\");\n Assert.assertEquals(\"`foo.bar`\", result.toString());\n result = Whitebox.invokeMethod(crq, \"quoteField\", \"MIN(foo.bar)\");\n Assert.assert... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "private String quoteField(String field) {\n if (!field.equals(\"*\") && field.contains(\".\")) {\n if (isFunction(field)) {\n if (!field.contains(\"(*)\")) {\n // Parse the arguments to the function\n int startParen = field.lastIndexOf(... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_907 | {
"fields": [
{
"declarator": "standardKey",
"modifier": "private",
"original_string": "private Key standardKey;",
"type": "Key",
"var_name": "standardKey"
},
{
"declarator": "standardValue",
"modifier": "private",
"original_string": "private Value standardV... | {
"body": "@Test\n public void testReadNullActivity() {\n List<Long> oldAsList = EdgeValueHelper.decodeActivityHistogram(NULL_VALUE);\n assertEquals(EdgeValueHelper.ACTIVITY_HISTOGRAM_LENGTH, oldAsList.size());\n }",
"class_method_signature": "EdgeValueHelperTest.testReadNullActivity()",
"cons... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ACTIVITY_HISTOGRAM_LENGTH = 24",
"... | {
"body": "public static List<Long> decodeActivityHistogram(Value value) {\n try {\n return decodeActivityHistogram(EdgeData.EdgeValue.parseFrom(value.get()).getHoursList());\n } catch (InvalidProtocolBufferException e) {\n // Probably an old edge value\n return decodeAc... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_454 | {
"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 testRange1() throws Exception {\n String originalQuery = \"BAZ >= '+aE5' AND BAZ <= '+bE1.2'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilter... | {
"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_141 | {
"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 testCleanUpJobDirectoryWithFailedJob() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testCleanUpJobDirectoryWithFailedJob called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.class.getResource(\"/dat... | {
"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_511 | {
"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 testBadRegex() throws ParseException {\n String query = \"_ANYFIELD_=='email' and ANOTHER_FIELD=='blah' and filter:includeRegex(FIELDA, '(?#icu)Friendly')\";\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_842 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/index/lookup/CreateUidsIteratorTest.java",
"identifier": "CreateUidsIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLastNull() {\n ArrayByteSequence bs = new ArrayByteSequence(\"shard_1\\u0000datatype\".getBytes(Charset.forName(\"UTF-8\")));\n assertEquals(\"shard_1\".length(), CreateUidsIterator.lastNull(bs));\n }",
"class_method_signature": "CreateUidsIteratorTest.testLast... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CreateUidsIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CreateUidsIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "public static int lastNull(ByteSequence bs) {\n int pos = bs.length();\n while (--pos > 0 && bs.byteAt(pos) != 0x00)\n ;\n return pos;\n }",
"class_method_signature": "CreateUidsIterator.lastNull(ByteSequence bs)",
"constructor": false,
"full_signature": "public sta... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_395 | {
"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 sizeMethodOnFunction() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"filter:includeRegex(NAM, 'MICHAEL').size() == 1\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"filter:includeRegex(NAME||NOME, 'MICHAEL').size() =... | {
"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_1031 | {
"fields": [
{
"declarator": "ccb",
"modifier": "private",
"original_string": "private CredentialsCacheBean ccb;",
"type": "CredentialsCacheBean",
"var_name": "ccb"
},
{
"declarator": "authManager",
"modifier": "@Inject\n private",
"original_string": "@I... | {
"body": "@Test\n public void testFlushAll() {\n assertEquals(3, cache.size());\n \n ccb.flushAll();\n \n assertEquals(0, cache.size());\n }",
"class_method_signature": "CredentialsCacheBeanTest.testFlushAll()",
"constructor": false,
"full_signature": "@Test public void... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected",
"original_string": "protected Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "authManager",
"modifier": ... | {
"body": "@GET\n @Path(\"/flushAll\")\n @JmxManaged\n public String flushAll() {\n try {\n // Remove principals from the Wildfly cached authentication manager, if we have one in use.\n authManager.flushCache();\n if (!cachedDatawaveUserServiceInstance.isUnsatisfied())... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_680 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFetchDataTypeKeysFromSingleValueString() {\n String data = \"k:v;\";\n Set<String> expectedDataTypeKeys = Sets.newHashSet(\"k\");\n Set<String> dataTypeKeys = QueryOptions.fetchDataTypeKeys(data);\n assertEquals(\"Failed to parse single value option st... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryOptions.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryOptions.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "fileSyst... | {
"body": "public static Set<String> fetchDataTypeKeys(String data) {\n Set<String> keys = Sets.newHashSet();\n if (org.apache.commons.lang3.StringUtils.isNotBlank(data)) {\n String[] entries = StringUtils.split(data, ';');\n for (String entry : entries) {\n String[]... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_403 | {
"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 testModelApplication() throws ParseException {\n model.addTermToModel(\"FOO1\", \"1BAR\");\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO1 == 'baz'\");\n ASTJexlScript groomed = JexlASTHelper.InvertNodeVisitor.invertSwappedNodes(script);\n AST... | {
"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_950 | {
"fields": [
{
"declarator": "rem",
"modifier": "private static",
"original_string": "private static RESTExceptionMapper rem;",
"type": "RESTExceptionMapper",
"var_name": "rem"
}
],
"file": "web-services/common-util/src/test/java/datawave/webservice/common/exception/RESTExce... | {
"body": "@Test\n public void testToResponse_simpleException() {\n \n Exception e = new Exception();\n Response response = rem.toResponse(e);\n MultivaluedMap<String,Object> responseMap = response.getHeaders();\n \n Assert.assertEquals(500, response.getStatus());\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "RESPONSE_ORIGIN = null",
"modifier... | {
"body": "@Override\n public Response toResponse(Exception e) {\n \n synchronized (lock) {\n if (null == RESPONSE_ORIGIN) {\n RESPONSE_ORIGIN = System.getProperty(\"cluster.name\") + \"/\" + System.getProperty(\"jboss.host.name\");\n }\n }\n \n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_815 | {
"fields": [
{
"declarator": "queryNode = null",
"modifier": "private",
"original_string": "private JexlNode queryNode = null;",
"type": "JexlNode",
"var_name": "queryNode"
},
{
"declarator": "config",
"modifier": "private",
"original_string": "private Shar... | {
"body": "@Test\n public void testApplyWithShardRange() {\n String shard = \"20190314_0\";\n IndexInfo indexInfo = new IndexInfo(-1);\n indexInfo.applyNode(queryNode);\n Tuple2<String,IndexInfo> tuple = new Tuple2<>(shard, indexInfo);\n \n // Build expected shard ranges\n... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TupleToRange.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TupleToRange.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "currentS... | {
"body": "public Iterator<QueryPlan> apply(Tuple2<String,IndexInfo> tuple) {\n String shard = tuple.first();\n IndexInfo indexInfo = tuple.second();\n \n JexlNode queryNode = currentScript;\n if (log.isTraceEnabled() && indexInfo.getNode() != null) {\n log.trace(\"Got it... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_546 | {
"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 parse3InteriorBackslashesEquals() throws Exception {\n String query = \"CITY == 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assert... | {
"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_116 | {
"fields": [
{
"declarator": "TEST_TYPE = \"test\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TYPE = \"test\";",
"type": "String",
"var_name": "TEST_TYPE"
},
{
"declarator": "TEST_UID = UID.builder().newId()",
"modi... | {
"body": "@Test\n public void testMultipleEvents() {\n ExtendedDataTypeHandler<Text,BulkIngestKey,Value> handler = new FacetHandler<>();\n handler.setup(ctx);\n \n helper.setup(ctx.getConfiguration());\n \n Collection<Multimap<String,NormalizedContentInterface>> items = T... | {
"fields": [
{
"declarator": "log = Logger.getLogger(FacetHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(FacetHandler.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "FACET_TA... | {
"body": "@Override\n public void setup(TaskAttemptContext context) {\n markingFunctions = MarkingFunctions.Factory.createMarkingFunctions();\n \n taskAttemptContext = context;\n \n Configuration conf = context.getConfiguration();\n \n final String t = Configuratio... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_383 | {
"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 functionWithMethod() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"filter:includeRegex(FOO, '1').size()\");\n ASTJexlScript expectedScript = JexlASTHelper.parseJexlQuery(\"filter:includeRegex(BAR1||BAR2, '1').size()\");\n ASTJexl... | {
"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_679 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryOptionsTest.java",
"identifier": "QueryOptionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildFieldDataTypeMapFromBadString() {\n String badData = \"k:k2:k3:v;\";\n Map<String,Set<String>> expectedDataTypeMap = new HashMap<>();\n Map<String,Set<String>> fieldDataTypeMap = QueryOptions.buildFieldDataTypeMap(badData);\n assertEquals(\"Failed... | {
"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_229 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckDirIsDirectory() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(true);\n expect(file.isDirectory()).andReturn(false);\n replay(file);\n String err = Files.checkDir(file);\n assertEquals(err, \"Fi... | {
"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_1027 | {
"fields": [
{
"declarator": "NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, c=us\"",
"modifier": "private static final",
"original_string": "private static final String NORMALIZED_SUBJECT_DN = \"cn=testuser, ou=my department, o=my company, st=some-state, ... | {
"body": "@Test\n public void testFailedLoginBadPassword() throws Exception {\n expectedException.expect(FailedLoginException.class);\n expectedException.expectMessage(\"Password invalid/Password required\");\n \n callbackHandler.setSecurityInfo(new SimplePrincipal(\"testUser<testIssue... | {
"fields": [
{
"declarator": "createSimplePrincipal = new ThreadLocal<>()",
"modifier": "private",
"original_string": "private ThreadLocal<Boolean> createSimplePrincipal = new ThreadLocal<>();",
"type": "ThreadLocal<Boolean>",
"var_name": "createSimplePrincipal"
}
],
"file":... | {
"body": "@Override\n public boolean login() throws LoginException {\n boolean success = super.login();\n \n int roleCount = 0;\n Group[] roleSets = getRoleSets();\n if (roleSets != null) {\n for (Group roleSet : roleSets) {\n for (Enumeration<? extends... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_696 | {
"fields": [
{
"declarator": "PASSWORD = \"\"",
"modifier": "private static final",
"original_string": "private static final String PASSWORD = \"\";",
"type": "String",
"var_name": "PASSWORD"
},
{
"declarator": "instance",
"modifier": "private static",
"ori... | {
"body": "@Test(expected = RuntimeException.class)\n public void testScannerSessionWithRuntimeExceptionResource() throws TableNotFoundException {\n Set<Authorizations> auths = new HashSet<>();\n auths.add(new Authorizations());\n ScannerSession ss = new ScannerSession(\"testTable\", auths, re... | {
"fields": [
{
"declarator": "lastSeenKey",
"modifier": "protected",
"original_string": "protected Key lastSeenKey;",
"type": "Key",
"var_name": "lastSeenKey"
},
{
"declarator": "ranges",
"modifier": "protected",
"original_string": "protected ConcurrentLink... | {
"body": "public void setResourceClass(Class<? extends AccumuloResource> clazz) {\n delegatedResourceInitializer = clazz;\n }",
"class_method_signature": "ScannerSession.setResourceClass(Class<? extends AccumuloResource> clazz)",
"constructor": false,
"full_signature": "public void setResourceClass(C... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_946 | {
"fields": [
{
"declarator": "query = null",
"modifier": "private",
"original_string": "private RunningQuery query = null;",
"type": "RunningQuery",
"var_name": "query"
},
{
"declarator": "bean = null",
"modifier": "private",
"original_string": "private Que... | {
"body": "@Test\n public void testCancelUserQuery_HappyPath() throws Exception {\n // Set expectations\n UUID queryId = UUID.randomUUID();\n expect(this.altCache.get(queryId.toString())).andReturn(this.query);\n \n // Run the test\n PowerMock.replayAll();\n QueryCa... | {
"fields": [
{
"declarator": "cache",
"modifier": "@Inject\n private",
"original_string": "@Inject\n private QueryCache cache;",
"type": "QueryCache",
"var_name": "cache"
},
{
"declarator": "query",
"modifier": "@Inject\n private",
"original_string... | {
"body": "@RolesAllowed({\"Administrator\", \"JBossAdministrator\"})\n @JmxManaged\n public String cancelUserQuery(String id) throws Exception {\n AbstractRunningQuery arq = cache.get(id);\n if (arq != null) {\n try {\n @SuppressWarnings(\"unused\")\n Void... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_415 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RootNegationCheckVisitorTest.java",
"identifier": "RootNegationCheckVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWrappedER() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"!(FOO =~ 'bar.*')\");\n Assert.assertTrue(RootNegationCheckVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "RootNegationCheckVisitorTest.testWrappe... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RootNegationCheckVisitor.java",
"identifier": "RootNegationCheckVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RootNegationCheckVisitor.hasTopLevelNegation(JexlNode script)",
"constr... | {
"body": "public static Boolean hasTopLevelNegation(JexlNode script) {\n RootNegationCheckVisitor visitor = new RootNegationCheckVisitor();\n \n // ensure all negations are pushed down\n JexlNode pushedDownTree = PushdownNegationVisitor.pushdownNegations(script);\n return !visitor.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_100 | {
"fields": [
{
"declarator": "TEST_FILE_LOCATION = \"datawave/ingest/mapreduce/job/full_splits.txt\"",
"modifier": "private static final",
"original_string": "private static final String TEST_FILE_LOCATION = \"datawave/ingest/mapreduce/job/full_splits.txt\";",
"type": "String",
"var... | {
"body": "@Test\n public void testMultiplierWrapping() throws IllegalAccessException, InstantiationException {\n int multiplier = 2;\n int numReducers = 6;\n Configuration conf = new Configuration();\n conf.setInt(SplitBasedHashPartitioner.PARTITIONER_SPACE_MULTIPLIER, multiplier);\n ... | {
"fields": [
{
"declarator": "PARTITIONER_SPACE_MULTIPLIER = \"split.based.hash.partitioner.multiplier\"",
"modifier": "public static final",
"original_string": "public static final String PARTITIONER_SPACE_MULTIPLIER = \"split.based.hash.partitioner.multiplier\";",
"type": "String",
... | {
"body": "@Override\n public int getPartition(BulkIngestKey bKey, Value value, int numPartitions) {\n int indexWithinSplits = super.getPartition(bKey, value, numPartitions);\n // ensure this returns a positive value. note Math.abs does not always return a positive number\n int offsetWithinPar... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_550 | {
"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 transitiveEqualsParseTest() throws Exception {\n String query = \"CITY == 'ci\\\\\\\\\\\\\\\\\\\\\\\\ty\\\\\\\\.blah'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n JexlNo... | {
"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_803 | {
"fields": [
{
"declarator": "children = Arrays.asList(\"a\", \"a.1\", \"a.1.1\", \"a.1.2\", \"a.1.2.1\", \"a.10\", \"a.2\", \"a.3\", \"a.4\", \"a.4.1\", \"a.4.1.1\", \"a.4.1.2\", \"a.4.2\",\n \"a.5\", \"a.6\", \"a.7\", \"a.8\", \"a.9\")",
"modifier": "private",
"original_str... | {
"body": "@Test(expected = IllegalStateException.class)\n public void testUninitializedHasTop() {\n iterator.hasTop();\n }",
"class_method_signature": "AncestorChildExpansionIteratorTest.testUninitializedHasTop()",
"constructor": false,
"full_signature": "@Test(expected = IllegalStateException.cla... | {
"fields": [
{
"declarator": "children",
"modifier": "private final",
"original_string": "private final List<String> children;",
"type": "List<String>",
"var_name": "children"
},
{
"declarator": "equality",
"modifier": "private final",
"original_string": "p... | {
"body": "@Override\n public boolean hasTop() {\n if (!seeked) {\n throw new IllegalStateException(\"cannot hasTop(), iterator has not been seeked\");\n }\n \n if (!initialized) {\n nextChild();\n }\n \n return topKey != null;\n }",
"clas... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_784 | {
"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 testRootAccept() {\n Key key = new Key(\"abc\", \"1234.123.12345\");\n Key other = new Key(\"abc\", \"1234\");\n assertTrue(equality.partOf(key, other));\n }",
"class_method_signature": "AncestorEqualityTest.testRootAccept()",
"constructor": false,
"full... | {
"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_1070 | {
"fields": [
{
"declarator": "bean = new TestMapReduceBean()",
"modifier": "@TestSubject\n private",
"original_string": "@TestSubject\n private TestMapReduceBean bean = new TestMapReduceBean();",
"type": "TestMapReduceBean",
"var_name": "bean"
},
{
"declarator": ... | {
"body": "@Test(expected = DatawaveWebApplicationException.class)\n public void testSubmitWithNullRequiredParameters() throws Exception {\n expect(ctx.getCallerPrincipal()).andReturn(principal);\n replayAll();\n \n bean.submit(\"TestJob\", null);\n verifyAll();\n }",
"class... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ctx",
"modifier": "@Resource\n ... | {
"body": "@POST\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\", \"application/x-protobuf\",\n \"application/x-protostuff\"})\n @javax.ws.rs.Path(\"/submit\")\n @GZIP\n public GenericResponse<String> submit(@FormParam... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.