id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
8582237_278 | {
"fields": [],
"file": "pipeline_api/src/test/java/com/splicemachine/pipeline/constraint/ConstraintContextTest.java",
"identifier": "ConstraintContextTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void withMessage() {\n // given\n ConstraintContext context1 = new ConstraintContext(\"aa\", \"bb\", \"cc\");\n // when\n ConstraintContext context2 = context1.withMessage(0, \"ZZ\");\n ConstraintContext context3 = context1.withMessage(1, \"ZZ\");\n ... | {
"fields": [
{
"declarator": "messageArgs",
"modifier": "private",
"original_string": "private String[] messageArgs;",
"type": "String[]",
"var_name": "messageArgs"
}
],
"file": "pipeline_api/src/main/java/com/splicemachine/pipeline/constraint/ConstraintContext.java",
"ide... | {
"body": "public ConstraintContext withMessage(int index, String newMessage) {\n String[] newArgs = Arrays.copyOf(this.messageArgs, this.messageArgs.length);\n newArgs[index] = newMessage;\n return new ConstraintContext(newArgs);\n }",
"class_method_signature": "ConstraintContext.withMessag... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_88 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java",
"identifier": "NonUniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testRangeSelectivity() throws StandardException {\n Assert.assertEquals(4000.0d,(double) impl.rangeSelectivity(row2000,row6000,true,false),50.0d);\n }",
"class_method_signature": "NonUniqueKeyStatisticsImplTest.testRangeSelectivity()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "frequenciesSketch",
"modifier": "private",... | {
"body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_151 | {
"fields": [
{
"declarator": "conf = new Configuration()",
"modifier": "",
"original_string": "Configuration conf = new Configuration();",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "hconf = new HBaseConfigurationSource(conf)",
"modifier": "",... | {
"body": "@Test\n public void testPrefixMatch() throws Exception {\n SConfiguration config = HConfiguration.getConfiguration();\n Map<String, String> auths = config.prefixMatch(\"splice.authentication.*\");\n\n String key = \"splice.authentication\";\n String value = auths.get(key);\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(\"splice.config\")",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(\"splice.config\");",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "DEFAULT_CO... | {
"body": "public static SConfiguration getConfiguration() {\n return new HConfiguration().init();\n }",
"class_method_signature": "HConfiguration.getConfiguration()",
"constructor": false,
"full_signature": "public static SConfiguration getConfiguration()",
"identifier": "getConfiguration",
"invo... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_67 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java",
"identifier": "UniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testFullScanSelectivity() throws StandardException {\n Assert.assertEquals(10000.0d,(double) impl.rangeSelectivity(null,null,true,false),50.0d);\n }",
"class_method_signature": "UniqueKeyStatisticsImplTest.testFullScanSelectivity()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_106 | {
"fields": [],
"file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java",
"identifier": "IntArraysTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComplementMap1() throws Exception {\n int[] expected = new int[] {3,4,5};\n int[] input = new int[] {0,1,2};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(prin... | {
"fields": [],
"file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java",
"identifier": "IntArrays",
"interfaces": "",
"methods": [
{
"class_method_signature": "IntArrays.IntArrays()",
"constructor": true,
"full_signature": "private IntArrays()",
"identifier"... | {
"body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_30 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test public void testAnySetBit() {\n assertEquals(2, bitset18C.anySetBit());\n bitset18C.clear(2);\n assertEquals(3, bitset18C.anySetBit());\n }",
"class_method_signature": "FormatableBitSetTest.testAnySetBit()",
"constructor": false,
"full_signature": "@Test public void test... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public int anySetBit() {\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\t\tfinal int numbytes = getLengthInBytes();\n\t\tfor (int i = 0; i < numbytes; ++i) {\n\t\t\tfinal byte v = value[i];\n\t\t\tif (v == 0) continue;\n\t\t\treturn (umul8(i) +... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_254 | {
"fields": [
{
"declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())",
"modifier": "private static final",
... | {
"body": "@Test\n public void correctlyIgnoresRemovedServers() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n final TickingClock clock = new IncrementingClock(0);\n final long timeout = 10l;\n\n fi... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_192 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/concurrent/ThreadsTest.java",
"identifier": "ThreadsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void sleep() {\n long startTime = System.currentTimeMillis();\n\n Threads.sleep(100, TimeUnit.MILLISECONDS);\n\n long elapsedTime = System.currentTimeMillis() - startTime;\n assertTrue(elapsedTime < 1000);\n assertTrue(elapsedTime > 75);\n }",
"clas... | {
"fields": [],
"file": "utilities/src/main/java/com/splicemachine/concurrent/Threads.java",
"identifier": "Threads",
"interfaces": "",
"methods": [
{
"class_method_signature": "Threads.Threads()",
"constructor": true,
"full_signature": "private Threads()",
"identifier": "Threads"... | {
"body": "public static void sleep(long duration, TimeUnit timeUnit) {\n try {\n Thread.sleep(timeUnit.toMillis(duration));\n } catch (InterruptedException e) {\n throw new IllegalStateException(e);\n }\n }",
"class_method_signature": "Threads.sleep(long duration, Time... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_203 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/uuid/SnowflakeTest.java",
"identifier": "SnowflakeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNoDuplicatesManyThreads() throws Exception {\n int numThreads=5;\n final int numIterations = 100000;\n ExecutorService executor = Executors.newFixedThreadPool(numThreads);\n final ConcurrentMap<Long,Boolean> existing = new ConcurrentHashMap<Long, Boole... | {
"fields": [
{
"declarator": "TIMESTAMP_MASK = 0x1ffffffffffl",
"modifier": "public static final",
"original_string": "public static final long TIMESTAMP_MASK = 0x1ffffffffffl;",
"type": "long",
"var_name": "TIMESTAMP_MASK"
},
{
"declarator": "TIMESTAMP_SHIFT = 12",
... | {
"body": "public long nextUUID(){\n long timestamp;\n /*\n * Get the timestamp to use.\n *\n * There are several reasons why we have to check against the latest timestamp:\n *\n * 1. Prevent duplicate UUIDs because we ask for too many UUID... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_215 | {
"fields": [
{
"declarator": "numRandomValues=1",
"modifier": "private static final",
"original_string": "private static final int numRandomValues=1;",
"type": "int",
"var_name": "numRandomValues"
},
{
"declarator": "kryoPool = mock(KryoPool.class)",
"modifier": ... | {
"body": "@Test\n\t\tpublic void testProperlyEncodesValues() throws Exception {\n\n\t\t\t\tExecRow execRow = new ValueRow(dataTypes.length);\n\t\t\t\tfor(int i=0;i<dataTypes.length;i++){\n\t\t\t\t\t\texecRow.setColumn(i + 1, row[i].cloneValue(true));\n\t\t\t\t}\n\n\t\t\t\tint[] keyColumns= new int[dataTypes.length];... | {
"fields": [
{
"declarator": "keyColumns",
"modifier": "protected final",
"original_string": "protected final int[] keyColumns;",
"type": "int[]",
"var_name": "keyColumns"
},
{
"declarator": "keySortOrder",
"modifier": "protected final",
"original_string": ... | {
"body": "public static DataHash encoder(int[] keyColumns,boolean[] keySortOrder,DescriptorSerializer[] serializers){\n return encoder(keyColumns,keySortOrder,SpliceKryoRegistry.getInstance(),serializers);\n }",
"class_method_signature": "BareKeyHash.encoder(int[] keyColumns,boolean[] keySortOrder,Descri... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_242 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void truncDate_returnsNullIfSourceOrDateOrBothAreNull() throws ParseException, SQLException {\n assertNull(TRUNC_DATE(timeStampT(\"2014/07/15 12:12:12.234\"), null));\n assertNull(TRUNC_DATE(null, \"month\"));\n assertNull(TRUNC_DATE(null, null));\n }",
"class_me... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Timestamp TRUNC_DATE(Timestamp source, String field) throws SQLException {\n if (source == null || field == null) return null;\n DateTime dt = new DateTime(source);\n field = field.toLowerCase();\n String lowerCaseField = field.toLowerCase();\n if (\"microse... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_184 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/collections/RingBufferTest.java",
"identifier": "RingBufferTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void clear() throws Exception {\n int bufferSize = 10;\n RingBuffer<Integer> buffer = new RingBuffer<Integer>(bufferSize);\n for (int i = 0; i < bufferSize; i++) {\n buffer.add(i);\n }\n buffer.clear();\n\n //should have exhausted the b... | {
"fields": [
{
"declarator": "mask",
"modifier": "private",
"original_string": "private int mask;",
"type": "int",
"var_name": "mask"
},
{
"declarator": "buffer",
"modifier": "private",
"original_string": "private Object[] buffer;",
"type": "Object[]"... | {
"body": "public void clear() {\n //skip the read position to the write position, so that you never see any of the old data\n readPosition = writePosition;\n offsetReadPosition = readPosition;\n }",
"class_method_signature": "RingBuffer.clear()",
"constructor": false,
"full_signature": ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_235 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void toTimestamp_throwsOnInvalidDateFormat() throws SQLException, ParseException {\n expectedException.expect(SQLException.class);\n SpliceDateFunctions.TO_TIMESTAMP(\"bad-format\", \"yyyy/MM/dd HH:mm:ss.SSS\");\n }",
"class_method_signature": "SpliceDateFunctionsTest.t... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }",
"class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)",
"constructor": false,
"full_signature": "public static Timestamp TO_TIMESTAMP(String source)",
"... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_92 | {
"fields": [
{
"declarator": "cut = new CurrentDatetime()",
"modifier": "private",
"original_string": "private CurrentDatetime cut = new CurrentDatetime();",
"type": "CurrentDatetime",
"var_name": "cut"
}
],
"file": "db-engine/src/test/java/com/splicemachine/db/impl/sql/exec... | {
"body": "@Test\n public void testGetCurrentDate() {\n LocalDate local = LocalDate.now();\n Date date = cut.getCurrentDate();\n long difference = ChronoUnit.DAYS.between(local, date.toLocalDate());\n assertTrue(difference <= 1); // Mostly zero, unless ran around midnight\n }",
"cl... | {
"fields": [
{
"declarator": "currentDateTime",
"modifier": "private",
"original_string": "private LocalDateTime currentDateTime;",
"type": "LocalDateTime",
"var_name": "currentDateTime"
},
{
"declarator": "currentDate",
"modifier": "private",
"original_str... | {
"body": "public Date getCurrentDate() {\n if (currentDate == null) {\n setCurrentDatetime();\n currentDate = Date.valueOf(currentDateTime.toLocalDate());\n }\n return currentDate;\n }",
"class_method_signature": "CurrentDatetime.getCurrentDate()",
"constructor": fal... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_262 | {
"fields": [],
"file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/sequence/AbstractSequenceTest.java",
"identifier": "AbstractSequenceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void singleThreaded1BlockWithStarting20WithRollover() throws Exception {\n\t\tSequence sequence = new SpliceTestSequence(1,1,20);\n\t\tfor (long i = 0; i< 1000; i++) {\n\t\t\tlong next = sequence.getNext();\n\t\t\tAssert.assertTrue(i+20==next);\n\t\t}\n\t}",
"class_method_signature": "Abs... | {
"fields": [
{
"declarator": "remaining=new AtomicLong(0l)",
"modifier": "protected final",
"original_string": "protected final AtomicLong remaining=new AtomicLong(0l);",
"type": "AtomicLong",
"var_name": "remaining"
},
{
"declarator": "currPosition=new AtomicLong(0l)"... | {
"body": "public long getNext() throws StandardException{\n if(remaining.getAndDecrement()<=0)\n allocateBlock(false);\n return currPosition.getAndAdd(incrementSteps);\n }",
"class_method_signature": "AbstractSequence.getNext()",
"constructor": false,
"full_signature": "public long ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_84 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java",
"identifier": "NonUniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testMinValue() throws StandardException {\n Assert.assertEquals(minRow,impl.minValue());\n }",
"class_method_signature": "NonUniqueKeyStatisticsImplTest.testMinValue()",
"constructor": false,
"full_signature": "@Test public void testMinValue()",
"identifier": "testM... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "frequenciesSketch",
"modifier": "private",... | {
"body": "@Override\n public ExecRow minValue() {\n return quantilesSketch.getMinValue();\n }",
"class_method_signature": "NonUniqueKeyStatisticsImpl.minValue()",
"constructor": false,
"full_signature": "@Override public ExecRow minValue()",
"identifier": "minValue",
"invocations": [
"getM... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_274 | {
"fields": [],
"file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/compile/CostUtilsTest.java",
"identifier": "CostUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void add() {\n long result = CostUtils.add(20L, 20L);\n assertEquals(40L, result);\n\n\n result = CostUtils.add(Long.MAX_VALUE, 200L);\n assertEquals(Long.MAX_VALUE, result);\n }",
"class_method_signature": "CostUtilsTest.add()",
"constructor": false,
... | {
"fields": [],
"file": "splice_machine/src/main/java/com/splicemachine/derby/impl/sql/compile/CostUtils.java",
"identifier": "CostUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "CostUtils.add(long count1, long count2)",
"constructor": false,
"full_signature": "public... | {
"body": "public static long add(long count1, long count2) {\n checkArgument(count1 >= 0);\n checkArgument(count2 >= 0);\n long sum = count1 + count2;\n return (sum >= 0L) ? sum : Long.MAX_VALUE;\n }",
"class_method_signature": "CostUtils.add(long count1, long count2)",
"constructo... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_223 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void testLastDay() {\n Calendar c = Calendar.getInstance();\n Date t = new Date(c.getTime().getTime());\n c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n Date s = new Date(c.getTime().getTime());\n assertEquals(SpliceDateFuncti... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date LAST_DAY(Date source) {\n if (source == null) {\n return null;\n }\n DateTime dt = new DateTime(source).dayOfMonth().withMaximumValue();\n return new Date(dt.getMillis());\n }",
"class_method_signature": "SpliceDateFunctions.LAST_DAY(Date sourc... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_47 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLLongIntTest.java",
"identifier": "SQLLongIntTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test\n public void writeExternal() throws IOException {\n SQLLongint lint = new SQLLongint(42);\n MockObjectOutput moo = new MockObjectOutput();\n lint.writeExternal(moo);\n Assert.assertFalse(\"Shouldn't be null\", moo.isNull);\n ... | {
"fields": [
{
"declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class)",
"modifier": "private static final",
"original_string": "private static final int BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class);",
"type": "int",
"var_n... | {
"body": "public void writeExternal(ObjectOutput out) throws IOException {\n\t\tout.writeBoolean(isNull);\n\t\tout.writeLong(value);\n\t}",
"class_method_signature": "SQLLongint.writeExternal(ObjectOutput out)",
"constructor": false,
"full_signature": "public void writeExternal(ObjectOutput out)",
"identifie... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_171 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateDoNotPurgeLatestTombstoneDuringMinorCompactionMissingFirstWriteToken() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_258 | {
"fields": [
{
"declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())",
"modifier": "private static final",
... | {
"body": "@Test\n public void noErrorWhenAllServersRespondBeforeFirstWait() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n TickingClock clock = new IncrementingClock(0);\n\n final TestDDLCommunicator ddlC... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_10 | {
"fields": [
{
"declarator": "TYPENAME = \"VARCHAR\"",
"modifier": "private static final",
"original_string": "private static final String TYPENAME = \"VARCHAR\";",
"type": "String",
"var_name": "TYPENAME"
},
{
"declarator": "HEADER_LENGTH = 2",
"modifier": "priv... | {
"body": "@Test\n public void testMissingThirdByteOfThree()\n throws IOException {\n // 0xef = 11101111, 0xb8 = 10111000\n byte[] data = {'a', (byte)0xef, (byte)0xb8};\n InputStream is = new ByteArrayInputStream(data);\n try {\n UTF8Util.skipFully(is, 2);\n ... | {
"fields": [],
"file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java",
"identifier": "UTF8Util",
"interfaces": "",
"methods": [
{
"class_method_signature": "UTF8Util.UTF8Util()",
"constructor": true,
"full_signature": "private UTF8Util()",
"identifier": "U... | {
"body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_126 | {
"fields": [],
"file": "hbase_sql/src/test/java/com/splicemachine/orc/block/FloatColumnBlockTest.java",
"identifier": "FloatColumnBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setPartitionValueTest() {\n FloatColumnBlock longColumnBlock = new FloatColumnBlock(null, DataTypes.FloatType);\n longColumnBlock.setPartitionValue(\"45.23\",1000);\n for (int i = 0; i< 1000; i++) {\n Assert.assertEquals(45.23f,longColumnBlock.getTestO... | {
"fields": [],
"file": "hbase_sql/src/main/java/com/splicemachine/orc/block/FloatColumnBlock.java",
"identifier": "FloatColumnBlock",
"interfaces": "",
"methods": [
{
"class_method_signature": "FloatColumnBlock.FloatColumnBlock(ColumnVector columnVector, DataType type)",
"constructor": true,
... | {
"body": "@Override\n public void setPartitionValue(String value, int size) {\n columnVector = ColumnVector.allocate(size, dataType, MemoryMode.ON_HEAP);\n columnVector.appendFloats(size,Float.parseFloat(value));\n }",
"class_method_signature": "FloatColumnBlock.setPartitionValue(String value, ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_130 | {
"fields": [
{
"declarator": "REGION_NAME = \"NetherRegion\"",
"modifier": "private static final",
"original_string": "private static final String REGION_NAME = \"NetherRegion\";",
"type": "String",
"var_name": "REGION_NAME"
},
{
"declarator": "mockCtx",
"modifie... | {
"body": "@Test\n public void preCompactTestScanner() throws Exception {\n MemstoreAwareObserver mao = new MemstoreAwareObserver();\n InternalScanner in = new StubInternalScanner();\n InternalScanner out = mao.preCompact(mockCtx, mockStore, in, userScanType, null, mockCompactionReq);\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(MemstoreAwareObserver.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(MemstoreAwareObserver.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "@Override\n public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,\n InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,\n CompactionRequest request) throws IOEx... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_219 | {
"fields": [
{
"declarator": "NANOS_IN_HOUR = 1000 * 1000 * 1000 * 60 * 60",
"modifier": "private static final",
"original_string": "private static final long NANOS_IN_HOUR = 1000 * 1000 * 1000 * 60 * 60;",
"type": "long",
"var_name": "NANOS_IN_HOUR"
}
],
"file": "splice_mac... | {
"body": "@Test\n public void shouldFailOnLargeDate() {\n String errorCode = \"N/A\";\n try {\n TimestampV2DescriptorSerializer.formatLong(getTimestamp(2263));\n } catch (StandardException e) {\n errorCode = e.getSqlState();\n }\n\n assertEquals(SQLState.LA... | {
"fields": [
{
"declarator": "INSTANCE_FACTORY = new AbstractTimeDescriptorSerializer.Factory() {\n @Override\n public DescriptorSerializer newInstance() {\n return new TimestampV2DescriptorSerializer();\n }\n\n @Override\n public boolean applies(int typeFormat... | {
"body": "public static long formatLong(Timestamp timestamp) throws StandardException {\n long millis = SQLTimestamp.checkV2Bounds(timestamp);\n long micros = timestamp.getNanos() / NANOS_TO_MICROS;\n return millis * MICROS_TO_SECOND + micros;\n }",
"class_method_signature": "TimestampV2Des... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_51 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLBooleanTest.java",
"identifier": "SQLBooleanTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test\n public void rowValueToDVDValue() throws Exception {\n SQLBoolean bool1 = new SQLBoolean(true);\n SQLBoolean bool2 = new SQLBoolean();\n ExecRow execRow = new ValueRow(2);\n execRow.setColumn(1, bool1);\n execRow.setCo... | {
"fields": [
{
"declarator": "F = 0x01",
"modifier": "public static final",
"original_string": "public static final byte F = 0x01;",
"type": "byte",
"var_name": "F"
},
{
"declarator": "T = 0x02",
"modifier": "public static final",
"original_string": "public... | {
"body": "public boolean getBoolean() {\n return value;\n }",
"class_method_signature": "SQLBoolean.getBoolean()",
"constructor": false,
"full_signature": "public boolean getBoolean()",
"identifier": "getBoolean",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "b... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_188 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/stream/StreamsTest.java",
"identifier": "StreamsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void wrap() throws StreamException {\n List<String> list = Lists.newArrayList(\"111\", \"222\", \"333\");\n\n Stream<String> stream1 = Streams.wrap(list);\n Stream<String> stream2 = Streams.wrap(list.iterator());\n\n assertEquals(\"111\", stream1.next());\n ... | {
"fields": [
{
"declarator": "EMPTY = new AbstractStream() {\n @Override public Object next() throws StreamException { return null; }\n @Override public void close() throws StreamException { }\n }",
"modifier": "private static final",
"original_string": "private static final ... | {
"body": "public static <T> Stream<T> wrap(Iterator<T> iterator){ return new IteratorStream<>(iterator); }",
"class_method_signature": "Streams.wrap(Iterator<T> iterator)",
"constructor": false,
"full_signature": "public static Stream<T> wrap(Iterator<T> iterator)",
"identifier": "wrap",
"invocations": [],... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_167 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateDoNotPurgeBecauseDeleteStartedBeforeWatermarkButCommittedAfter() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(900, 1100),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getM... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_183 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/collections/RingBufferTest.java",
"identifier": "RingBufferTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void size() {\n RingBuffer<Integer> buffer = new RingBuffer<Integer>(16);\n assertEquals(0, buffer.size());\n\n buffer.add(42);\n assertEquals(1, buffer.size());\n\n buffer.add(42);\n assertEquals(2, buffer.size());\n\n buffer.clear();\n ... | {
"fields": [
{
"declarator": "mask",
"modifier": "private",
"original_string": "private int mask;",
"type": "int",
"var_name": "mask"
},
{
"declarator": "buffer",
"modifier": "private",
"original_string": "private Object[] buffer;",
"type": "Object[]"... | {
"body": "public int size() {\n return writePosition - readPosition;\n }",
"class_method_signature": "RingBuffer.size()",
"constructor": false,
"full_signature": "public int size()",
"identifier": "size",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
"sign... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_245 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void testLargeTimestamps() throws Exception {\n\n assertEquals(\"2013-11-26 23:28:55.22\", SpliceDateFunctions.TO_TIMESTAMP(\"2013-11-26 23:28:55.22\",\"yyyy-MM-dd HH:mm:ss.SSSSSS\").toString());\n assertEquals(\"2014-03-08 20:33:27.135\", SpliceDateFunctions.TO_TIMESTAMP(\"... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }",
"class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)",
"constructor": false,
"full_signature": "public static Timestamp TO_TIMESTAMP(String source)",
"... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_212 | {
"fields": [
{
"declarator": "maxRuns=1000",
"modifier": "private static final",
"original_string": "private static final int maxRuns=1000;",
"type": "int",
"var_name": "maxRuns"
},
{
"declarator": "sampleData",
"modifier": "private final",
"original_string... | {
"body": "@Test\n public void testIntSameAsByteArray() throws Exception {\n byte[] bytes = Bytes.toBytes(sampleValue);\n int correct = murmur32.hash(bytes,0,bytes.length);\n\n int actual = murmur32.hash(sampleValue);\n\n Assert.assertEquals(\"Incorrect int hash!\",correct,actual);\n ... | {
"fields": [
{
"declarator": "c1 = 0xcc9e2d51",
"modifier": "private static final",
"original_string": "private static final int c1 = 0xcc9e2d51;",
"type": "int",
"var_name": "c1"
},
{
"declarator": "c2 = 0x1b873593",
"modifier": "private static final",
"or... | {
"body": "@Override\n public int hash(String elem) {\n assert elem!=null: \"Cannot hash a null element!\";\n int h = seed;\n int length = elem.length();\n int pos = 0;\n int visited =0;\n char[] chars = elem.toCharArray();\n while(length-visited>=4){\n /... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_204 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/uuid/SnowflakeTest.java",
"identifier": "SnowflakeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void timestampFromUUID() {\n assertEquals(1402425368772L, Snowflake.timestampFromUUID(-2074918693534679039l));\n assertEquals(1402425369637L, Snowflake.timestampFromUUID(-7920591009858039807l));\n assertEquals(1402425368822L, Snowflake.timestampFromUUID(-9039827904181... | {
"fields": [
{
"declarator": "TIMESTAMP_MASK = 0x1ffffffffffl",
"modifier": "public static final",
"original_string": "public static final long TIMESTAMP_MASK = 0x1ffffffffffl;",
"type": "long",
"var_name": "TIMESTAMP_MASK"
},
{
"declarator": "TIMESTAMP_SHIFT = 12",
... | {
"body": "public static long timestampFromUUID(long uuid) {\n return (uuid & TIMESTAMP_LOCATION) >> TIMESTAMP_SHIFT;\n }",
"class_method_signature": "Snowflake.timestampFromUUID(long uuid)",
"constructor": false,
"full_signature": "public static long timestampFromUUID(long uuid)",
"identifier": "ti... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_195 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/concurrent/CountDownLatchesTest.java",
"identifier": "CountDownLatchesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUncheckedAwaitWithTimeoutReturnsFalse() throws Exception {\n final CountDownLatch latch = new CountDownLatch(1);\n new Thread() {\n @Override\n public void run() {\n Threads.sleep(5, TimeUnit.SECONDS);\n }\n }.s... | {
"fields": [],
"file": "utilities/src/main/java/com/splicemachine/concurrent/CountDownLatches.java",
"identifier": "CountDownLatches",
"interfaces": "",
"methods": [
{
"class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch countDownLatch)",
"constructor": false,
"full... | {
"body": "public static void uncheckedAwait(CountDownLatch countDownLatch) {\n try {\n countDownLatch.await();\n } catch (InterruptedException e) {\n throw new IllegalStateException(e);\n }\n }",
"class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_253 | {
"fields": [
{
"declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())",
"modifier": "private static final",
... | {
"body": "@Test(expected=StandardException.class)\n public void timesOutIfNoServerEverResponds() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n final TickingClock clock = new IncrementingClock(0);\n final... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_101 | {
"fields": [],
"file": "splice_encoding/src/test/java/com/splicemachine/utils/ByteSliceTest.java",
"identifier": "ByteSliceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void toHexString() {\n ByteSlice byteSlice = new ByteSlice();\n byteSlice.set(new byte[]{18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0});\n assertEquals(\"1211100F0E0D0C0B0A09080706050403020100\", byteSlice.toHexString());\n }",
"class_method_s... | {
"fields": [
{
"declarator": "hashFunction = HashFunctions.murmur3(0)",
"modifier": "private static final",
"original_string": "private static final Hash32 hashFunction = HashFunctions.murmur3(0);",
"type": "Hash32",
"var_name": "hashFunction"
},
{
"declarator": "EMPTY... | {
"body": "public String toHexString() {\n if(this.length<=0) return \"\";\n return Bytes.toHex(buffer,offset,length);\n }",
"class_method_signature": "ByteSlice.toHexString()",
"constructor": false,
"full_signature": "public String toHexString()",
"identifier": "toHexString",
"invocations"... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_37 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java",
"identifier": "SQLSmallIntTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test(expected = StandardException.class)\n public void testNegativeOverFlow() throws StandardException {\n SQLSmallint integer1 = new SQLSmallint(Integer.MIN_VALUE);\n SQLSmallint integer2 = new SQLSmallint(1);\n integer1.minus(integer1, integer2, null);... | {
"fields": [
{
"declarator": "SMALLINT_LENGTH = 2",
"modifier": "static final",
"original_string": "static final int SMALLINT_LENGTH = 2;",
"type": "int",
"var_name": "SMALLINT_LENGTH"
},
{
"declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli... | {
"body": "public NumberDataValue minus(NumberDataValue result)\n\t\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new SQLSmallint();\n\t\t}\n\n\t\tif (this.isNull())\n\t\t{\n\t\t\tresult.setToNull();\n\t\t\treturn result;\n\t\t}\n\n\t\tint operandValue = this.getShort();... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_228 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void monthBetween() {\n Calendar c = Calendar.getInstance();\n Date t = new Date(c.getTime().getTime());\n c.add(Calendar.MONTH, 3);\n Date s = new Date(c.getTime().getTime());\n assertEquals(3.0, SpliceDateFunctions.MONTH_BETWEEN(t, s), 0.001);\n }",... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static double MONTH_BETWEEN(Date source1, Date source2) {\n if (source1 == null || source2 == null) return -1;\n DateTime dt1 = new DateTime(source1);\n DateTime dt2 = new DateTime(source2);\n return Months.monthsBetween(dt1, dt2).getMonths();\n }",
"class_method_sig... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_156 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateMixOfTransactions() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockValueCell(300),\n SITestUtils.getMockValueCell(200),\n SITestUtils.getMockValueCell(100)\n ));\n transactions.addAl... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_60 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java",
"identifier": "UniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testMinValue() throws StandardException {\n Assert.assertEquals(minRow,impl.minValue());\n }",
"class_method_signature": "UniqueKeyStatisticsImplTest.testMinValue()",
"constructor": false,
"full_signature": "@Test public void testMinValue()",
"identifier": "testMinV... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public ExecRow minValue() {\n return quantilesSketch.getMinValue();\n }",
"class_method_signature": "UniqueKeyStatisticsImpl.minValue()",
"constructor": false,
"full_signature": "@Override public ExecRow minValue()",
"identifier": "minValue",
"invocations": [
"getMinV... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_140 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator":... | {
"body": "@Test\n public void testBlockingLarge() throws StandardException {\n StreamListener<ExecRow> sl = new StreamListener<>();\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> manyRows = new ArrayList<>();\n for(i... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDD.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "DEFAUL... | {
"body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_99 | {
"fields": [],
"file": "splice_encoding/src/test/java/com/splicemachine/storage/EntryDecoderTest.java",
"identifier": "EntryDecoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getCurrentIndex_returnsIndexWithCardinalityOfNonNullFields() throws IOException {\n\n // < null, null, 'C' >\n byte[] value = new byte[]{-126, -128, 0, 69};\n EntryDecoder entryDecoder = new EntryDecoder(value);\n\n BitIndex bitIndex = entryDecoder.getCurr... | {
"fields": [
{
"declarator": "currentData",
"modifier": "private",
"original_string": "private ByteSlice currentData;",
"type": "ByteSlice",
"var_name": "currentData"
},
{
"declarator": "lastIndexData",
"modifier": "private",
"original_string": "private Byt... | {
"body": "public BitIndex getCurrentIndex() {\n return bitIndex;\n }",
"class_method_signature": "EntryDecoder.getCurrentIndex()",
"constructor": false,
"full_signature": "public BitIndex getCurrentIndex()",
"identifier": "getCurrentIndex",
"invocations": [],
"modifiers": "public",
"parameter... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_76 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java",
"identifier": "PrimaryKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testRangeSelectivity() throws StandardException {\n Assert.assertEquals(4000.0d,(double) impl.rangeSelectivity(row2000,row6000,true,false),50.0d);\n }",
"class_method_signature": "PrimaryKeyStatisticsImplTest.testRangeSelectivity()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_269 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void delete() throws IOException {\n // given\n ExportParams exportParams = ExportParams.withDirectory(temporaryFolder.getRoot().getAbsolutePath());\n ExportFile exportFile = new ExportFile(exportParams, testTaskId(),dfs);\n\n exportFile.getOutputStream();\n ... | {
"fields": [
{
"declarator": "SUCCESS_FILE = \"_SUCCESS\"",
"modifier": "public static final",
"original_string": "public static final String SUCCESS_FILE = \"_SUCCESS\";",
"type": "String",
"var_name": "SUCCESS_FILE"
},
{
"declarator": "fileSystem",
"modifier": ... | {
"body": "public boolean delete() throws IOException {\n if (LOG.isDebugEnabled())\n SpliceLogUtils.debug(LOG, \"delete()\");\n try{\n fileSystem.delete(exportParams.getDirectory(),buildFilenameFromTaskId(taskId), false);\n return true;\n }catch(NoSuchFileExcepti... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_117 | {
"fields": [],
"file": "hbase_sql/src/test/java/com/splicemachine/orc/TestOrcDataSourceUtils.java",
"identifier": "TestOrcDataSourceUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMergeSingle()\n {\n List<DiskRange> diskRanges = mergeAdjacentDiskRanges(\n ImmutableList.of(new DiskRange(100, 100)),\n new DataSize(0, BYTE),\n new DataSize(0, BYTE));\n assertEquals(diskRanges, ImmutableList.of(new ... | {
"fields": [],
"file": "hbase_sql/src/main/java/com/splicemachine/orc/OrcDataSourceUtils.java",
"identifier": "OrcDataSourceUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "OrcDataSourceUtils.OrcDataSourceUtils()",
"constructor": true,
"full_signature": "private OrcD... | {
"body": "public static List<DiskRange> mergeAdjacentDiskRanges(Collection<DiskRange> diskRanges, DataSize maxMergeDistance, DataSize maxReadSize)\n {\n // sort ranges by start offset\n List<DiskRange> ranges = new ArrayList<>(diskRanges);\n Collections.sort(ranges, new Comparator<DiskRange>(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_21 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test public void testCompareEmpty18() {\n // Would expect 1 since empty is smaller than bitset18 (based\n //on documentation)\n //assertEquals(1,empty.compare(bitset18));\n assertEquals(-1, empty.compare(bitset18));\n }",
"class_method_signature": "FormatableBitSetTest.tes... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public int compare(FormatableBitSet other)\n\t{\n\n\t\tint\t\totherCount, thisCount;\n\t\tint\t\totherLen, thisLen;\n\t\tbyte[]\totherb;\n\n\t\totherb = other.value;\n\t\totherLen = other.getLengthInBytes();\n\t\tthisLen = getLengthInBytes();\n\t\tfor (otherCount = 0, thisCount = 0;\n\t\t\t\totherCount < o... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_1 | {
"fields": [
{
"declarator": "TYPENAME = \"VARCHAR\"",
"modifier": "private static final",
"original_string": "private static final String TYPENAME = \"VARCHAR\";",
"type": "String",
"var_name": "TYPENAME"
},
{
"declarator": "HEADER_LENGTH = 2",
"modifier": "priv... | {
"body": "@Test\n public void testSkipUntilEOFOnShortStreamASCII()\n throws IOException {\n TestCase.assertEquals(5, UTF8Util.skipUntilEOF(new LoopingAlphabetStream(5)));\n }",
"class_method_signature": "UTF8UtilTest.testSkipUntilEOFOnShortStreamASCII()",
"constructor": false,
"full_sig... | {
"fields": [],
"file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java",
"identifier": "UTF8Util",
"interfaces": "",
"methods": [
{
"class_method_signature": "UTF8Util.UTF8Util()",
"constructor": true,
"full_signature": "private UTF8Util()",
"identifier": "U... | {
"body": "public static final long skipUntilEOF(InputStream in)\n throws IOException {\n // No need to do the skip in a loop, as Reader.read() returning -1\n // means EOF has been reached.\n // Note that a loop should be used if skip is used instead of read.\n return internalSk... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_249 | {
"fields": [
{
"declarator": "txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SNAPSHOT_ISOLATION,Txn.ROOT_TRANSACTION,null,true,null)",
"modifier": "private static final",
"original_string": "private static final WritableTxn txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SN... | {
"body": "@Test\n public void allPostCommitAreTreatedAsSuch() throws Exception{\n TestChecker checker=getTestChecker();\n Clock clock = new IncrementingClock(0);\n\n TxnStore supplier = new TestingTxnStore(clock,new TestingTimestampSource(),null,100l);\n supplier.recordNewTransaction(t... | {
"fields": [
{
"declarator": "LOG=Logger.getLogger(DDLWatchRefresher.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG=Logger.getLogger(DDLWatchRefresher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "se... | {
"body": "public boolean refreshDDL(Set<DDLWatcher.DDLListener> callbacks) throws IOException{\n Collection<String> ongoingDDLChangeIds=watchChecker.getCurrentChangeIds();\n if(ongoingDDLChangeIds==null) return false;\n\n Set<Pair<DDLChange,String>> newChanges=new HashSet<>();\n boolean c... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_56 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java",
"identifier": "UniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testNullCount() throws StandardException {\n Assert.assertEquals(0, impl.nullCount());\n }",
"class_method_signature": "UniqueKeyStatisticsImplTest.testNullCount()",
"constructor": false,
"full_signature": "@Test public void testNullCount()",
"identifier": "testNull... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long nullCount() {\n return nullCount;\n }",
"class_method_signature": "UniqueKeyStatisticsImpl.nullCount()",
"constructor": false,
"full_signature": "@Override public long nullCount()",
"identifier": "nullCount",
"invocations": [],
"modifiers": "@Override public... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_160 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateDoNotPurgeBecauseTombstoneNotCommitted() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n SITestUtils.getMockValueCell(100)\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_137 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator":... | {
"body": "@Test\n public void testBasicStream() throws Exception {\n StreamListener<ExecRow> sl = new StreamListener<>();\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n JavaPairRDD<ExecRow, ExecRow> rdd = SpliceSpark.getContextUnsafe().parallelizePairs(te... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDD.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "DEFAUL... | {
"body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_208 | {
"fields": [
{
"declarator": "maxRuns=1000",
"modifier": "private static final",
"original_string": "private static final int maxRuns=1000;",
"type": "int",
"var_name": "maxRuns"
},
{
"declarator": "sampleData",
"modifier": "private final",
"original_string... | {
"body": "@Test\n public void testLongSameAsByteArray() throws Exception {\n byte[] bytes = Bytes.toBytes(sampleLong);\n long correct = hasher.hash(bytes,0,bytes.length);\n\n long actual = hasher.hash(sampleLong);\n\n Assert.assertEquals(\"Incorrect long hash!\",correct,actual);\n }... | {
"fields": [
{
"declarator": "m = 0xc6a4a7935bd1e995L",
"modifier": "private static final",
"original_string": "private static final long m = 0xc6a4a7935bd1e995L;",
"type": "long",
"var_name": "m"
},
{
"declarator": "r = 47",
"modifier": "private static final",
... | {
"body": "@Override\n public long hash(String elem) {\n assert elem!=null: \"Cannot hash a null element\";\n int length = elem.length();\n long h = initialize(seed,length);\n int pos =0;\n char[] chars = elem.toCharArray();\n while(length-pos>=8){\n h = hash(h,... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_17 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test\n public void testShrinkNeg() {\n try {\n bitset18.shrink(-9);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n }",
"class_method_signature": "FormatableBitSetTest.testShrinkNeg()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public void shrink(int n)\n\t{\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\n\t\tif (n < 0 || n > lengthAsBits) {\n\t\t\tthrow new\n\t\t\t\tIllegalArgumentException(\"Bit set cannot shrink from \"+\n\t\t\t\t\t\t\t\t\t\t lengthAsBits+\" to \"+... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_121 | {
"fields": [],
"file": "hbase_sql/src/test/java/com/splicemachine/orc/metadata/TestOrcMetadataReader.java",
"identifier": "TestOrcMetadataReader",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMinSlice()\n throws Exception\n {\n int startCodePoint = MIN_CODE_POINT;\n int endCodePoint = MAX_CODE_POINT;\n Slice minSlice = Slices.utf8Slice(\"\");\n\n for (int i = startCodePoint; i < endCodePoint; i++) {\n String valu... | {
"fields": [
{
"declarator": "MAX_BYTE = Slices.wrappedBuffer(new byte[] { (byte) 0xFF })",
"modifier": "private static final",
"original_string": "private static final Slice MAX_BYTE = Slices.wrappedBuffer(new byte[] { (byte) 0xFF });",
"type": "Slice",
"var_name": "MAX_BYTE"
}... | {
"body": "@VisibleForTesting\n public static Slice getMinSlice(String minimum)\n {\n if (minimum == null) {\n return null;\n }\n\n int index = firstSurrogateCharacter(minimum);\n if (index == -1) {\n return Slices.utf8Slice(minimum);\n }\n // trun... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_199 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/concurrent/LongStripedSynchronizerTest.java",
"identifier": "LongStripedSynchronizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void stripedReadWriteLock() {\n // given\n LongStripedSynchronizer<ReadWriteLock> striped = LongStripedSynchronizer.stripedReadWriteLock(128, false);\n\n // when\n Set<ReadWriteLock> locks = Sets.newIdentityHashSet();\n for (long i = 0; i < 2000; i++) {\... | {
"fields": [
{
"declarator": "syncs",
"modifier": "",
"original_string": "Object[] syncs;",
"type": "Object[]",
"var_name": "syncs"
}
],
"file": "utilities/src/main/java/com/splicemachine/concurrent/LongStripedSynchronizer.java",
"identifier": "LongStripedSynchronizer",
... | {
"body": "public static LongStripedSynchronizer<ReadWriteLock> stripedReadWriteLock(int stripes, final boolean fair){\n int s = getNearestPowerOf2(stripes);\n return new LongStripedSynchronizer<ReadWriteLock>(s,new Supplier<ReadWriteLock>() {\n @Override\n public ReadWriteLock get... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_40 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java",
"identifier": "SQLSmallIntTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test\n public void writeExternalNull() throws IOException {\n SQLSmallint s = new SQLSmallint();\n MockObjectOutput moo = new MockObjectOutput();\n s.writeExternal(moo);\n Assert.assertTrue(\"Should be null\", moo.isNull);\n }",
"... | {
"fields": [
{
"declarator": "SMALLINT_LENGTH = 2",
"modifier": "static final",
"original_string": "static final int SMALLINT_LENGTH = 2;",
"type": "int",
"var_name": "SMALLINT_LENGTH"
},
{
"declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli... | {
"body": "public void writeExternal(ObjectOutput out) throws IOException {\n\t\tout.writeBoolean(isNull);\n\t\tout.writeShort(value);\n\t}",
"class_method_signature": "SQLSmallint.writeExternal(ObjectOutput out)",
"constructor": false,
"full_signature": "public void writeExternal(ObjectOutput out)",
"identif... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_176 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutatePurgePartialUpdateButNotBaselineInsert() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_224 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void nextDay() throws ParseException, SQLException {\n Date date1 = new Date(DF.parse(\"2014/06/24\").getTime());\n Date date2 = new Date(DF.parse(\"2014/06/29\").getTime());\n Date date3 = new Date(DF.parse(\"2014/06/25\").getTime());\n Date date4 = new Date(D... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date NEXT_DAY(Date source, String weekday) throws SQLException {\n if (source == null || weekday == null) return source;\n String lowerWeekday = weekday.toLowerCase();\n if (!WEEK_DAY_MAP.containsKey(lowerWeekday)) {\n throw PublicAPI.wrapStandardException(Erro... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_273 | {
"fields": [
{
"declarator": "csvWriterBuilder = new ExportCSVWriterBuilder()",
"modifier": "private",
"original_string": "private ExportCSVWriterBuilder csvWriterBuilder = new ExportCSVWriterBuilder();",
"type": "ExportCSVWriterBuilder",
"var_name": "csvWriterBuilder"
}
],
... | {
"body": "@Test\n public void buildCVSWriter() throws IOException {\n\n // given\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n ExportParams exportParams = ExportParams.withDirectory(\"/tmp\");\n\n // when\n CsvListWriter csvWriter = csvWriterBuilder.build(b... | {
"fields": [
{
"declarator": "WRITE_BUFFER_SIZE_BYTES = 16 * 1024",
"modifier": "private static final",
"original_string": "private static final int WRITE_BUFFER_SIZE_BYTES = 16 * 1024;",
"type": "int",
"var_name": "WRITE_BUFFER_SIZE_BYTES"
}
],
"file": "splice_machine/src/m... | {
"body": "public CsvListWriter build(OutputStream outputStream, ExportParams exportParams) throws IOException {\n OutputStreamWriter stream = new OutputStreamWriter(outputStream, exportParams.getCharacterEncoding());\n Writer writer = new BufferedWriter(stream, WRITE_BUFFER_SIZE_BYTES);\n CsvPre... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_83 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java",
"identifier": "NonUniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testMaxValue() throws StandardException {\n Assert.assertEquals(maxRow,impl.maxValue());\n }",
"class_method_signature": "NonUniqueKeyStatisticsImplTest.testMaxValue()",
"constructor": false,
"full_signature": "@Test public void testMaxValue()",
"identifier": "testM... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "frequenciesSketch",
"modifier": "private",... | {
"body": "@Override\n public ExecRow maxValue() {\n return quantilesSketch.getMaxValue();\n }",
"class_method_signature": "NonUniqueKeyStatisticsImpl.maxValue()",
"constructor": false,
"full_signature": "@Override public ExecRow maxValue()",
"identifier": "maxValue",
"invocations": [
"getM... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_265 | {
"fields": [],
"file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/operations/DMLTriggerEventMapperTest.java",
"identifier": "DMLTriggerEventMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAfterEvent() throws Exception {\n assertEquals(TriggerEvent.AFTER_DELETE, DMLTriggerEventMapper.getAfterEvent(DeleteOperation.class));\n\n assertEquals(TriggerEvent.AFTER_INSERT, DMLTriggerEventMapper.getAfterEvent(InsertOperation.class));\n assertEquals(T... | {
"fields": [
{
"declarator": "beforeMap = ImmutableMap.<Class<? extends DMLWriteOperation>, TriggerEvent>of(\n InsertOperation.class, TriggerEvent.BEFORE_INSERT,\n UpdateOperation.class, TriggerEvent.BEFORE_UPDATE,\n DeleteOperation.class, TriggerEvent.BEFORE_DELETE\n )"... | {
"body": "public static TriggerEvent getAfterEvent(Class<? extends DMLWriteOperation> operationClass) {\n for (Map.Entry<Class<? extends DMLWriteOperation>, TriggerEvent> entry : afterMap.entrySet()) {\n if (entry.getKey().isAssignableFrom(operationClass)) {\n return entry.getValue()... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_95 | {
"fields": [
{
"declarator": "cut = new CurrentDatetime()",
"modifier": "private",
"original_string": "private CurrentDatetime cut = new CurrentDatetime();",
"type": "CurrentDatetime",
"var_name": "cut"
}
],
"file": "db-engine/src/test/java/com/splicemachine/db/impl/sql/exec... | {
"body": "@Test\n public void testForget() throws InterruptedException {\n Timestamp timestamp = cut.getCurrentTimestamp();\n TimeUnit.MILLISECONDS.sleep(10);\n Timestamp sameTimestamp = cut.getCurrentTimestamp();\n assertEquals(timestamp, sameTimestamp);\n\n TimeUnit.MILLISECON... | {
"fields": [
{
"declarator": "currentDateTime",
"modifier": "private",
"original_string": "private LocalDateTime currentDateTime;",
"type": "LocalDateTime",
"var_name": "currentDateTime"
},
{
"declarator": "currentDate",
"modifier": "private",
"original_str... | {
"body": "public void forget() {\n constructionDateTime = LocalDateTime.now();\n constructionNanos = System.nanoTime();\n currentDateTime = null;\n currentDate = null;\n currentTime = null;\n currentTimestamp = null;\n }",
"class_method_signature": "CurrentDatetime.forg... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_232 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void toDateWithTimezoneTransitionAtMidnight() throws Exception {\n String source = \"1908-04-01\";\n DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = new Date(formatter.parse(\"1908-04-01\").getTime());\n\n try {\n assertEqu... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date TO_DATE(String source) throws SQLException {\n return TO_DATE(source,null);\n }",
"class_method_signature": "SpliceDateFunctions.TO_DATE(String source)",
"constructor": false,
"full_signature": "public static Date TO_DATE(String source)",
"identifier": "TO_DATE",
"inv... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_233 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void toDateDefaultWrongPattern() throws Exception {\n String source = \"2014/06/24\";\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n Date date = new Date(formatter.parse(\"06/24/2014\").getTime());\n\n try {\n assertEquals(date, Splic... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date TO_DATE(String source) throws SQLException {\n return TO_DATE(source,null);\n }",
"class_method_signature": "SpliceDateFunctions.TO_DATE(String source)",
"constructor": false,
"full_signature": "public static Date TO_DATE(String source)",
"identifier": "TO_DATE",
"inv... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_94 | {
"fields": [
{
"declarator": "cut = new CurrentDatetime()",
"modifier": "private",
"original_string": "private CurrentDatetime cut = new CurrentDatetime();",
"type": "CurrentDatetime",
"var_name": "cut"
}
],
"file": "db-engine/src/test/java/com/splicemachine/db/impl/sql/exec... | {
"body": "@Test\n public void testGetCurrentTimestamp() {\n LocalDateTime local = LocalDateTime.now();\n Timestamp timestamp = cut.getCurrentTimestamp();\n long difference = ChronoUnit.MILLIS.between(local, timestamp.toLocalDateTime());\n assertTrue(difference <= 500);\n }",
"clas... | {
"fields": [
{
"declarator": "currentDateTime",
"modifier": "private",
"original_string": "private LocalDateTime currentDateTime;",
"type": "LocalDateTime",
"var_name": "currentDateTime"
},
{
"declarator": "currentDate",
"modifier": "private",
"original_str... | {
"body": "public Timestamp getCurrentTimestamp() {\n if (currentTimestamp == null) {\n setCurrentDatetime();\n currentTimestamp = Timestamp.valueOf(currentDateTime);\n int mask = POWERS_OF_10[9 - timestampPrecision];\n int newNanos = currentTimestamp.getNanos() / ma... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_264 | {
"fields": [],
"file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/operations/DMLTriggerEventMapperTest.java",
"identifier": "DMLTriggerEventMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBeforeEvent() throws Exception {\n assertEquals(TriggerEvent.BEFORE_DELETE, DMLTriggerEventMapper.getBeforeEvent(DeleteOperation.class));\n\n assertEquals(TriggerEvent.BEFORE_INSERT, DMLTriggerEventMapper.getBeforeEvent(InsertOperation.class));\n assertEqu... | {
"fields": [
{
"declarator": "beforeMap = ImmutableMap.<Class<? extends DMLWriteOperation>, TriggerEvent>of(\n InsertOperation.class, TriggerEvent.BEFORE_INSERT,\n UpdateOperation.class, TriggerEvent.BEFORE_UPDATE,\n DeleteOperation.class, TriggerEvent.BEFORE_DELETE\n )"... | {
"body": "public static TriggerEvent getBeforeEvent(Class<? extends DMLWriteOperation> operationClass) {\n for (Map.Entry<Class<? extends DMLWriteOperation>, TriggerEvent> entry : beforeMap.entrySet()) {\n if (entry.getKey().isAssignableFrom(operationClass)) {\n return entry.getValue... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_82 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java",
"identifier": "NonUniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testTotalCount() throws StandardException {\n Assert.assertEquals(10000,impl.totalCount());\n }",
"class_method_signature": "NonUniqueKeyStatisticsImplTest.testTotalCount()",
"constructor": false,
"full_signature": "@Test public void testTotalCount()",
"identifier":... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "frequenciesSketch",
"modifier": "private",... | {
"body": "@Override\n public long totalCount() {\n return quantilesSketch.getN();\n }",
"class_method_signature": "NonUniqueKeyStatisticsImpl.totalCount()",
"constructor": false,
"full_signature": "@Override public long totalCount()",
"identifier": "totalCount",
"invocations": [
"getN"
]... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_272 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Ignore\n @Test\n public void verify_failCase() throws IOException, StandardException {\n ExportParams exportParams = ExportParams.withDirectory(\"/ExportPermissionCheckTest\");\n ExportPermissionCheck permissionCheck = new ExportPermissionCheck(exportParams,dfs);\n try {\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(ExportPermissionCheck.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(ExportPermissionCheck.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "void verify() throws StandardException {\n verifyExportDirExistsOrCanBeCreated();\n verifyExportDirWritable();\n }",
"class_method_signature": "ExportPermissionCheck.verify()",
"constructor": false,
"full_signature": " void verify()",
"identifier": "verify",
"invocations": [
... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_225 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void nextDayIsNotCaseSensitive() throws ParseException, SQLException {\n Date startDate = new Date(DF.parse(\"2014/06/24\").getTime());\n Date resultDate = new Date(DF.parse(\"2014/06/30\").getTime());\n assertEquals(resultDate, SpliceDateFunctions.NEXT_DAY(startDate,... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date NEXT_DAY(Date source, String weekday) throws SQLException {\n if (source == null || weekday == null) return source;\n String lowerWeekday = weekday.toLowerCase();\n if (!WEEK_DAY_MAP.containsKey(lowerWeekday)) {\n throw PublicAPI.wrapStandardException(Erro... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_198 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/concurrent/MoreExecutorsTest.java",
"identifier": "MoreExecutorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void namedThreadPool() throws Exception {\n final int CORE_POOL_SIZE = 1 + new Random().nextInt(9);\n final int MAX_POOL_SIZE = CORE_POOL_SIZE + new Random().nextInt(9);\n final int KEEP_ALIVE_SEC = new Random().nextInt(100);\n final boolean IS_DAEMON = new Ran... | {
"fields": [],
"file": "utilities/src/main/java/com/splicemachine/concurrent/MoreExecutors.java",
"identifier": "MoreExecutors",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreExecutors.MoreExecutors()",
"constructor": true,
"full_signature": "private MoreExecutors()",... | {
"body": "public static ThreadPoolExecutor namedThreadPool(int coreWorkers, int maxWorkers,\n String nameFormat,\n long keepAliveSeconds,\n boolean isDaemon) {\n... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_41 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java",
"identifier": "SQLSmallIntTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test\n public void readExternalNull() throws IOException {\n SQLSmallint s = new SQLSmallint();\n MockObjectInput moi = new MockObjectInput();\n moi.isNull = true;\n moi.value = 0;\n s.readExternal(moi);\n Ass... | {
"fields": [
{
"declarator": "SMALLINT_LENGTH = 2",
"modifier": "static final",
"original_string": "static final int SMALLINT_LENGTH = 2;",
"type": "int",
"var_name": "SMALLINT_LENGTH"
},
{
"declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli... | {
"body": "public void readExternal(ObjectInput in) throws IOException {\n\t\tisNull = in.readBoolean();\n\t\tvalue = in.readShort();\n\t}",
"class_method_signature": "SQLSmallint.readExternal(ObjectInput in)",
"constructor": false,
"full_signature": "public void readExternal(ObjectInput in)",
"identifier": "... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_177 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutatePurgeBaselineUpdateBecausePartialUpdatesCoverItAll() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_16 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test\n public void testShrinkLarger() {\n try {\n bitset18.shrink(25);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n }",
"class_method_signature": "FormatableBitSetTest.testShrinkLarger()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public void shrink(int n)\n\t{\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\n\t\tif (n < 0 || n > lengthAsBits) {\n\t\t\tthrow new\n\t\t\t\tIllegalArgumentException(\"Bit set cannot shrink from \"+\n\t\t\t\t\t\t\t\t\t\t lengthAsBits+\" to \"+... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_120 | {
"fields": [],
"file": "hbase_sql/src/test/java/com/splicemachine/orc/TestOrcDataSourceUtils.java",
"identifier": "TestOrcDataSourceUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMergeMaxSize()\n {\n List<DiskRange> consistent10ByteGap = ImmutableList.of(new DiskRange(100, 90), new DiskRange(200, 90), new DiskRange(300, 90));\n assertEquals(mergeAdjacentDiskRanges(consistent10ByteGap, new DataSize(10, BYTE), new DataSize(0, BYTE)), consis... | {
"fields": [],
"file": "hbase_sql/src/main/java/com/splicemachine/orc/OrcDataSourceUtils.java",
"identifier": "OrcDataSourceUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "OrcDataSourceUtils.OrcDataSourceUtils()",
"constructor": true,
"full_signature": "private OrcD... | {
"body": "public static List<DiskRange> mergeAdjacentDiskRanges(Collection<DiskRange> diskRanges, DataSize maxMergeDistance, DataSize maxReadSize)\n {\n // sort ranges by start offset\n List<DiskRange> ranges = new ArrayList<>(diskRanges);\n Collections.sort(ranges, new Comparator<DiskRange>(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_209 | {
"fields": [
{
"declarator": "maxRuns=1000",
"modifier": "private static final",
"original_string": "private static final int maxRuns=1000;",
"type": "int",
"var_name": "maxRuns"
},
{
"declarator": "sampleData",
"modifier": "private final",
"original_string... | {
"body": "@Test\n public void testMatchesGoogleVersionMurmur332() throws Exception {\n HashCode hashCode = Hashing.murmur3_32(0).hashBytes(sampleData, 0, sampleData.length);\n int actual =hashCode.asInt();\n\n int hash = murmur32.hash(sampleData, 0, sampleData.length);\n\n Assert.asser... | {
"fields": [
{
"declarator": "c1 = 0xcc9e2d51",
"modifier": "private static final",
"original_string": "private static final int c1 = 0xcc9e2d51;",
"type": "int",
"var_name": "c1"
},
{
"declarator": "c2 = 0x1b873593",
"modifier": "private static final",
"or... | {
"body": "@Override\n public int hash(String elem) {\n assert elem!=null: \"Cannot hash a null element!\";\n int h = seed;\n int length = elem.length();\n int pos = 0;\n int visited =0;\n char[] chars = elem.toCharArray();\n while(length-visited>=4){\n /... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_136 | {
"fields": [
{
"declarator": "localBaseDir = \"target/HdfsDirFileTest\"",
"modifier": "private static",
"original_string": "private static String localBaseDir = \"target/HdfsDirFileTest\";",
"type": "String",
"var_name": "localBaseDir"
}
],
"file": "hbase_sql/src/test/java/c... | {
"body": "@Test\n\tpublic void testMkdirs() throws IOException {\n\t\tHdfsDirFile dir = createHdfsDirFile(\"myfolder5/foo/bar\");\n\t\tAssert.assertTrue(\"Directories were not created\", dir.mkdirs());\n\t\tHdfsDirFile file1 = createHdfsDirFile(dir, \"able5.txt\");\n\t\tAssert.assertTrue(\"File was not created\", fi... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(HdfsDirFile.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(HdfsDirFile.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "path",
... | {
"body": "@Override\n\tpublic boolean mkdirs() {\n\t\ttry {\n\t\t\tFileSystem fs = getFileSystem();\n\t\t\treturn fs.mkdirs(new Path(path));\n\t\t} catch (IOException e) {\n\t\t\tLOG.error(String.format(\"An exception occurred while making directories in the path '%s'.\", path), e);\n\t\t\treturn false;\n\t\t}\n\t}"... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_57 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java",
"identifier": "UniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testNotNullCount() throws StandardException {\n Assert.assertEquals(10000,impl.notNullCount());\n }",
"class_method_signature": "UniqueKeyStatisticsImplTest.testNotNullCount()",
"constructor": false,
"full_signature": "@Test public void testNotNullCount()",
"identif... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long notNullCount() {\n return quantilesSketch.getN();\n }",
"class_method_signature": "UniqueKeyStatisticsImpl.notNullCount()",
"constructor": false,
"full_signature": "@Override public long notNullCount()",
"identifier": "notNullCount",
"invocations": [
"getN... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_161 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateDoNotPurgeBecauseTombstoneRolledBack() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n SITestUtils.getMockValueCell(100)\n ))... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_248 | {
"fields": [
{
"declarator": "txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SNAPSHOT_ISOLATION,Txn.ROOT_TRANSACTION,null,true,null)",
"modifier": "private static final",
"original_string": "private static final WritableTxn txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SN... | {
"body": "@Test\n public void picksUpNonTentativeChange() throws Exception{\n TestChecker checker=getTestChecker();\n Clock clock = new IncrementingClock(0);\n\n TxnStore supplier = new TestingTxnStore(clock,new TestingTimestampSource(),null,100l);\n supplier.recordNewTransaction(txn);... | {
"fields": [
{
"declarator": "LOG=Logger.getLogger(DDLWatchRefresher.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG=Logger.getLogger(DDLWatchRefresher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "se... | {
"body": "public boolean refreshDDL(Set<DDLWatcher.DDLListener> callbacks) throws IOException{\n Collection<String> ongoingDDLChangeIds=watchChecker.getCurrentChangeIds();\n if(ongoingDDLChangeIds==null) return false;\n\n Set<Pair<DDLChange,String>> newChanges=new HashSet<>();\n boolean c... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_0 | {
"fields": [
{
"declarator": "TYPENAME = \"VARCHAR\"",
"modifier": "private static final",
"original_string": "private static final String TYPENAME = \"VARCHAR\";",
"type": "String",
"var_name": "TYPENAME"
},
{
"declarator": "HEADER_LENGTH = 2",
"modifier": "priv... | {
"body": "@Test\n public void testSkipUntilEOFOnZeroLengthStream()\n throws IOException {\n TestCase.assertEquals(0, UTF8Util.skipUntilEOF(new LoopingAlphabetStream(0)));\n }",
"class_method_signature": "UTF8UtilTest.testSkipUntilEOFOnZeroLengthStream()",
"constructor": false,
"full_sig... | {
"fields": [],
"file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java",
"identifier": "UTF8Util",
"interfaces": "",
"methods": [
{
"class_method_signature": "UTF8Util.UTF8Util()",
"constructor": true,
"full_signature": "private UTF8Util()",
"identifier": "U... | {
"body": "public static final long skipUntilEOF(InputStream in)\n throws IOException {\n // No need to do the skip in a loop, as Reader.read() returning -1\n // means EOF has been reached.\n // Note that a loop should be used if skip is used instead of read.\n return internalSk... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_116 | {
"fields": [
{
"declarator": "msg1 = \"CHECK WITH ME\"",
"modifier": "protected static",
"original_string": "protected static String msg1 = \"CHECK WITH ME\";",
"type": "String",
"var_name": "msg1"
},
{
"declarator": "msg2 = \"CHECK WITH ME 2\"",
"modifier": "pro... | {
"body": "@Test\n\tpublic void messageTrimmingTest() {\n\t\tAssert.assertEquals(msg1,exception.getMessage());\n\t}",
"class_method_signature": "SpliceDoNotRetryIOExceptionTest.messageTrimmingTest()",
"constructor": false,
"full_signature": "@Test public void messageTrimmingTest()",
"identifier": "messageTrim... | {
"fields": [
{
"declarator": "serialVersionUID = -733330421228198468L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -733330421228198468L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOG =... | {
"body": "@Override\n public String getMessage() {\n LOG.trace(\"getMessage\");\n return super.getMessage();\n }",
"class_method_signature": "SpliceDoNotRetryIOException.getMessage()",
"constructor": false,
"full_signature": "@Override public String getMessage()",
"identifier": "getMessag... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_20 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test public void testCompare18Empty() {\n // Would expect -1 since empty is smaller than bitset18 (based\n //on documentation)\n //assertEquals(-1,bitset18.compare(new FormatableBitSet()));\n assertEquals(1, bitset18.compare(new FormatableBitSet()));\n }",
"class_method_si... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public int compare(FormatableBitSet other)\n\t{\n\n\t\tint\t\totherCount, thisCount;\n\t\tint\t\totherLen, thisLen;\n\t\tbyte[]\totherb;\n\n\t\totherb = other.value;\n\t\totherLen = other.getLengthInBytes();\n\t\tthisLen = getLengthInBytes();\n\t\tfor (otherCount = 0, thisCount = 0;\n\t\t\t\totherCount < o... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_268 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void buildFilenameFromTaskId() throws IOException {\n ExportFile streamSetup = new ExportFile(new ExportParams(), testTaskId(),dfs);\n byte[] taskId = testTaskId();\n assertEquals(\"export_82010203042A060708.csv\", streamSetup.buildFilenameFromTaskId(taskId));\n }"... | {
"fields": [
{
"declarator": "SUCCESS_FILE = \"_SUCCESS\"",
"modifier": "public static final",
"original_string": "public static final String SUCCESS_FILE = \"_SUCCESS\";",
"type": "String",
"var_name": "SUCCESS_FILE"
},
{
"declarator": "fileSystem",
"modifier": ... | {
"body": "protected String buildFilenameFromTaskId(byte[] taskId) {\n String postfix = \"\";\n if (exportParams.getCompression() == COMPRESSION.BZ2) {\n postfix = \".bz2\";\n }\n else if (exportParams.getCompression() == COMPRESSION.GZ) {\n postfix = \".gz\";\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_141 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator":... | {
"body": "@Test\n public void testBlockingLargeOddPartitions() throws StandardException {\n StreamListener<ExecRow> sl = new StreamListener<>();\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> manyRows = new ArrayList<>();\n... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(StreamableRDD.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "DEFAUL... | {
"body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_98 | {
"fields": [
{
"declarator": "txnLifecycleManager",
"modifier": "private",
"original_string": "private ClientTxnLifecycleManager txnLifecycleManager;",
"type": "ClientTxnLifecycleManager",
"var_name": "txnLifecycleManager"
},
{
"declarator": "txnStore",
"modifier... | {
"body": "@Test\n public void testCannotSeeRolledBackRow() throws Exception{\n TxnSupplier baseStore=txnStore;\n\n Txn rolledBack=txnLifecycleManager.beginTransaction(Bytes.toBytes(\"hello\"));\n rolledBack.rollback();\n\n ReadResolver noopResolver=NoOpReadResolver.INSTANCE;\n T... | {
"fields": [
{
"declarator": "transactionStore",
"modifier": "private final",
"original_string": "private final TxnSupplier transactionStore;",
"type": "TxnSupplier",
"var_name": "transactionStore"
},
{
"declarator": "myTxn",
"modifier": "private final",
"o... | {
"body": "@Override\n public DataFilter.ReturnCode filterCell(DataCell keyValue) throws IOException{\n CellType type=keyValue.dataType();\n switch (type) {\n case COMMIT_TIMESTAMP:\n ensureTransactionIsCached(keyValue);\n return DataFilter.ReturnCode.SKIP;\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_77 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java",
"identifier": "PrimaryKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testNullBeginSelectivity() throws StandardException {\n Assert.assertEquals(6000.0d,(double) impl.rangeSelectivity(null,row6000,true,false),50.0d);\n }",
"class_method_signature": "PrimaryKeyStatisticsImplTest.testNullBeginSelectivity()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_157 | {
"fields": [
{
"declarator": "watermark = 1000",
"modifier": "private",
"original_string": "private long watermark = 1000;",
"type": "long",
"var_name": "watermark"
},
{
"declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu... | {
"body": "@Test\n public void mutateNullTransaction() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockValueCell(100),\n SITestUtils.getMockValueCell(100)\n ));\n transactions.addAll(Arrays.asList(\n null,\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_61 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java",
"identifier": "UniqueKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testNullSelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(null));\n }",
"class_method_signature": "UniqueKeyStatisticsImplTest.testNullSelectivity()",
"constructor": false,
"full_signature": "@Test public void testNullSelectivity()",
... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long selectivity(ExecRow element) {\n return 1L;\n }",
"class_method_signature": "UniqueKeyStatisticsImpl.selectivity(ExecRow element)",
"constructor": false,
"full_signature": "@Override public long selectivity(ExecRow element)",
"identifier": "selectivity",
"invo... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_229 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void toDate() throws SQLException, ParseException {\n String format = \"yyyy/MM/dd\";\n String source = \"2014/06/24\";\n DateFormat formatter = new SimpleDateFormat(format);\n Date date = new Date(formatter.parse(source).getTime());\n\n assertEquals(dat... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Date TO_DATE(String source) throws SQLException {\n return TO_DATE(source,null);\n }",
"class_method_signature": "SpliceDateFunctions.TO_DATE(String source)",
"constructor": false,
"full_signature": "public static Date TO_DATE(String source)",
"identifier": "TO_DATE",
"inv... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_100 | {
"fields": [],
"file": "splice_encoding/src/test/java/com/splicemachine/utils/ByteSliceTest.java",
"identifier": "ByteSliceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getByteCopy() {\n byte[] bytes = new byte[]{0, 1, 2, 3, 4, 5};\n ByteSlice byteSlice = ByteSlice.wrap(bytes);\n byte[] copy = byteSlice.getByteCopy();\n assertNotSame(\"should not be the same\", bytes, copy);\n assertArrayEquals(\"but should be equa... | {
"fields": [
{
"declarator": "hashFunction = HashFunctions.murmur3(0)",
"modifier": "private static final",
"original_string": "private static final Hash32 hashFunction = HashFunctions.murmur3(0);",
"type": "Hash32",
"var_name": "hashFunction"
},
{
"declarator": "EMPTY... | {
"body": "public byte[] getByteCopy() {\n if(length<=0) return EMPTY_BYTE_ARRAY;\n return Bytes.slice(buffer, offset, length);\n }",
"class_method_signature": "ByteSlice.getByteCopy()",
"constructor": false,
"full_signature": "public byte[] getByteCopy()",
"identifier": "getByteCopy",
"inv... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_36 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java",
"identifier": "SQLSmallIntTest",
"interfaces": "",
"superclass": "extends SQLDataValueDescriptorTest"
} | {
"body": "@Test\n public void addTwo() throws StandardException {\n SQLSmallint integer1 = new SQLSmallint(100);\n SQLSmallint integer2 = new SQLSmallint(100);\n Assert.assertEquals(\"Integer Add Fails\", 200, integer1.plus(integer1, integer2, null).getInt(),0);\n }",
... | {
"fields": [
{
"declarator": "SMALLINT_LENGTH = 2",
"modifier": "static final",
"original_string": "static final int SMALLINT_LENGTH = 2;",
"type": "int",
"var_name": "SMALLINT_LENGTH"
},
{
"declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli... | {
"body": "public int\tgetInt()\n\t{\n\t\treturn (int) value;\n\t}",
"class_method_signature": "SQLSmallint.getInt()",
"constructor": false,
"full_signature": "public int getInt()",
"identifier": "getInt",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "i... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_252 | {
"fields": [
{
"declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())",
"modifier": "private static final",
... | {
"body": "@Test(expected=StandardException.class)\n public void timesOutIfServerRespondsAfterTimeout() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n final TickingClock clock = new IncrementingClock(0);\n ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_194 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/concurrent/CountDownLatchesTest.java",
"identifier": "CountDownLatchesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUncheckedAwaitWithTimeout() throws Exception {\n final CountDownLatch latch = new CountDownLatch(1);\n new Thread() {\n @Override\n public void run() {\n latch.countDown();\n }\n }.start();\n\n assertTrue... | {
"fields": [],
"file": "utilities/src/main/java/com/splicemachine/concurrent/CountDownLatches.java",
"identifier": "CountDownLatches",
"interfaces": "",
"methods": [
{
"class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch countDownLatch)",
"constructor": false,
"full... | {
"body": "public static void uncheckedAwait(CountDownLatch countDownLatch) {\n try {\n countDownLatch.await();\n } catch (InterruptedException e) {\n throw new IllegalStateException(e);\n }\n }",
"class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_205 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/uuid/SnowflakeTest.java",
"identifier": "SnowflakeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void toString_includesExpectedMachineId() {\n assertEquals(\"Snowflake{lastTimestamp=0, counter=0, machineId=2}\", new Snowflake((short) (1 << 1)).toString());\n assertEquals(\"Snowflake{lastTimestamp=0, counter=0, machineId=4}\", new Snowflake((short) (1 << 2)).toString());... | {
"fields": [
{
"declarator": "TIMESTAMP_MASK = 0x1ffffffffffl",
"modifier": "public static final",
"original_string": "public static final long TIMESTAMP_MASK = 0x1ffffffffffl;",
"type": "long",
"var_name": "TIMESTAMP_MASK"
},
{
"declarator": "TIMESTAMP_SHIFT = 12",
... | {
"body": "@Override\n public String toString() {\n return \"Snowflake{\" +\n \"lastTimestamp=\" + lastTimestamp +\n \", counter=\" + counter +\n \", machineId=\" + machineId +\n '}';\n }",
"class_method_signature": "Snowflake.toString()",
"... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_213 | {
"fields": [
{
"declarator": "maxRuns=1000",
"modifier": "private static final",
"original_string": "private static final int maxRuns=1000;",
"type": "int",
"var_name": "maxRuns"
},
{
"declarator": "sampleData",
"modifier": "private final",
"original_string... | {
"body": "@Test\n public void testLongSameAsByteArray() throws Exception {\n byte[] bytes = Bytes.toBytes(sampleLong);\n int correct = murmur32.hash(bytes,0,bytes.length);\n\n int actual = murmur32.hash(sampleLong);\n\n Assert.assertEquals(\"Incorrect int hash!\",correct,actual);\n ... | {
"fields": [
{
"declarator": "c1 = 0xcc9e2d51",
"modifier": "private static final",
"original_string": "private static final int c1 = 0xcc9e2d51;",
"type": "int",
"var_name": "c1"
},
{
"declarator": "c2 = 0x1b873593",
"modifier": "private static final",
"or... | {
"body": "@Override\n public int hash(String elem) {\n assert elem!=null: \"Cannot hash a null element!\";\n int h = seed;\n int length = elem.length();\n int pos = 0;\n int visited =0;\n char[] chars = elem.toCharArray();\n while(length-visited>=4){\n /... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_244 | {
"fields": [
{
"declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")",
"modifier": "private static final",
"original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");",
"type": "DateFormat",
"var_name": "DF"
},
{
"declarator": "DFT... | {
"body": "@Test\n public void truncDate_isNotCaseSensitive() throws ParseException, SQLException {\n assertEquals(timeStampT(\"2014/07/15 12:00:00.0\"), TRUNC_DATE(timeStampT(\"2014/07/15 12:12:12.234\"), \"hOuR\"));\n }",
"class_method_signature": "SpliceDateFunctionsTest.truncDate_isNotCaseSensitive... | {
"fields": [
{
"declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()",
"modifier": "private static final... | {
"body": "public static Timestamp TRUNC_DATE(Timestamp source, String field) throws SQLException {\n if (source == null || field == null) return null;\n DateTime dt = new DateTime(source);\n field = field.toLowerCase();\n String lowerCaseField = field.toLowerCase();\n if (\"microse... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_182 | {
"fields": [],
"file": "utilities/src/test/java/com/splicemachine/collections/RingBufferTest.java",
"identifier": "RingBufferTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isFull() {\n RingBuffer<Integer> buffer = new RingBuffer<Integer>(4);\n buffer.add(10);\n assertFalse(buffer.isFull());\n buffer.add(10);\n assertFalse(buffer.isFull());\n buffer.add(10);\n assertFalse(buffer.isFull());\n buffer... | {
"fields": [
{
"declarator": "mask",
"modifier": "private",
"original_string": "private int mask;",
"type": "int",
"var_name": "mask"
},
{
"declarator": "buffer",
"modifier": "private",
"original_string": "private Object[] buffer;",
"type": "Object[]"... | {
"body": "public boolean isFull() {\n return size() == buffer.length;\n }",
"class_method_signature": "RingBuffer.isFull()",
"constructor": false,
"full_signature": "public boolean isFull()",
"identifier": "isFull",
"invocations": [
"size"
],
"modifiers": "public",
"parameters": "()",
... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_3 | {
"fields": [
{
"declarator": "TYPENAME = \"VARCHAR\"",
"modifier": "private static final",
"original_string": "private static final String TYPENAME = \"VARCHAR\";",
"type": "String",
"var_name": "TYPENAME"
},
{
"declarator": "HEADER_LENGTH = 2",
"modifier": "priv... | {
"body": "@Test\n public void testSkipUntilEOFOnLongStreamASCII()\n throws IOException {\n TestCase.assertEquals(127019, UTF8Util.skipUntilEOF(\n new LoopingAlphabetStream(127019)));\n }",
"class_method_signature": "UTF8UtilTest.testSkipUntilEOFOnLongStreamASCII()",
"constr... | {
"fields": [],
"file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java",
"identifier": "UTF8Util",
"interfaces": "",
"methods": [
{
"class_method_signature": "UTF8Util.UTF8Util()",
"constructor": true,
"full_signature": "private UTF8Util()",
"identifier": "U... | {
"body": "public static final long skipUntilEOF(InputStream in)\n throws IOException {\n // No need to do the skip in a loop, as Reader.read() returning -1\n // means EOF has been reached.\n // Note that a loop should be used if skip is used instead of read.\n return internalSk... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_23 | {
"fields": [
{
"declarator": "bits24",
"modifier": "private",
"original_string": "private byte[] bits24;",
"type": "byte[]",
"var_name": "bits24"
},
{
"declarator": "bits24C",
"modifier": "private",
"original_string": "private byte[] bits24C;",
"type"... | {
"body": "@Test public void testIsSetEmpty() {\n try {\n empty.isSet(-8);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n try {\n empty.isSet(-1);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n ... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private byte[]\tvalue;",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "bitsInLastByte",
"modifier": "private",
"original_string": "private\tbyte\tbitsInLastByte;",
... | {
"body": "public final boolean isSet(int position)\n\t{\n\t\tcheckPosition(position);\n\t\tfinal int byteIndex = udiv8(position);\n\t\tfinal byte bitIndex = umod8(position);\n\t\treturn ((value[byteIndex] & (0x80>>bitIndex)) != 0);\n\t}",
"class_method_signature": "FormatableBitSet.isSet(int position)",
"constru... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_115 | {
"fields": [],
"file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java",
"identifier": "IntArraysTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComplementMap9() throws Exception {\n int[] expected = new int[] {0,1,2,5};\n int[] input = new int[] {3,4};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n// System.out.println(printArr... | {
"fields": [],
"file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java",
"identifier": "IntArrays",
"interfaces": "",
"methods": [
{
"class_method_signature": "IntArrays.IntArrays()",
"constructor": true,
"full_signature": "private IntArrays()",
"identifier"... | {
"body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
8582237_74 | {
"fields": [],
"file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java",
"identifier": "PrimaryKeyStatisticsImplTest",
"interfaces": "",
"superclass": "extends AbstractKeyStatisticsImplTest"
} | {
"body": "@Test\n public void testEmptySelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(new ValueRow(3)));\n }",
"class_method_signature": "PrimaryKeyStatisticsImplTest.testEmptySelectivity()",
"constructor": false,
"full_signature": "@Test public void testEmptySel... | {
"fields": [
{
"declarator": "quantilesSketch",
"modifier": "private",
"original_string": "private ItemsSketch<ExecRow> quantilesSketch;",
"type": "ItemsSketch<ExecRow>",
"var_name": "quantilesSketch"
},
{
"declarator": "nullCount",
"modifier": "private",
"... | {
"body": "@Override\n public long selectivity(ExecRow element) {\n return 1L;\n }",
"class_method_signature": "PrimaryKeyStatisticsImpl.selectivity(ExecRow element)",
"constructor": false,
"full_signature": "@Override public long selectivity(ExecRow element)",
"identifier": "selectivity",
"inv... | {
"created": "3/5/2013 3:07:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 8582237,
"size": null,
"stargazer_count": null,
"stars": 128,
"updates": "2020-01-23T21:06:43+00:00",
"url": "https://github.com/splicemachine/spli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.