id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
36960637_881 | {
"fields": [
{
"declarator": "timelock",
"modifier": "@Mock private",
"original_string": "@Mock private NamespacedConjureTimelockService timelock;",
"type": "NamespacedConjureTimelockService",
"var_name": "timelock"
},
{
"declarator": "lockRequest",
"modifier": "... | {
"body": "@Test\n public void startTransactionsResponseHasCorrectLeasedLock() {\n Lease lease = getLease();\n when(timelock.startTransactions(any())).thenReturn(startTransactionsResponseWith(LOCK_TOKEN, lease));\n\n StartTransactionResponseV4 clientResponse =\n lockLeaseService... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final NamespacedConjureTimelockService delegate;",
"type": "NamespacedConjureTimelockService",
"var_name": "delegate"
},
{
"declarator": "clientId",
"modifier": "pri... | {
"body": "StartTransactionResponseV4 startTransactions(int batchSize) {\n ConjureStartTransactionsRequest request = ConjureStartTransactionsRequest.builder()\n .requestorId(clientId)\n .requestId(UUID.randomUUID())\n .numTransactions(batchSize)\n .la... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_497 | {
"fields": [
{
"declarator": "LOW_TS = 10L",
"modifier": "private static final",
"original_string": "private static final long LOW_TS = 10L;",
"type": "long",
"var_name": "LOW_TS"
},
{
"declarator": "LOW_TS2 = 2 * LOW_TS",
"modifier": "private static final",
... | {
"body": "@Test\n public void doesNotTransitivelyRetainWritesFromBeforeSweepTimestamp() {\n long sweepTimestamp = getSweepTsCons();\n enqueueWriteCommitted(TABLE_CONS, sweepTimestamp - 10);\n enqueueTombstone(TABLE_CONS, sweepTimestamp - 5);\n enqueueWriteCommitted(TABLE_CONS, sweepTim... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TargetedSweeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweeper.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@SuppressWarnings(\"checkstyle:RegexpMultiline\") // Suppress VisibleForTesting warning\n @VisibleForTesting\n public long sweepNextBatch(ShardAndStrategy shardStrategy, long maxTsExclusive) {\n assertInitialized();\n return queue.sweepNextBatch(shardStrategy, maxTsExclusive);\n }",
... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_58 | {
"fields": [
{
"declarator": "TIMESTAMP = 12345L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP = 12345L;",
"type": "long",
"var_name": "TIMESTAMP"
},
{
"declarator": "INITIAL_UPPER_LIMIT = 10L",
"modifier": "private... | {
"body": "@Test\n public void shouldOnlyMakeOneGetCallToTheUnderlyingStore() {\n upperLimit.get();\n upperLimit.get();\n\n verify(boundStore, times(1)).getUpperLimit();\n }",
"class_method_signature": "PersistentUpperLimitTest.shouldOnlyMakeOneGetCallToTheUnderlyingStore()",
"construct... | {
"fields": [
{
"declarator": "BUFFER = 1_000_000",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final long BUFFER = 1_000_000;",
"type": "long",
"var_name": "BUFFER"
},
{
"declarator": "currentLimit",
"mod... | {
"body": "public long get() {\n return currentLimit;\n }",
"class_method_signature": "PersistentUpperLimit.get()",
"constructor": false,
"full_signature": "public long get()",
"identifier": "get",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature":... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_614 | {
"fields": [
{
"declarator": "FIVE = 5L",
"modifier": "private static final",
"original_string": "private static final long FIVE = 5L;",
"type": "long",
"var_name": "FIVE"
},
{
"declarator": "value = new AtomicLong(0)",
"modifier": "private final",
"origina... | {
"body": "@Test\n public void reportsNegativeDifferenceValues() {\n value.set(FIVE);\n assertThat(longGauge.getValue()).isEqualTo(FIVE);\n value.set(2L);\n assertThat(longGauge.getValue()).isEqualTo(2L - FIVE);\n }",
"class_method_signature": "ZeroBasedDeltaGaugeTest.reportsNegati... | {
"fields": [
{
"declarator": "underlying",
"modifier": "private final",
"original_string": "private final LongSupplier underlying;",
"type": "LongSupplier",
"var_name": "underlying"
},
{
"declarator": "previousValue = 0",
"modifier": "private",
"original_st... | {
"body": "@Override\n public synchronized Long getValue() {\n long currentValue = underlying.getAsLong();\n long previous = previousValue;\n previousValue = currentValue;\n return currentValue - previous;\n }",
"class_method_signature": "ZeroBasedDeltaGauge.getValue()",
"constru... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_244 | {
"fields": [],
"file": "atlasdb-client/src/test/java/com/palantir/atlasdb/util/TopNMetricPublicationControllerTest.java",
"identifier": "TopNMetricPublicationControllerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void throwsWhenCreatingControllerWithNonPositiveArguments() {\n assertThatThrownBy(() -> TopNMetricPublicationController.create(0))\n .isInstanceOf(IllegalStateException.class)\n .hasMessageContaining(\"maxPermittedRank must be positive\");\n as... | {
"fields": [
{
"declarator": "REFRESH_INTERVAL = Duration.ofSeconds(30)",
"modifier": "private static final",
"original_string": "private static final Duration REFRESH_INTERVAL = Duration.ofSeconds(30);",
"type": "Duration",
"var_name": "REFRESH_INTERVAL"
},
{
"declara... | {
"body": "@SuppressWarnings(\"unchecked\") // Guaranteed correct\n public static <T extends Comparable> TopNMetricPublicationController<T> create(int maxPermittedRank) {\n Preconditions.checkState(maxPermittedRank > 0, \"maxPermittedRank must be positive\",\n SafeArg.of(\"maxPermittedRank\",... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_6 | {
"fields": [
{
"declarator": "METRIC_NAME_1 = MetricName.builder()\n .safeName(\"com.palantir.atlasdb.metrics.lockAndGetHeldMetrics.p99\")\n .build()",
"modifier": "private static final",
"original_string": "private static final MetricName METRIC_NAME_1 = MetricName.builde... | {
"body": "@Test\n public void forEachWorksOnMetricsFromBothRegistries() {\n Timer timer = registry1.timer(METRIC_NAME_1);\n Histogram histogram = registry2.histogram(METRIC_NAME_2);\n Meter meter = registry1.meter(METRIC_NAME_3);\n\n Map<MetricName, Metric> stateOfTheWorld = Maps.newHa... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DisjointUnionTaggedMetricSet.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DisjointUnionTaggedMetricSet.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n public void forEachMetric(BiConsumer<MetricName, Metric> consumer) {\n first.forEachMetric(consumer);\n second.forEachMetric(consumer);\n }",
"class_method_signature": "DisjointUnionTaggedMetricSet.forEachMetric(BiConsumer<MetricName, Metric> consumer)",
"constructor": f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_751 | {
"fields": [
{
"declarator": "DC_1 = \"dc1\"",
"modifier": "private static final",
"original_string": "private static final String DC_1 = \"dc1\";",
"type": "String",
"var_name": "DC_1"
},
{
"declarator": "DC_2 = \"dc2\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void freshInstanceSetsStrategyOptions() throws TException {\n setTopology(createDetails(DC_1, RACK_1, HOST_1),\n createDetails(DC_1, RACK_1, HOST_2),\n createDetails(DC_1, RACK_1, HOST_3),\n createDetails(DC_2, RACK_1, HOST_4));\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraVerifier.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraVerifier.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "static KsDef createKsDefForFresh(CassandraClient client, CassandraKeyValueServiceConfig config) throws TException {\n KsDef ksDef = new KsDef(config.getKeyspaceOrThrow(), CassandraConstants.NETWORK_STRATEGY,\n ImmutableList.of());\n Set<String> dcs = sanityCheckDatacenters(clie... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_301 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void getRows() throws Exception {\n ImmutableList<byte[]> rows = ImmutableList.of(ROW_NAME);\n Map<Cell, Value> expectedResult = ImmutableMap.of();\n when(delegate.getRows(TABLE_REF, rows, ColumnSelection.all(), TIMESTAMP)).thenReturn(expectedResult);\n\n Map<C... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public Map<Cell, Value> getRows(TableReference tableRef,\n Iterable<byte[]> rows,\n ColumnSelection columnSelection,\n long timestamp) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"ge... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_585 | {
"fields": [
{
"declarator": "ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE",
"modifier": "private static final",
"original_string": "private static final V1EncodingStrategy ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE;",
"type": "V1EncodingStrategy",
"var_name": "ENCODING_STRA... | {
"body": "@Test\n public void repeatedProcessBatchOnlyMakesOneCallWithDuplicatesIfFailedAndKnownFailed() {\n KeyAlreadyExistsException exception = new KeyAlreadyExistsException(\"boo\",\n ImmutableList.of(ENCODING_STRATEGY.encodeStartTimestampAsCell(5L)));\n doThrow(exception)\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WriteBatchingTransactionService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(WriteBatchingTransactionService.class);",
"type": "Logger",
"var_nam... | {
"body": "@VisibleForTesting\n static void processBatch(\n EncodingTransactionService delegate, List<BatchElement<TimestampPair, Void>> batchElements) {\n Multimap<Long, BatchElement<TimestampPair, Void>> startTimestampKeyedBatchElements\n = MultimapBuilder.hashKeys().hashSetValue... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_993 | {
"fields": [
{
"declarator": "COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\")",
"modifier": "private static final",
"original_string": "private static final byte[] COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\");",
"type": "byte[]",
"var_name": "COORDINATION_ROW"
},
{
"dec... | {
"body": "@Test\n public void getReturnsEmptyIfNoKeyFound() {\n assertThat(coordinationStore.getAgreedValue()).isEmpty();\n }",
"class_method_signature": "KeyValueServiceCoordinationStoreTest.getReturnsEmptyIfNoKeyFound()",
"constructor": false,
"full_signature": "@Test public void getReturnsEmpty... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class);",
"type": "Logger",
"var_n... | {
"body": "@Override\n public Optional<ValueAndBound<T>> getAgreedValue() {\n return readLatestState().map(CoordinationStoreState::valueAndBound);\n }",
"class_method_signature": "KeyValueServiceCoordinationStore.getAgreedValue()",
"constructor": false,
"full_signature": "@Override public Optional<... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_839 | {
"fields": [
{
"declarator": "FORTY_TWO = 42",
"modifier": "private static final",
"original_string": "private static final int FORTY_TWO = 42;",
"type": "int",
"var_name": "FORTY_TWO"
},
{
"declarator": "LEADING_PI_DIGITS = 314159265358979L",
"modifier": "privat... | {
"body": "@Test\n public void testIsInitializedDefersToTimestampService() {\n when(timestampService.isInitialized())\n .thenReturn(false)\n .thenReturn(true);\n\n assertFalse(managedTimestampService.isInitialized());\n assertTrue(managedTimestampService.isInitial... | {
"fields": [
{
"declarator": "timestampService",
"modifier": "private final",
"original_string": "private final TimestampService timestampService;",
"type": "TimestampService",
"var_name": "timestampService"
},
{
"declarator": "timestampManagementService",
"modif... | {
"body": "@Override\n public boolean isInitialized() {\n return timestampService.isInitialized();\n }",
"class_method_signature": "DelegatingManagedTimestampService.isInitialized()",
"constructor": false,
"full_signature": "@Override public boolean isInitialized()",
"identifier": "isInitialized"... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_213 | {
"fields": [
{
"declarator": "BLOCKING_TIME_LIMIT_MILLIS = 10L",
"modifier": "private static final",
"original_string": "private static final long BLOCKING_TIME_LIMIT_MILLIS = 10L;",
"type": "long",
"var_name": "BLOCKING_TIME_LIMIT_MILLIS"
},
{
"declarator": "TEST_CURR... | {
"body": "@Test\n public void closesDelegate() throws IOException {\n acceptingService.close();\n\n verify(delegate).close();\n }",
"class_method_signature": "BlockingTimeLimitedLockServiceTest.closesDelegate()",
"constructor": false,
"full_signature": "@Test public void closesDelegate()",
... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(BlockingTimeLimitedLockService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(BlockingTimeLimitedLockService.class);",
"type": "Logger",
"var_name"... | {
"body": "@Override\n public void close() throws IOException {\n delegate.close();\n }",
"class_method_signature": "BlockingTimeLimitedLockService.close()",
"constructor": false,
"full_signature": "@Override public void close()",
"identifier": "close",
"invocations": [
"close"
],
"modi... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_643 | {
"fields": [
{
"declarator": "TIMESTAMP_1 = 10L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP_1 = 10L;",
"type": "long",
"var_name": "TIMESTAMP_1"
},
{
"declarator": "TIMESTAMP_2 = 20L",
"modifier": "private static ... | {
"body": "@Test\n public void getMillisForTimestampReturnsLastTimeKnownToOccurBeforeQueriedTimestamp() {\n PUNCHER_HISTORY.forEach((key, value) -> assertThat(puncherStore.getMillisForTimestamp(key + 1))\n .isEqualTo(value));\n }",
"class_method_signature": "KeyValueServicePuncherStoreTe... | {
"fields": [
{
"declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)",
"modifier": "private static final",
"original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);",
"type": "byte[]",
"var_name": "COLUMN"
},
{
"declarato... | {
"body": "@Override\n public long getMillisForTimestamp(long timestamp) {\n return getMillisForTimestamp(keyValueService, timestamp);\n }",
"class_method_signature": "KeyValueServicePuncherStore.getMillisForTimestamp(long timestamp)",
"constructor": false,
"full_signature": "@Override public long ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_356 | {
"fields": [
{
"declarator": "DATA_SIZE = 4",
"modifier": "private static final",
"original_string": "private static final int DATA_SIZE = 4;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "DATA_SIZE_PLUS_ONE = 5",
"modifier": "private static final",... | {
"body": "@Test\n public void bufferLengthCanAlmostReachIntMaxValue() throws IOException {\n BlockGetter bigGetter = new BlockGetter() {\n @Override\n public void get(long firstBlock, long numBlocks, OutputStream destination) {\n // do nothing\n }\n\n ... | {
"fields": [
{
"declarator": "blockGetter",
"modifier": "private final",
"original_string": "private final BlockGetter blockGetter;",
"type": "BlockGetter",
"var_name": "blockGetter"
},
{
"declarator": "numBlocks",
"modifier": "private final",
"original_str... | {
"body": "@VisibleForTesting\n static void ensureExpectedArraySizeDoesNotOverflow(BlockGetter blockGetter, int blocksInMemory) {\n int expectedBlockLength = blockGetter.expectedBlockLength();\n int maxBlocksInMemory = StreamStoreDefinition.MAX_IN_MEMORY_THRESHOLD / expectedBlockLength;\n long... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_706 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = 123",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_VALUE = 123;",
"type": "int",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "delegate = mock(Supplier.class)",
"modifier"... | {
"body": "@Test\n public void batchesConcurrentRequests() throws InterruptedException {\n freezableDelegate.freeze();\n AsyncTasks initialTask = getConcurrently(1);\n AsyncTasks batch = getConcurrently(5);\n freezableDelegate.unfreeze();\n\n batch.await();\n\n // At least... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final Supplier<T> delegate;",
"type": "Supplier<T>",
"var_name": "delegate"
},
{
"declarator": "executor =\n MoreExecutors.listeningDecorator(PTExecutors.newCac... | {
"body": "@Override\n public T get() {\n Round present = round;\n if (present.isFirstToArrive()) {\n present.execute();\n return present.getResult();\n }\n Round next = present.awaitDone();\n if (next.isFirstToArrive()) {\n next.execute();\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_511 | {
"fields": [
{
"declarator": "SUCCESS_TOO_FAST = SweepIterationResults.success(1L)",
"modifier": "private static final",
"original_string": "private static final SweepIterationResult SUCCESS_TOO_FAST = SweepIterationResults.success(1L);",
"type": "SweepIterationResult",
"var_name": ... | {
"body": "@Test\n public void unableToAcquireShardReturnsMaxPause() {\n assertThat(delay.getNextPause(SweepIterationResults.unableToAcquireShard()))\n .isEqualTo(DEFAULT_MAX_PAUSE_MILLIS);\n }",
"class_method_signature": "SweepDelayTest.unableToAcquireShardReturnsMaxPause()",
"constru... | {
"fields": [
{
"declarator": "BATCH_CELLS_LOW_THRESHOLD = 100",
"modifier": "static final",
"original_string": "static final int BATCH_CELLS_LOW_THRESHOLD = 100;",
"type": "int",
"var_name": "BATCH_CELLS_LOW_THRESHOLD"
},
{
"declarator": "MIN_PAUSE_MILLIS = 1",
"... | {
"body": "long getNextPause(SweepIterationResult result) {\n return SweepIterationResults.caseOf(result)\n .success(this::updateCurrentPauseAndGet)\n .unableToAcquireShard_(maxPauseMillis)\n .insufficientConsistency_(BACKOFF)\n .otherError_(maxPauseM... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_74 | {
"fields": [
{
"declarator": "CLIENT = Client.of(\"client\")",
"modifier": "private static final",
"original_string": "private static final Client CLIENT = Client.of(\"client\");",
"type": "Client",
"var_name": "CLIENT"
},
{
"declarator": "CLIENT_2 = Client.of(\"client... | {
"body": "@Test\n public void onlyRunsChecksIfWeSuspectMultipleLeaders() {\n when(checker1.getFreshTimestampFromNodeForClient(anyString())).thenReturn(OptionalLong.empty());\n when(checker2.getFreshTimestampFromNodeForClient(anyString())).then(getNextTimestamp());\n\n noSimultaneousServiceChe... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "public void processHealthCheckDigest(HealthCheckDigest digest) {\n Set<Client> clientsWithMultipleLeaders = digest.statusesToClient().get(TimeLockStatus.MULTIPLE_LEADERS);\n if (clientsWithMultipleLeaders.isEmpty()) {\n return;\n }\n\n log.info(\"Clients {} appear to ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_141 | {
"fields": [
{
"declarator": "print = new OutputPrinter(LoggerFactory.getLogger(OutputPrinter.class))",
"modifier": "private static final",
"original_string": "private static final OutputPrinter print = new OutputPrinter(LoggerFactory.getLogger(OutputPrinter.class));",
"type": "OutputPrin... | {
"body": "@Test\n public void testErrorPrintingWorksWithMultipleReplacement() {\n String systemErr = StandardStreamUtilities.wrapSystemErr(\n () -> print.error(\"Replace {} of {} {}.\", SafeArg.of(\"all\", \"all\"), SafeArg.of(\"these\", \"these\"),\n SafeArg.of(\"fie... | {
"fields": [
{
"declarator": "logger",
"modifier": "private",
"original_string": "private Logger logger;",
"type": "Logger",
"var_name": "logger"
}
],
"file": "atlasdb-cli/src/main/java/com/palantir/atlasdb/cli/output/OutputPrinter.java",
"identifier": "OutputPrinter",
"... | {
"body": "@Override\n public void error(final String message, Arg... args) {\n String errorMessage = MessageFormatter.arrayFormat(message, args).getMessage();\n logger.error(message, args);\n System.err.println(errorMessage);\n }",
"class_method_signature": "OutputPrinter.error(final Str... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_842 | {
"fields": [
{
"declarator": "FORTY_TWO = 42",
"modifier": "private static final",
"original_string": "private static final int FORTY_TWO = 42;",
"type": "int",
"var_name": "FORTY_TWO"
},
{
"declarator": "LEADING_PI_DIGITS = 314159265358979L",
"modifier": "privat... | {
"body": "@Test\n public void testFastForwardTimestampDefersToTimestampManagementService() {\n managedTimestampService.fastForwardTimestamp(LEADING_PI_DIGITS);\n\n verify(timestampManagementService, times(1)).fastForwardTimestamp(eq(LEADING_PI_DIGITS));\n }",
"class_method_signature": "Delegati... | {
"fields": [
{
"declarator": "timestampService",
"modifier": "private final",
"original_string": "private final TimestampService timestampService;",
"type": "TimestampService",
"var_name": "timestampService"
},
{
"declarator": "timestampManagementService",
"modif... | {
"body": "@Override\n public void fastForwardTimestamp(@QueryParam(\"currentTimestamp\") long currentTimestamp) {\n timestampManagementService.fastForwardTimestamp(currentTimestamp);\n }",
"class_method_signature": "DelegatingManagedTimestampService.fastForwardTimestamp(@QueryParam(\"currentTimestamp\... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_907 | {
"fields": [
{
"declarator": "ONE_THOUSAND = 1000",
"modifier": "private static final",
"original_string": "private static final int ONE_THOUSAND = 1000;",
"type": "int",
"var_name": "ONE_THOUSAND"
},
{
"declarator": "tokenList",
"modifier": "private",
"ori... | {
"body": "@Test\n public void enqueueingTokensEnqueuedSinglyAllEventuallyCaptured() {\n setupTokenCollectingTimeLock();\n\n tokenList.forEach(token -> unlocker.enqueue(ImmutableSet.of(token)));\n\n verifyTryUnlockAttemptedAtLeastOnce();\n assertAllTokensEventuallyUnlocked();\n }",
... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n @SuppressWarnings(\"FutureReturnValueIgnored\")\n public void enqueue(Set<LockToken> tokens) {\n autobatcher.apply(tokens);\n }",
"class_method_signature": "AsyncTimeLockUnlocker.enqueue(Set<LockToken> tokens)",
"constructor": false,
"full_signature": "@Override @SuppressW... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_454 | {
"fields": [
{
"declarator": "SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUtils.SWEEP_BATCH_SIZE)",
"modifier": "private static final",
"original_string": "private static final SweepIterationResult SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUti... | {
"body": "@Test\n public void doNotExceedMaximumParallelism() throws Exception {\n when(sweepIteration.call()).thenReturn(SUCCESS_LARGE);\n scheduler.start(ScalingSweepTaskScheduler.MAX_PARALLELISM);\n\n tickClock();\n runSweepIterations(5);\n tickClock();\n runSweepItera... | {
"fields": [
{
"declarator": "COOL_DOWN = Duration.ofMinutes(5L)",
"modifier": "private static final",
"original_string": "private static final Duration COOL_DOWN = Duration.ofMinutes(5L);",
"type": "Duration",
"var_name": "COOL_DOWN"
},
{
"declarator": "BATCH_CELLS_LO... | {
"body": "void start(int initialThreads) {\n for (int i = 0; i < initialThreads; i++) {\n increaseNumberOfTasks(INITIAL_DELAY);\n }\n }",
"class_method_signature": "ScalingSweepTaskScheduler.start(int initialThreads)",
"constructor": false,
"full_signature": " void start(int initial... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_287 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void compactInternally() throws Exception {\n kvs.compactInternally(TABLE_REF);\n\n checkSpan(\"atlasdb-kvs.compactInternally({table})\");\n verify(delegate).compactInternally(TABLE_REF);\n verifyNoMoreInteractions(delegate);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public void compactInternally(TableReference tableRef) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"compactInternally({})\",\n LoggingArgs.safeTableOrPlaceholder(tableRef))) {\n delegate().... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_792 | {
"fields": [
{
"declarator": "DEFAULT_PORT = 5000",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PORT = 5000;",
"type": "int",
"var_name": "DEFAULT_PORT"
},
{
"declarator": "OTHER_PORT = 6000",
"modifier": "private stat... | {
"body": "@Test\n public void shouldReturnAbsentIfPredicateMatchesNoServers() {\n CassandraService cassandra = clientPoolWithServers(ImmutableSet.of(HOST_1));\n\n Optional<CassandraClientPoolingContainer> container\n = cassandra.getRandomGoodHostForPredicate(address -> false);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraClientPool.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClientPool.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public Optional<CassandraClientPoolingContainer> getRandomGoodHostForPredicate(\n Predicate<InetSocketAddress> predicate) {\n Map<InetSocketAddress, CassandraClientPoolingContainer> pools = currentPools;\n\n Set<InetSocketAddress> filteredHosts = pools.keySet().stream()\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_268 | {
"fields": [
{
"declarator": "COMPONENT_NAME = \"rowComponent\"",
"modifier": "private static final",
"original_string": "private static final String COMPONENT_NAME = \"rowComponent\";",
"type": "String",
"var_name": "COMPONENT_NAME"
},
{
"declarator": "VALUE_TYPE = Va... | {
"body": "@Test\n public void nameIsNotLoggableIfNotSpecified() {\n assertThat(LOGGABILITY_UNSPECIFIED_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.UNSAFE);\n }",
"class_method_signature": "NameComponentDescriptionTest.nameIsNotLoggableIfNotSpecified()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "componentName",
"modifier": "final",
"original_string": "final String componentName;",
"type": "String",
"var_name": "componentName"
},
{
"declarator": "type",
"modifier": "final",
"original_string": "final ValueType type;",
... | {
"body": "public LogSafety getLogSafety() {\n return logSafety;\n }",
"class_method_signature": "NameComponentDescription.getLogSafety()",
"constructor": false,
"full_signature": "public LogSafety getLogSafety()",
"identifier": "getLogSafety",
"invocations": [],
"modifiers": "public",
"parame... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_638 | {
"fields": [
{
"declarator": "TIMESTAMP_1 = 10L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP_1 = 10L;",
"type": "long",
"var_name": "TIMESTAMP_1"
},
{
"declarator": "TIMESTAMP_2 = 20L",
"modifier": "private static ... | {
"body": "@Test\n public void getTimestampForMillisReturnsMinValueIfQueryingClockTimeBeforeFirstPunch() {\n assertThat(puncherStore.get(WALL_CLOCK_1 - 1)).isEqualTo(Long.MIN_VALUE);\n assertThat(puncherStore.get(0L)).isEqualTo(Long.MIN_VALUE);\n }",
"class_method_signature": "KeyValueServicePun... | {
"fields": [
{
"declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)",
"modifier": "private static final",
"original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);",
"type": "byte[]",
"var_name": "COLUMN"
},
{
"declarato... | {
"body": "@Override\n public Long get(Long timeMillis) {\n return get(keyValueService, timeMillis);\n }",
"class_method_signature": "KeyValueServicePuncherStore.get(Long timeMillis)",
"constructor": false,
"full_signature": "@Override public Long get(Long timeMillis)",
"identifier": "get",
"in... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_815 | {
"fields": [
{
"declarator": "DEFAULT_PORT = 5000",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PORT = 5000;",
"type": "int",
"var_name": "DEFAULT_PORT"
},
{
"declarator": "HOSTNAME_1 = \"1.0.0.0\"",
"modifier": "priva... | {
"body": "@Test\n public void shouldIncrementRetries() {\n request.triedOnHost(HOST_1);\n assertNumberOfTotalAttempts(1);\n assertNumberOfAttemptsOnHost(1, HOST_1);\n\n request.triedOnHost(HOST_1);\n assertNumberOfTotalAttempts(2);\n assertNumberOfAttemptsOnHost(2, HOST_1... | {
"fields": [
{
"declarator": "preferredHost",
"modifier": "private final",
"original_string": "private final InetSocketAddress preferredHost;",
"type": "InetSocketAddress",
"var_name": "preferredHost"
},
{
"declarator": "fn",
"modifier": "private final",
"o... | {
"body": "public void triedOnHost(InetSocketAddress host) {\n triedHosts.merge(host, 1, (old, ignore) -> old + 1);\n }",
"class_method_signature": "RetryableCassandraRequest.triedOnHost(InetSocketAddress host)",
"constructor": false,
"full_signature": "public void triedOnHost(InetSocketAddress host)"... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_116 | {
"fields": [
{
"declarator": "SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10",
"modifier": "public static final",
"original_string": "public static final long SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10;",
"type": "long",
... | {
"body": "@Test\n public void debugOrSlowLogShouldNotBeLoggedWhenLockResponseIsNotSlow() {\n lockServiceWithSlowLogEnabled.logSlowLockAcquisition(\n TEST_LOCKID, LockClient.ANONYMOUS, LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS - 5);\n assertThat(testLockServiceImplLogger.getLogging... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LockServiceImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LockServiceImpl.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@VisibleForTesting\n protected void logSlowLockAcquisition(String lockId, LockClient currentHolder, long durationMillis) {\n final String slowLockLogMessage = \"Blocked for {} ms to acquire lock {} {}.\";\n\n // Note: The construction of params is pushed into the branches, as it may be exp... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_546 | {
"fields": [
{
"declarator": "MAPPER = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper MAPPER = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "MAPPER"
},
{
"declarator": "ROW = \"row\"",
"... | {
"body": "@Test\n public void confirmJsonOnDiskBackCompatMaintainedSerialization() {\n assertEquals(JSON_LOCK_SERIALIZATION, new String(LOCK_ENTRY.value(), StandardCharsets.UTF_8));\n }",
"class_method_signature": "LockEntryTest.confirmJsonOnDiskBackCompatMaintainedSerialization()",
"constructor": f... | {
"fields": [
{
"declarator": "MAPPER = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper MAPPER = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "MAPPER"
},
{
"declarator": "LOCK_COLUMN = \"lock\""... | {
"body": "public byte[] value() {\n try {\n return asUtf8Bytes(MAPPER.writeValueAsString(this));\n } catch (JsonProcessingException e) {\n throw Throwables.throwUncheckedException(e);\n }\n }",
"class_method_signature": "LockEntry.value()",
"constructor": false,
"f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_23 | {
"fields": [
{
"declarator": "TABLE = TableReference.createFromFullyQualifiedName(\"test.table\")",
"modifier": "private static final",
"original_string": "private static final TableReference TABLE = TableReference.createFromFullyQualifiedName(\"test.table\");",
"type": "TableReference",
... | {
"body": "@Test\n public void lockDescriptorWithOneZeroReturnsEmptyForCells() {\n LockDescriptor descriptor = AtlasRowLockDescriptor.of(TABLE.getQualifiedName(), NO_ZERO_ROW);\n assertThat(AtlasLockDescriptorUtils.candidateCells(descriptor)).isEmpty();\n }",
"class_method_signature": "AtlasLock... | {
"fields": [],
"file": "atlasdb-api/src/main/java/com/palantir/atlasdb/keyvalue/api/AtlasLockDescriptorUtils.java",
"identifier": "AtlasLockDescriptorUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AtlasLockDescriptorUtils.AtlasLockDescriptorUtils()",
"constructor": true,
... | {
"body": "public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) {\n Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor);\n if (!tableRefAndRemainder.isPresent()) {\n return ImmutableList.of();\n }\n\n TableReference t... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_403 | {
"fields": [
{
"declarator": "RECOMPUTE_MILLIS = 10",
"modifier": "private static final",
"original_string": "private static final long RECOMPUTE_MILLIS = 10;",
"type": "long",
"var_name": "RECOMPUTE_MILLIS"
},
{
"declarator": "METRICS_CONFIGURATION\n = Targ... | {
"body": "@Test\n public void enqueuedWritesDoesNotClashAcrossStrategies() {\n metrics.updateEnqueuedWrites(CONS_ZERO, 1);\n metrics.updateEnqueuedWrites(THOR_ZERO, 10);\n metrics.updateEnqueuedWrites(CONS_ZERO, 1);\n\n assertThat(metricsManager).hasEnqueuedWritesConservativeEqualTo(2)... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TargetedSweepMetrics.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweepMetrics.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "public void updateEnqueuedWrites(ShardAndStrategy shardStrategy, long writes) {\n updateMetricsIfPresent(shardStrategy, metrics -> metrics.updateEnqueuedWrites(writes));\n }",
"class_method_signature": "TargetedSweepMetrics.updateEnqueuedWrites(ShardAndStrategy shardStrategy, long writes)",
"... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_950 | {
"fields": [
{
"declarator": "SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/security/trustStore.jks\"))",
"modifier": "private static final",
"original_string": "private static final SslConfiguration SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/sec... | {
"body": "@Test\n public void createProxyAndLocalListCreatesSingletonListIfNoRemoteAddressesProvided() {\n PaxosAcceptor localAcceptor = mock(PaxosAcceptor.class);\n when(localAcceptor.getLatestSequencePreparedOrAccepted()).thenReturn(1L);\n\n List<PaxosAcceptor> paxosAcceptors = Leaders.crea... | {
"fields": [],
"file": "atlasdb-config/src/main/java/com/palantir/atlasdb/factory/Leaders.java",
"identifier": "Leaders",
"interfaces": "",
"methods": [
{
"class_method_signature": "Leaders.Leaders()",
"constructor": true,
"full_signature": "private Leaders()",
"identifier": "Lea... | {
"body": "public static <T> List<T> createProxyAndLocalList(\n T localObject,\n Set<String> remoteUris,\n Supplier<RemotingClientConfig> remotingClientConfig,\n Optional<TrustContext> trustContext,\n Class<T> clazz,\n UserAgent userAgent) {\n\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_680 | {
"fields": [
{
"declarator": "STRING_1 = \"a\"",
"modifier": "private static final",
"original_string": "private static final String STRING_1 = \"a\";",
"type": "String",
"var_name": "STRING_1"
},
{
"declarator": "STRING_2 = \"b\"",
"modifier": "private static fi... | {
"body": "@Test\n public void resolvesToValueIfOneOptionalPresentAndOneIsNull() {\n assertThat(OptionalResolver.resolve(PRESENT_OPTIONAL_1, null)).isEqualTo(STRING_1);\n }",
"class_method_signature": "OptionalResolverTest.resolvesToValueIfOneOptionalPresentAndOneIsNull()",
"constructor": false,
"f... | {
"fields": [],
"file": "atlasdb-commons/src/main/java/com/palantir/util/OptionalResolver.java",
"identifier": "OptionalResolver",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionalResolver.OptionalResolver()",
"constructor": true,
"full_signature": "private OptionalRe... | {
"body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\") // Used to process existing configuration files.\n public static <T> T resolve(Optional<T> optional1, Optional<T> optional2) {\n Set<T> values = Stream.of(optional1, optional2)\n .filter(Objects::nonNull)\n .f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_395 | {
"fields": [
{
"declarator": "adjustableConfig",
"modifier": "private",
"original_string": "private AdjustableSweepBatchConfigSource adjustableConfig;",
"type": "AdjustableSweepBatchConfigSource",
"var_name": "adjustableConfig"
},
{
"declarator": "previousConfig",
... | {
"body": "@Test\n public void canDecreaseAndIncreaseConfigWithAllLargeValues() {\n //Given\n configWithValues(1000, 1000, 1000);\n\n whenDecreasingTheMultiplier_thenAdjustedConfigValuesDecrease();\n\n whenIncreasingTheMultiplier_thenAdjustedConfigValuesIncrease();\n\n assertThat... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(BackgroundSweeperImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(BackgroundSweeperImpl.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "public static double getBatchSizeMultiplier() {\n return batchSizeMultiplier;\n }",
"class_method_signature": "AdjustableSweepBatchConfigSource.getBatchSizeMultiplier()",
"constructor": false,
"full_signature": "public static double getBatchSizeMultiplier()",
"identifier": "getBatchSizeMu... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_35 | {
"fields": [
{
"declarator": "TEST_PREFIX = \"a_\"",
"modifier": "private static final",
"original_string": "private static final String TEST_PREFIX = \"a_\";",
"type": "String",
"var_name": "TEST_PREFIX"
},
{
"declarator": "TEST_NAMESPACE = Namespace.create(\"test_nam... | {
"body": "@Test\n public void shouldReturnIfTableMappingExists() throws TableMappingNotFoundException {\n when(resultSet.size()).thenReturn(1);\n\n AgnosticResultRow row = mock(AgnosticResultRow.class);\n when(row.getString(eq(\"short_table_name\"))).thenReturn(SHORT_TABLE_NAME);\n doR... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(OracleTableNameUnmapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(OracleTableNameUnmapper.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@SuppressWarnings(\"checkstyle:NestedTryDepth\")\n public String getShortTableNameFromMappingTable(\n ConnectionSupplier connectionSupplier,\n String tablePrefix,\n TableReference tableRef) throws TableMappingNotFoundException {\n String fullTableName = tablePrefi... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_550 | {
"fields": [
{
"declarator": "TABLE_1 = \"table1\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_1 = \"table1\";",
"type": "String",
"var_name": "TABLE_1"
},
{
"declarator": "TABLE_2 = \"table2\"",
"modifier": "privat... | {
"body": "@Test\n public void returnsUncompactedTableIfPossible() {\n when(sweepHistoryProvider.getHistory(mockTx)).thenReturn(ImmutableMap.of(TABLE_1, 1L, TABLE_2, 2L));\n when(compactionHistoryProvider.getHistory(mockTx)).thenReturn(ImmutableMap.of(TABLE_2, 3L));\n\n Optional<String> table ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CompactPriorityCalculator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CompactPriorityCalculator.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@VisibleForTesting\n Optional<String> selectTableToCompactInternal(Transaction tx) {\n Map<String, Long> tableToLastTimeSwept = sweepHistoryProvider.getHistory(tx);\n Map<String, Long> tableToLastTimeCompacted = compactionHistoryProvider.getHistory(tx);\n\n Optional<String> tableToC... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_100 | {
"fields": [
{
"declarator": "CLIENT1 = Client.of(\"client-1\")",
"modifier": "private static final",
"original_string": "private static final Client CLIENT1 = Client.of(\"client-1\");",
"type": "Client",
"var_name": "CLIENT1"
},
{
"declarator": "CLIENT2 = Client.of(\"... | {
"body": "@Test\n public void shouldBeUnhealthyIfQuorumNodesAreNotUpAndNoNodePingedSuccessfully() {\n HealthCheckPinger leader1 = getMockOfPingableLeaderWherePingReturns(ImmutableSet.of());\n HealthCheckPinger leader2 = getMockOfPingableLeaderWherePingThrows();\n HealthCheckPinger leader3 = g... | {
"fields": [
{
"declarator": "HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7)",
"modifier": "private static final",
"original_string": "private static final Duration HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7);",
"type": "Duration",
"var_name": "HEALTH_CHECK_TIME_LIMIT"
},
... | {
"body": "public HealthCheckDigest getStatus() {\n Set<Client> namespacesToCheck = namespaceTracker.trackedNamespaces();\n\n PaxosResponses<PaxosContainer<Map<Client, HealthCheckResponse>>> responses =\n PaxosQuorumChecker.collectAsManyResponsesAsPossible(\n Immuta... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_803 | {
"fields": [
{
"declarator": "BYTES1 = ByteBuffer.allocate(3)",
"modifier": "private static final",
"original_string": "private static final ByteBuffer BYTES1 = ByteBuffer.allocate(3);",
"type": "ByteBuffer",
"var_name": "BYTES1"
},
{
"declarator": "BYTES2 = ByteBuffer... | {
"body": "@Test\n public void multigetSliceWeigherReturnsCorrectNumRows() {\n assertThatWeightSuccessReturnsCorrectNumberOfRows(ThriftQueryWeighers.multigetSlice(ImmutableList.of(BYTES1)));\n }",
"class_method_signature": "ThriftQueryWeighersTest.multigetSliceWeigherReturnsCorrectNumRows()",
"constr... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClient.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "public static QueryWeigher<Map<ByteBuffer, List<ColumnOrSuperColumn>>> multigetSlice(List<ByteBuffer> keys) {\n return readWeigher(ThriftObjectSizeUtils::getApproximateSizeOfColsByKey, Map::size, keys.size());\n }",
"class_method_signature": "ThriftQueryWeighers.multigetSlice(List<ByteBuffer> k... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_946 | {
"fields": [
{
"declarator": "SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/security/trustStore.jks\"))",
"modifier": "private static final",
"original_string": "private static final SslConfiguration SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/sec... | {
"body": "@Test\n public void canHaveTwoInstancesOfServicesTalkingToTheSameTimeLockServer() {\n ConjureTimelockService sameTimelockService = provider.getConjureTimelockService();\n\n assertTimestampRange(conjureTimelockService, FIRST_LOWER, FIRST_UPPER);\n assertTimestampRange(sameTimelockSer... | {
"fields": [
{
"declarator": "TIMELOCK_SHORT_TIMEOUT = \"timelock-short-timeout\"",
"modifier": "private static final",
"original_string": "private static final String TIMELOCK_SHORT_TIMEOUT = \"timelock-short-timeout\";",
"type": "String",
"var_name": "TIMELOCK_SHORT_TIMEOUT"
}... | {
"body": "ConjureTimelockService getConjureTimelockService() {\n ConjureTimelockServiceBlocking longTimeoutService\n = dialogueClientFactory.get(ConjureTimelockServiceBlocking.class, TIMELOCK_LONG_TIMEOUT);\n ConjureTimelockServiceBlocking shortTimeoutService\n = dialogueC... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_415 | {
"fields": [
{
"declarator": "metricsManager",
"modifier": "private",
"original_string": "private MetricsManager metricsManager;",
"type": "MetricsManager",
"var_name": "metricsManager"
},
{
"declarator": "legacyMetrics",
"modifier": "private",
"original_st... | {
"body": "@Test\n public void testAllOutcomes() {\n SweepOutcomeMetrics.LEGACY_OUTCOMES.forEach(outcome -> {\n legacyMetrics.registerOccurrenceOf(outcome);\n assertThat(metricsManager).hasLegacyOutcomeEqualTo(outcome, 1L);\n });\n SweepOutcomeMetrics.TARGETED_OUTCOMES.fo... | {
"fields": [
{
"declarator": "LEGACY_OUTCOMES = Arrays.asList(SweepOutcome.values())",
"modifier": "public static final",
"original_string": "public static final List<SweepOutcome> LEGACY_OUTCOMES = Arrays.asList(SweepOutcome.values());",
"type": "List<SweepOutcome>",
"var_name": "L... | {
"body": "public void registerOccurrenceOf(SweepOutcome outcome) {\n if (outcome == SweepOutcome.FATAL) {\n metrics.get().fatal().set(true);\n return;\n }\n\n metrics.get().reservoir().update(outcome.ordinal());\n }",
"class_method_signature": "SweepOutcomeMetrics.regi... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_696 | {
"fields": [
{
"declarator": "delegate",
"modifier": "@Mock private",
"original_string": "@Mock private TestInterface delegate;",
"type": "TestInterface",
"var_name": "delegate"
},
{
"declarator": "supplier",
"modifier": "@Mock private",
"original_string": ... | {
"body": "@Test\n public void testEqualsHashCodeToStringNotDelegated() {\n TestInterface iface = ReplaceIfExceptionMatchingProxy.newProxyInstance(\n TestInterface.class, supplier, _thrown -> true);\n assertThat(iface.toString()).isNotEqualTo(delegate.toString());\n assertThat(i... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ReplaceIfExceptionMatchingProxy.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ReplaceIfExceptionMatchingProxy.class);",
"type": "Logger",
"var_nam... | {
"body": "@SuppressWarnings(\"unchecked\")\n @VisibleForTesting\n static <T> T newProxyInstance(\n Class<T> interfaceClass,\n Supplier<T> delegate,\n Predicate<Throwable> shouldReplace) {\n return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(),\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_229 | {
"fields": [
{
"declarator": "TAG_KEY_1 = \"tag1\"",
"modifier": "private static final",
"original_string": "private static final String TAG_KEY_1 = \"tag1\";",
"type": "String",
"var_name": "TAG_KEY_1"
},
{
"declarator": "TAG_VALUE_1 = \"tagVal1\"",
"modifier": ... | {
"body": "@Test\n public void shouldReturnNameWithSingleTag() throws Exception {\n String metricName = MetricNameUtils.getMetricName(METRIC_NAME, ImmutableMap.of(TAG_KEY_1, TAG_VALUE_1));\n assertThat(metricName).isEqualTo(\"metricName;tag1=tagVal1\");\n }",
"class_method_signature": "MetricNam... | {
"fields": [
{
"declarator": "MAX_ALLOWED_TAGS = 10",
"modifier": "private static final",
"original_string": "private static final int MAX_ALLOWED_TAGS = 10;",
"type": "int",
"var_name": "MAX_ALLOWED_TAGS"
},
{
"declarator": "DELIMITER = \";\"",
"modifier": "priv... | {
"body": "public static String getMetricName(String metricName, Map<String, String> tags) {\n Preconditions.checkArgument(tags.size() <= MAX_ALLOWED_TAGS, \"Too many tags set on the metric %s. \"\n + \"Maximum allowed number of tags is %s, found %s.\", metricName, MAX_ALLOWED_TAGS, tags.size())... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_383 | {
"fields": [
{
"declarator": "factory = new InMemoryAtlasDbFactory()",
"modifier": "private final",
"original_string": "private final AtlasDbFactory factory = new InMemoryAtlasDbFactory();",
"type": "AtlasDbFactory",
"var_name": "factory"
}
],
"file": "atlasdb-impl-shared/sr... | {
"body": "@Test\n public void asyncInitKvsSynchronous() {\n KeyValueService kvs = createRawKeyValueService(true);\n assertThat(kvs.isInitialized()).isTrue();\n assertThat(kvs.getAllTableNames()).isEmpty();\n }",
"class_method_signature": "InMemoryAtlasDbFactoryTest.asyncInitKvsSynchronou... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(InMemoryAtlasDbFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(InMemoryAtlasDbFactory.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "@Override\n public InMemoryKeyValueService createRawKeyValueService(\n MetricsManager metricsManager,\n KeyValueServiceConfig config,\n Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig,\n Optional<LeaderConfig> leaderConfig,\n Optional... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_679 | {
"fields": [
{
"declarator": "STRING_1 = \"a\"",
"modifier": "private static final",
"original_string": "private static final String STRING_1 = \"a\";",
"type": "String",
"var_name": "STRING_1"
},
{
"declarator": "STRING_2 = \"b\"",
"modifier": "private static fi... | {
"body": "@Test\n public void resolvesToValueIfOneOptionalPresent() {\n assertThat(OptionalResolver.resolve(PRESENT_OPTIONAL_1, EMPTY_OPTIONAL)).isEqualTo(STRING_1);\n assertThat(OptionalResolver.resolve(EMPTY_OPTIONAL, PRESENT_OPTIONAL_2)).isEqualTo(STRING_2);\n }",
"class_method_signature": "... | {
"fields": [],
"file": "atlasdb-commons/src/main/java/com/palantir/util/OptionalResolver.java",
"identifier": "OptionalResolver",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionalResolver.OptionalResolver()",
"constructor": true,
"full_signature": "private OptionalRe... | {
"body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\") // Used to process existing configuration files.\n public static <T> T resolve(Optional<T> optional1, Optional<T> optional2) {\n Set<T> values = Stream.of(optional1, optional2)\n .filter(Objects::nonNull)\n .f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_854 | {
"fields": [
{
"declarator": "START_SEQUENCE = 123",
"modifier": "private static final",
"original_string": "private static final int START_SEQUENCE = 123;",
"type": "int",
"var_name": "START_SEQUENCE"
},
{
"declarator": "BATCH_SIZE = 250",
"modifier": "private s... | {
"body": "@Test\n public void readBatchFiltersOutNulls() throws IOException {\n Predicate<Long> isOdd = num -> num % 2 != 0;\n when(mockLog.readRound(anyLong()))\n .thenAnswer(invocation -> {\n long sequence = (long) invocation.getArguments()[0];\n ... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final PaxosStateLog<V> delegate;",
"type": "PaxosStateLog<V>",
"var_name": "delegate"
},
{
"declarator": "hydrator",
"modifier": "private final",
"original_str... | {
"body": "public List<PaxosRound<V>> readBatch(long startSequence, int numEntries) {\n return AtlasFutures.getUnchecked(\n Futures.allAsList(\n LongStream.range(startSequence, startSequence + numEntries)\n .mapToObj(sequence -> executor.subm... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_157 | {
"fields": [
{
"declarator": "generator",
"modifier": "private",
"original_string": "private DistributingModulusGenerator generator;",
"type": "DistributingModulusGenerator",
"var_name": "generator"
}
],
"file": "timelock-impl/src/test/java/com/palantir/atlasdb/timelock/tran... | {
"body": "@Test\n public void throwsIfUnmarkingUnmarkedResidue() {\n setupGeneratorWithModulus(3);\n\n assertThatThrownBy(() -> unmarkResidue(0))\n .satisfies(DistributingModulusGeneratorTest::failureArisesFromUnmarkingResidues);\n }",
"class_method_signature": "DistributingModul... | {
"fields": [
{
"declarator": "referenceCounts",
"modifier": "private final",
"original_string": "private final SortedSet<ReferenceCountedResidue> referenceCounts;",
"type": "SortedSet<ReferenceCountedResidue>",
"var_name": "referenceCounts"
}
],
"file": "timelock-impl/src/ma... | {
"body": "public synchronized void unmarkResidue(int residue) {\n // There are usually only 16 elements, so this O(n) algo probably will do, but we can pair this with a HashMap\n // and/or make ReferenceCountedResidue modifiable if we decide to use higher moduli in the future.\n for (ReferenceCo... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_62 | {
"fields": [
{
"declarator": "FAILURE = new IllegalStateException()",
"modifier": "private static final",
"original_string": "private static final RuntimeException FAILURE = new IllegalStateException();",
"type": "RuntimeException",
"var_name": "FAILURE"
},
{
"declarat... | {
"body": "@Test public void\n shouldRethrowServiceNotAvailableExceptionsWithoutWrapping() {\n RuntimeException response = allocationFailures.responseTo(SERVICE_NOT_AVAILABLE_EXCEPTION);\n assertThat(response instanceof ServiceNotAvailableException, is(true));\n assertThat(response, is(SERVICE... | {
"fields": [
{
"declarator": "MULTIPLE_RUNNING_TIMESTAMP_SERVICES_MESSAGE =\n \"This server is no longer usable as there appears to be another timestamp server running.\"",
"modifier": "private static final",
"original_string": "private static final String MULTIPLE_RUNNING_TIMESTAMP_... | {
"body": "public RuntimeException responseTo(Throwable newFailure) {\n synchronized (this) {\n logNewFailure(newFailure);\n previousAllocationFailure = newFailure;\n }\n\n if (newFailure instanceof MultipleRunningTimestampServiceError) {\n encounteredMultipleRunn... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_507 | {
"fields": [
{
"declarator": "LOW_TS = 10L",
"modifier": "private static final",
"original_string": "private static final long LOW_TS = 10L;",
"type": "long",
"var_name": "LOW_TS"
},
{
"declarator": "LOW_TS2 = 2 * LOW_TS",
"modifier": "private static final",
... | {
"body": "@Test\n public void enableAutoTuningSweepsMultipleFinePartitions() {\n enableAutoTuning = true;\n\n enqueueWriteCommitted(TABLE_CONS, LOW_TS);\n enqueueTombstone(TABLE_CONS, LOW_TS + 2);\n enqueueWriteCommitted(TABLE_CONS, LOW_TS + 4);\n enqueueTombstone(TABLE_CONS, LO... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TargetedSweeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweeper.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@VisibleForTesting\n long processShard(ShardAndStrategy shardAndStrategy) {\n long maxTsExclusive = Sweeper.of(shardAndStrategy).getSweepTimestamp(timestampsSupplier);\n return sweepNextBatch(shardAndStrategy, maxTsExclusive);\n }",
"class_method_signature": "TargetedSweeper.processSh... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_442 | {
"fields": [
{
"declarator": "NOTHING = getTableRef(\"nothing\")",
"modifier": "private static final",
"original_string": "private static final TableReference NOTHING = getTableRef(\"nothing\");",
"type": "TableReference",
"var_name": "NOTHING"
},
{
"declarator": "CONS... | {
"body": "@Test\n public void filterOutUnsweepableRemovesWritesWithStrategyNothing() {\n List<WriteInfo> writes = ImmutableList.of(\n getWriteInfoWithFixedCellHash(CONSERVATIVE, 0),\n getWriteInfoWithFixedCellHash(NOTHING, 1),\n getWriteInfoWithFixedCellHash(CON... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WriteInfoPartitioner.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(WriteInfoPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "@VisibleForTesting\n List<WriteInfo> filterOutUnsweepableTables(List<WriteInfo> writes) {\n return writes.stream()\n .filter(writeInfo -> getStrategy(writeInfo).isPresent())\n .collect(Collectors.toList());\n }",
"class_method_signature": "WriteInfoPartitioner.f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_911 | {
"fields": [
{
"declarator": "REFRESH_INTERVAL_MILLIS = 1234L",
"modifier": "private static final",
"original_string": "private static final long REFRESH_INTERVAL_MILLIS = 1234L;",
"type": "long",
"var_name": "REFRESH_INTERVAL_MILLIS"
},
{
"declarator": "TOKEN_1 = Lock... | {
"body": "@Test\n public void stopsRefreshingLockIfItIsNotRefreshed() {\n ImmutableSet<LockToken> lockTokensToRefresh = ImmutableSet.of(TOKEN_1);\n when(timelock.refreshLockLeases(TOKENS)).thenReturn(lockTokensToRefresh);\n registerLocks();\n\n tick();\n verify(timelock).refresh... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LockRefresher.class)",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(LockRefresher.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "execut... | {
"body": "public void registerLocks(Collection<LockToken> tokens) {\n tokensToRefresh.addAll(tokens);\n }",
"class_method_signature": "LockRefresher.registerLocks(Collection<LockToken> tokens)",
"constructor": false,
"full_signature": "public void registerLocks(Collection<LockToken> tokens)",
"iden... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_291 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void dropTable() throws Exception {\n kvs.dropTable(TABLE_REF);\n\n checkSpan(\"atlasdb-kvs.dropTable({table})\");\n verify(delegate).dropTable(TABLE_REF);\n verifyNoMoreInteractions(delegate);\n }",
"class_method_signature": "TracingKeyValueServiceTest.dr... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public void dropTable(TableReference tableRef) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"dropTable({})\",\n LoggingArgs.safeTableOrPlaceholder(tableRef))) {\n delegate().dropTable(tableR... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_784 | {
"fields": [],
"file": "atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/pool/WeightedHostsTest.java",
"identifier": "WeightedHostsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWeightedHostsWithUniformActivity() {\n Map<InetSocketAddress, CassandraClientPoolingContainer> pools = ImmutableMap.of(\n new InetSocketAddress(0), createMockClientPoolingContainerWithUtilization(10),\n new InetSocketAddress(1), createMockClie... | {
"fields": [
{
"declarator": "hosts",
"modifier": "final",
"original_string": "final NavigableMap<Integer, InetSocketAddress> hosts;",
"type": "NavigableMap<Integer, InetSocketAddress>",
"var_name": "hosts"
}
],
"file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/k... | {
"body": "public static WeightedHosts create(Map<InetSocketAddress, CassandraClientPoolingContainer> pools) {\n Preconditions.checkArgument(!pools.isEmpty(), \"pools should be non-empty\");\n return new WeightedHosts(buildHostsWeightedByActiveConnections(pools));\n }",
"class_method_signature": "W... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_290 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void delete() throws Exception {\n Multimap<Cell, Long> cells = ImmutableMultimap.of(CELL, 1L);\n kvs.delete(TABLE_REF, cells);\n\n checkSpan(\"atlasdb-kvs.delete({table}, 1 keys)\");\n verify(delegate).delete(TABLE_REF, cells);\n verifyNoMoreInteraction... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public void delete(TableReference tableRef, Multimap<Cell, Long> keys) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"delete({}, {} keys)\",\n LoggingArgs.safeTableOrPlaceholder(tableRef), keys.size()))... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_785 | {
"fields": [],
"file": "atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/pool/WeightedHostsTest.java",
"identifier": "WeightedHostsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWeightedHostsWithLowActivityPool() {\n InetSocketAddress lowActivityHost = new InetSocketAddress(2);\n Map<InetSocketAddress, CassandraClientPoolingContainer> pools = ImmutableMap.of(\n new InetSocketAddress(0), createMockClientPoolingContainerWithUti... | {
"fields": [
{
"declarator": "hosts",
"modifier": "final",
"original_string": "final NavigableMap<Integer, InetSocketAddress> hosts;",
"type": "NavigableMap<Integer, InetSocketAddress>",
"var_name": "hosts"
}
],
"file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/k... | {
"body": "public static WeightedHosts create(Map<InetSocketAddress, CassandraClientPoolingContainer> pools) {\n Preconditions.checkArgument(!pools.isEmpty(), \"pools should be non-empty\");\n return new WeightedHosts(buildHostsWeightedByActiveConnections(pools));\n }",
"class_method_signature": "W... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_855 | {
"fields": [
{
"declarator": "START_SEQUENCE = 123",
"modifier": "private static final",
"original_string": "private static final int START_SEQUENCE = 123;",
"type": "int",
"var_name": "START_SEQUENCE"
},
{
"declarator": "BATCH_SIZE = 250",
"modifier": "private s... | {
"body": "@Test\n public void noResultsReturnsEmptyList() throws IOException {\n when(mockLog.readRound(anyLong())).thenReturn(null);\n\n try (PaxosStateLogBatchReader<PaxosValue> reader = createReader()) {\n assertThat(reader.readBatch(START_SEQUENCE, BATCH_SIZE)).isEmpty();\n }\n... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final PaxosStateLog<V> delegate;",
"type": "PaxosStateLog<V>",
"var_name": "delegate"
},
{
"declarator": "hydrator",
"modifier": "private final",
"original_str... | {
"body": "public List<PaxosRound<V>> readBatch(long startSequence, int numEntries) {\n return AtlasFutures.getUnchecked(\n Futures.allAsList(\n LongStream.range(startSequence, startSequence + numEntries)\n .mapToObj(sequence -> executor.subm... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_156 | {
"fields": [],
"file": "timelock-impl/src/test/java/com/palantir/atlasdb/timelock/config/TimeLimiterConfigurationTest.java",
"identifier": "TimeLimiterConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ignoresErrorMarginIfTimeLimitingIsDisabled() {\n TimeLimiterConfiguration configuration = ImmutableTimeLimiterConfiguration.of(false, Math.PI);\n assertThat(configuration.enableTimeLimiting()).isFalse();\n }",
"class_method_signature": "TimeLimiterConfigurationTest... | {
"fields": [
{
"declarator": "DEFAULT_BLOCKING_TIMEOUT_ERROR_MARGIN = 0.03",
"modifier": "public static final",
"original_string": "public static final double DEFAULT_BLOCKING_TIMEOUT_ERROR_MARGIN = 0.03;",
"type": "double",
"var_name": "DEFAULT_BLOCKING_TIMEOUT_ERROR_MARGIN"
}
... | {
"body": "@Value.Parameter\n public abstract boolean enableTimeLimiting();",
"class_method_signature": "TimeLimiterConfiguration.enableTimeLimiting()",
"constructor": false,
"full_signature": "@Value.Parameter public abstract boolean enableTimeLimiting()",
"identifier": "enableTimeLimiting",
"invocation... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_506 | {
"fields": [
{
"declarator": "LOW_TS = 10L",
"modifier": "private static final",
"original_string": "private static final long LOW_TS = 10L;",
"type": "long",
"var_name": "LOW_TS"
},
{
"declarator": "LOW_TS2 = 2 * LOW_TS",
"modifier": "private static final",
... | {
"body": "@Test\n public void sweepOnlyOneFinePartitionByDefault() {\n enqueueWriteCommitted(TABLE_CONS, LOW_TS);\n enqueueTombstone(TABLE_CONS, LOW_TS + 2);\n enqueueWriteCommitted(TABLE_CONS, LOW_TS + 4);\n enqueueTombstone(TABLE_CONS, LOW_TS + 6);\n enqueueWriteCommitted(TABL... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TargetedSweeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweeper.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@VisibleForTesting\n long processShard(ShardAndStrategy shardAndStrategy) {\n long maxTsExclusive = Sweeper.of(shardAndStrategy).getSweepTimestamp(timestampsSupplier);\n return sweepNextBatch(shardAndStrategy, maxTsExclusive);\n }",
"class_method_signature": "TargetedSweeper.processSh... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_63 | {
"fields": [
{
"declarator": "FAILURE = new IllegalStateException()",
"modifier": "private static final",
"original_string": "private static final RuntimeException FAILURE = new IllegalStateException();",
"type": "RuntimeException",
"var_name": "FAILURE"
},
{
"declarat... | {
"body": "@SuppressWarnings(\"Slf4jConstantLogMessage\")\n @Test public void\n shouldLogTheFirstOfATypeOfExceptionToError() {\n ignoringExceptions(() -> allocationFailures.responseTo(FAILURE));\n\n verify(log).error(anyString(), eq(FAILURE));\n }",
"class_method_signature": "TimestampAllocat... | {
"fields": [
{
"declarator": "MULTIPLE_RUNNING_TIMESTAMP_SERVICES_MESSAGE =\n \"This server is no longer usable as there appears to be another timestamp server running.\"",
"modifier": "private static final",
"original_string": "private static final String MULTIPLE_RUNNING_TIMESTAMP_... | {
"body": "public RuntimeException responseTo(Throwable newFailure) {\n synchronized (this) {\n logNewFailure(newFailure);\n previousAllocationFailure = newFailure;\n }\n\n if (newFailure instanceof MultipleRunningTimestampServiceError) {\n encounteredMultipleRunn... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_443 | {
"fields": [
{
"declarator": "NOTHING = getTableRef(\"nothing\")",
"modifier": "private static final",
"original_string": "private static final TableReference NOTHING = getTableRef(\"nothing\");",
"type": "TableReference",
"var_name": "NOTHING"
},
{
"declarator": "CONS... | {
"body": "@Test\n public void partitionWritesByShardStrategyTimestampPartitionsIntoSeparatePartitions() {\n List<WriteInfo> writes = ImmutableList.of(\n getWriteInfo(CONSERVATIVE, 0, 0, 100L),\n getWriteInfo(CONSERVATIVE, 1, 0, 100L),\n getWriteInfo(CONSERVATIVE... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WriteInfoPartitioner.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(WriteInfoPartitioner.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "@VisibleForTesting\n Map<PartitionInfo, List<WriteInfo>> partitionWritesByShardStrategyTimestamp(List<WriteInfo> writes) {\n int shards = numShards.get();\n return writes.stream()\n .collect(Collectors.groupingBy(write -> getPartitionInfo(write, shards), Collectors.toList())... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_910 | {
"fields": [
{
"declarator": "REFRESH_INTERVAL_MILLIS = 1234L",
"modifier": "private static final",
"original_string": "private static final long REFRESH_INTERVAL_MILLIS = 1234L;",
"type": "long",
"var_name": "REFRESH_INTERVAL_MILLIS"
},
{
"declarator": "TOKEN_1 = Lock... | {
"body": "@Test\n public void continuesRefreshingLocksThatAreReturned() {\n when(timelock.refreshLockLeases(TOKENS)).thenReturn(TOKENS);\n registerLocks();\n\n tick();\n tick();\n verify(timelock, times(2)).refreshLockLeases(TOKENS);\n }",
"class_method_signature": "LockRef... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LockRefresher.class)",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(LockRefresher.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "execut... | {
"body": "public void registerLocks(Collection<LockToken> tokens) {\n tokensToRefresh.addAll(tokens);\n }",
"class_method_signature": "LockRefresher.registerLocks(Collection<LockToken> tokens)",
"constructor": false,
"full_signature": "public void registerLocks(Collection<LockToken> tokens)",
"iden... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_697 | {
"fields": [],
"file": "atlasdb-commons/src/test/java/com/palantir/common/proxy/InterruptibleProxyTest.java",
"identifier": "InterruptibleProxyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInterrupt() throws InterruptedException, BrokenBarrierException {\n final CyclicBarrier barrier = new CyclicBarrier(2);\n final Thread callingThread = Thread.currentThread();\n final AtomicBoolean gotInterrupted = new AtomicBoolean(false);\n List<Strin... | {
"fields": [
{
"declarator": "defaultExecutor = Suppliers.memoize(() ->\n PTExecutors.newCachedThreadPool(\"Interruptible Proxy\"))",
"modifier": "private static final",
"original_string": "private static final Supplier<ExecutorService> defaultExecutor = Suppliers.memoize(() ->\n ... | {
"body": "public static <T> T newProxyInstance(Class<T> interfaceClass, T delegate, CancelDelegate cancel) {\n return newProxyInstance(interfaceClass, delegate, cancel, defaultExecutor.get());\n }",
"class_method_signature": "InterruptibleProxy.newProxyInstance(Class<T> interfaceClass, T delegate, Cancel... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_228 | {
"fields": [
{
"declarator": "CUSTOM_METRIC_NAME = \"foo\"",
"modifier": "private static final",
"original_string": "private static final String CUSTOM_METRIC_NAME = \"foo\";",
"type": "String",
"var_name": "CUSTOM_METRIC_NAME"
},
{
"declarator": "PING_METHOD = \"ping\... | {
"body": "@Test\n public void instrumentTaggedAsyncFunctionWithExtraTags() {\n Map<String, String> extraTags = ImmutableMap.of(\"key\", \"value\");\n AsyncTestService asyncTestService = AtlasDbMetrics.instrumentWithTaggedMetrics(\n taggedMetrics,\n AsyncTestService.clas... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AtlasDbMetrics.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AtlasDbMetrics.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "at... | {
"body": "public static <T, U extends T> T instrumentWithTaggedMetrics(\n TaggedMetricRegistry taggedMetrics,\n Class<T> serviceInterface,\n U service) {\n return Instrumentation.builder(serviceInterface, service)\n .withHandler(new TaggedMetricsInvocationEventH... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_382 | {
"fields": [
{
"declarator": "factory = new InMemoryAtlasDbFactory()",
"modifier": "private final",
"original_string": "private final AtlasDbFactory factory = new InMemoryAtlasDbFactory();",
"type": "AtlasDbFactory",
"var_name": "factory"
}
],
"file": "atlasdb-impl-shared/sr... | {
"body": "@Test\n public void syncInitKvsSynchronous() {\n KeyValueService kvs = createRawKeyValueService(false);\n assertThat(kvs.isInitialized()).isTrue();\n assertThat(kvs.getAllTableNames()).isEmpty();\n }",
"class_method_signature": "InMemoryAtlasDbFactoryTest.syncInitKvsSynchronous... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(InMemoryAtlasDbFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(InMemoryAtlasDbFactory.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "@Override\n public InMemoryKeyValueService createRawKeyValueService(\n MetricsManager metricsManager,\n KeyValueServiceConfig config,\n Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig,\n Optional<LeaderConfig> leaderConfig,\n Optional... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_678 | {
"fields": [
{
"declarator": "STRING_1 = \"a\"",
"modifier": "private static final",
"original_string": "private static final String STRING_1 = \"a\";",
"type": "String",
"var_name": "STRING_1"
},
{
"declarator": "STRING_2 = \"b\"",
"modifier": "private static fi... | {
"body": "@Test\n public void throwsOnOneEmptyAndOneNullOptional() {\n assertThatThrownBy(() -> OptionalResolver.resolve(null, Optional.empty()))\n .isInstanceOf(IllegalArgumentException.class);\n }",
"class_method_signature": "OptionalResolverTest.throwsOnOneEmptyAndOneNullOptional()",... | {
"fields": [],
"file": "atlasdb-commons/src/main/java/com/palantir/util/OptionalResolver.java",
"identifier": "OptionalResolver",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionalResolver.OptionalResolver()",
"constructor": true,
"full_signature": "private OptionalRe... | {
"body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\") // Used to process existing configuration files.\n public static <T> T resolve(Optional<T> optional1, Optional<T> optional2) {\n Set<T> values = Stream.of(optional1, optional2)\n .filter(Objects::nonNull)\n .f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_551 | {
"fields": [
{
"declarator": "TABLE_1 = \"table1\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_1 = \"table1\";",
"type": "String",
"var_name": "TABLE_1"
},
{
"declarator": "TABLE_2 = \"table2\"",
"modifier": "privat... | {
"body": "@Test\n public void returnsTableWithBiggestSweepToCompactionPositiveTime() {\n // TABLE_1 is chosen because more time passed between its last compaction and its last sweep -\n // so without other information, we assume there's more to compact.\n when(sweepHistoryProvider.getHistory(... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CompactPriorityCalculator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CompactPriorityCalculator.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@VisibleForTesting\n Optional<String> selectTableToCompactInternal(Transaction tx) {\n Map<String, Long> tableToLastTimeSwept = sweepHistoryProvider.getHistory(tx);\n Map<String, Long> tableToLastTimeCompacted = compactionHistoryProvider.getHistory(tx);\n\n Optional<String> tableToC... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_34 | {
"fields": [
{
"declarator": "TEST_PREFIX = \"a_\"",
"modifier": "private static final",
"original_string": "private static final String TEST_PREFIX = \"a_\";",
"type": "String",
"var_name": "TEST_PREFIX"
},
{
"declarator": "TEST_NAMESPACE = Namespace.create(\"test_nam... | {
"body": "@Test\n public void shouldThrowIfTableMappingDoesNotExist() throws TableMappingNotFoundException {\n when(resultSet.size()).thenReturn(0);\n\n expectedException.expect(TableMappingNotFoundException.class);\n expectedException.expectMessage(\"The table a_test_namespace__ThisIsAVeryLo... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(OracleTableNameUnmapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(OracleTableNameUnmapper.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@SuppressWarnings(\"checkstyle:NestedTryDepth\")\n public String getShortTableNameFromMappingTable(\n ConnectionSupplier connectionSupplier,\n String tablePrefix,\n TableReference tableRef) throws TableMappingNotFoundException {\n String fullTableName = tablePrefi... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_101 | {
"fields": [
{
"declarator": "CLIENT1 = Client.of(\"client-1\")",
"modifier": "private static final",
"original_string": "private static final Client CLIENT1 = Client.of(\"client-1\");",
"type": "Client",
"var_name": "CLIENT1"
},
{
"declarator": "CLIENT2 = Client.of(\"... | {
"body": "@Test\n public void canHandleIndividualClientsSeperately() {\n List<HealthCheckPinger> leaders = getHealthCheckPingers(\n ImmutableSet.of(CLIENT1),\n ImmutableSet.of(CLIENT3),\n ImmutableSet.of(CLIENT3));\n\n SetMultimap<TimeLockStatus, Client> ... | {
"fields": [
{
"declarator": "HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7)",
"modifier": "private static final",
"original_string": "private static final Duration HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7);",
"type": "Duration",
"var_name": "HEALTH_CHECK_TIME_LIMIT"
},
... | {
"body": "public HealthCheckDigest getStatus() {\n Set<Client> namespacesToCheck = namespaceTracker.trackedNamespaces();\n\n PaxosResponses<PaxosContainer<Map<Client, HealthCheckResponse>>> responses =\n PaxosQuorumChecker.collectAsManyResponsesAsPossible(\n Immuta... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_802 | {
"fields": [
{
"declarator": "metricsManager = MetricsManagers.of(\n new MetricRegistry(),\n new DefaultTaggedMetricRegistry(),\n Refreshable.only(true))",
"modifier": "private final",
"original_string": "private final MetricsManager metricsManager = MetricsMana... | {
"body": "@Test\n public void metricsAreProducedAndFiltered() {\n CassandraClientPoolMetrics metrics = new CassandraClientPoolMetrics(metricsManager);\n AtomicLong poolOne = new AtomicLong(3);\n AtomicLong poolTwo = new AtomicLong(4);\n AtomicLong poolThree = new AtomicLong(20);\n\n ... | {
"fields": [
{
"declarator": "metricsManager",
"modifier": "private final",
"original_string": "private final MetricsManager metricsManager;",
"type": "MetricsManager",
"var_name": "metricsManager"
},
{
"declarator": "aggregateRequestMetrics",
"modifier": "privat... | {
"body": "@SuppressWarnings(\"unchecked\") // Guaranteed to have the correct type\n public void registerPoolMetric(\n CassandraClientPoolHostLevelMetric metric,\n Gauge<Long> gauge,\n int poolNumber) {\n MetricPublicationFilter filter = outlierControllers.get(metric).regist... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_947 | {
"fields": [
{
"declarator": "SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/security/trustStore.jks\"))",
"modifier": "private static final",
"original_string": "private static final SslConfiguration SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/sec... | {
"body": "@Test\n public void canTalkToTwoDifferentTimeLockServers() {\n ConjureTimelockService secondTimelockService = getAtlasDbDialogueServiceProvider(secondServerPort)\n .getConjureTimelockService();\n\n assertTimestampRange(conjureTimelockService, FIRST_LOWER, FIRST_UPPER);\n ... | {
"fields": [
{
"declarator": "TIMELOCK_SHORT_TIMEOUT = \"timelock-short-timeout\"",
"modifier": "private static final",
"original_string": "private static final String TIMELOCK_SHORT_TIMEOUT = \"timelock-short-timeout\";",
"type": "String",
"var_name": "TIMELOCK_SHORT_TIMEOUT"
}... | {
"body": "ConjureTimelockService getConjureTimelockService() {\n ConjureTimelockServiceBlocking longTimeoutService\n = dialogueClientFactory.get(ConjureTimelockServiceBlocking.class, TIMELOCK_LONG_TIMEOUT);\n ConjureTimelockServiceBlocking shortTimeoutService\n = dialogueC... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_414 | {
"fields": [
{
"declarator": "enqueuedWrites = new AtomicLong()",
"modifier": "private final",
"original_string": "private final AtomicLong enqueuedWrites = new AtomicLong();",
"type": "AtomicLong",
"var_name": "enqueuedWrites"
},
{
"declarator": "entriesRead = new Ato... | {
"body": "@Test\n public void continueToBePublishedIfWeCatchUp() {\n millisSinceLastSweptTs.set(TargetedSweepMetricPublicationFilter.MINIMUM_STALE_DURATION.toMillis());\n\n assertThat(filter.shouldPublish()).isTrue();\n\n millisSinceLastSweptTs.set(1);\n assertThat(filter.shouldPublish... | {
"fields": [
{
"declarator": "MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final long MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000;",
"type": "long",
"var_name": ... | {
"body": "@Override\n public boolean shouldPublish() {\n if (publicationLatch.get()) {\n return true;\n }\n boolean conditionsAchieved = testConditions();\n if (conditionsAchieved) {\n publicationLatch.set(true);\n }\n return conditionsAchieved;\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_681 | {
"fields": [
{
"declarator": "STRING_1 = \"a\"",
"modifier": "private static final",
"original_string": "private static final String STRING_1 = \"a\";",
"type": "String",
"var_name": "STRING_1"
},
{
"declarator": "STRING_2 = \"b\"",
"modifier": "private static fi... | {
"body": "@Test\n public void resolvesToValueOnTwoEqualOptionals() {\n assertThat(OptionalResolver.resolve(PRESENT_OPTIONAL_1, Optional.of(STRING_1))).isEqualTo(STRING_1);\n }",
"class_method_signature": "OptionalResolverTest.resolvesToValueOnTwoEqualOptionals()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "atlasdb-commons/src/main/java/com/palantir/util/OptionalResolver.java",
"identifier": "OptionalResolver",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionalResolver.OptionalResolver()",
"constructor": true,
"full_signature": "private OptionalRe... | {
"body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\") // Used to process existing configuration files.\n public static <T> T resolve(Optional<T> optional1, Optional<T> optional2) {\n Set<T> values = Stream.of(optional1, optional2)\n .filter(Objects::nonNull)\n .f... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_394 | {
"fields": [
{
"declarator": "adjustableConfig",
"modifier": "private",
"original_string": "private AdjustableSweepBatchConfigSource adjustableConfig;",
"type": "AdjustableSweepBatchConfigSource",
"var_name": "adjustableConfig"
},
{
"declarator": "previousConfig",
... | {
"body": "@Test\n public void canDecreaseAndIncreaseConfigWithAllSmallValues() {\n //Given\n configWithValues(1, 1, 1);\n\n whenDecreasingTheMultiplier_thenAdjustedConfigValuesDecrease();\n\n whenIncreasingTheMultiplier_thenAdjustedConfigValuesIncrease();\n\n assertThat(Adjustab... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(BackgroundSweeperImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(BackgroundSweeperImpl.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "public static double getBatchSizeMultiplier() {\n return batchSizeMultiplier;\n }",
"class_method_signature": "AdjustableSweepBatchConfigSource.getBatchSizeMultiplier()",
"constructor": false,
"full_signature": "public static double getBatchSizeMultiplier()",
"identifier": "getBatchSizeMu... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_814 | {
"fields": [
{
"declarator": "MESSAGE = \"a exception\"",
"modifier": "private static final",
"original_string": "private static final String MESSAGE = \"a exception\";",
"type": "String",
"var_name": "MESSAGE"
},
{
"declarator": "CAUSE = new Exception()",
"modif... | {
"body": "@Test\n public void nonImplicatingExceptionWithConnectionAsCauseShouldNeverBlacklist() {\n Exception ex = new InsufficientConsistencyException(\"insufficient consistency\",\n new SocketTimeoutException());\n assertFalse(handlerConservative.shouldBlacklist(ex, MAX_RETRIES_PER... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class);",
"type": "Logger",
"var_n... | {
"body": "@VisibleForTesting\n boolean shouldBlacklist(Exception ex, int numberOfAttempts) {\n return isConnectionException(ex)\n && numberOfAttempts >= maxTriesSameHost.get()\n && !isExceptionNotImplicatingThisParticularNode(ex);\n }",
"class_method_signature": "Cassandr... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_117 | {
"fields": [
{
"declarator": "SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10",
"modifier": "public static final",
"original_string": "public static final long SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10;",
"type": "long",
... | {
"body": "@Test\n public void verifySerializedBatchOfLockRequestsSmallerThan45MB() throws InterruptedException, IOException {\n Set<LockRefreshToken> tokens = new HashSet<>();\n\n // divide batch size by 1000 and check size in KB as approximation\n for (int i = 0; i < LockRefreshingLockServic... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LockServiceImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LockServiceImpl.class);",
"type": "Logger",
"var_name": "log"
},
{
"de... | {
"body": "@Override\n public LockRefreshToken lock(String client, LockRequest request) throws InterruptedException {\n com.palantir.logsafe.Preconditions.checkArgument(request.getLockGroupBehavior() == LockGroupBehavior.LOCK_ALL_OR_NONE,\n \"lock() only supports LockGroupBehavior.LOCK_ALL_OR... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_22 | {
"fields": [
{
"declarator": "TABLE = TableReference.createFromFullyQualifiedName(\"test.table\")",
"modifier": "private static final",
"original_string": "private static final TableReference TABLE = TableReference.createFromFullyQualifiedName(\"test.table\");",
"type": "TableReference",
... | {
"body": "@Test\n public void lockDescriptorWithNoZerosReturnsEmptyForCells() {\n LockDescriptor descriptor = StringLockDescriptor.of(\"test\");\n assertThat(AtlasLockDescriptorUtils.candidateCells(descriptor)).isEmpty();\n }",
"class_method_signature": "AtlasLockDescriptorUtilsTest.lockDescrip... | {
"fields": [],
"file": "atlasdb-api/src/main/java/com/palantir/atlasdb/keyvalue/api/AtlasLockDescriptorUtils.java",
"identifier": "AtlasLockDescriptorUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AtlasLockDescriptorUtils.AtlasLockDescriptorUtils()",
"constructor": true,
... | {
"body": "public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) {\n Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor);\n if (!tableRefAndRemainder.isPresent()) {\n return ImmutableList.of();\n }\n\n TableReference t... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_547 | {
"fields": [
{
"declarator": "TEST_REASON = \"for-test\"",
"modifier": "private static final",
"original_string": "private static final String TEST_REASON = \"for-test\";",
"type": "String",
"var_name": "TEST_REASON"
},
{
"declarator": "service",
"modifier": "pri... | {
"body": "@Test\n public void canCreatePersistentLockService() {\n KeyValueService kvs = new InMemoryKeyValueService(false);\n PersistentLockService pls = KvsBackedPersistentLockService.create(kvs);\n assertNotNull(pls);\n }",
"class_method_signature": "KvsBackedPersistentLockServiceTest... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(KvsBackedPersistentLockService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(KvsBackedPersistentLockService.class);",
"type": "Logger",
"var_name"... | {
"body": "public static PersistentLockService create(KeyValueService kvs) {\n return create(kvs, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC);\n }",
"class_method_signature": "KvsBackedPersistentLockService.create(KeyValueService kvs)",
"constructor": false,
"full_signature": "public static PersistentL... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_402 | {
"fields": [
{
"declarator": "RECOMPUTE_MILLIS = 10",
"modifier": "private static final",
"original_string": "private static final long RECOMPUTE_MILLIS = 10;",
"type": "long",
"var_name": "RECOMPUTE_MILLIS"
},
{
"declarator": "METRICS_CONFIGURATION\n = Targ... | {
"body": "@Test\n public void sweepTimestampGetsLastValueOverShards() {\n metrics.updateSweepTimestamp(CONS_ZERO, 1);\n assertThat(metricsManager).hasSweepTimestampConservativeEqualTo(1L);\n\n metrics.updateSweepTimestamp(CONS_ONE, 5);\n assertThat(metricsManager).hasSweepTimestampCons... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TargetedSweepMetrics.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweepMetrics.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "public void updateSweepTimestamp(ShardAndStrategy shardStrategy, long value) {\n updateMetricsIfPresent(shardStrategy, metrics -> metrics.updateSweepTimestamp(value));\n }",
"class_method_signature": "TargetedSweepMetrics.updateSweepTimestamp(ShardAndStrategy shardStrategy, long value)",
"con... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_951 | {
"fields": [
{
"declarator": "SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/security/trustStore.jks\"))",
"modifier": "private static final",
"original_string": "private static final SslConfiguration SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/sec... | {
"body": "@Test(expected = NullPointerException.class)\n public void createProxyAndLocalListThrowsIfNullClassProvided() {\n PaxosAcceptor localAcceptor = mock(PaxosAcceptor.class);\n\n Leaders.createProxyAndLocalList(\n localAcceptor,\n REMOTE_SERVICE_ADDRESSES,\n ... | {
"fields": [],
"file": "atlasdb-config/src/main/java/com/palantir/atlasdb/factory/Leaders.java",
"identifier": "Leaders",
"interfaces": "",
"methods": [
{
"class_method_signature": "Leaders.Leaders()",
"constructor": true,
"full_signature": "private Leaders()",
"identifier": "Lea... | {
"body": "public static <T> List<T> createProxyAndLocalList(\n T localObject,\n Set<String> remoteUris,\n Supplier<RemotingClientConfig> remotingClientConfig,\n Optional<TrustContext> trustContext,\n Class<T> clazz,\n UserAgent userAgent) {\n\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_286 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void close() throws Exception {\n kvs.close();\n\n checkSpan(\"atlasdb-kvs.close()\");\n verify(delegate).close();\n verifyNoMoreInteractions(delegate);\n }",
"class_method_signature": "TracingKeyValueServiceTest.close()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public void close() {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"close()\")) {\n delegate().close();\n }\n tracingExecutorService.shutdown();\n }",
"class_method_signature": "TracingKey... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_793 | {
"fields": [
{
"declarator": "DEFAULT_PORT = 5000",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PORT = 5000;",
"type": "int",
"var_name": "DEFAULT_PORT"
},
{
"declarator": "OTHER_PORT = 6000",
"modifier": "private stat... | {
"body": "@Test\n public void shouldOnlyReturnHostsMatchingPredicate() {\n CassandraService cassandra = clientPoolWithServers(ImmutableSet.of(HOST_1, HOST_2));\n\n int numTrials = 50;\n for (int i = 0; i < numTrials; i++) {\n Optional<CassandraClientPoolingContainer> container\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraClientPool.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClientPool.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public Optional<CassandraClientPoolingContainer> getRandomGoodHostForPredicate(\n Predicate<InetSocketAddress> predicate) {\n Map<InetSocketAddress, CassandraClientPoolingContainer> pools = currentPools;\n\n Set<InetSocketAddress> filteredHosts = pools.keySet().stream()\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_269 | {
"fields": [
{
"declarator": "COMPONENT_NAME = \"rowComponent\"",
"modifier": "private static final",
"original_string": "private static final String COMPONENT_NAME = \"rowComponent\";",
"type": "String",
"var_name": "COMPONENT_NAME"
},
{
"declarator": "VALUE_TYPE = Va... | {
"body": "@Test\n public void nameCanBeSpecifiedToBeLoggable() {\n assertThat(NAME_LOGGABLE_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.SAFE);\n }",
"class_method_signature": "NameComponentDescriptionTest.nameCanBeSpecifiedToBeLoggable()",
"constructor": false,
"full_signature": "@Test public ... | {
"fields": [
{
"declarator": "componentName",
"modifier": "final",
"original_string": "final String componentName;",
"type": "String",
"var_name": "componentName"
},
{
"declarator": "type",
"modifier": "final",
"original_string": "final ValueType type;",
... | {
"body": "public LogSafety getLogSafety() {\n return logSafety;\n }",
"class_method_signature": "NameComponentDescription.getLogSafety()",
"constructor": false,
"full_signature": "public LogSafety getLogSafety()",
"identifier": "getLogSafety",
"invocations": [],
"modifiers": "public",
"parame... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_639 | {
"fields": [
{
"declarator": "TIMESTAMP_1 = 10L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP_1 = 10L;",
"type": "long",
"var_name": "TIMESTAMP_1"
},
{
"declarator": "TIMESTAMP_2 = 20L",
"modifier": "private static ... | {
"body": "@Test\n public void getTimestampForMillisReturnsTimestampIfQueryingPreciseClockTime() {\n PUNCHER_HISTORY.forEach((key, value) -> assertThat(puncherStore.get(value)).isEqualTo(key));\n }",
"class_method_signature": "KeyValueServicePuncherStoreTest.getTimestampForMillisReturnsTimestampIfQuery... | {
"fields": [
{
"declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)",
"modifier": "private static final",
"original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);",
"type": "byte[]",
"var_name": "COLUMN"
},
{
"declarato... | {
"body": "@Override\n public Long get(Long timeMillis) {\n return get(keyValueService, timeMillis);\n }",
"class_method_signature": "KeyValueServicePuncherStore.get(Long timeMillis)",
"constructor": false,
"full_signature": "@Override public Long get(Long timeMillis)",
"identifier": "get",
"in... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_75 | {
"fields": [],
"file": "timelock-agent/src/test/java/com/palantir/timelock/config/TimeLockRuntimeConfigurationTest.java",
"identifier": "TimeLockRuntimeConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void canSpecifyPositiveLockLoggerTimeout() {\n ImmutableTimeLockRuntimeConfiguration.builder()\n .slowLockLogTriggerMillis(1L)\n .build();\n }",
"class_method_signature": "TimeLockRuntimeConfigurationTest.canSpecifyPositiveLockLoggerTimeout()",
... | {
"fields": [],
"file": "timelock-agent/src/main/java/com/palantir/timelock/config/TimeLockRuntimeConfiguration.java",
"identifier": "TimeLockRuntimeConfiguration",
"interfaces": "",
"methods": [
{
"class_method_signature": "TimeLockRuntimeConfiguration.paxos()",
"constructor": false,
"f... | {
"body": "@JsonProperty(\"slow-lock-log-trigger-in-ms\")\n @Value.Default\n public long slowLockLogTriggerMillis() {\n return 10000;\n }",
"class_method_signature": "TimeLockRuntimeConfiguration.slowLockLogTriggerMillis()",
"constructor": false,
"full_signature": "@JsonProperty(\"slow-lock-log-... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_510 | {
"fields": [
{
"declarator": "SUCCESS_TOO_FAST = SweepIterationResults.success(1L)",
"modifier": "private static final",
"original_string": "private static final SweepIterationResult SUCCESS_TOO_FAST = SweepIterationResults.success(1L);",
"type": "SweepIterationResult",
"var_name": ... | {
"body": "@Test\n public void configurationAboveDefaultMaximumIsRespected() {\n SweepDelay largeDelay = new SweepDelay(2 * DEFAULT_MAX_PAUSE_MILLIS);\n\n assertThat(largeDelay.getNextPause(SUCCESS)).isEqualTo(2 * DEFAULT_MAX_PAUSE_MILLIS);\n }",
"class_method_signature": "SweepDelayTest.configu... | {
"fields": [
{
"declarator": "BATCH_CELLS_LOW_THRESHOLD = 100",
"modifier": "static final",
"original_string": "static final int BATCH_CELLS_LOW_THRESHOLD = 100;",
"type": "int",
"var_name": "BATCH_CELLS_LOW_THRESHOLD"
},
{
"declarator": "MIN_PAUSE_MILLIS = 1",
"... | {
"body": "long getNextPause(SweepIterationResult result) {\n return SweepIterationResults.caseOf(result)\n .success(this::updateCurrentPauseAndGet)\n .unableToAcquireShard_(maxPauseMillis)\n .insufficientConsistency_(BACKOFF)\n .otherError_(maxPauseM... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_140 | {
"fields": [
{
"declarator": "print = new OutputPrinter(LoggerFactory.getLogger(OutputPrinter.class))",
"modifier": "private static final",
"original_string": "private static final OutputPrinter print = new OutputPrinter(LoggerFactory.getLogger(OutputPrinter.class));",
"type": "OutputPrin... | {
"body": "@Test\n public void testInfoPrintingWorksWithMultipleReplacement() {\n String systemOut = StandardStreamUtilities.wrapSystemOut(\n () -> print.info(\"Replace {} of {} {}.\", SafeArg.of(\"all\", \"all\"), SafeArg.of(\"these\", \"these\"),\n SafeArg.of(\"fields... | {
"fields": [
{
"declarator": "logger",
"modifier": "private",
"original_string": "private Logger logger;",
"type": "Logger",
"var_name": "logger"
}
],
"file": "atlasdb-cli/src/main/java/com/palantir/atlasdb/cli/output/OutputPrinter.java",
"identifier": "OutputPrinter",
"... | {
"body": "@Override\n public void info(String message, Arg... args) {\n String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage();\n logger.info(message, args);\n System.out.println(infoMessage);\n }",
"class_method_signature": "OutputPrinter.info(String message, Arg.... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_843 | {
"fields": [
{
"declarator": "MAX_TIMESTAMPS = 10_000",
"modifier": "private static final",
"original_string": "private static final int MAX_TIMESTAMPS = 10_000;",
"type": "int",
"var_name": "MAX_TIMESTAMPS"
},
{
"declarator": "unbatchedDelegate = new MaxTimestampsToGi... | {
"body": "@Test\n public void throwsIfAskForZeroTimestamps() {\n assertThatThrownBy(() -> timestamp.getFreshTimestamps(0))\n .isInstanceOf(IllegalArgumentException.class)\n .hasMessage(\"Must not request zero or negative timestamps\");\n }",
"class_method_signature": "Req... | {
"fields": [
{
"declarator": "timer = LoggingOperationTimer.create(RequestBatchingTimestampService.class)",
"modifier": "private static final",
"original_string": "private static final OperationTimer timer = LoggingOperationTimer.create(RequestBatchingTimestampService.class);",
"type": "O... | {
"body": "@Override\n public TimestampRange getFreshTimestamps(int numTimestampsRequested) {\n Preconditions.checkArgument(numTimestampsRequested > 0, \"Must not request zero or negative timestamps\");\n ListenableFuture<TimestampRange> range = batcher.apply(numTimestampsRequested);\n try {\n... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_906 | {
"fields": [
{
"declarator": "ONE_THOUSAND = 1000",
"modifier": "private static final",
"original_string": "private static final int ONE_THOUSAND = 1000;",
"type": "int",
"var_name": "ONE_THOUSAND"
},
{
"declarator": "tokenList",
"modifier": "private",
"ori... | {
"body": "@Test(timeout = 2_000)\n public void enqueueDoesNotBlock() {\n doAnswer(invocation -> {\n Uninterruptibles.sleepUninterruptibly(30, TimeUnit.SECONDS);\n return null;\n }).when(timelockService).tryUnlock(any());\n\n unlocker.enqueue(ImmutableSet.copyOf(tokenList... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n @SuppressWarnings(\"FutureReturnValueIgnored\")\n public void enqueue(Set<LockToken> tokens) {\n autobatcher.apply(tokens);\n }",
"class_method_signature": "AsyncTimeLockUnlocker.enqueue(Set<LockToken> tokens)",
"constructor": false,
"full_signature": "@Override @SuppressW... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_455 | {
"fields": [
{
"declarator": "SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUtils.SWEEP_BATCH_SIZE)",
"modifier": "private static final",
"original_string": "private static final SweepIterationResult SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUti... | {
"body": "@Test\n public void tasksNotReducedBeforeCoolDownPasses() throws Exception {\n when(sweepIteration.call()).thenReturn(SUCCESS_SMALL);\n\n scheduler.start(10);\n runSweepIterations(10);\n verify(sweepIteration, times(10 * 10)).call();\n }",
"class_method_signature": "Scal... | {
"fields": [
{
"declarator": "COOL_DOWN = Duration.ofMinutes(5L)",
"modifier": "private static final",
"original_string": "private static final Duration COOL_DOWN = Duration.ofMinutes(5L);",
"type": "Duration",
"var_name": "COOL_DOWN"
},
{
"declarator": "BATCH_CELLS_LO... | {
"body": "void start(int initialThreads) {\n for (int i = 0; i < initialThreads; i++) {\n increaseNumberOfTasks(INITIAL_DELAY);\n }\n }",
"class_method_signature": "ScalingSweepTaskScheduler.start(int initialThreads)",
"constructor": false,
"full_signature": " void start(int initial... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_212 | {
"fields": [
{
"declarator": "BLOCKING_TIME_LIMIT_MILLIS = 10L",
"modifier": "private static final",
"original_string": "private static final long BLOCKING_TIME_LIMIT_MILLIS = 10L;",
"type": "long",
"var_name": "BLOCKING_TIME_LIMIT_MILLIS"
},
{
"declarator": "TEST_CURR... | {
"body": "@Test\n public void rethrowsExceptionOccurringFromInterruptibleOperation() {\n assertThatThrownBy(() -> throwingService.lock(LockClient.ANONYMOUS.getClientId(), LOCK_REQUEST))\n .isInstanceOf(IllegalStateException.class);\n }",
"class_method_signature": "BlockingTimeLimitedLoc... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(BlockingTimeLimitedLockService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(BlockingTimeLimitedLockService.class);",
"type": "Logger",
"var_name"... | {
"body": "@Nullable\n @Override\n public LockRefreshToken lock(@PathParam(\"client\") String client, LockRequest request) throws InterruptedException {\n return callWithTimeLimit(\n () -> delegate.lock(client, request),\n ImmutableLockRequestSpecification.of(\"lock\", clien... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_642 | {
"fields": [
{
"declarator": "TIMESTAMP_1 = 10L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP_1 = 10L;",
"type": "long",
"var_name": "TIMESTAMP_1"
},
{
"declarator": "TIMESTAMP_2 = 20L",
"modifier": "private static ... | {
"body": "@Test\n public void getMillisForTimestampReturnsClockTimeIfQueryingPreciseTimestamp() {\n PUNCHER_HISTORY.forEach((key, value) -> assertThat(puncherStore.getMillisForTimestamp(key)).isEqualTo(value));\n }",
"class_method_signature": "KeyValueServicePuncherStoreTest.getMillisForTimestampRetur... | {
"fields": [
{
"declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)",
"modifier": "private static final",
"original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);",
"type": "byte[]",
"var_name": "COLUMN"
},
{
"declarato... | {
"body": "@Override\n public long getMillisForTimestamp(long timestamp) {\n return getMillisForTimestamp(keyValueService, timestamp);\n }",
"class_method_signature": "KeyValueServicePuncherStore.getMillisForTimestamp(long timestamp)",
"constructor": false,
"full_signature": "@Override public long ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_357 | {
"fields": [
{
"declarator": "DATA_SIZE = 4",
"modifier": "private static final",
"original_string": "private static final int DATA_SIZE = 4;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "DATA_SIZE_PLUS_ONE = 5",
"modifier": "private static final",... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void bufferLengthCanNotQuiteReachIntMaxValue() throws IOException {\n BlockGetter reallyBigGetter = new BlockGetter() {\n @Override\n public void get(long firstBlock, long numBlocks, OutputStream destination) {\n ... | {
"fields": [
{
"declarator": "blockGetter",
"modifier": "private final",
"original_string": "private final BlockGetter blockGetter;",
"type": "BlockGetter",
"var_name": "blockGetter"
},
{
"declarator": "numBlocks",
"modifier": "private final",
"original_str... | {
"body": "public static BlockConsumingInputStream create(\n BlockGetter blockGetter,\n long numBlocks,\n int blocksInMemory) throws IOException {\n ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory);\n return new BlockConsumingInputStream(blockGetter, n... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_707 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = 123",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_VALUE = 123;",
"type": "int",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "delegate = mock(Supplier.class)",
"modifier"... | {
"body": "@Test\n public void doesNotBatchSerialRequests() {\n supplier.get();\n supplier.get();\n supplier.get();\n\n verify(delegate, times(3)).get();\n }",
"class_method_signature": "CoalescingSupplierTest.doesNotBatchSerialRequests()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final Supplier<T> delegate;",
"type": "Supplier<T>",
"var_name": "delegate"
},
{
"declarator": "executor =\n MoreExecutors.listeningDecorator(PTExecutors.newCac... | {
"body": "@Override\n public T get() {\n Round present = round;\n if (present.isFirstToArrive()) {\n present.execute();\n return present.getResult();\n }\n Round next = present.awaitDone();\n if (next.isFirstToArrive()) {\n next.execute();\n ... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_584 | {
"fields": [
{
"declarator": "ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE",
"modifier": "private static final",
"original_string": "private static final V1EncodingStrategy ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE;",
"type": "V1EncodingStrategy",
"var_name": "ENCODING_STRA... | {
"body": "@Test\n public void repeatedProcessBatchOnlyMakesOneCallWithDuplicatesIfSuccessful() {\n KeyAlreadyExistsException exception = new KeyAlreadyExistsException(\"boo\",\n ImmutableList.of(ENCODING_STRATEGY.encodeStartTimestampAsCell(5L)));\n doNothing()\n .doThro... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WriteBatchingTransactionService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(WriteBatchingTransactionService.class);",
"type": "Logger",
"var_nam... | {
"body": "@VisibleForTesting\n static void processBatch(\n EncodingTransactionService delegate, List<BatchElement<TimestampPair, Void>> batchElements) {\n Multimap<Long, BatchElement<TimestampPair, Void>> startTimestampKeyedBatchElements\n = MultimapBuilder.hashKeys().hashSetValue... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_992 | {
"fields": [
{
"declarator": "SWEEP_QUEUE_WRITES_ENABLED\n = ImmutableTargetedSweepInstallConfig.builder().enableSweepQueueWrites(true).build()",
"modifier": "private static final",
"original_string": "private static final TargetedSweepInstallConfig SWEEP_QUEUE_WRITES_ENABLED\n ... | {
"body": "@SuppressWarnings(\"unchecked\") // Mock assignment known to be safe\n @Test\n public void liveReload() {\n Supplier<AtlasDbRuntimeConfig> runtimeConfigSupplier = mock(Supplier.class);\n when(runtimeConfigSupplier.get())\n .thenReturn(createRuntimeConfig(TARGETED_SWEEP_EN... | {
"fields": [
{
"declarator": "runtimeConfigSupplier",
"modifier": "private final",
"original_string": "private final Supplier<SweepConfig> runtimeConfigSupplier;",
"type": "Supplier<SweepConfig>",
"var_name": "runtimeConfigSupplier"
},
{
"declarator": "sweepQueueWrites... | {
"body": "@Override\n public boolean getAsBoolean() {\n return runtimeConfigSupplier.get().enabled().orElse(!sweepQueueWritesEnabled);\n }",
"class_method_signature": "ShouldRunBackgroundSweepSupplier.getAsBoolean()",
"constructor": false,
"full_signature": "@Override public boolean getAsBoolean()... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_838 | {
"fields": [
{
"declarator": "KEYSPACE = \"ks\"",
"modifier": "private static final",
"original_string": "private static final String KEYSPACE = \"ks\";",
"type": "String",
"var_name": "KEYSPACE"
},
{
"declarator": "KEYSPACE_2 = \"ks2\"",
"modifier": "private sta... | {
"body": "@Test\n public void canReplaceKeyspace() {\n CassandraKeyValueServiceConfig newConfig = CassandraKeyValueServiceConfigs.copyWithKeyspace(\n CONFIG_WITH_KEYSPACE, KEYSPACE_2);\n assertThat(newConfig.getKeyspaceOrThrow()).isEqualTo(KEYSPACE_2);\n }",
"class_method_signatu... | {
"fields": [],
"file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraKeyValueServiceConfigs.java",
"identifier": "CassandraKeyValueServiceConfigs",
"interfaces": "",
"methods": [
{
"class_method_signature": "CassandraKeyValueServiceConfigs.CassandraKeyValueServiceConfigs(... | {
"body": "public static CassandraKeyValueServiceConfig copyWithKeyspace(\n CassandraKeyValueServiceConfig cassandraConfig,\n String recommendedKeyspace) {\n return ImmutableCassandraKeyValueServiceConfig.builder()\n .from(cassandraConfig)\n .keyspace(recomme... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_615 | {
"fields": [],
"file": "atlasdb-impl-shared/src/test/java/com/palantir/atlasdb/transaction/impl/DefaultTaskExecutorsTest.java",
"identifier": "DefaultTaskExecutorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void deleteExecutorHasBoundedTaskQueue() {\n ExecutorService service = DefaultTaskExecutors.createDefaultDeleteExecutor();\n for (int i = 0; i < DefaultTaskExecutors.DEFAULT_QUEUE_CAPACITY + 1; i++) {\n service.submit(() -> {\n Uninterruptibles.slee... | {
"fields": [
{
"declarator": "DEFAULT_IDLE_TIMEOUT = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_IDLE_TIMEOUT = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_IDLE_TIMEOUT"
},
{
... | {
"body": "static ExecutorService createDefaultDeleteExecutor() {\n return PTExecutors.newThreadPoolExecutor(\n SINGLE_THREAD,\n SINGLE_THREAD,\n DEFAULT_IDLE_TIMEOUT.toMillis(),\n TimeUnit.MILLISECONDS,\n new LinkedBlockingQueue<>(DEFA... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_245 | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(\"AnnotatedCallable\")",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(\"AnnotatedCallable\");",
"type": "Logger",
"var_name": "log"
}
],
"file": "... | {
"body": "@Test\n public void throwableSuppressingItselfShouldBeLoggable() {\n // When logging exceptions with circular dependencies, logback can cause stack overflow. See\n // https://jira.qos.ch/browse/LOGBACK-1027. This tests asserts that there are no circular dependencies when\n // using ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "namedThrowables = {Error.class, RuntimeException.class, E... | {
"body": "public static Throwable from(Throwable throwable) {\n String message = String.format(\"%s [%s] occurred while processing thread (%s)\",\n highLevelType(throwable), throwable, Thread.currentThread().getName());\n SuppressedException suppressedException = new SuppressedException(... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_7 | {
"fields": [
{
"declarator": "METRIC_NAME_1 = MetricName.builder()\n .safeName(\"com.palantir.atlasdb.metrics.metrics.p99\")\n .build()",
"modifier": "private static final",
"original_string": "private static final MetricName METRIC_NAME_1 = MetricName.builder()\n ... | {
"body": "@Test\n public void metricsWithNoFilterAreAccepted() {\n MetricPublicationArbiter arbiter = new MetricPublicationArbiter(ImmutableMap.of());\n assertThat(arbiter.test(METRIC_NAME_1)).isTrue();\n assertThat(arbiter.test(METRIC_NAME_2)).isTrue();\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MetricPublicationArbiter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(MetricPublicationArbiter.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@Override\n public boolean test(MetricName metricName) {\n return Optional.ofNullable(singleMetricFilters.get(metricName))\n .map(filters -> allFiltersMatch(metricName, filters))\n .orElse(true);\n }",
"class_method_signature": "MetricPublicationArbiter.test(Met... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_750 | {
"fields": [
{
"declarator": "DC_1 = \"dc1\"",
"modifier": "private static final",
"original_string": "private static final String DC_1 = \"dc1\";",
"type": "String",
"var_name": "DC_1"
},
{
"declarator": "DC_2 = \"dc2\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void multipleDcSuceeds() throws TException {\n setTopology(createDetails(DC_1, RACK_1, HOST_1),\n createDetails(DC_1, RACK_1, HOST_2),\n createDetails(DC_1, RACK_1, HOST_3),\n createDetails(DC_2, RACK_1, HOST_4));\n when(config.re... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CassandraVerifier.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraVerifier.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "static Set<String> sanityCheckDatacenters(CassandraClient client, CassandraKeyValueServiceConfig config)\n throws TException {\n createSimpleRfTestKeyspaceIfNotExists(client);\n\n Multimap<String, String> datacenterToRack = HashMultimap.create();\n Set<String> hosts = Sets.n... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_300 | {
"fields": [
{
"declarator": "NAMESPACE = Namespace.create(\"test\")",
"modifier": "private static final",
"original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");",
"type": "Namespace",
"var_name": "NAMESPACE"
},
{
"declarator": "ROW_... | {
"body": "@Test\n public void getMetadataForTables() throws Exception {\n Map<TableReference, byte[]> expectedResult = ImmutableMap.of(TABLE_REF, METADATA_BYTES);\n when(delegate.getMetadataForTables()).thenReturn(expectedResult);\n\n Map<TableReference, byte[]> result = kvs.getMetadataForTab... | {
"fields": [
{
"declarator": "SERVICE_NAME = \"atlasdb-kvs\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "delegate",
"modif... | {
"body": "@Override\n public Map<TableReference, byte[]> getMetadataForTables() {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"getMetadataForTables()\")) {\n return delegate().getMetadataForTables();\n }\n }",
"class... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
36960637_183 | {
"fields": [
{
"declarator": "CLIENT = Client.of(\"alice\")",
"modifier": "private static final",
"original_string": "private static final Client CLIENT = Client.of(\"alice\");",
"type": "Client",
"var_name": "CLIENT"
},
{
"declarator": "PAXOS_ROUND_ONE = 1",
"mo... | {
"body": "@Test\n public void newClientCannotBeCreatedIfCreatingClientsIsNotPermitted() {\n LocalPaxosComponents rejectingComponents = createPaxosComponents(false);\n assertThatThrownBy(() -> rejectingComponents.learner(CLIENT))\n .isInstanceOf(ServiceNotAvailableException.class)\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LocalPaxosComponents.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LocalPaxosComponents.class);",
"type": "Logger",
"var_name": "log"
},
{... | {
"body": "public PaxosLearner learner(Client client) {\n return getOrCreateComponents(client).learner();\n }",
"class_method_signature": "LocalPaxosComponents.learner(Client client)",
"constructor": false,
"full_signature": "public PaxosLearner learner(Client client)",
"identifier": "learner",
"i... | {
"created": "6/5/2015 11:42:44 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 36960637,
"size": null,
"stargazer_count": null,
"stars": 711,
"updates": "2020-01-27T16:43:57+00:00",
"url": "https://github.com/palantir/atlasdb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.