id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
116999027_943 | {
"fields": [
{
"declarator": "qlCache = null",
"modifier": "protected",
"original_string": "protected CreatedQueryLogicCacheBean qlCache = null;",
"type": "CreatedQueryLogicCacheBean",
"var_name": "qlCache"
},
{
"declarator": "internalCache = null",
"modifier": "... | {
"body": "@Test\n public void testSnapshot() throws Exception {\n String queryId1 = \"12345\", queryId2 = \"123456\";\n String userId = \"me\";\n long timestamp = 1l;\n \n EasyMock.expect(System.currentTimeMillis()).andReturn(timestamp);\n \n PowerMock.replayAll();... | {
"fields": [
{
"declarator": "tripToPair = from -> {\n if (null == from) {\n return null;\n }\n return new Pair<>(from.logic, from.cxn);\n }",
"modifier": "private static final",
"original_string": "private static final Function<Triple,Pair<QueryLogic<?>,Conne... | {
"body": "public Map<String,Pair<QueryLogic<?>,Connector>> snapshot() {\n HashMap<Pair<String,Long>,Triple> snapshot = Maps.newHashMap(cache);\n HashMap<String,Pair<QueryLogic<?>,Connector>> tformMap = Maps.newHashMapWithExpectedSize(cache.size());\n \n for (Entry<String,Pair<QueryLogic<?... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_410 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RootNegationCheckVisitorTest.java",
"identifier": "RootNegationCheckVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNegatedOneLeafAnd() throws ParseException {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"!(FOO != 'bar' && FOO == 'baz')\");\n Assert.assertFalse(RootNegationCheckVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "RootNegationChec... | {
"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_294 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test6() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"FOO == 'bar' || FOO == 'bar'\");\n Assert.assertFalse(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test6()... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitor.java",
"identifier": "HasTopLevelNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)",
... | {
"body": "public static Boolean hasTopLevelNegation(ASTJexlScript script) {\n HasTopLevelNegationVisitor visitor = new HasTopLevelNegationVisitor();\n \n return visitor.recurseRoot(script);\n }",
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_18 | {
"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 testFlagFileMarker() throws Exception {\n log.info(\"----- testFlagFileMarker -----\");\n File f = setUpFlagDir();\n // two days, 5 files each day, two folders in fmc = 20 flags\n LongRange range = createTestFiles(2, 5);\n // fmc.setSetFlagFileTim... | {
"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_781 | {
"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 testDifferentParentDifferentChildren() {\n Key docKey = new Key(\"row\", \"parent.document.id.child\");\n Key otherKey = new Key(\"row\", \"parent.document.id2.child2\");\n assertFalse(equality.partOf(docKey, otherKey));\n assertFalse(equality.partOf(other... | {
"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_851 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/audit/SplitSelectorExtractorTest.java",
"identifier": "SplitSelectorExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractSelectorsLuceneQuery1() {\n \n SplitSelectorExtractor extractor = new SplitSelectorExtractor();\n QueryImpl q = new QueryImpl();\n q.setQuery(\"selector1\");\n List<String> selectorList = extractor.extractSelectors(q);\n List<String> e... | {
"fields": [
{
"declarator": "separatorCharacter = null",
"modifier": "protected",
"original_string": "protected String separatorCharacter = null;",
"type": "String",
"var_name": "separatorCharacter"
},
{
"declarator": "separatorParameter = null",
"modifier": "pr... | {
"body": "@Override\n public List<String> extractSelectors(Query query) throws IllegalArgumentException {\n List<String> selectorList = new ArrayList<>();\n \n String selectorSeparator = this.separatorCharacter;\n if (this.separatorParameter != null) {\n QueryImpl.Parameter ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_502 | {
"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 GTNoFieldTest() throws ParseException {\n String query = \"_NOFIELD_ > 'x'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, QueryPruningVisitor.getState(script));\n \n Asser... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_152 | {
"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 testMarkJobDirectoryFailedHandlesThrownException() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testMarkJobDirectoryFailedHandlesThrownException called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderTest.... | {
"fields": [
{
"declarator": "log = Logger.getLogger(BulkIngestMapFileLoader.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(BulkIngestMapFileLoader.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "public boolean markJobDirectoryFailed(URI workingHdfs, Path jobDirectory) {\n boolean success = false;\n try {\n FileSystem fs = getFileSystem(workingHdfs);\n success = fs.rename(new Path(jobDirectory, LOADING_FILE_MARKER), new Path(jobDirectory, FAILED_FILE_MARKER));\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_447 | {
"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 testAndNullSameField() throws Exception {\n String originalQuery = \"FOO != 'abc' && FOO == null\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFi... | {
"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_914 | {
"fields": [],
"file": "warehouse/core/src/test/java/datawave/edge/util/EdgeValueTest.java",
"identifier": "EdgeValueTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNewBuilder() throws InvalidProtocolBufferException {\n EdgeValueBuilder builder = EdgeValue.newBuilder();\n builder.setBitmask(1);\n builder.setCount(42l);\n \n EdgeValue eValue = builder.build();\n Value value = eValue.encode();\n ... | {
"fields": [
{
"declarator": "count",
"modifier": "private final",
"original_string": "private final Long count;",
"type": "Long",
"var_name": "count"
},
{
"declarator": "bitmask",
"modifier": "private final",
"original_string": "private final Integer bitma... | {
"body": "public static EdgeValueBuilder newBuilder() {\n return new EdgeValueBuilder();\n }",
"class_method_signature": "EdgeValue.newBuilder()",
"constructor": false,
"full_signature": "public static EdgeValueBuilder newBuilder()",
"identifier": "newBuilder",
"invocations": [],
"modifiers": "... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_200 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/time/NowTest.java",
"identifier": "NowTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleton() {\n Now now = Now.getInstance();\n Now now2 = Now.getInstance();\n Assert.assertSame(now, now2);\n }",
"class_method_signature": "NowTest.testSingleton()",
"constructor": false,
"full_signature": "@Test public void testSingleton()",
"id... | {
"fields": [
{
"declarator": "timer = null",
"modifier": "private",
"original_string": "private Timer timer = null;",
"type": "Timer",
"var_name": "timer"
},
{
"declarator": "now = new AtomicLong()",
"modifier": "private",
"original_string": "private Atomic... | {
"body": "public static Now getInstance() {\n if (instance == null) {\n synchronized (Now.class) {\n if (instance == null) {\n instance = new Now(false);\n }\n }\n }\n return instance;\n }",
"class_method_signature": "No... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_650 | {
"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 testIsRootPointer() {\n ByteSequence root = new ArrayByteSequence(rootId);\n ByteSequence child = new ArrayByteSequence(childId);\n ByteSequence grandchild = new ArrayByteSequence(grandchildId);\n assertTrue(TLD.isRootPointer(root));\n assertFalse(T... | {
"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 boolean isRootPointer(ByteSequence id) {\n ArrayList<Integer> dots = instancesOf('.', id);\n return dots.size() <= 2;\n }",
"class_method_signature": "TLD.isRootPointer(ByteSequence id)",
"constructor": false,
"full_signature": "public static boolean isRootPointer(ByteS... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_345 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testNormalizedBoundsCase() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new NumberType()));\n \n helper.setIndexedFields(dataTypes.keySet());\n helper.setIndexOnlyF... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class);",
"type": "Logger",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandTerms(ShardQueryConfiguration config, MetadataHelper helper, T script) {\n ExpandMultiNormalizedTerms visitor = new ExpandMultiNormalizedTerms(config, helper);\n \n if (null == visitor.config.getQueryField... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_715 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test\n public void testEdgesWithPreconditions() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == '$200_1_R' AND SINK == '$200_3_R' AND TYPE == 'TEST10' AND RELATION == 'REL1-REL2'\");\n \n String transformed = logic.getEventQuery(query);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_63 | {
"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 testConfigureGridxTable() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n ShardTableConfigHelperTest.logger.info(\"ShardTableConfigHelperTest.testConfigureGridxTable called.\");\n \n try {\n \n Confi... | {
"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": "protected void configureGridxTable(TableOperations tops) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {\n // Add the UID aggregator\n for (IteratorScope scope : IteratorScope.values()) {\n String stem = String.format(\"%s%s.%s\", Property.TABLE_ITERAT... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_596 | {
"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_noPrimaryToSecondaryMapSetTest() 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, va... | {
"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_980 | {
"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 testMethodAuthsIsNull() {\n HashSet<Authorizations> expected = new HashSet<>();\n for (Set<String> auths : userAuths) {\n expected.add(new Authorizations(auths.toArray(new String[auths.size()])));\n }\n assertEquals(expected, AuthorizationsUtil.... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Set<Authorizations> mergeAuthorizations(String requestedAuths, Collection<? extends Collection<String>> userAuths) {\n HashSet<String> requested = null;\n if (!StringUtils.isEmpty(requestedAuths)) {\n requested = new HashSet<>(splitAuths(requestedAuths));\n }\n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_579 | {
"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_pruneTopTest() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(1, 10);\n List<TermWeightPosition> offsetsB = asList(10, 11);\n List<TermWeightPosition> offsetsC = asList(4, 12);\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_129 | {
"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 testHandlerNormalizedTokenizedFieldWithSpace() throws Exception {\n \n TypeRegistry.reset();\n TypeRegistry.getInstance(ctx.getConfiguration());\n \n setupMocks();\n \n TestContentIndexingColumnBasedHandler handler = new TestContentInd... | {
"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_607 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/GeoWaveUtilsTest.java",
"identifier": "GeoWaveUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void splitLargeRangesTest() throws Exception {\n String wktString = \"POLYGON((-180 -90, 180 -90, 180 90, -180 90, -180 -90))\";\n Geometry geom = new WKTReader().read(wktString);\n \n List<ByteArrayRange> byteArrayRanges = new ArrayList<>();\n byteArray... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/util/GeoWaveUtils.java",
"identifier": "GeoWaveUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "GeoWaveUtils.initLongBuffer(ByteBuffer longBuffer)",
"constructor": false,
"full_signature": "priv... | {
"body": "public static List<ByteArrayRange> splitLargeRanges(List<ByteArrayRange> byteArrayRanges, Geometry queryGeometry, double maxRangeOverlap) {\n return splitLargeRanges(byteArrayRanges, queryGeometry, maxRangeOverlap, null);\n }",
"class_method_signature": "GeoWaveUtils.splitLargeRanges(List<ByteA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_257 | {
"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 testTripleNegationEq() 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_34 | {
"fields": [
{
"declarator": "dataType = new Type(\"dt1\", null, null, null, 10, null)",
"modifier": "private",
"original_string": "private Type dataType = new Type(\"dt1\", null, null, null, 10, null);",
"type": "Type",
"var_name": "dataType"
},
{
"declarator": "conf"... | {
"body": "@Test\n public void shouldDropBForSameGroupOnly() {\n fields.put(\"A1\", createGroupedValue(\"A1\", \"0\", \"Test1\"));\n fields.put(\"A2\", createGroupedValue(\"A2\", \"0\", \"Test2\"));\n fields.put(\"B1\", createGroupedValue(\"B1\", \"1\", \"TestX\"));\n fields.put(\"B2\",... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(IngestFieldFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(IngestFieldFilter.class);",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public void apply(Multimap<String,?> fields) {\n // for the field name filters, remove the drop fields if the keep fields exist\n for (FieldFilter filter : fieldNameFilters) {\n if (fields.keySet().containsAll(filter.getKeepFields())) {\n if (logger.isTraceEnabled())... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_742 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/jexl/JexlNodeSetTest.java",
"identifier": "JexlNodeSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainsAll() {\n JexlNode node1 = JexlNodeFactory.buildEQNode(\"FOO\", \"bar\");\n JexlNode node2 = JexlNodeFactory.buildEQNode(\"FOO2\", \"bar2\");\n JexlNode node3 = JexlNodeFactory.buildEQNode(\"FOO3\", \"bar3\");\n \n JexlNodeSet nodeSet = ... | {
"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 containsAll(Collection<?> collection) {\n if (collection != null) {\n for (Object o : collection) {\n if (!contains(o)) {\n return false;\n }\n }\n return true;\n }\n return ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1059 | {
"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 testOrderByWithDirection() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar\", null, null, \"foo.bar DESC\", \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`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_312 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/DepthVisitorTest.java",
"identifier": "DepthVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAnd2() throws Exception {\n String originalQuery = \"FOO == 'abc' and FOO = 'bcd' and FOO = 'abcdef'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n Assert.assertEquals(2, DepthVisitor.getDepth(script, 3));\n Assert... | {
"fields": [
{
"declarator": "maxDepth = 100",
"modifier": "private",
"original_string": "private int maxDepth = 100;",
"type": "int",
"var_name": "maxDepth"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/DepthVisitor.java",
"identifier": "De... | {
"body": "public static int getDepth(JexlNode root, int maxDepth) {\n DepthVisitor vis = new DepthVisitor(maxDepth);\n Depth depth = new Depth();\n root.jjtAccept(vis, depth);\n return depth.getMaxDepth();\n }",
"class_method_signature": "DepthVisitor.getDepth(JexlNode root, int maxD... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_938 | {
"fields": [
{
"declarator": "qlCache",
"modifier": "private static",
"original_string": "private static CreatedQueryLogicCacheBean qlCache;",
"type": "CreatedQueryLogicCacheBean",
"var_name": "qlCache"
},
{
"declarator": "connFactory",
"modifier": "private stati... | {
"body": "@Test\n public void testRemoveIdleOrExpired() throws Exception {\n QueryExpirationBean bean = createBean(0);\n RunningQuery query = createRunningQuery();\n bean.init();\n String qid = query.getSettings().getId().toString();\n queryCache.put(qid, query);\n qlCach... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryExpirationBean.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryExpirationBean.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "@Schedule(hour = \"*\", minute = \"*\", second = \"*/30\", persistent = false)\n public void removeIdleOrExpired() {\n if (log.isDebugEnabled()) {\n log.debug(\"@Schedule - removeIdleOrExpired\");\n }\n long now = System.currentTimeMillis();\n clearQueries(now);\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_892 | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrieTest.class)",
"modifier": "public static",
"original_string": "public static Logger log = Logger.getLogger(TokenTtlTrieTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "BENCHMARK_SIZE... | {
"body": "@Test\n public void testParseWithWhiteSpaces() {\n String initial = \"\\\"baking powder\\\" : 1d\\n\\t\\t\\t\\t\" + \"\\\"dried beans\\\" : 2d\\n\\t\\t\\t\\t\" + \"\\\"baking soda\\\" : 3d\\n\\t\\t\\t\\t\"\n + \"\\\"coffee grounds\\\" : 4d\\n\\t\\t\\t\\t\" + \"\\\"coffee wh... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrie.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TokenTtlTrie.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DELIMITE... | {
"body": "public Long scan(byte[] rawString) {\n int bestPriority = Integer.MAX_VALUE;\n float ttl = 0;\n int curState = 0;\n for (byte b : rawString) {\n short charClass = charClasses[0xff & (int) b];\n if (curState == REJECT_TOKEN) {\n if (charClass ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_191 | {
"fields": [
{
"declarator": "DEFAULT_PARTITION = 3",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PARTITION = 3;",
"type": "int",
"var_name": "DEFAULT_PARTITION"
},
{
"declarator": "NUM_REDUCERS = 100",
"modifier": "publ... | {
"body": "@Test\n public void testValidateExpectedCase() throws Exception {\n conf.set(PartitionerCache.PREFIX_DEDICATED_PARTITIONER + \"table1\", DelegatingPartitionerTest.AlwaysReturnOne.class.getName());\n conf.set(PartitionerCache.PREFIX_DEDICATED_PARTITIONER + \"table2\", DelegatingPartitionerT... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DelegatingPartitioner.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(DelegatingPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public List<String> validatePartitioners(String[] tableNames, Job job) {\n ArrayList<String> validTableNames = new ArrayList<>();\n for (String tableName : tableNames) {\n if (hasPartitionerOverride(new Text(tableName))) {\n try {\n Partitioner<Bul... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_484 | {
"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 unchangedTest() throws ParseException {\n String query = \"FIELD1 == 'x' || (FIELD1 == 'y' && FIELD2 == 'z')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.UNKNOWN, QueryPruningVisitor.getStat... | {
"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_241 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMvNoOverwrite() throws Exception {\n File src = mock(File.class);\n File dest = mock(File.class);\n expect(src.exists()).andReturn(true);\n expect(src.isDirectory()).andReturn(false);\n expect(src.canRead()).andReturn(true);\n replay(src)... | {
"fields": [
{
"declarator": "NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\"",
"modifier": "private static final",
"original_string": "private static final String NULL_PARAMS = Files.class.getName() + \" does not accept null parameters.\";",
"type": "String",
... | {
"body": "public static String mv(final String src, final String dest) {\n if (src == null || dest == null)\n throw new IllegalArgumentException(NULL_PARAMS);\n return mv(new File(src), new File(dest));\n }",
"class_method_signature": "Files.mv(final String src, final String dest)",
"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_611 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/util/GeoWaveUtilsTest.java",
"identifier": "GeoWaveUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createByteArrayRangeTest() {\n // String, String\n ByteArrayRange byteArrayRange = GeoWaveUtils.createByteArrayRange(\"0100\", \"0103\");\n Assert.assertEquals(\"0100\", new ByteArray(byteArrayRange.getStart()).getHexString().replace(\" \", \"\"));\n Asser... | {
"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 ByteArrayRange createByteArrayRange(String startGeohash, String endGeohash) {\n return createByteArrayRange(startGeohash, endGeohash, null);\n }",
"class_method_signature": "GeoWaveUtils.createByteArrayRange(String startGeohash, String endGeohash)",
"constructor": false,
"full... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_304 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testAllOrSomeEmptyPortion() throws TableNotFoundException {\n List<JexlNode> children = new ArrayList<>();\n children.add(wrap(JexlNodeFactory.buildEQNode(\"INDEXEDFIELD\", \"v1\")));\n children.add(wrap(JexlNodeFactory.buildEQNode(\"INDEXEDFIELD\", \"v2\")));\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ExecutableDeterminationVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ExecutableDeterminationVisitor.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "public static STATE getState(JexlNode node, ShardQueryConfiguration config, MetadataHelper helper) {\n return getState(node, config, helper, false);\n }",
"class_method_signature": "ExecutableDeterminationVisitor.getState(JexlNode node, ShardQueryConfiguration config, MetadataHelper helper)",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_754 | {
"fields": [
{
"declarator": "queryParser",
"modifier": "private",
"original_string": "private LuceneQueryParser queryParser;",
"type": "LuceneQueryParser",
"var_name": "queryParser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/parser/lucene/TestL... | {
"body": "@Test(expected = ParseException.class)\n public void testParseExceptionBadNot() throws ParseException {\n queryParser.parse(\"a not\");\n }",
"class_method_signature": "TestLuceneQueryParser.testParseExceptionBadNot()",
"constructor": false,
"full_signature": "@Test(expected = ParseExcep... | {
"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_22 | {
"fields": [
{
"declarator": "conf",
"modifier": "private",
"original_string": "private Configuration conf;",
"type": "Configuration",
"var_name": "conf"
}
],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/data/config/DataTypeHelperImplTest.java",
"identifier... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testInvalidConfig() {\n DataTypeHelperImpl helper = new DataTypeHelperImpl();\n TypeRegistry.reset();\n TypeRegistry.getInstance(conf);\n helper.setup(conf);\n }",
"class_method_signature": "DataTypeHelperImp... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(DataTypeHelperImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(DataTypeHelperImpl.class);",
"type": "Logger",
"var_name": "logger"
},
... | {
"body": "@Override\n public void setup(Configuration config) {\n initType(config);\n \n // Ingest Policy Enforcement\n // check if we have a default\n String policyEnforcerClass = \"\";\n if (null != config.get(\"all\" + Properties.INGEST_POLICY_ENFORCER_CLASS)) {\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_187 | {
"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 testTableSeparationWithFilePerShardLoc() throws IOException, InterruptedException {\n MultiRFileOutputFormatter.setGenerateMapFilePerShardLocation(conf, true);\n RecordWriter<BulkIngestKey,Value> writer = createWriter(formatter, conf);\n writeShardPairs(writer, 2... | {
"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 setGenerateMapFilePerShardLocation(Configuration conf, boolean generateMapFilePerShardLocation) {\n conf.setBoolean(GENERATE_MAP_FILE_PER_SHARD_LOCATION, generateMapFilePerShardLocation);\n }",
"class_method_signature": "MultiRFileOutputFormatter.setGenerateMapFilePerShardLoc... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_884 | {
"fields": [
{
"declarator": "MILLIS_IN_DAY = 1000L * 60 * 60 * 24L",
"modifier": "private static",
"original_string": "private static long MILLIS_IN_DAY = 1000L * 60 * 60 * 24L;",
"type": "long",
"var_name": "MILLIS_IN_DAY"
},
{
"declarator": "VALUE = new Value()",
... | {
"body": "@Test(expected = NullPointerException.class)\n public void testInitWithNoTtl() throws Exception {\n ConfigurableAgeOffFilter filter = new ConfigurableAgeOffFilter();\n filter.init(source, new HashMap<>(), env);\n }",
"class_method_signature": "ConfigurableAgeOffFilterTest.testInitWith... | {
"fields": [
{
"declarator": "log = Logger.getLogger(ConfigurableAgeOffFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(ConfigurableAgeOffFilter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {\n super.init(source, options, env);\n \n myEnv = env;\n \n // disabled if this is a system initialized major compaction and ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_8 | {
"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 testFlagMakerConfigWithHdfsOverride() throws JAXBException, IOException {\n log.info(\"----- testFlagMakerConfigWithHdfsOverride -----\");\n String overrideValue = \"testDir/BulkIngest\";\n FlagMakerConfig flagMakerConfig = FlagMaker.getFlagMakerConfig(new Stri... | {
"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_538 | {
"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 parse2LeadingBackslashesEquals() throws Exception {\n String query = \"CITY == '\\\\\\\\\\\\\\\\city'\";\n JexlNode node = JexlASTHelper.parseJexlQuery(query);\n String interpretedQuery = JexlStringBuildingVisitor.buildQuery(node);\n Assert.assertEquals(qu... | {
"fields": [
{
"declarator": "log = Logger.getLogger(JexlASTHelper.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger log = Logger.getLogger(JexlASTHelper.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "AN... | {
"body": "public static ASTJexlScript parseJexlQuery(String query) throws ParseException {\n // Instantiate a parser and visitor\n Parser parser = new Parser(new StringReader(\";\"));\n \n // lowercase all 'and', 'or', and 'not' portions of the query.\n String caseFixQuery = AND_PA... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_492 | {
"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 notTrueTest() throws ParseException {\n String query = \"!true\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, QueryPruningVisitor.getState(script));\n \n Assert.assertEqua... | {
"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_168 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/job/BulkIngestKeyTest.java",
"identifier": "BulkIngestKeyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals() {\n Text tableName1 = new Text(\"testTable\");\n Key key1 = new Key(new Text(\"row\\0key\"), new Text(\"colFam\"), new Text(\"col\\0qual\"), new Text(\"col\\0vis\"));\n BulkIngestKey bik1 = new BulkIngestKey(tableName1, key1);\n \n Text... | {
"fields": [
{
"declarator": "tableName = null",
"modifier": "protected",
"original_string": "protected Text tableName = null;",
"type": "Text",
"var_name": "tableName"
},
{
"declarator": "key = new Key()",
"modifier": "protected",
"original_string": "prote... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n BulkIngestKey other = (BulkIngestKey) obj;\n return compareTo(oth... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_646 | {
"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 testParseRootPointerFromFI() {\n Key fiKey = buildFiKey(rootId);\n ByteSequence parsed = TLD.parseRootPointerFromFI(fiKey.getColumnQualifierData());\n ByteSequence expected = new ArrayByteSequence(datatype + '\\u0000' + rootId);\n assertEquals(expected, pa... | {
"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 parseRootPointerFromFI(ByteSequence cq) {\n ArrayList<Integer> nulls = lastInstancesOf(0, cq, 2);\n final int start = nulls.get(1) + 1, stop = cq.length();\n return parseRootPointerFromId(cq.subSequence(start, stop));\n }",
"class_method_signature": "TLD... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_216 | {
"fields": [
{
"declarator": "jsonFile = \"/input/flattener-test.json\"",
"modifier": "protected static",
"original_string": "protected static String jsonFile = \"/input/flattener-test.json\";",
"type": "String",
"var_name": "jsonFile"
},
{
"declarator": "json",
... | {
"body": "@Test(expected = IllegalStateException.class)\n public void testGroupingContextWithBadJson() throws Exception {\n JsonObjectFlattener flattener = new JsonObjectFlattenerImpl.Builder().flattenMode(FlattenMode.GROUPED).occurrenceInGroupDelimiter(\"#\").build();\n \n JsonParser parser ... | {
"fields": [
{
"declarator": "DEFAULT_PATH_DELIMITER = \".\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_PATH_DELIMITER = \".\";",
"type": "String",
"var_name": "DEFAULT_PATH_DELIMITER"
},
{
"declarator": "DEFAULT_OCCURRE... | {
"body": "@Override\n public Multimap<String,String> flatten(JsonObject object) throws IllegalStateException {\n Multimap<String,String> map = HashMultimap.create();\n flatten(object, map);\n return map;\n }",
"class_method_signature": "JsonObjectFlattenerImpl.flatten(JsonObject object)"... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_75 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(DateIndexTableConfigHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(DateIndexTableConfigHelperTest.class);",
"type": "Logger",
"var_name": "logge... | {
"body": "@Test(expected = TableNotFoundException.class)\n public void testConfigureCalledBeforeSetup() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n DateIndexTableConfigHelperTest.logger.info(\"DateIndexTableConfigHelperTest.testConfigureCalledBeforeSetup called... | {
"fields": [
{
"declarator": "log",
"modifier": "protected",
"original_string": "protected Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "conf",
"modifier": "protected",
"original_string": "protected Configuration conf;",
"type"... | {
"body": "@Override\n public void configure(TableOperations tops) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {\n configureDateIndexTable(tops);\n }",
"class_method_signature": "DateIndexTableConfigHelper.configure(TableOperations tops)",
"constructor": false,
"full... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_703 | {
"fields": [
{
"declarator": "dict = null",
"modifier": "",
"original_string": "DefaultEdgeDictionary dict = null;",
"type": "DefaultEdgeDictionary",
"var_name": "dict"
},
{
"declarator": "logic = new DefaultEdgeEventQueryLogic()",
"modifier": "",
"original... | {
"body": "@Test\n public void testBasicQueryParse() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST1' AND RELATION == 'REL1-REL2' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n \n String transformed =... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1018 | {
"fields": [
{
"declarator": "userDN = \"CN=Guy Some Other soguy, OU=ou1, OU=ou2, OU=ou3, O=o1, C=US\"",
"modifier": "private static final",
"original_string": "private static final String userDN = \"CN=Guy Some Other soguy, OU=ou1, OU=ou2, OU=ou3, O=o1, C=US\";",
"type": "String",
... | {
"body": "@Test\n public void testListModels() throws Exception {\n importModels();\n PowerMock.resetAll();\n \n EasyMock.expect(ctx.getCallerPrincipal()).andReturn(principal);\n HashMap<String,String> trackingMap = new HashMap<>();\n EasyMock.expect(connectionFactory.get... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DEFAULT_MODEL_TABLE_NAME = \"DatawaveMet... | {
"body": "@GET\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\", \"application/x-protobuf\",\n \"application/x-protostuff\", \"text/html\"})\n @Path(\"/list\")\n @GZIP\n @Interceptors(ResponseInterceptor.class)\n pu... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_353 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testWeirdlyNormalizedFunction() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.put(\"NUM\", new NumberType());\n \n helper.setIndexedFields(dataTypes.keySet());\n helper.setIndexOnlyFields(dataTypes... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class);",
"type": "Logger",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandTerms(ShardQueryConfiguration config, MetadataHelper helper, T script) {\n ExpandMultiNormalizedTerms visitor = new ExpandMultiNormalizedTerms(config, helper);\n \n if (null == visitor.config.getQueryField... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_979 | {
"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(expected = IllegalArgumentException.class)\n public void testUserRequestsAuthTheyDontHave() {\n // This is the case where we could throw an error or write something to the logs\n methodAuths = \"A,C,F\";\n AuthorizationsUtil.mergeAuthorizations(methodAuths, userAuths);\n ... | {
"fields": [],
"file": "web-services/common-util/src/main/java/datawave/security/util/AuthorizationsUtil.java",
"identifier": "AuthorizationsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "AuthorizationsUtil.union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2... | {
"body": "public static Set<Authorizations> mergeAuthorizations(String requestedAuths, Collection<? extends Collection<String>> userAuths) {\n HashSet<String> requested = null;\n if (!StringUtils.isEmpty(requestedAuths)) {\n requested = new HashSet<>(splitAuths(requestedAuths));\n }\n... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_580 | {
"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_pruneBottomTest() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(1, 3, 8);\n List<TermWeightPosition> offsetsB = asList(3, 4, 44);\n List<TermWeightPosition> offsetsC = asList(4, 5, 35)... | {
"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_996 | {
"fields": [
{
"declarator": "formatter = new DateFormatter(null)",
"modifier": "private",
"original_string": "private DateFormatter formatter = new DateFormatter(null);",
"type": "DateFormatter",
"var_name": "formatter"
}
],
"file": "web-services/common-util/src/test/java/d... | {
"body": "@Test(expected = RuntimeException.class)\n public void testDateFormatterFail2() {\n formatter.fromString(\"20120101 250000\");\n }",
"class_method_signature": "DateFormatterTest.testDateFormatterFail2()",
"constructor": false,
"full_signature": "@Test(expected = RuntimeException.class) p... | {
"fields": [
{
"declarator": "log = Logger.getLogger(this.getClass())",
"modifier": "private",
"original_string": "private Logger log = Logger.getLogger(this.getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "defaultTime = \"000000\"",
"modifi... | {
"body": "@Override\n public Date fromString(String s) {\n Date d;\n synchronized (DateFormatter.dateFormat) {\n String str = s;\n if (str.equals(\"+24Hours\")) {\n d = new Date(new Date().getTime() + 86400000);\n log.debug(\"Param passed in was '+... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_518 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConjunctionOfTwoNEAndSingleEQ() throws ParseException {\n String queryString = \"FOO != BAR && BAR != FOO && BAR == CAT\";\n String expectedQuery = \"!(FOO == BAR) && !(BAR == FOO) && BAR == CAT\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(querySt... | {
"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_148 | {
"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 testTakeOwnershipJobDirectoryExistsThrowsException() throws Exception {\n \n BulkIngestMapFileLoaderTest.logger.info(\"testTakeOwnershipJobDirectoryExistsThrowsException called...\");\n \n try {\n \n URL url = BulkIngestMapFileLoaderT... | {
"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_324 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/ValidPatternVisitorTest.java",
"identifier": "ValidPatternVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = PatternSyntaxException.class)\n public void testFilterFunctionExcludeRegex() throws ParseException {\n String queryString = \"A == '1' && filter:excludeRegex(B,'*2*')\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ValidPatternVisitor.check(... | {
"fields": [
{
"declarator": "patternCache",
"modifier": "private",
"original_string": "private Map<String,Pattern> patternCache;",
"type": "Map<String,Pattern>",
"var_name": "patternCache"
}
],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/ValidPa... | {
"body": "public static void check(JexlNode node) {\n ValidPatternVisitor visitor = new ValidPatternVisitor();\n node.jjtAccept(visitor, null);\n }",
"class_method_signature": "ValidPatternVisitor.check(JexlNode node)",
"constructor": false,
"full_signature": "public static void check(JexlNode... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_774 | {
"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 testParseSpaces() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n Assert.assertEquals(\"FIELD: \", luceneParser.parse(\"FIELD:\\\\ \\\\ \").getContents());\n Assert.assertEquals(\"FIELD: TEST\", luceneParser.parse(\"FIELD:\... | {
"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_261 | {
"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 testAndNE() 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_631 | {
"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_groupingTest() {\n expect(mockScript.jjtGetNumChildren()).andReturn(0).anyTimes();\n expect(mockScript.jjtAccept(isA(EventDataQueryExpressionVisitor.class), eq(\"\"))).andReturn(null);\n \n replayAll();\n \n // expected key st... | {
"fields": [
{
"declarator": "FI_CF = new Text(\"fi\").getBytes()",
"modifier": "public static final",
"original_string": "public static final byte[] FI_CF = new Text(\"fi\").getBytes();",
"type": "byte[]",
"var_name": "FI_CF"
},
{
"declarator": "TF_CF = Constants.TERM... | {
"body": "protected String getCurrentField(Key current) {\n ByteSequence cf = current.getColumnFamilyData();\n \n if (WritableComparator.compareBytes(cf.getBackingArray(), 0, 2, FI_CF, 0, 2) == 0) {\n ArrayList<Integer> nullIndexes = TLD.instancesOf(0, cf, 1);\n final int s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_959 | {
"fields": [],
"file": "web-services/common-util/src/test/java/datawave/security/util/DnUtilsTest.java",
"identifier": "DnUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildNormalizedProxyDN() {\n String expected = \"sdn<idn>\";\n String actual = DnUtils.buildNormalizedProxyDN(\"SDN\", \"IDN\", null, null);\n assertEquals(expected, actual);\n \n expected = \"sdn1<idn1><sdn2><idn2>\";\n actual = DnUtils.... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static String buildNormalizedProxyDN(String subjectDN, String issuerDN, String proxiedSubjectDNs, String proxiedIssuerDNs) {\n StringBuilder sb = new StringBuilder();\n for (String escapedDN : buildNormalizedDNList(subjectDN, issuerDN, proxiedSubjectDNs, proxiedIssuerDNs)) {\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_55 | {
"fields": [
{
"declarator": "EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0)",
"modifier": "public static",
"original_string": "public static org.apache.hadoop.util.bloom.Key EMPTY_BF_KEY = new org.apache.hadoop.util.bloom.Key(new byte[0], 1.0);",
"type": "org.apach... | {
"body": "@Test\n public void testTransformRange() {\n // key should only be in bloom filter if it contains both the field name (cf) and field value (row)\n org.apache.accumulo.core.data.Key cbKey = new org.apache.accumulo.core.data.Key();\n Assert.assertNull(\"empty key should not be in bloo... | {
"fields": [
{
"declarator": "EMPTY_BYTES = new byte[0]",
"modifier": "private static final",
"original_string": "private static final byte[] EMPTY_BYTES = new byte[0];",
"type": "byte[]",
"var_name": "EMPTY_BYTES"
}
],
"file": "warehouse/ingest-core/src/main/java/datawave/i... | {
"body": "@Override\n public org.apache.hadoop.util.bloom.Key transform(org.apache.accumulo.core.data.Key cbKey) {\n \n if (isKeyInBloomFilter(cbKey)) {\n byte keyData[];\n \n // The row is the field value\n ByteSequence row = cbKey.getRowData();\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_723 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private LuceneToJexlQueryParser parser;",
"type": "LuceneToJexlQueryParser",
"var_name": "parser"
},
{
"declarator": "anyField = Constants.ANY_FIELD",
"modifier": "private static fi... | {
"body": "@Test\n public void testTokenizedFieldUnfieldedEnabled() throws ParseException {\n parser.setTokenizeUnfieldedQueries(true);\n Assert.assertEquals(\"(_ANYFIELD_ == '1234 5678 to bird' || content:within(4, termOffsetMap, '1234', '5678', 'bird'))\",\n parseQuery(\"1234... | {
"fields": [
{
"declarator": "DEFAULT_TOKENIZED_FIELDS = {\"TOKFIELD\"}",
"modifier": "private static final",
"original_string": "private static final String[] DEFAULT_TOKENIZED_FIELDS = {\"TOKFIELD\"};",
"type": "String[]",
"var_name": "DEFAULT_TOKENIZED_FIELDS"
},
{
... | {
"body": "public void setTokenizeUnfieldedQueries(boolean tokenizeUnfieldedQueries) {\n this.tokenizeUnfieldedQueries = tokenizeUnfieldedQueries;\n }",
"class_method_signature": "LuceneToJexlQueryParser.setTokenizeUnfieldedQueries(boolean tokenizeUnfieldedQueries)",
"constructor": false,
"full_signat... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_689 | {
"fields": [
{
"declarator": "connector",
"modifier": "private static",
"original_string": "private static Connector connector;",
"type": "Connector",
"var_name": "connector"
},
{
"declarator": "scannerFactory",
"modifier": "private static",
"original_strin... | {
"body": "@Test\n public void testTheSimplestOfScans() throws Exception {\n \n // Components that define the query: \"FOO == 'bar'\"\n String fieldName = \"FOO\";\n String fieldValue = \"bar\";\n ASTEQNode eqNode = (ASTEQNode) JexlNodeFactory.buildEQNode(fieldName, fieldValue);\... | {
"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 = Logger.getLogger(RangeStreamScanner.class)",
"mod... | {
"body": "@Override\n public boolean hasNext() {\n /*\n * Let's take a moment to look through all states S\n */\n try {\n if (null != stats)\n stats.getTimer(TIMERS.HASNEXT).resume();\n \n while (null == currentEntry && (!finished || !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_1038 | {
"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 testNonSSLoginWithoutSubjectHeaderFails() throws Exception {\n httpRequestHeaders.add(ISSUER_DN_HEADER, testUserCert.getIssuerDN().toString());\n \n expect(httpServerExchange.getConnection()).andReturn(serverConnection);\n expect(serverConnection.getSslSes... | {
"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_373 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/IteratorBuildingVisitorTest.java",
"identifier": "IteratorBuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildLiteralRange_middleWildcardTest() throws ParseException {\n ASTJexlScript query = JexlASTHelper.parseJexlQuery(\"FOO =~ 'bar.*man'\");\n List<ASTERNode> erNodes = JexlASTHelper.getERNodes(query);\n LiteralRange<?> range = IteratorBuildingVisitor.buildLiteral... | {
"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_666 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/composite/CompositeUtilsTest.java",
"identifier": "CompositeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void incrementMaxString() {\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < 10; i++)\n builder.appendCodePoint(Character.MAX_CODE_POINT);\n \n String minString = builder.toString();\n \n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CompositeUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CompositeUtils.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "ALL_... | {
"body": "public static String incrementBound(String orig) {\n // increment string\n int[] codePoints = orig.codePoints().toArray();\n int length = codePoints.length;\n int lastCodePoint = codePoints[length - 1];\n while (lastCodePoint == Character.MAX_CODE_POINT) {\n if... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_236 | {
"fields": [],
"file": "warehouse/common/src/test/java/datawave/common/io/FilesTest.java",
"identifier": "FilesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckFileCanRead() throws Exception {\n File file = mock(File.class);\n expect(file.exists()).andReturn(true);\n expect(file.isDirectory()).andReturn(false);\n expect(file.canRead()).andReturn(false);\n replay(file);\n String err = Files.... | {
"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_559 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/functions/EvaluationPhaseFilterFunctionsTest.java",
"identifier": "EvaluationPhaseFilterFunctionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIncludeRegex() {\n // @formatter:off\n // will return the first (thus only one) match\n Assert.assertTrue(EvaluationPhaseFilterFunctions.includeRegex(\n Lists.newArrayList(\n makeValueTuple(\"FOO.1,BAR,bar\"),\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 FunctionalSet<ValueTuple> includeRegex(Object fieldValue, String regex) {\n FunctionalSet<ValueTuple> matches = FunctionalSet.emptySet();\n if (fieldValue != null\n && (JexlPatternCache.getPattern(regex).matcher(ValueTuple.getStringValue(fieldValue)).match... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_109 | {
"fields": [
{
"declarator": "MAX_EXPECTED_COLLISIONS = 70",
"modifier": "public static final",
"original_string": "public static final int MAX_EXPECTED_COLLISIONS = 70;",
"type": "int",
"var_name": "MAX_EXPECTED_COLLISIONS"
},
{
"declarator": "TOTAL_TSERVERS = 600",
... | {
"body": "@Test\n public void testLocationHashPartitioner() throws Exception {\n conf.setInt(ShardIdFactory.NUM_SHARDS, SHARDS_PER_DAY);\n new TestShardGenerator(conf, NUM_DAYS, SHARDS_PER_DAY, TOTAL_TSERVERS, \"shard\");\n TabletLocationHashPartitioner partitionerTwo = new TabletLocationHash... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TabletLocationHashPartitioner.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TabletLocationHashPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public void setConf(Configuration conf) {\n this.conf = conf;\n }",
"class_method_signature": "TabletLocationHashPartitioner.setConf(Configuration conf)",
"constructor": false,
"full_signature": "@Override public void setConf(Configuration conf)",
"identifier": "setConf",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_365 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/TreeFlatteningRebuildingVisitorTest.java",
"identifier": "TreeFlatteningRebuildingVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void multipleNestingTest() throws Exception {\n String query = \"((a && (b && (c && d))) || b || (c || d || e || (f || g || (h || i || (((j || k)))))))\";\n String expected = \"((a && b && c && d) || b || c || d || e || f || g || h || i || j || k)\";\n JexlNode node =... | {
"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_735 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private LuceneToJexlControlledQueryParser parser;",
"type": "LuceneToJexlControlledQueryParser",
"var_name": "parser"
}
],
"file": "warehouse/query-core/src/test/java/datawave/query/language/pa... | {
"body": "@Test\n public void testIncludedFields() throws ParseException {\n parser = new LuceneToJexlControlledQueryParser();\n Set<String> allowedFields = new HashSet<>();\n allowedFields.add(\"FIELD1\");\n allowedFields.add(\"FIELD2\");\n allowedFields.add(\"FIELD3\");\n ... | {
"fields": [
{
"declarator": "includedValues = new HashMap<>()",
"modifier": "private",
"original_string": "private Map<String,Set<String>> includedValues = new HashMap<>();",
"type": "Map<String,Set<String>>",
"var_name": "includedValues"
},
{
"declarator": "excludedV... | {
"body": "@Override\n public void setIncludedValues(Map<String,Set<String>> includedValues) {\n this.includedValues = includedValues;\n }",
"class_method_signature": "LuceneToJexlControlledQueryParser.setIncludedValues(Map<String,Set<String>> includedValues)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_43 | {
"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_Timeout() throws Exception {\n // Create test input\n final NormalizedContentInterface nci = new NormalizedFieldAndValue(\"TEST\", \"test\");\n \n // Set expectations\n expect(this.filter.apply(isA(String.class))).andReturn(true); // On... | {
"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_220 | {
"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 testGetEventFieldsSIMPLE() throws Exception {\n JsonIngestHelper ingestHelper = init(initConfig(FlattenMode.SIMPLE));\n \n RawRecordContainer event = new RawRecordContainerImpl();\n event.setDate((new Date()).getTime());\n event.setRawData(testRecor... | {
"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_670 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/iterator/QueryIteratorTest.java",
"identifier": "QueryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsDocumentSpecificRange_spansMultipleRows() {\n Key start = new Key(\"20190314_0\", \"dataType\\0doc0\");\n Key end = new Key(\"20190314_9\", \"dataType\\0doc0\\0\");\n Range multipleRowRange = new Range(start, end);\n assertFalse(QueryIterator.isDocum... | {
"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_918 | {
"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 assortedDataIntoDefaultBucketLogOutputTest() {\n // The data entered into accumulo: 2 - one day old, 2 two days old, two , 2 eight days old, 2 fifteen days old\n // and 2 thirty one days old. The last eight should be removed by the default buckets\n loadAssortedD... | {
"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_14 | {
"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 testCounterLimitExceeded() throws Exception {\n log.info(\"----- testCounterLimitExceeded -----\");\n int expectedMax = (COUNTER_LIMIT - 2) / 2;\n File f = setUpFlagDir();\n // two days, expectedMax + 20 files each day\n LongRange range = createTe... | {
"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_298 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitorTest.java",
"identifier": "HasTopLevelNegationVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test10() throws Exception {\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(\"(FOO == 'bar' || FOO == 'bar')\");\n Assert.assertFalse(HasTopLevelNegationVisitor.hasTopLevelNegation(script));\n }",
"class_method_signature": "HasTopLevelNegationVisitorTest.test... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/HasTopLevelNegationVisitor.java",
"identifier": "HasTopLevelNegationVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)",
... | {
"body": "public static Boolean hasTopLevelNegation(ASTJexlScript script) {\n HasTopLevelNegationVisitor visitor = new HasTopLevelNegationVisitor();\n \n return visitor.recurseRoot(script);\n }",
"class_method_signature": "HasTopLevelNegationVisitor.hasTopLevelNegation(ASTJexlScript script)... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_762 | {
"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 testFunctions() throws ParseException {\n LuceneQueryParser luceneParser = new LuceneQueryParser();\n \n // parameters to functions do not have to be escaped\n Assert.assertEquals(\"[AND,fielda:selectora][posFilter: filter(true, AND, field, test[abc]*.*)]\... | {
"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_332 | {
"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 testExceededOrThresholdCannotExpand() throws Exception {\n ASTJexlScript queryTree = JexlASTHelper\n .parseJexlQuery(\"UUID == 'capone' && (((ExceededOrThresholdMarkerJexlNode = true) && (((id = 'some-bogus-id') && (field = 'QUOTE') && (params = '{\\\"va... | {
"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_627 | {
"fields": [
{
"declarator": "log = Logger.getLogger(DiscoveryIteratorTest.class)",
"modifier": "static final",
"original_string": "static final Logger log = Logger.getLogger(DiscoveryIteratorTest.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "warehouse/query-co... | {
"body": "@Test\n public void testReverseIndex() throws Throwable {\n Connector con = new InMemoryInstance(\"DiscoveryIteratorTest\").getConnector(\"root\", new PasswordToken(\"\"));\n con.tableOperations().create(\"reverseIndex\");\n writeSample(con.createBatchWriter(\"reverseIndex\", new Ba... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DiscoveryIterator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DiscoveryIterator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@Override\n public void next() throws IOException {\n tk = null;\n tv = null;\n \n while (itr.hasTop() && tk == null) {\n Multimap<String,TermInfo> terms = aggregateDate();\n if (terms.isEmpty()) {\n if (log.isTraceEnabled())\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_277 | {
"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 testMixedMarkers() throws ParseException {\n ASTJexlScript query = JexlASTHelper\n .parseJexlQuery(\"!((ASTDelayedPredicate = true) && (F1 == 'v1' && ((ExceededTermThresholdMarkerJexlNode = true) && (F2 == 'v2'))))\");\n JexlNode result = Pushdown... | {
"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_963 | {
"fields": [],
"file": "web-services/common-util/src/test/java/datawave/security/util/DnUtilsTest.java",
"identifier": "DnUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testBuildNormalizedProxyDNTooMissingIssuers() {\n DnUtils.buildNormalizedProxyDN(\"SDN\", \"IDN\", \"SDN2<SDN3>\", null);\n }",
"class_method_signature": "DnUtilsTest.testBuildNormalizedProxyDNTooMissingIssuers()",
"constructor... | {
"fields": [
{
"declarator": "PROPS_RESOURCE = \"dnutils.properties\"",
"modifier": "public static final",
"original_string": "public static final String PROPS_RESOURCE = \"dnutils.properties\";",
"type": "String",
"var_name": "PROPS_RESOURCE"
},
{
"declarator": "PROPS... | {
"body": "public static String buildNormalizedProxyDN(String subjectDN, String issuerDN, String proxiedSubjectDNs, String proxiedIssuerDNs) {\n StringBuilder sb = new StringBuilder();\n for (String escapedDN : buildNormalizedDNList(subjectDN, issuerDN, proxiedSubjectDNs, proxiedIssuerDNs)) {\n ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_430 | {
"fields": [
{
"declarator": "visitor = new BooleanOptimizationRebuildingVisitor()",
"modifier": "private",
"original_string": "private BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();",
"type": "BooleanOptimizationRebuildingVisitor",
"var_n... | {
"body": "@Test\n public void testConjunction() throws ParseException {\n String original = \"a && b && c\";\n optimize(original, original, false, false);\n }",
"class_method_signature": "BooleanOptimizationRebuildingVisitorTest.testConjunction()",
"constructor": false,
"full_signature": "@... | {
"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_125 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/mapreduce/handler/shard/content/TermAndZoneTest.java",
"identifier": "TermAndZoneTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals() {\n \n String token = \"Hello:World\";\n String otherToken = \"term:zone\";\n \n TermAndZone uut = new TermAndZone(token);\n TermAndZone match = new TermAndZone(token);\n TermAndZone other = new TermAndZone(otherToken);\n ... | {
"fields": [
{
"declarator": "serialVersionUID = -5948574921922307149L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5948574921922307149L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "zon... | {
"body": "@Override\n public boolean equals(Object o) {\n if (o instanceof TermAndZone) {\n return this.term.equals(((TermAndZone) o).term) && this.zone.equals(((TermAndZone) o).zone);\n }\n return false;\n }",
"class_method_signature": "TermAndZone.equals(Object o)",
"const... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_575 | {
"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_pruneAllTest() {\n List<List<TermWeightPosition>> offsets = new ArrayList<>();\n List<TermWeightPosition> offsetsA = asList(1);\n List<TermWeightPosition> offsetsB = asList(5);\n List<TermWeightPosition> offsetsC = asList(11);\n \n o... | {
"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_826 | {
"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 testNonIndexedNumeric() throws Exception {\n String originalQuery = \"(FOO == 'bag' && BAR == 4)\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n \n config.setBeginDate(new Date(0));\n config.setEndDate(new Date(System.curr... | {
"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_80 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(MetadataTableConfigHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(MetadataTableConfigHelperTest.class);",
"type": "Logger",
"var_name": "logger"... | {
"body": "@Test\n public void testConfigureCalledBeforeSetup() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {\n \n MetadataTableConfigHelperTest.logger.info(\"MetadataTableConfigHelperTest.testConfigureCalledBeforeSetup called.\");\n \n try {\n ... | {
"fields": [
{
"declarator": "log",
"modifier": "protected",
"original_string": "protected Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "conf",
"modifier": "protected",
"original_string": "protected Configuration conf;",
"type"... | {
"body": "@Override\n public void configure(TableOperations tops) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {\n if (tableName != null) {\n for (IteratorScope scope : IteratorScope.values()) {\n setFrequencyCombiner(tops, scope.name());\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_719 | {
"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 testManditoryFieldEdgeRelationship() throws Exception {\n Query query = new QueryImpl();\n query.setQuery(\"SOURCE == 'sourceValue' AND SINK == 'targetValue' AND TYPE == 'TEST1' AND ATTRIBUTE1 == 'SOURCE1-SOURCE2'\");\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DefaultEdgeEventQueryLogic.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DefaultEdgeEventQueryLogic.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "protected String getEventQuery(Query settings) throws Exception {\n return getEventQueryBuilder().getEventQuery(getJexlQueryString(settings));\n }",
"class_method_signature": "DefaultEdgeEventQueryLogic.getEventQuery(Query settings)",
"constructor": false,
"full_signature": "protected Strin... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1002 | {
"fields": [
{
"declarator": "MODEL_NAME = \"MODEL\"",
"modifier": "private static final",
"original_string": "private static final String MODEL_NAME = \"MODEL\";",
"type": "String",
"var_name": "MODEL_NAME"
},
{
"declarator": "FIELD_NAME = \"field1\"",
"modifier... | {
"body": "@Test\n public void testReverseKeyParse() throws Exception {\n FieldMapping mapping = ModelKeyParser.parseKey(REVERSE_KEY, AUTHS);\n Assert.assertEquals(REVERSE_FIELD_MAPPING, mapping);\n \n // Test ReverseKeyParse with no datatype\n REVERSE_FIELD_MAPPING.setDatatype(n... | {
"fields": [
{
"declarator": "NULL_BYTE = \"\\0\"",
"modifier": "public static final",
"original_string": "public static final String NULL_BYTE = \"\\0\";",
"type": "String",
"var_name": "NULL_BYTE"
},
{
"declarator": "NULL_VALUE = new Value(new byte[0])",
"modif... | {
"body": "public static FieldMapping parseKey(Key key, Set<Authorizations> auths) {\n FieldMapping mapping = new FieldMapping();\n String row = key.getRow().toString();\n String[] colf = key.getColumnFamily().toString().split(NULL_BYTE);\n String[] colq = key.getColumnQualifier().toString... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_349 | {
"fields": [
{
"declarator": "config",
"modifier": "private",
"original_string": "private ShardQueryConfiguration config;",
"type": "ShardQueryConfiguration",
"var_name": "config"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testMultiNormalizedFieldOpField() throws ParseException {\n Multimap<String,Type<?>> dataTypes = HashMultimap.create();\n dataTypes.putAll(\"FOO\", Sets.newHashSet(new LcNoDiacriticsType(), new LcType()));\n \n helper.setIndexedFields(dataTypes.keySet());\... | {
"fields": [
{
"declarator": "log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = ThreadConfigurableLogger.getLogger(ExpandMultiNormalizedTerms.class);",
"type": "Logger",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T extends JexlNode> T expandTerms(ShardQueryConfiguration config, MetadataHelper helper, T script) {\n ExpandMultiNormalizedTerms visitor = new ExpandMultiNormalizedTerms(config, helper);\n \n if (null == visitor.config.getQueryField... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_467 | {
"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 testRegexHeadTail() throws Exception {\n String originalQuery = \"FOO =~ '.*abc'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n final Map<String,ExpressionFilter> filter = EventDataQueryExpressionVisitor.getExpressionFilters(script, at... | {
"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_934 | {
"fields": [
{
"declarator": "drm",
"modifier": "private",
"original_string": "private DatawaveRoleManager drm;",
"type": "DatawaveRoleManager",
"var_name": "drm"
},
{
"declarator": "datawavePrincipal",
"modifier": "private",
"original_string": "private Dat... | {
"body": "@Test\n public void testBasicsLoadedConstructor() {\n \n drm = new DatawaveRoleManager(getFirstRole());\n \n Set<String> gottenRoles = drm.getRequiredRoles();\n Assert.assertTrue(gottenRoles.contains(\"REQ_ROLE_1\"));\n Assert.assertFalse(gottenRoles.contains(\"... | {
"fields": [
{
"declarator": "requiredRoles",
"modifier": "private",
"original_string": "private Set<String> requiredRoles;",
"type": "Set<String>",
"var_name": "requiredRoles"
}
],
"file": "web-services/query/src/main/java/datawave/webservice/query/logic/DatawaveRoleManager... | {
"body": "public Set<String> getRequiredRoles() {\n return requiredRoles;\n }",
"class_method_signature": "DatawaveRoleManager.getRequiredRoles()",
"constructor": false,
"full_signature": "public Set<String> getRequiredRoles()",
"identifier": "getRequiredRoles",
"invocations": [],
"modifiers": ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_871 | {
"fields": [],
"file": "warehouse/core/src/test/java/datawave/data/hash/UIDTest.java",
"identifier": "UIDTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComparisons() {\n long timestamp = 1449585658444L;\n SnowflakeUIDBuilder builder = SnowflakeUID.builder(timestamp, 1, 1, 1);\n \n HashUID uid1 = new HashUID(\"test\".getBytes(), new Date(timestamp));\n SnowflakeUID uid2 = builder.newId();\n ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(UID.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(UID.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "EMPTY_EXTRAS = {}... | {
"body": "public static UIDBuilder<UID> builder() {\n return HashUID.builder();\n }",
"class_method_signature": "UID.builder()",
"constructor": false,
"full_signature": "public static UIDBuilder<UID> builder()",
"identifier": "builder",
"invocations": [
"builder"
],
"modifiers": "public s... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_522 | {
"fields": [],
"file": "warehouse/query-core/src/test/java/datawave/query/jexl/visitors/RewriteNegationsVisitorTest.java",
"identifier": "RewriteNegationsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleGE() throws ParseException {\n String queryString = \"FOO >= BAR\";\n String expectedQuery = \"FOO >= BAR\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);\n ASTJexlScript negatedScript = RewriteNegationsVisitor.rewrite(scrip... | {
"fields": [],
"file": "warehouse/query-core/src/main/java/datawave/query/jexl/visitors/RewriteNegationsVisitor.java",
"identifier": "RewriteNegationsVisitor",
"interfaces": "",
"methods": [
{
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"fu... | {
"body": "public static <T extends JexlNode> T rewrite(T node) {\n node.jjtAccept(new RewriteNegationsVisitor(), null);\n return node;\n }",
"class_method_signature": "RewriteNegationsVisitor.rewrite(T node)",
"constructor": false,
"full_signature": "public static T rewrite(T node)",
"identi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_488 | {
"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 orFalseTest() throws ParseException {\n String query = \"false || _NOFIELD_ == 'z'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);\n Assert.assertEquals(QueryPruningVisitor.TruthState.FALSE, QueryPruningVisitor.getState(script));\n \n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(QueryPruningVisitor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(QueryPruningVisitor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public static TruthState getState(JexlNode node) {\n QueryPruningVisitor visitor = new QueryPruningVisitor(false);\n return (TruthState) node.jjtAccept(visitor, null);\n }",
"class_method_signature": "QueryPruningVisitor.getState(JexlNode node)",
"constructor": false,
"full_signature... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_172 | {
"fields": [
{
"declarator": "PASSWORD = \"passw0rd\"",
"modifier": "public static final",
"original_string": "public static final String PASSWORD = \"passw0rd\";",
"type": "String",
"var_name": "PASSWORD"
},
{
"declarator": "HOST_NAME = \"localhost\"",
"modifier... | {
"body": "@Test(expected = IOException.class)\n public void testGetSplitsNoFile() throws IOException {\n logger.info(\"testGetSplitsNoFile called...\");\n setupConfiguration();\n \n try {\n TableSplitsCache uut = new TableSplitsCache(createMockJobConf());\n Assert... | {
"fields": [
{
"declarator": "REFRESH_SPLITS = \"datawave.ingest.refresh.splits\"",
"modifier": "public static final",
"original_string": "public static final String REFRESH_SPLITS = \"datawave.ingest.refresh.splits\";",
"type": "String",
"var_name": "REFRESH_SPLITS"
},
{
... | {
"body": "public List<Text> getSplits(String table) throws IOException {\n if (null == this.splits)\n read();\n List<Text> tableSplits = this.splits.get(table);\n if (tableSplits == null) {\n return Collections.emptyList();\n }\n return tableSplits;\n }",
... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_1055 | {
"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 testColumnThatNeedEscapingInGroupBy() throws Exception {\n String sql = crq.generateSql(\"v\", \"foo.bar\", null, \"foo.bar\", null, \"me\", null);\n Assert.assertEquals(\"SELECT \" + fixedColumns + \",`foo.bar` FROM v WHERE _user_ = 'me' GROUP BY `foo.bar`\", sql);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CachedRunningQuery.class)",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger(CachedRunningQuery.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "datasour... | {
"body": "public String generateSql(String view, String fields, String conditions, String grouping, String order, String user, Connection connection)\n throws SQLException {\n CachedResultsParameters.validate(view);\n StringBuilder buf = new StringBuilder();\n if (StringUtils.... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_38 | {
"fields": [],
"file": "warehouse/ingest-core/src/test/java/datawave/ingest/util/ResourceAvailabilityUtilTest.java",
"identifier": "ResourceAvailabilityUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsMemoryAvailable_DefaultPath() {\n // Create test input\n float reasonableMinAvailability = 0.0f;\n float unreasonableMinAvailability = 1.01f;\n \n // Run the test\n boolean result1 = ResourceAvailabilityUtil.isMemoryAvailable(reasonable... | {
"fields": [
{
"declarator": "LOGGED_EXCEPTIONS = new HashSet<>(0)",
"modifier": "private static",
"original_string": "private static Set<String> LOGGED_EXCEPTIONS = new HashSet<>(0);",
"type": "Set<String>",
"var_name": "LOGGED_EXCEPTIONS"
},
{
"declarator": "ROOT_PAT... | {
"body": "public static boolean isMemoryAvailable(float minPercentageAvailable) {\n final Runtime runtime = Runtime.getRuntime();\n long freeMemory = runtime.freeMemory();\n long totalMemory = runtime.totalMemory();\n \n return ((((double) freeMemory / (double) totalMemory))) >= mi... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_4 | {
"fields": [
{
"declarator": "directoryCache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(10, TimeUnit.MINUTES)\n .concurrencyLevel(10).build()",
"modifier": "private static final",
"original_string": "private static final Cache<Path,Path> directoryCache = Ca... | {
"body": "@Test\n public void testConflictMove() throws Exception {\n \n Path file = getTestFile(fs);\n InputFile entry = new InputFile(\"foo\", file, 0, 0, 0, fmc.getBaseHDFSDir());\n createTrackedDirs(fs, entry);\n \n // create conflict file with different checksum\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(FlagEntryMover.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(FlagEntryMover.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "CHKS... | {
"body": "@Override\n public InputFile call() throws IOException {\n \n // Create the flagging, flagged and loaded directory if they do not exist\n Path dstFlagging = checkParent(entry.getFlagging());\n Path dstFlagged = checkParent(entry.getFlagged());\n Path dstLoaded = checkP... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_922 | {
"fields": [
{
"declarator": "TYPE1 = \"/type1-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String TYPE1 = \"/type1-config.xml\";",
"type": "String",
"var_name": "TYPE1"
},
{
"declarator": "TYPE2 = \"/type2-config.xml\"",
... | {
"body": "@Test\n public void shouldDetectDifferentSettings() {\n CompareResult result = compare.run(type1Conf, type2Conf);\n assertTrue(result.getDiff().contains(\"ingest.helper.class\"));\n }",
"class_method_signature": "DataTypeConfigCompareTest.shouldDetectDifferentSettings()",
"construct... | {
"fields": [
{
"declarator": "PREFIX = \"data.name\"",
"modifier": "public static final",
"original_string": "public static final String PREFIX = \"data.name\";",
"type": "String",
"var_name": "PREFIX"
}
],
"file": "warehouse/ops-tools/config-compare/src/main/java/datawave/c... | {
"body": "public CompareResult run(Configuration left, Configuration right) {\n SortedSet<String> same = new TreeSet<>();\n SortedSet<String> diff = new TreeSet<>();\n SortedSet<String> leftOnly = new TreeSet<>();\n SortedSet<String> rightOnly = new TreeSet<>();\n \n String ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_888 | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrieTest.class)",
"modifier": "public static",
"original_string": "public static Logger log = Logger.getLogger(TokenTtlTrieTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "BENCHMARK_SIZE... | {
"body": "@Test\n public void testTrie() {\n TokenTtlTrie trie = new TokenTtlTrie.Builder().setDelimiters(\",;\".getBytes()).addToken(\"foo\".getBytes(), 2).addToken(\"bar\".getBytes(), 3)\n .addToken(\"baz\".getBytes(), 4).build();\n \n assertNull(trie.scan(\"foobar,ba... | {
"fields": [
{
"declarator": "log = Logger.getLogger(TokenTtlTrie.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(TokenTtlTrie.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DELIMITE... | {
"body": "public Long scan(byte[] rawString) {\n int bestPriority = Integer.MAX_VALUE;\n float ttl = 0;\n int curState = 0;\n for (byte b : rawString) {\n short charClass = charClasses[0xff & (int) b];\n if (curState == REJECT_TOKEN) {\n if (charClass ... | {
"created": "1/10/2018 7:05:58 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 116999027,
"size": null,
"stargazer_count": null,
"stars": 283,
"updates": "2020-01-24T11:35:17+00:00",
"url": "https://github.com/NationalSecurit... |
116999027_471 | {
"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 testUnknownFunctionQuery() throws Exception {\n String originalQuery = \"filter:occurence(FOO, '=', 3) && BAR == '123'\";\n ASTJexlScript script = JexlASTHelper.parseJexlQuery(originalQuery);\n ASTJexlScript newScript = FunctionIndexQueryExpansionVisitor.expandFu... | {
"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_164 | {
"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 testRecordWriterWriteWithUpdatesWithColFamilyTypedWithUID() throws IOException, InterruptedException {\n \n CBMutationOutputFormatterTest.logger.info(\"testRecordWriterWriteWithUpdatesWithColFamilyTypedWithUID 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_534 | {
"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 parse3TrailingBackslashesEquals() throws Exception {\n String query = \"CITY == 'city\\\\\\\\\\\\\\\\\\\\\\\\'\";\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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.