id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
97518356_690 | {
"fields": [
{
"declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);",
"type": "NodeEndpoint",
"var_name": "REMOTE_EN... | {
"body": "@Test\n public void testGetFileBlockLocationsNegativeStart() throws IOException {\n Path path = new Path(\"/foo/10.0.0.1@bar\");\n\n try {\n fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), -22, 8192);\n fail(\"Expected getFileBlockLocation to throw an exception\... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);",
"typ... | {
"body": "@Override\n public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException {\n Preconditions.checkArgument(start >= 0, \"start should be positive\");\n Preconditions.checkArgument(len >= 0, \"len should be positive\");\n\n if (start >= file.getLen()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_385 | {
"fields": [
{
"declarator": "ENDPOINT_1_1 = newNodeEndpoint(\"10.0.0.1\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint ENDPOINT_1_1 = newNodeEndpoint(\"10.0.0.1\", 1234);",
"type": "NodeEndpoint",
"var_name": "ENDPOINT_1_1"
}... | {
"body": "@Test\n public void twoFilesOnSameHost() throws Exception {\n final List<CompleteWork> workUnits = asList(\n newWork(\"/10.0.0.1/table/foo1\", 1024, ENDPOINT_1_1, 0.33),\n newWork(\"/10.0.0.1/table/foo2\", 2048, ENDPOINT_1_2, 0.66)\n );\n\n ListMultimap<Integer, CompleteWork> mappin... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(HardAssignmentCreator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HardAssignmentCreator.class);",
"type": "org.slf... | {
"body": "public <T extends CompleteWork> ListMultimap<Integer, T> getMappings(\n final List<NodeEndpoint> endpoints, final List<T> units) throws PhysicalOperatorSetupException {\n verify(endpoints, units, units.size() >= endpoints.size(), \"There should be at least one work unit for each hard affinity node.... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_540 | {
"fields": [
{
"declarator": "NON_NULL_VALUE = 89683200000L",
"modifier": "public static final",
"original_string": "public static final long NON_NULL_VALUE = 89683200000L;",
"type": "long",
"var_name": "NON_NULL_VALUE"
},
{
"declarator": "DST_VALUE = 1558999993123L",
... | {
"body": "@Test\n public void testGetObject() throws Exception {\n assertEquals(new Date(72, 10, 4), accessor.getObject(0));\n }",
"class_method_signature": "TestDateMilliAccessor.testGetObject()",
"constructor": false,
"full_signature": "@Test public void testGetObject()",
"identifier": "testGetObject"... | {
"fields": [
{
"declarator": "TYPE = Types.optional(MinorType.DATE)",
"modifier": "private static final",
"original_string": "private static final MajorType TYPE = Types.optional(MinorType.DATE);",
"type": "MajorType",
"var_name": "TYPE"
},
{
"declarator": "defaultTime... | {
"body": "@Override\n public Object getObject(int index) {\n return getDate(index, defaultTimeZone);\n }",
"class_method_signature": "DateMilliAccessor.getObject(int index)",
"constructor": false,
"full_signature": "@Override public Object getObject(int index)",
"identifier": "getObject",
"invocations... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_110 | {
"fields": [
{
"declarator": "SOURCES_PATH = \"/source/\"",
"modifier": "private static final",
"original_string": "private static final String SOURCES_PATH = \"/source/\";",
"type": "String",
"var_name": "SOURCES_PATH"
},
{
"declarator": "reader = ConnectionReader.of(... | {
"body": "@Test\n public void testRemovingSensitiveFields() throws Exception {\n SourceConfig config = new SourceConfig();\n config.setName(\"Foopy\");\n config.setId(new EntityId(\"id\"));\n config.setTag(\"0\");\n config.setAccelerationGracePeriod(0L);\n config.setAccelerationRefreshPeriod(0L);\... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(SourceResource.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(SourceResource.class);",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@VisibleForTesting\n protected SourceDeprecated fromSourceConfig(SourceConfig sourceConfig) {\n return new SourceDeprecated(sourceService.fromSourceConfig(sourceConfig));\n }",
"class_method_signature": "SourceResource.fromSourceConfig(SourceConfig sourceConfig)",
"constructor": false,
"full_sig... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_405 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/ops/TestQueryContext.java",
"identifier": "TestQueryContext",
"interfaces": "",
"superclass": "extends BaseTestQuery"
} | {
"body": "@Test\n public void testOptionManagerSetup() throws Exception {\n try (final QueryContext queryContext =\n new QueryContext(session(), getSabotContext(), UserBitShared.QueryId.getDefaultInstance());) {\n final OptionManagerWrapper optionManager = (OptionManagerWrapper) queryContext.getO... | {
"fields": [
{
"declarator": "sabotContext",
"modifier": "private final",
"original_string": "private final SabotContext sabotContext;",
"type": "SabotContext",
"var_name": "sabotContext"
},
{
"declarator": "session",
"modifier": "private final",
"original_... | {
"body": "public OptionManager getOptions() {\n return optionManager;\n }",
"class_method_signature": "QueryContext.getOptions()",
"constructor": false,
"full_signature": "public OptionManager getOptions()",
"identifier": "getOptions",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_22 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/util/TestDateUtils.java",
"identifier": "TestDateUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetStartOfLastMonth() {\n LocalDate dateLastMonth = LocalDate.now().minusMonths(1);\n long startOfLastMonth = DateUtils.getStartOfLastMonth();\n\n LocalDate dateStartOfLastMonth = DateUtils.fromEpochMillis(startOfLastMonth);\n assertEquals(dateLastMonth.getMonthValue(),... | {
"fields": [],
"file": "dac/backend/src/main/java/com/dremio/dac/util/DateUtils.java",
"identifier": "DateUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtils.getStartOfLastMonth()",
"constructor": false,
"full_signature": "public static long getStartOfLastMonth... | {
"body": "public static long getStartOfLastMonth() {\n LocalDate now = LocalDate.now();\n LocalDate targetDate = now.minusDays(now.getDayOfMonth() - 1).minusMonths(1);\n Instant instant = targetDate.atStartOfDay().toInstant(ZoneOffset.UTC);\n return instant.toEpochMilli();\n }",
"class_method_signatur... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_686 | {
"fields": [
{
"declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);",
"type": "NodeEndpoint",
"var_name": "REMOTE_EN... | {
"body": "@Test\n public void testRenameRemoteFileDifferentEndpoints() throws IOException {\n Path src = new Path(\"/foo/bar/10.0.0.1@file1\");\n Path dst = new Path(\"/foo/bar/10.0.0.2@file3\");\n try {\n fs.rename(src, dst);\n fail(\"Expected rename across endpoints to fail\");\n } catch(IOE... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);",
"typ... | {
"body": "@Override\n public boolean rename(Path src, Path dst) throws IOException {\n Path absoluteSrc = toAbsolutePath(src);\n Path absoluteDst = toAbsolutePath(dst);\n checkPath(absoluteSrc);\n checkPath(absoluteDst);\n\n // Handle root\n if (absoluteSrc.isRoot()) {\n throw new IOException... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_239 | {
"fields": [],
"file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java",
"identifier": "TestReflectionManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSyncDoesUpdateReflectionWhenChanged(){\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n MaterializationId materializationId = new MaterializationId(\"m_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HASH\");\n JobId materializati... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class);",
"type": "org.slf4j.Logge... | {
"body": "@VisibleForTesting\n void sync(){\n long lastWakeupTime = System.currentTimeMillis();\n final long previousLastWakeupTime = lastWakeupTime - WAKEUP_OVERLAP_MS;\n // updating the store's lastWakeupTime here. This ensures that if we're failing we don't do a denial of service attack\n // this ass... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_393 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/store/dfs/TestFormatPluginOptionExtractor.java",
"identifier": "TestFormatPluginOptionExtractor",
"interfaces": "",
"superclass": "extends ExecTest"
} | {
"body": "@Test\n public void test() {\n FormatPluginOptionExtractor e = new FormatPluginOptionExtractor(CLASSPATH_SCAN_RESULT);\n Collection<FormatPluginOptionsDescriptor> options = e.getOptions();\n for (FormatPluginOptionsDescriptor d : options) {\n assertEquals(d.pluginConfigClass.getAnnotation(Js... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FormatPluginOptionExtractor.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = org.slf4j.LoggerFactory.getLogger(FormatPluginOptionExtractor.class);",
"type": "Logge... | {
"body": "@VisibleForTesting\n Collection<FormatPluginOptionsDescriptor> getOptions() {\n return optionsByTypeName.values();\n }",
"class_method_signature": "FormatPluginOptionExtractor.getOptions()",
"constructor": false,
"full_signature": "@VisibleForTesting Collection<FormatPluginOptionsDescriptor> get... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_669 | {
"fields": [
{
"declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);",
"type": "NodeEndpoint",
"var_name": "REMOTE_EN... | {
"body": "@Test\n public void testOpenLocalFile() throws IOException {\n try {\n Path path = new Path(\"/tmp/file\");\n @SuppressWarnings(\"unused\")\n FSDataInputStream fdis = fs.open(path, 32768);\n fail(\"Expected open call to throw an exception\");\n } catch (IOException e) {\n //... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);",
"typ... | {
"body": "@Override\n public FSDataInputStream open(Path f, int bufferSize) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot open \" + f);\n }\n\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_147 | {
"fields": [
{
"declarator": "attemptsHelper",
"modifier": "private",
"original_string": "private AttemptsHelper attemptsHelper;",
"type": "AttemptsHelper",
"var_name": "attemptsHelper"
}
],
"file": "services/jobs/src/test/java/com/dremio/service/jobs/TestAttemptsHelper.java... | {
"body": "@Test\n public void testGetEngineStartTime() {\n Preconditions.checkNotNull(attemptsHelper.getEngineStartTime());\n assertTrue(1L == attemptsHelper.getEngineStartTime());\n }",
"class_method_signature": "TestAttemptsHelper.testGetEngineStartTime()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "stateDurations",
"modifier": "private final",
"original_string": "private final Map<AttemptEvent.State, Long> stateDurations;",
"type": "Map<AttemptEvent.State, Long>",
"var_name": "stateDurations"
},
{
"declarator": "events",
"modif... | {
"body": "public Long getEngineStartTime() {\n return getDuration(State.ENGINE_START);\n }",
"class_method_signature": "AttemptsHelper.getEngineStartTime()",
"constructor": false,
"full_signature": "public Long getEngineStartTime()",
"identifier": "getEngineStartTime",
"invocations": [
"getDuration... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_517 | {
"fields": [
{
"declarator": "smallData = new byte[]{0, 1, 2, 3, 0, 127}",
"modifier": "private static final",
"original_string": "private static final byte[] smallData = new byte[]{0, 1, 2, 3, 0, 127};",
"type": "byte[]",
"var_name": "smallData"
},
{
"declarator": "NE... | {
"body": "@Test\n public void testRopeByteStringWithZeroOnRight() throws Exception {\n ByteString literal = ByteString.copyFrom(smallData);\n\n ByteString data = (ByteString) NEW_ROPE_BYTE_STRING_INSTANCE.invoke(null, literal, ByteString.EMPTY);\n\n OptimisticByteOutput byteOutput = new OptimisticByteOutpu... | {
"fields": [
{
"declarator": "EMPTY = new byte[0]",
"modifier": "private static final",
"original_string": "private static final byte[] EMPTY = new byte[0];",
"type": "byte[]",
"var_name": "EMPTY"
},
{
"declarator": "payloadSize",
"modifier": "private final",
... | {
"body": "public byte[] toByteArray() {\n if (payloadSize == 0) {\n return arrayReference != null ? arrayReference : EMPTY;\n }\n\n Preconditions.checkState(arrayOffset == payloadSize, \"Byte payload not fully received.\");\n return arrayReference;\n\n }",
"class_method_signature": "OptimisticByt... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_75 | {
"fields": [
{
"declarator": "recommender = new ExtractRecommender()",
"modifier": "private",
"original_string": "private ExtractRecommender recommender = new ExtractRecommender();",
"type": "ExtractRecommender",
"var_name": "recommender"
}
],
"file": "dac/backend/src/test/j... | {
"body": "@Test\n public void ruleSuggestionsSelNumberAtTheEnd() {\n Selection selection = new Selection(\"col\", \"883 N Shoreline Blvd., Mountain View, CA 94043\", 41, 5);\n List<ExtractRule> rules = recommender.getRules(selection, TEXT);\n assertEquals(7, rules.size());\n comparePattern(\"\\\\d+\", 1... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(ExtractRecommender.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(ExtractRecommender.class);",
"type": "Logger",
"var_name": "logger"
}
... | {
"body": "@Override\n public List<ExtractRule> getRules(Selection selection, DataType selColType) {\n checkArgument(selColType == DataType.TEXT, \"Extract text is supported only on TEXT type columns\");\n\n if (selection.getLength() <= 0) {\n throw UserException.validationError()\n .message(\"te... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_452 | {
"fields": [],
"file": "common/src/test/java/com/dremio/io/file/TestMorePosixFilePermissions.java",
"identifier": "TestMorePosixFilePermissions",
"interfaces": "",
"superclass": "extends DremioTest"
} | {
"body": "@Test\n public void testFromOctalModeWithIllegalMode() {\n assertFails(() -> MorePosixFilePermissions.fromOctalMode(-1));\n assertFails(() -> MorePosixFilePermissions.fromOctalMode(512));\n assertFails(() -> MorePosixFilePermissions.fromOctalMode(Integer.MIN_VALUE));\n assertFails(() -> MorePo... | {
"fields": [
{
"declarator": "PERMISSIONS = PosixFilePermission.values()",
"modifier": "private static final",
"original_string": "private static final PosixFilePermission[] PERMISSIONS = PosixFilePermission.values();",
"type": "PosixFilePermission[]",
"var_name": "PERMISSIONS"
... | {
"body": "public static Set<PosixFilePermission> fromOctalMode(int mode) {\n Preconditions.checkArgument(0 <= mode && mode <= MAX_MODE, \"mode should be between 0 and 0777\");\n\n final Set<PosixFilePermission> result = EnumSet.noneOf(PosixFilePermission.class);\n // Start with most significant bit\n int... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_281 | {
"fields": [],
"file": "services/coordinator/src/test/java/com/dremio/service/coordinator/zk/TestPathUtils.java",
"identifier": "TestPathUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalizeRemovesRedundantForwardSlashes() {\n final String actual = PathUtils.normalize(\"/a/b/c\");\n final String expected = \"/a/b/c\";\n Assert.assertEquals(\"invalid path\", expected, actual);\n\n final String actual2 = PathUtils.normalize(\"//a//b//c\");\n fina... | {
"fields": [],
"file": "services/coordinator/src/main/java/com/dremio/service/coordinator/zk/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(final String... parts)",
"constructor": false,
"full_signature": "public st... | {
"body": "public static final String normalize(final String path) {\n if (Strings.isNullOrEmpty(Preconditions.checkNotNull(path))) {\n return path;\n }\n\n final StringBuilder builder = new StringBuilder();\n char last = path.charAt(0);\n builder.append(last);\n for (int i=1; i<path.length(); ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_583 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getShort_on_DOUBLE_thatFits_getsIt() throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( 32767d ) );\n assertThat( uut.getShort( 0 ), equalTo( (short) 32767) );\n }",
"class_method_signature": "TypeConv... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public short getShort( int rowOffset ) throws InvalidAccessException {\n final short result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case SMALLINT:\n result = innerAccessor.getShort( rowOffset );\n break;\n\n // 2. Converted-from types... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_429 | {
"fields": [
{
"declarator": "optionManager",
"modifier": "private",
"original_string": "private OptionManager optionManager;",
"type": "OptionManager",
"var_name": "optionManager"
},
{
"declarator": "optionList",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testDeleteAllOptions() {\n final OptionManager eagerCachingOptionManager = new EagerCachingOptionManager(optionManager);\n eagerCachingOptionManager.deleteAllOptions(OptionValue.OptionType.SYSTEM);\n\n assertNull(eagerCachingOptionManager.getOption(optionValueA.getName()));\n ... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final OptionManager delegate;",
"type": "OptionManager",
"var_name": "delegate"
}
],
"file": "sabot/kernel/src/main/java/com/dremio/exec/server/options/EagerCachingOptionManager... | {
"body": "@Override\n public boolean deleteAllOptions(OptionType type) {\n return super.deleteAllOptions(type) && delegate.deleteAllOptions(type);\n }",
"class_method_signature": "EagerCachingOptionManager.deleteAllOptions(OptionType type)",
"constructor": false,
"full_signature": "@Override public boolea... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_645 | {
"fields": [
{
"declarator": "TEST_RPC_TIMEOUT_MS = 100",
"modifier": "private static final",
"original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;",
"type": "int",
"var_name": "TEST_RPC_TIMEOUT_MS"
},
{
"declarator": "logger = org.slf4j.LoggerFactory... | {
"body": "@Test\n public void testDeleteWithValidPathButNotDeleted() throws Exception {\n setupRPC(\n DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath(\"/foo/bar\").setRecursive(true).build(),\n DFS.RpcType.DELETE_RESPONSE, DFS.DeleteResponse.newBuilder().setValue(false).build());... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);",
"type": "org.slf4j... | {
"body": "@Override\n public boolean delete(Path f, boolean recursive) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive);\n runner.runCommand(command);\n\n RpcFuture<D... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_215 | {
"fields": [
{
"declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();",
"type": "Vers... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testValidateOptionsConflict() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{createOption, versionOption});\n }",
"class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsConflict()",
"constructor": fals... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java",
"identifier": "KVStoreOptionUtility",
"interfaces": "",
"methods": [
{
"class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)",
"con... | {
"body": "public static void validateOptions(KVStore.KVStoreOption... options) {\n if (null == options || options.length <= 1) {\n return;\n }\n\n boolean foundVersion = false;\n boolean foundCreate = false;\n\n for (KVStore.KVStoreOption option : options) {\n if (option == KVStore.PutOption... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_700 | {
"fields": [
{
"declarator": "mockTempDir",
"modifier": "private static",
"original_string": "private static Path mockTempDir;",
"type": "Path",
"var_name": "mockTempDir"
},
{
"declarator": "mockNestedTempDir",
"modifier": "private static",
"original_string... | {
"body": "@Test\n public void validateZipDirectoryValidNatural() throws IOException {\n ZipEntry entry = new ZipEntry(\"somedir/somefile\");\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry);\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry);\n Na... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(NativeLibPluginClassLoader.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(NativeLibPluginClassLoader.class);",
"type"... | {
"body": "@VisibleForTesting\n static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException {\n final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize();\n if (!destinationPath.startsWith(tempDirectory)) {\n throw new IOException(String.format(\"JAR... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_350 | {
"fields": [
{
"declarator": "traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL)",
"modifier": "private static final",
"original_string": "private static final RelTraitSet traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL);",
"type": "RelTraitSet",
"var_name": "traits"
}... | {
"body": "@Test\n public void joinWithLimitWithSoftScan() {\n Prel input =\n newScreen(\n newLimit(0, 10,\n newProject(exprs(), rowType(),\n newUnionExchange(\n newJoin(\n newProject(exprs(), rowType(),\n ... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/planner/physical/visitor/SimpleLimitExchangeRemover.java",
"identifier": "SimpleLimitExchangeRemover",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleLimitExchangeRemover.apply(PlannerSettings settings, Prel input... | {
"body": "public static Prel apply(PlannerSettings settings, Prel input){\n if(!settings.isTrivialSingularOptimized() || settings.isLeafLimitsEnabled()) {\n return input;\n }\n\n if(input.accept(new Identifier(), false)){\n return input.accept(new AllExchangeRemover(), null);\n }\n return in... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_184 | {
"fields": [],
"file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": "extends FormatTestArtifacts"
} | {
"body": "@Test\n public void testEqualsReturnsFalseByteProtoObject() {\n assertFalse(KeyUtils.equals(\n new KeyPair<>(\n TEST_STRING.getBytes(UTF_8),\n \"some other silly string\".getBytes(UTF_8)),\n new KeyPair<>(\n TEST_STRING.getBytes(UTF_8),\n \"some other silly\".getBy... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java",
"identifier": "KeyUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "KeyUtils.KeyUtils()",
"constructor": true,
"full_signature": "private KeyUtils()",
"... | {
"body": "public static boolean equals(Object left, Object right) {\n if (left instanceof byte[] && right instanceof byte[]) {\n return Arrays.equals((byte[]) left, (byte[]) right);\n }\n return Objects.equals(left, right);\n }",
"class_method_signature": "KeyUtils.equals(Object left, Object right)"... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_59 | {
"fields": [
{
"declarator": "recommender = new ReplaceRecommender()",
"modifier": "private",
"original_string": "private ReplaceRecommender recommender = new ReplaceRecommender();",
"type": "ReplaceRecommender",
"var_name": "recommender"
}
],
"file": "dac/backend/src/test/j... | {
"body": "@Test\n public void matches() throws Exception {\n final File dataFile = temp.newFile(\"matches.json\");\n try (final PrintWriter printWriter = new PrintWriter(dataFile)) {\n printWriter.append(\"{ \\\"col\\\" : \\\"Los Angeles\\\" }\");\n printWriter.append(\"{ \\\"col\\\" : \\\"LOS Angel... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(ReplaceRecommender.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(ReplaceRecommender.class);",
"type": "Logger",
"var_name": "logger"
}
... | {
"body": "public TransformRuleWrapper<ReplacePatternRule> wrapRule(ReplacePatternRule rule) {\n return new ReplaceTransformRuleWrapper(rule);\n }",
"class_method_signature": "ReplaceRecommender.wrapRule(ReplacePatternRule rule)",
"constructor": false,
"full_signature": "public TransformRuleWrapper<ReplaceP... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_491 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java",
"identifier": "TestBlackListOutput",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void writeFixed32() throws IOException {\n Output delegate = Mockito.mock(Output.class);\n BlackListOutput subject =\n new BlackListOutput(\n delegate,\n Collections.emptyMap(),\n new int[]{2}\n );\n\n subject.writeFixed32(1, 9, fals... | {
"fields": [
{
"declarator": "EmptyArray = new int[0]",
"modifier": "private static final",
"original_string": "private static final int[] EmptyArray = new int[0];",
"type": "int[]",
"var_name": "EmptyArray"
},
{
"declarator": "delegate",
"modifier": "private fin... | {
"body": "@Override\n public void writeFixed32(int fieldNumber, int value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeFixed32(fieldNumber, value, repeated);\n }",
"class_method_signature": "BlackListOutput.writeFixed32(int fieldNumber, int... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_242 | {
"fields": [],
"file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java",
"identifier": "TestReflectionGoalChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMatchesVersion() {\n final String testTag = \"1\";\n final ReflectionGoal goal = ReflectionGoal.getDefaultInstance().newMessage()\n .setTag(\"wrongTag\")\n .setVersion(Long.valueOf(testTag));\n assertTrue(ReflectionGoalChecker.checkGoal(goal, new ReflectionEntry(... | {
"fields": [
{
"declarator": "Instance = new ReflectionGoalChecker()",
"modifier": "public static final",
"original_string": "public static final ReflectionGoalChecker Instance = new ReflectionGoalChecker();",
"type": "ReflectionGoalChecker",
"var_name": "Instance"
},
{
... | {
"body": "public static boolean checkGoal(ReflectionGoal goal, Materialization materialization) {\n return Instance.isEqual(goal, materialization.getReflectionGoalVersion());\n }",
"class_method_signature": "ReflectionGoalChecker.checkGoal(ReflectionGoal goal, Materialization materialization)",
"constructor"... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_612 | {
"fields": [],
"file": "plugins/hive/src/test/hive2/com/dremio/exec/store/hive/exec/TestHiveScanBatchCreator.java",
"identifier": "TestHiveScanBatchCreator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ensureStoragePluginIsUsedForUsername() throws Exception {\n final String originalName = \"Test\";\n final String finalName = \"Replaced\";\n\n final HiveScanBatchCreator creator = new HiveScanBatchCreator();\n\n final HiveStoragePlugin plugin = mock(HiveStoragePlugin.class)... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(HiveScanBatchCreator.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(HiveScanBatchCreator.class);",
"type": "Logger",
"var_name": "logger"
... | {
"body": "@VisibleForTesting\n public UserGroupInformation getUGI(HiveStoragePlugin storagePlugin, HiveProxyingSubScan config) {\n final String userName = storagePlugin.getUsername(config.getProps().getUserName());\n return HiveImpersonationUtil.createProxyUgi(userName);\n }",
"class_method_signature": "Hi... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_307 | {
"fields": [
{
"declarator": "allocatorRule = AllocatorRule.defaultAllocator()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AllocatorRule allocatorRule = AllocatorRule.defaultAllocator();",
"type": "AllocatorRule",
"var_name": "allocatorRule"
... | {
"body": "@Test\n public void testReserveMemory() {\n SharedResourceGroup resourceGroup = mock(SharedResourceGroup.class);\n SabotConfig config = mock(SabotConfig.class);\n FragmentWorkQueue workQueue = mock(FragmentWorkQueue.class);\n TunnelProvider tunnelProvider = mock(TunnelProvider.class);\n\n E... | {
"fields": [
{
"declarator": "oppositeMajorFragmentId",
"modifier": "private final",
"original_string": "private final int oppositeMajorFragmentId;",
"type": "int",
"var_name": "oppositeMajorFragmentId"
},
{
"declarator": "incomingStreams",
"modifier": "private f... | {
"body": "@Override\n public synchronized void close() throws Exception {\n if(!closed){\n\n final List<AutoCloseable> closeables = new ArrayList<>();\n closeables.addAll(Arrays.asList(buffers));\n\n closeables.add(new AutoCloseable() {\n\n @Override\n public void close() throws Exce... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_192 | {
"fields": [],
"file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": "extends FormatTestArtifacts"
} | {
"body": "@Test\n public void testToStringProtoByteKeyPairByteKeyTriple() {\n assertEquals(\"KeyTriple{ key1=[123, 127, 9, 0], key2=KeyPair{ key1=somestring, key2=[1, 23, 43, 5]}, key3=[0, 0, 0, 0]}\",\n KeyUtils.toString(\n new KeyTriple<>(\n new byte[]{123, 127, 9, 0},\n new KeyPa... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java",
"identifier": "KeyUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "KeyUtils.KeyUtils()",
"constructor": true,
"full_signature": "private KeyUtils()",
"... | {
"body": "public static String toString(Object key) {\n if (null == key) {\n return null;\n }\n\n return (key instanceof byte[] ? Arrays.toString((byte[]) key) : key.toString());\n }",
"class_method_signature": "KeyUtils.toString(Object key)",
"constructor": false,
"full_signature": "public stat... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_468 | {
"fields": [
{
"declarator": "properties = new TemporarySystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();",
"type": "TemporarySystemProperties",
"var_name": "pro... | {
"body": "@Test\n public void newSystemProp() {\n String name = DremioConfig.DEBUG_AUTOPORT_BOOL;\n\n // set setting one way so we make sure we don't depend on external settings.\n properties.set(name, \"false\");\n assertEquals(false, DremioConfig.create().getBoolean(name));\n\n // now set the value... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public static DremioConfig create() {\n return create(null);\n }",
"class_method_signature": "DremioConfig.create()",
"constructor": false,
"full_signature": "public static DremioConfig create()",
"identifier": "create",
"invocations": [
"create"
],
"modifiers": "public static",
"pa... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_487 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/TestGuiceServiceModule.java",
"identifier": "TestGuiceServiceModule",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultiBind() throws Exception {\n final GuiceServiceModule guiceServiceHandler = new GuiceServiceModule();\n final Injector injector = Guice.createInjector(guiceServiceHandler, new MultiBindModule());\n\n final MultiImpl bInstance = (MultiImpl) injector.getInstance(B.class)... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(GuiceServiceModule.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(GuiceServiceModule.class);",
"type": "Logger",
"var_name": "logger"
},
... | {
"body": "public void close(Injector injector) throws Exception {\n\n serviceList.forEach((clazz) -> {\n final Object instance = injector.getInstance(clazz);\n\n if (instance instanceof Service) {\n try {\n logger.debug(\"stopping {}\", instance.getClass().toString());\n ((Servi... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_604 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test( expected = SQLConversionOverflowException.class )\n public void test_getFloat_on_DOUBLE_thatOverflows_throws()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( 1e100 ) );\n try {\n uut.getFloat( 0 );\n }\n... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public float getFloat( int rowOffset ) throws InvalidAccessException {\n final float result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case FLOAT4:\n result = innerAccessor.getFloat( rowOffset );\n break;\n\n // 2. Converted-from types:\... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_254 | {
"fields": [
{
"declarator": "counter = new AtomicInteger()",
"modifier": "private final",
"original_string": "private final AtomicInteger counter = new AtomicInteger();",
"type": "AtomicInteger",
"var_name": "counter"
}
],
"file": "services/command-pool/src/test/java/com/dr... | {
"body": "@Test\n public void testDifferentPrioritySuppliers() {\n // single threaded pool to have a deterministic ordering of execution\n final CommandPool pool = newTestCommandPool();\n\n final BlockingCommand blocking = new BlockingCommand();\n pool.submit(CommandPool.Priority.HIGH, \"test\", blockin... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BoundCommandPool.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BoundCommandPool.class);",
"type": "org.slf4j.Logger"... | {
"body": "@Override\n public <V> CompletableFuture<V> submit(Priority priority, String descriptor, Command<V> command, boolean runInSameThread) {\n final long time = System.currentTimeMillis();\n final CommandWrapper<V> wrapper = new CommandWrapper<>(priority, descriptor, time, command);\n logger.debug(\"c... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_311 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/rpc/TestRpcCompatibilityEncoder.java",
"identifier": "TestRpcCompatibilityEncoder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIgnoreOtherMessages() throws Exception {\n RpcCompatibilityEncoder encoder = new RpcCompatibilityEncoder();\n ChannelHandlerContext context = mock(ChannelHandlerContext.class);\n\n OutboundRpcMessage message = new OutboundRpcMessage(RpcMode.PING, 0, 0, Acks.OK);\n List<... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/rpc/RpcCompatibilityEncoder.java",
"identifier": "RpcCompatibilityEncoder",
"interfaces": "",
"methods": [
{
"class_method_signature": "RpcCompatibilityEncoder.encode(ChannelHandlerContext context, OutboundRpcMessage message, List<O... | {
"body": "@Override\n protected void encode(ChannelHandlerContext context, OutboundRpcMessage message, List<Object> out) throws Exception {\n if (message.mode != RpcMode.RESPONSE_FAILURE) {\n out.add(message);\n return;\n }\n\n final MessageLite pBody = message.pBody;\n if (!(pBody instanceof ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_18 | {
"fields": [],
"file": "dac/daemon/src/test/java/com/dremio/dac/cmd/AdminCommandRunnerTest.java",
"identifier": "AdminCommandRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void runCommand() throws Exception {\n assertFalse(TestCommand.invokedCorrectly);\n AdminCommandRunner.runCommand(\"test-command\", TestCommand.class, new String[]{\"arg0\", \"arg1\"});\n assertTrue(TestCommand.invokedCorrectly);\n }",
"class_method_signature": "AdminCommandRunn... | {
"fields": [],
"file": "dac/daemon/src/main/java/com/dremio/dac/cmd/AdminCommandRunner.java",
"identifier": "AdminCommandRunner",
"interfaces": "",
"methods": [
{
"class_method_signature": "AdminCommandRunner.main(String[] args)",
"constructor": false,
"full_signature": "public static v... | {
"body": "static void runCommand(String commandName, Class<?> command, String[] commandArgs) throws Exception {\n final Method mainMethod = command.getMethod(\"main\", String[].class);\n Preconditions.checkState(Modifier.isStatic(mainMethod.getModifiers())\n && Modifier.isPublic(mainMethod.getModifiers(... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_595 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getLong_on_SMALLINT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new SmallIntStubAccessor( (short) 32767 ) );\n assertThat( uut1.getLong( 0 ), equalTo( 32767L ) );\n final SqlAccessor uut2 =\n new TypeC... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public long getLong( int rowOffset ) throws InvalidAccessException {\n final long result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case BIGINT:\n result = innerAccessor.getLong( rowOffset );\n break;\n\n // 2. Converted-from types:\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_203 | {
"fields": [
{
"declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();",
"type": "Vers... | {
"body": "@Test\n public void testValidateOptionsNull() {\n KVStoreOptionUtility.validateOptions((KVStore.PutOption[]) null);\n }",
"class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsNull()",
"constructor": false,
"full_signature": "@Test public void testValidateOptionsNull()",
"iden... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java",
"identifier": "KVStoreOptionUtility",
"interfaces": "",
"methods": [
{
"class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)",
"con... | {
"body": "public static void validateOptions(KVStore.KVStoreOption... options) {\n if (null == options || options.length <= 1) {\n return;\n }\n\n boolean foundVersion = false;\n boolean foundCreate = false;\n\n for (KVStore.KVStoreOption option : options) {\n if (option == KVStore.PutOption... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_653 | {
"fields": [
{
"declarator": "TEST_RPC_TIMEOUT_MS = 100",
"modifier": "private static final",
"original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;",
"type": "int",
"var_name": "TEST_RPC_TIMEOUT_MS"
},
{
"declarator": "logger = org.slf4j.LoggerFactory... | {
"body": "@Test\n public void testInputStream() throws Exception {\n Path filePath = new Path(\"/foo/bar\");\n byte[] data = new byte[100];\n for (int i = 0; i < 100; ++i) {\n data[i] = (byte)i;\n }\n byte [] readBuf = new byte[1000];\n ByteBuf byteBuf = Unpooled.wrappedBuffer(data, 0, 100);\... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);",
"type": "org.slf4j... | {
"body": "@Override\n public FSDataInputStream open(Path f, int bufferSize) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Create a tunnel to connect remotely\n final String path = absolutePath.toUri().getPath();\n\n //return new InputStream\n retur... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_346 | {
"fields": [
{
"declarator": "traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL)",
"modifier": "private static final",
"original_string": "private static final RelTraitSet traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL);",
"type": "RelTraitSet",
"var_name": "traits"
}... | {
"body": "@Test\n public void simpleSelectWithLimitWithSoftScan() {\n Prel input =\n newScreen(\n newLimit(0, 10,\n newProject(exprs(), rowType(),\n newUnionExchange(\n newLimit(0, 10,\n newProject(exprs(), rowT... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/planner/physical/visitor/SimpleLimitExchangeRemover.java",
"identifier": "SimpleLimitExchangeRemover",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleLimitExchangeRemover.apply(PlannerSettings settings, Prel input... | {
"body": "public static Prel apply(PlannerSettings settings, Prel input){\n if(!settings.isTrivialSingularOptimized() || settings.isLeafLimitsEnabled()) {\n return input;\n }\n\n if(input.accept(new Identifier(), false)){\n return input.accept(new AllExchangeRemover(), null);\n }\n return in... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_716 | {
"fields": [
{
"declarator": "properties = new TemporarySystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();",
"type": "TemporarySystemProperties",
"var_name": "pro... | {
"body": "@Test\n public void testDistroDefaults() throws Exception {\n assumeNonMaprProfile();\n\n YarnController controller = Mockito.mock(YarnController.class);\n YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));\n Cluster cluster = new Clust... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(YarnService.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(YarnService.class);",
"type": "Logger",
"var_name": "logger"
},
{
"d... | {
"body": "@VisibleForTesting\n protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) {\n String rmAddress = null;\n // make sure we set defaults first - before we overwrite it with props from ClusterConfig\n setYarnDefaults(cluster, yarnConfiguration);\n List<Pro... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_331 | {
"fields": [
{
"declarator": "typeFactory = SqlTypeFactoryImpl.INSTANCE",
"modifier": "private final",
"original_string": "private final RelDataTypeFactory typeFactory = SqlTypeFactoryImpl.INSTANCE;",
"type": "RelDataTypeFactory",
"var_name": "typeFactory"
}
],
"file": "sabo... | {
"body": "@Test\n public void testAreRowTypesEqualIgnoresAny() {\n final RelDataType type1 = typeFactory.createStructType(\n asList(\n typeFactory.createSqlType(SqlTypeName.INTEGER),\n typeFactory.createSqlType(SqlTypeName.BIGINT)\n ),\n asList(\"intC\", \"bigIntC\")\n );\n\n f... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MaterializationExpander.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MaterializationExpander.class);",
"type": "org... | {
"body": "@VisibleForTesting\n static boolean areRowTypesEqual(RelDataType rowType1, RelDataType rowType2) {\n if (rowType1 == rowType2) {\n return true;\n }\n\n if (rowType2.getFieldCount() != rowType1.getFieldCount()) {\n return false;\n }\n\n final List<RelDataTypeField> f1... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_624 | {
"fields": [
{
"declarator": "DATE_RFC1123_FORMATTER = DateTimeFormatter\n .ofPattern(\"EEE, dd MMM yyyy HH:mm:ss 'GMT'\")\n .withZone(ZoneId.of(\"UTC\"))\n .withLocale(Locale.US)",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter DATE_RFC1... | {
"body": "@Test\n public void testAsyncHttpClientClosedError() {\n AsyncHttpClient client = mock(AsyncHttpClient.class);\n when(client.isClosed()).thenReturn(true);\n LocalDateTime versionDate = LocalDateTime.now(ZoneId.of(\"GMT\")).minusDays(2);\n\n AzureAsyncReader azureAsyncReader = spy(new AzureAsyn... | {
"fields": [
{
"declarator": "BASE_MILLIS_TO_WAIT = 250",
"modifier": "private static final",
"original_string": "private static final int BASE_MILLIS_TO_WAIT = 250;",
"type": "int",
"var_name": "BASE_MILLIS_TO_WAIT"
},
{
"declarator": "MAX_MILLIS_TO_WAIT = 10 * BASE_M... | {
"body": "@Override\n public CompletableFuture<Void> readFully(long offset, ByteBuf dst, int dstOffset, int len) {\n return read(offset, dst, dstOffset, len, 0);\n }",
"class_method_signature": "AzureAsyncReader.readFully(long offset, ByteBuf dst, int dstOffset, int len)",
"constructor": false,
"full_sign... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_274 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSheetXlsFile() throws Exception {\n XlsFileConfig fileFormat = new XlsFileConfig();\n fileFormat.setSheetName(\"foo\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'excel'\", tableOptions);\n assertContains(\"xls => true\", tableOp... | {
"fields": [
{
"declarator": "buffer = LinkedBuffer.allocate(512)",
"modifier": "@JsonIgnore\n private final",
"original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);",
"type": "LinkedBuffer",
"var_name": "buffer"
},
{
"decla... | {
"body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_80 | {
"fields": [
{
"declarator": "table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\"",
"modifier": "private static",
"original_string": "private static String table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\";",
"type": "String",
"var_name": "table"
},
{
"declarator":... | {
"body": "@Test\n public void selectConstant() {\n final String query = \"SELECT 1729 AS special\";\n final VirtualDatasetState ds = extract(getQueryFromSQL(query));\n assertEquals(ds, new VirtualDatasetState()\n .setFrom(new FromSQL(query).setAlias(\"nested_0\").wrap())\n .setContextList(Col... | {
"fields": [],
"file": "dac/backend/src/main/java/com/dremio/dac/explore/QuerySemantics.java",
"identifier": "QuerySemantics",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuerySemantics.QuerySemantics()",
"constructor": true,
"full_signature": "private QuerySemantics()"... | {
"body": "public static VirtualDatasetState extract(QueryMetadata metadata) {\n final com.dremio.service.jobs.metadata.proto.VirtualDatasetState pState = metadata.getState();\n final VirtualDatasetState state = new VirtualDatasetState();\n if (pState.hasFrom()) {\n state.setFrom(fromBuf(pState.getFrom(... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_448 | {
"fields": [
{
"declarator": "instance =\n new DayOfWeekFromSundayDateTimeField(\n ISOChronology.getInstanceUTC(),\n ISOChronology.getInstanceUTC().days())",
"modifier": "private static final",
"original_string": "private static final DayOfWeekFromSundayDateTimeField inst... | {
"body": "@Test\n public void getAsText() {\n assertTrue(\"Sunday\".equalsIgnoreCase(instance.getAsText(1526173261000L)));\n assertTrue(\"Monday\".equalsIgnoreCase(instance.getAsText(1526259661000L)));\n assertTrue(\"Saturday\".equalsIgnoreCase(instance.getAsText(1526086861000L)));\n }",
"class_method_s... | {
"fields": [
{
"declarator": "serialVersionUID = 8020294841735395909L",
"modifier": "@SuppressWarnings(\"unused\")\n private static final",
"original_string": "@SuppressWarnings(\"unused\")\n private static final long serialVersionUID = 8020294841735395909L;",
"type": "long",
"var... | {
"body": "@Override\n public String getAsText(int fieldValue, Locale locale) {\n return chronology.dayOfWeek().getAsText(reverse(fieldValue), locale);\n }",
"class_method_signature": "DayOfWeekFromSundayDateTimeField.getAsText(int fieldValue, Locale locale)",
"constructor": false,
"full_signature": "@Over... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_366 | {
"fields": [
{
"declarator": "bfTestAllocator",
"modifier": "private",
"original_string": "private BufferAllocator bfTestAllocator;",
"type": "BufferAllocator",
"var_name": "bfTestAllocator"
},
{
"declarator": "TEST_NAME = \"20ed4177-87c7-91cc-c869-82b1d90cd300:frag:1:... | {
"body": "@Test\n public void testClose() {\n try (final BloomFilter f1 = new BloomFilter(bfTestAllocator, TEST_NAME, 64)) {\n f1.setup();\n\n f1.getDataBuffer().retain();\n assertEquals(2, f1.getDataBuffer().refCnt());\n f1.close();\n assertEquals(1, ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(BloomFilter.class)",
"modifier": "private static",
"original_string": "private static Logger logger = LoggerFactory.getLogger(BloomFilter.class);",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": ... | {
"body": "@Override\n public void close() {\n logger.debug(\"Closing bloomfilter {}'s data buffer. RefCount {}\", this.name, dataBuffer.refCnt());\n try {\n dataBuffer.close();\n } catch (Exception e) {\n logger.error(\"Error while closing bloomfilter \" + this.name, e);... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_223 | {
"fields": [
{
"declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();",
"type": "Vers... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testIndexPutOptionNotSupportedIndexPutOptionFoundAmongMany() {\n KVStoreOptionUtility.checkIndexPutOptionIsNotUsed(new KVStore.PutOption[]{createOption, indexPutOption, versionOption});\n }",
"class_method_signature": "KVStoreOptionUtili... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java",
"identifier": "KVStoreOptionUtility",
"interfaces": "",
"methods": [
{
"class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)",
"con... | {
"body": "public static void checkIndexPutOptionIsNotUsed(KVStore.KVStoreOption... options) {\n if (null == options || options.length == 0) {\n return;\n }\n\n for (KVStore.KVStoreOption option : options) {\n if (option instanceof IndexPutOption) {\n throw new IllegalArgumentException(\"Ind... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_389 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/store/StoragePluginUtilsTest.java",
"identifier": "StoragePluginUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddContextAndErrorMessageToUserException() {\n final UserException.Builder builder = UserException.validationError();\n final String errorMessageFormatString = \"Invalid username: %s\";\n final String sourceName = \"fictitious-source\";\n final UserException userExcepti... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/store/StoragePluginUtils.java",
"identifier": "StoragePluginUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "StoragePluginUtils.StoragePluginUtils()",
"constructor": true,
"full_signature": "private S... | {
"body": "public static UserException.Builder message(UserException.Builder builder, String sourceName, String errorMessage, Object... args) {\n // Constructs a format string which contains the sourceName and the errorMessage,\n // which is then formatted with arguments provided as parameters.\n return buil... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_673 | {
"fields": [
{
"declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);",
"type": "NodeEndpoint",
"var_name": "REMOTE_EN... | {
"body": "@Test\n public void testAppendRoot() throws IOException {\n Path root = new Path(\"/\");\n try {\n fs.append(root, 4096, null);\n fail(\"Expected append call to throw an exception\");\n } catch (AccessControlException e) {\n // ok\n }\n }",
"class_method_signature": "TestPseu... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);",
"typ... | {
"body": "@Override\n public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot open \" + f);\... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_2 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "kvstore =\n... | {
"body": "@Test\n public void testTasksWithoutUUID() throws Exception {\n DACConfig dacConfig = DACConfig.newConfig();\n Upgrade upgrade = new Upgrade(dacConfig, CLASSPATH_SCAN_RESULT, false);\n\n List<? extends UpgradeTask> tasks = upgrade.getUpgradeTasks();\n tasks.forEach(task -> assertNotNull(\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class);",
"type": "org.slf4j.Logger",
"var_name"... | {
"body": "@VisibleForTesting\n List<? extends UpgradeTask> getUpgradeTasks() {\n return upgradeTasks;\n }",
"class_method_signature": "Upgrade.getUpgradeTasks()",
"constructor": false,
"full_signature": "@VisibleForTesting List<? extends UpgradeTask> getUpgradeTasks()",
"identifier": "getUpgradeTasks",
... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_38 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/TestDatasetVersionResource.java",
"identifier": "TestDatasetVersionResource",
"interfaces": "",
"superclass": "extends BaseTestServer"
} | {
"body": "@Test\n public void testRenameShouldNotBreakHistory() throws Exception {\n Dataset parentVDS = createVDS(Arrays.asList(\"dsvTest\", \"renameParentVDS\"),\"select * from sys.version\");\n Dataset vds = expectSuccess(getBuilder(getPublicAPI(3).path(\"catalog\")).buildPost(Entity.json(parentVDS)), new ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(DatasetVersionResource.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(DatasetVersionResource.class);",
"type": "Logger",
"var_name": "logger"... | {
"body": "@GET\n @Produces(APPLICATION_JSON)\n public Dataset getDataset() throws DatasetVersionNotFoundException, DatasetNotFoundException, NamespaceException {\n return getCurrentDataset();\n }",
"class_method_signature": "DatasetVersionResource.getDataset()",
"constructor": false,
"full_signature": "@... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_720 | {
"fields": [
{
"declarator": "properties = new TemporarySystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();",
"type": "TemporarySystemProperties",
"var_name": "pro... | {
"body": "@Test\n public void testDistroDefaultsOverwrite() throws Exception {\n assumeNonMaprProfile();\n\n YarnController controller = Mockito.mock(YarnController.class);\n YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));\n\n Cluster myCluste... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(YarnService.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(YarnService.class);",
"type": "Logger",
"var_name": "logger"
},
{
"d... | {
"body": "@VisibleForTesting\n protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) {\n String rmAddress = null;\n // make sure we set defaults first - before we overwrite it with props from ClusterConfig\n setYarnDefaults(cluster, yarnConfiguration);\n List<Pro... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_370 | {
"fields": [
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schema;",
"type": "Schema",
"var_name": "schema"
},
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n... | {
"body": "@Test\n public void testStringSpec() throws Exception{\n String columnName = \"data\";\n String expectedValue = \"abc\";\n PartitionSpec partitionSpec = PartitionSpec\n .builderFor(schema)\n .identity(columnName)\n .build();\n\n IcebergPartitionData icebergPartitionData = new Ic... | {
"fields": [
{
"declarator": "partitionType",
"modifier": "private final",
"original_string": "private final Types.StructType partitionType;",
"type": "Types.StructType",
"var_name": "partitionType"
},
{
"declarator": "size",
"modifier": "private final",
"o... | {
"body": "public void setString(int position, String value) {\n set(position, value);\n }",
"class_method_signature": "IcebergPartitionData.setString(int position, String value)",
"constructor": false,
"full_signature": "public void setString(int position, String value)",
"identifier": "setString",
"in... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_665 | {
"fields": [
{
"declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);",
"type": "NodeEndpoint",
"var_name": "REMOTE_EN... | {
"body": "@Test\n public void testListStatusIteratorPastLastElement() throws IOException {\n final Path root = new Path(\"/\");\n final RemoteIterator<FileStatus> statusIter = fs.listStatusIterator(root);\n\n while (statusIter.hasNext()) {\n statusIter.next();\n }\n\n try {\n statusIter.nex... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);",
"typ... | {
"body": "@Override\n public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException {\n final Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n if (isRemoteFile(absolutePath)) {\n return new RemoteIterator<FileStatus>() {\n private bo... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_235 | {
"fields": [],
"file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java",
"identifier": "TestReflectionManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handleGoalWithEntryButHashHasNotChangedAndBoostHasChanged(){\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HASH\");\n String goalTag = \"goal_tag\";\n String reflectionGoalName = \"name\";\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class);",
"type": "org.slf4j.Logge... | {
"body": "@VisibleForTesting\n void handleGoal(ReflectionGoal goal) {\n final ReflectionEntry entry = reflectionStore.get(goal.getId());\n if (entry == null) {\n // no corresponding reflection, goal has been created or enabled\n if (goal.getState() == ReflectionGoalState.ENABLED) { // we still need ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_409 | {
"fields": [
{
"declarator": "lpp",
"modifier": "private static",
"original_string": "private static LogicalPlanPersistence lpp;",
"type": "LogicalPlanPersistence",
"var_name": "lpp"
},
{
"declarator": "optionValidatorListing",
"modifier": "private static",
... | {
"body": "@Test\n public void testIterator() throws Exception {\n OptionManager optionManager = OptionManagerWrapper.Builder.newBuilder()\n .withOptionValidatorProvider(optionValidatorListing)\n .withOptionManager(defaultOptionManager)\n .withOptionManager(systemOptionManager)\n .withOptionMa... | {
"fields": [
{
"declarator": "optionManagers",
"modifier": "private final",
"original_string": "private final List<OptionManager> optionManagers;",
"type": "List<OptionManager>",
"var_name": "optionManagers"
},
{
"declarator": "optionValidatorListing",
"modifier"... | {
"body": "@Override\n public Iterator<OptionValue> iterator() {\n final OptionList resultList = new OptionList();\n final Map<String, OptionValue> optionsMap = CaseInsensitiveMap.newHashMap();\n final OptionList defaultOptions = getDefaultOptions();\n\n // Add default options to optionMap\n defaultOp... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_327 | {
"fields": [
{
"declarator": "dummyEndpoint = NodeEndpoint\n .newBuilder()\n .setAddress(\"test\")\n .build()",
"modifier": "",
"original_string": "NodeEndpoint dummyEndpoint = NodeEndpoint\n .newBuilder()\n .setAddress(\"test\")\n .build();",
"type": "NodeEndpoint",
... | {
"body": "@Test\n public void sameKeyMultiPOPs() throws Exception {\n PlanFragmentsIndex.Builder indexBuilder = new PlanFragmentsIndex.Builder();\n MinorDataSerDe serDe = new MinorDataSerDe(null, null);\n MinorDataWriter writer = new MinorDataWriter(null, dummyEndpoint, serDe, indexBuilder);\n\n MockSto... | {
"fields": [
{
"declarator": "handle",
"modifier": "private final",
"original_string": "private final FragmentHandle handle;",
"type": "FragmentHandle",
"var_name": "handle"
},
{
"declarator": "index",
"modifier": "private final",
"original_string": "privat... | {
"body": "public ByteString readProtoEntry(OpProps props, String key) throws Exception {\n return attrsMap.getAttrValue(props, key);\n }",
"class_method_signature": "MinorDataReader.readProtoEntry(OpProps props, String key)",
"constructor": false,
"full_signature": "public ByteString readProtoEntry(OpProps... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_262 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleQuoteTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setQuote(\"'\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"quote => ''''\", tableOptions);\n }",
"class_method_signature": "TestFil... | {
"fields": [
{
"declarator": "buffer = LinkedBuffer.allocate(512)",
"modifier": "@JsonIgnore\n private final",
"original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);",
"type": "LinkedBuffer",
"var_name": "buffer"
},
{
"decla... | {
"body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_632 | {
"fields": [
{
"declarator": "authTokenProvider =\n new AzureSharedKeyAuthTokenProvider(\"mock-account\", Base64.encode(\"mock-key\".getBytes()))",
"modifier": "private final",
"original_string": "private final AzureSharedKeyAuthTokenProvider authTokenProvider =\n new AzureSharedKeyAuthTo... | {
"body": "@Test\n public void testCheckAndUpdate() {\n assertFalse(\"Shared key token is static. There shouldn't ever be an update required\",\n authTokenProvider.checkAndUpdateToken());\n }",
"class_method_signature": "TestAzureSharedKeyAuthTokenProvider.testCheckAndUpdate()",
"constructor": false,
... | {
"fields": [
{
"declarator": "storageSharedKeyCredential",
"modifier": "private final",
"original_string": "private final StorageSharedKeyCredential storageSharedKeyCredential;",
"type": "StorageSharedKeyCredential",
"var_name": "storageSharedKeyCredential"
}
],
"file": "plu... | {
"body": "@Override\n public boolean checkAndUpdateToken() {\n // Shared key never changes\n return false;\n }",
"class_method_signature": "AzureSharedKeyAuthTokenProvider.checkAndUpdateToken()",
"constructor": false,
"full_signature": "@Override public boolean checkAndUpdateToken()",
"identifier": "... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_96 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "dac/backend/src/test/... | {
"body": "@Test\n public void testSourceHasDefaultRefreshPolicy() throws Exception {\n final String sourceName = \"src3\";\n final NASConf nas = new NASConf();\n nas.path = folder.getRoot().getPath() ;\n SourceUI source = new SourceUI();\n source.setName(sourceName);\n source.setCtime(System.curre... | {
"fields": [
{
"declarator": "executor",
"modifier": "private final",
"original_string": "private final QueryExecutor executor;",
"type": "QueryExecutor",
"var_name": "executor"
},
{
"declarator": "namespaceService",
"modifier": "private final",
"original_s... | {
"body": "@RolesAllowed(\"admin\")\n @DELETE\n @Produces(MediaType.APPLICATION_JSON)\n public void deleteSource(@QueryParam(\"version\") String version) throws NamespaceException, SourceNotFoundException {\n if (version == null) {\n throw new ClientErrorException(\"missing version parameter\");\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_79 | {
"fields": [
{
"declarator": "table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\"",
"modifier": "private static",
"original_string": "private static String table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\";",
"type": "String",
"var_name": "table"
},
{
"declarator":... | {
"body": "@Test\n public void testStar() {\n VirtualDatasetState ds = extract(\n getQueryFromSQL(\"select * from \" + table));\n assertEquals(\n new VirtualDatasetState()\n .setFrom(from)\n .setContextList(Collections.<String>emptyList())\n .setRe... | {
"fields": [],
"file": "dac/backend/src/main/java/com/dremio/dac/explore/QuerySemantics.java",
"identifier": "QuerySemantics",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuerySemantics.QuerySemantics()",
"constructor": true,
"full_signature": "private QuerySemantics()"... | {
"body": "public static VirtualDatasetState extract(QueryMetadata metadata) {\n final com.dremio.service.jobs.metadata.proto.VirtualDatasetState pState = metadata.getState();\n final VirtualDatasetState state = new VirtualDatasetState();\n if (pState.hasFrom()) {\n state.setFrom(fromBuf(pState.getFrom(... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_219 | {
"fields": [
{
"declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();",
"type": "Vers... | {
"body": "@Test\n public void testIndexPutOptionNotSupportedSingleCreate() {\n KVStoreOptionUtility.checkIndexPutOptionIsNotUsed(new KVStore.PutOption[]{createOption});\n }",
"class_method_signature": "KVStoreOptionUtilityTest.testIndexPutOptionNotSupportedSingleCreate()",
"constructor": false,
"full_sign... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java",
"identifier": "KVStoreOptionUtility",
"interfaces": "",
"methods": [
{
"class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)",
"con... | {
"body": "public static void checkIndexPutOptionIsNotUsed(KVStore.KVStoreOption... options) {\n if (null == options || options.length == 0) {\n return;\n }\n\n for (KVStore.KVStoreOption option : options) {\n if (option instanceof IndexPutOption) {\n throw new IllegalArgumentException(\"Ind... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_649 | {
"fields": [
{
"declarator": "TEST_RPC_TIMEOUT_MS = 100",
"modifier": "private static final",
"original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;",
"type": "int",
"var_name": "TEST_RPC_TIMEOUT_MS"
},
{
"declarator": "logger = org.slf4j.LoggerFactory... | {
"body": "@Test\n public void testMkdirsWithInvalidPath() throws Exception {\n setupRPC(\n DFS.RpcType.MKDIRS_REQUEST, DFS.MkdirsRequest.newBuilder().setPath(\"/foo/bar\").setPermission(0755).build(),\n DFS.MkdirsResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException(\"File not f... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);",
"type": "org.slf4j... | {
"body": "@Override\n public boolean mkdirs(Path f, FsPermission permission) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final MkdirsCommand command = new MkdirsCommand(\n absolutePath.toUri().getPath(),\n permission != null ? (int) permission.... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_425 | {
"fields": [
{
"declarator": "som",
"modifier": "private",
"original_string": "private SystemOptionManager som;",
"type": "SystemOptionManager",
"var_name": "som"
},
{
"declarator": "kvStore",
"modifier": "private",
"original_string": "private LegacyKVStore... | {
"body": "@Test\n public void testIsValid() {\n registerTestOption(OptionValue.Kind.LONG, \"valid-option\", \"0\");\n // invalid options should not be registered\n\n assertTrue(som.isValid(\"valid-option\"));\n assertFalse(som.isValid(\"invalid-option\"));\n }",
"class_method_signature": "TestSystemO... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);",
"type": "org.slf4j.L... | {
"body": "@Override\n public boolean isValid(String name){\n return optionValidatorListing.isValid(name);\n }",
"class_method_signature": "SystemOptionManager.isValid(String name)",
"constructor": false,
"full_signature": "@Override public boolean isValid(String name)",
"identifier": "isValid",
"invoc... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_560 | {
"fields": [
{
"declarator": "STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE",
"modifier": "private static final",
"original_string": "private static final String STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE;",
"type": "String",
"var_name": "STATUS_... | {
"body": "@Test\n public void test_acceptsURL_rejectsNonDremioJdbcUrl()\n throws SQLException\n {\n assertThat( uut.acceptsURL(\"jdbc:notdremio:whatever\"), equalTo( false ) );\n }",
"class_method_signature": "DriverTest.test_acceptsURL_rejectsNonDremioJdbcUrl()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(Driver.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Driver.class);",
"type": "org.slf4j.Logger",
"var_name": ... | {
"body": "@Override\n public boolean acceptsURL( String url ) throws SQLException {\n return impl.acceptsURL( url );\n }",
"class_method_signature": "Driver.acceptsURL( String url )",
"constructor": false,
"full_signature": "@Override public boolean acceptsURL( String url )",
"identifier": "acceptsURL",... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_130 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/TestJSONPrettyPrintFilter.java",
"identifier": "TestJSONPrettyPrintFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJSONGeneratorUntouched() throws IOException {\n JSONPrettyPrintFilter filter = new JSONPrettyPrintFilter();\n ContainerRequest request = ContainerRequestBuilder.from(\"http://localhost/foo/bar\", \"GET\", null).accept(\"random/media\").build();\n ContainerResponse response... | {
"fields": [],
"file": "dac/backend/src/main/java/com/dremio/dac/server/JSONPrettyPrintFilter.java",
"identifier": "JSONPrettyPrintFilter",
"interfaces": "implements ContainerResponseFilter",
"methods": [
{
"class_method_signature": "JSONPrettyPrintFilter.filter(ContainerRequestContext requestConte... | {
"body": "@Override\n public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)\n throws IOException {\n UriInfo info = requestContext.getUriInfo();\n if (!info.getQueryParameters().containsKey(\"pretty\")) {\n return;\n }\n\n ObjectWriterInjector.set(n... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_55 | {
"fields": [
{
"declarator": "recommender = new ReplaceRecommender()",
"modifier": "private",
"original_string": "private ReplaceRecommender recommender = new ReplaceRecommender();",
"type": "ReplaceRecommender",
"var_name": "recommender"
}
],
"file": "dac/backend/src/test/j... | {
"body": "@Test\n public void contains() throws Exception {\n final File dataFile = temp.newFile(\"containsTest.json\");\n try (final PrintWriter printWriter = new PrintWriter(dataFile)) {\n printWriter.append(\"{ \\\"col\\\" : \\\"This is an amazing restaurant. Very good food.\\\" }\");\n printWrit... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(ReplaceRecommender.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(ReplaceRecommender.class);",
"type": "Logger",
"var_name": "logger"
}
... | {
"body": "public TransformRuleWrapper<ReplacePatternRule> wrapRule(ReplacePatternRule rule) {\n return new ReplaceTransformRuleWrapper(rule);\n }",
"class_method_signature": "ReplaceRecommender.wrapRule(ReplacePatternRule rule)",
"constructor": false,
"full_signature": "public TransformRuleWrapper<ReplaceP... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_188 | {
"fields": [],
"file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": "extends FormatTestArtifacts"
} | {
"body": "@Test\n public void testToStringNull() {\n assertNull(KeyUtils.toString(null));\n }",
"class_method_signature": "KeyUtilsTest.testToStringNull()",
"constructor": false,
"full_signature": "@Test public void testToStringNull()",
"identifier": "testToStringNull",
"invocations": [
"assertNul... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java",
"identifier": "KeyUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "KeyUtils.KeyUtils()",
"constructor": true,
"full_signature": "private KeyUtils()",
"... | {
"body": "public static String toString(Object key) {\n if (null == key) {\n return null;\n }\n\n return (key instanceof byte[] ? Arrays.toString((byte[]) key) : key.toString());\n }",
"class_method_signature": "KeyUtils.toString(Object key)",
"constructor": false,
"full_signature": "public stat... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_472 | {
"fields": [
{
"declarator": "allocatorRule = AllocatorRule.defaultAllocator()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AllocatorRule allocatorRule = AllocatorRule.defaultAllocator();",
"type": "AllocatorRule",
"var_name": "allocatorRule"
... | {
"body": "@Test\n public void testPrune() throws Exception {\n try (RollbackCloseable closeable = new RollbackCloseable(true)) {\n BufferAllocator root = allocatorRule.newAllocator(\"test-memory-debug-info\", 0, 1024 * 1024);\n closeable.add(root);\n\n BufferAllocator twig = root.newChildAllocator... | {
"fields": [
{
"declarator": "NUM_LEVELS_FROM_ROOT_TO_OPERATOR = 6",
"modifier": "private static final",
"original_string": "private static final int NUM_LEVELS_FROM_ROOT_TO_OPERATOR = 6;",
"type": "int",
"var_name": "NUM_LEVELS_FROM_ROOT_TO_OPERATOR"
},
{
"declarator"... | {
"body": "public static String getDetailsOnAllocationFailure(OutOfMemoryException exception, BufferAllocator allocator) {\n BufferAllocator failedAtAllocator = null;\n\n /*\n * Check if the exception has details about the outcome. This may not always be present\n * eg. if the failure is due to fragment... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_167 | {
"fields": [],
"file": "services/base-rpc/src/test/java/com/dremio/exec/rpc/TestReconnectingConnection.java",
"identifier": "TestReconnectingConnection",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ensureFirstFailsWaiting() throws InterruptedException, ExecutionException {\n CountDownLatch latch = new CountDownLatch(1);\n TestReConnection c = conn(\n 100000, 100, 100,\n r -> {\n try {\n latch.await();\n } catch (InterruptedExceptio... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(this.getClass())",
"modifier": "private final",
"original_string": "private final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(this.getClass());",
"type": "org.slf4j.Logger",
"var_name": "logger"... | {
"body": "public <R extends MessageLite, C extends RpcCommand<R, CONNECTION_TYPE>> void runCommand(C cmd) {\n\n if (closed.get()) {\n cmd.connectionFailed(FailureType.CONNECTION, new IOException(\"Connection has been closed: \" + toString()));\n }\n\n ConnectionRunner r = new ConnectionRunner();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_537 | {
"fields": [
{
"declarator": "NON_NULL_VALUE = 58447234",
"modifier": "public static final",
"original_string": "public static final int NON_NULL_VALUE = 58447234;",
"type": "int",
"var_name": "NON_NULL_VALUE"
},
{
"declarator": "PST_CALENDAR = Calendar.getInstance(Tim... | {
"body": "@Test(expected=NullPointerException.class)\n public void testNullCalendar() throws InvalidAccessException {\n accessor.getTime(0, null);\n }",
"class_method_signature": "TestTimeMilliAccessor.testNullCalendar()",
"constructor": false,
"full_signature": "@Test(expected=NullPointerException.class)... | {
"fields": [
{
"declarator": "TYPE = Types.optional(MinorType.TIME)",
"modifier": "private static final",
"original_string": "private static final MajorType TYPE = Types.optional(MinorType.TIME);",
"type": "MajorType",
"var_name": "TYPE"
},
{
"declarator": "defaultTime... | {
"body": "@Override\n public Time getTime(int index, Calendar calendar) {\n Preconditions.checkNotNull(calendar, \"Invalid calendar used when attempting to retrieve time.\");\n return getTime(index, calendar.getTimeZone());\n }",
"class_method_signature": "TimeMilliAccessor.getTime(int index, Calendar cale... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_258 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLineDelimiterTextFileWithSingleQuote() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setLineDelimiter(\"'a\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"lineDelimiter => '''a'\", tableOptions);\n }",
... | {
"fields": [
{
"declarator": "buffer = LinkedBuffer.allocate(512)",
"modifier": "@JsonIgnore\n private final",
"original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);",
"type": "LinkedBuffer",
"var_name": "buffer"
},
{
"decla... | {
"body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_608 | {
"fields": [
{
"declarator": "REPEAT_RULE = TestTools.getRepeatRule(false)",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TestRule REPEAT_RULE = TestTools.getRepeatRule(false);",
"type": "TestRule",
"var_name": "REPEAT_RULE"
},
{
"decl... | {
"body": "@Test\n public void buildInputFormatLookup() {\n\n {\n assertTrue(HiveReaderProtoUtil.buildInputFormatLookup(HiveTableXattr.newBuilder().build()).size() == 0);\n }\n\n {\n HiveTableXattr xattr = HiveTableXattr.newBuilder()\n .addAllPartitionXattrs(\n Lists.newArray... | {
"fields": [],
"file": "plugins/hive/src/main/java/com/dremio/exec/store/hive/exec/HiveReaderProtoUtil.java",
"identifier": "HiveReaderProtoUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "HiveReaderProtoUtil.encodePropertiesAsDictionary(HiveTableXattr.Builder tableXattr)",
... | {
"body": "@Deprecated\n static Map<String, Integer> buildInputFormatLookup(HiveTableXattrOrBuilder tableXattr) {\n int i = 0;\n final Map<String, Integer> lookup = Maps.newHashMap();\n for (final PartitionXattr partitionXattr : tableXattr.getPartitionXattrsList()) {\n if (partitionXattr.hasInputFormat... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_464 | {
"fields": [
{
"declarator": "properties = new TemporarySystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();",
"type": "TemporarySystemProperties",
"var_name": "pro... | {
"body": "@Test\n public void systemOverFile(){\n // clear relevant parameters.\n final String path = \"my.fave.path\";\n properties.set(DremioConfig.DB_PATH_STRING, path);\n\n DremioConfig config = DremioConfig.create(getClass().getResource(\"/test-dremio.conf\"));\n\n // check simple setting\n a... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public static DremioConfig create() {\n return create(null);\n }",
"class_method_signature": "DremioConfig.create()",
"constructor": false,
"full_signature": "public static DremioConfig create()",
"identifier": "create",
"invocations": [
"create"
],
"modifiers": "public static",
"pa... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_43 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/model/TestExpressionBase.java",
"identifier": "TestExpressionBase",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVisitor() {\n ExpressionBase exp = new ExpCalculatedField(\"foo\");\n String name = exp.accept(new ExpressionBase.ExpressionVisitor<String>() {\n @Override\n public String visit(ExpColumnReference col) throws Exception {\n throw new UnsupportedOperationExcept... | {
"fields": [
{
"declarator": "acceptor = new Acceptor<ExpressionBase, ExpressionVisitor<?>, Expression>(){}",
"modifier": "public static final",
"original_string": "public static final Acceptor<ExpressionBase, ExpressionVisitor<?>, Expression> acceptor = new Acceptor<ExpressionBase, ExpressionV... | {
"body": "public final <T> T accept(ExpressionVisitor<T> visitor) throws VisitorException {\n return acceptor.accept(visitor, this);\n }",
"class_method_signature": "ExpressionBase.accept(ExpressionVisitor<T> visitor)",
"constructor": false,
"full_signature": "public final T accept(ExpressionVisitor<T> vis... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_521 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/TestPathUtils.java",
"identifier": "TestPathUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHybridSchemaPathToFSPath() throws Exception {\n assertEquals(Path.of(\"/dfs/tmp/a/b/c\"), PathUtils.toFSPath(\"dfs.tmp.\\\"a/b/c\"));\n assertEquals(Path.of(\"/dfs/tmp/a/b/c.json\"), PathUtils.toFSPath(\"dfs.tmp.\\\"a/b/c.json\"));\n assertEquals(Path.of(\"/dfs/tmp/a.txt\"... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class);",
"type": "org.slf4j.Logger",
"var_n... | {
"body": "public static Path toFSPath(final List<String> schemaPath) {\n if (schemaPath == null || schemaPath.isEmpty()) {\n return ROOT_PATH;\n }\n return ROOT_PATH.resolve(PATH_JOINER.join(schemaPath));\n }",
"class_method_signature": "PathUtils.toFSPath(final List<String> schemaPath)",
"constru... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_171 | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestRpcException.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestRpcException.class);",
"type": "org.slf4j.Logger"... | {
"body": "@Test\n public void testRemoteRuntimeException() throws Exception {\n UserRemoteException ure = UserRemoteException.create(UserException\n .unsupportedError(new UserRpcException(null, \"user rpc exception\", new RuntimeException(\"test message\")))\n .build(logger).getOrCreatePBError(fals... | {
"fields": [
{
"declarator": "serialVersionUID = -5964230316010502319L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5964230316010502319L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "log... | {
"body": "public static <T extends Throwable> void propagateIfPossible(@Nullable RpcException e, Class<T> clazz) throws T {\n if (e == null) {\n return;\n }\n\n Throwable cause = e.getCause();\n if (!(cause instanceof UserRemoteException)) {\n return;\n }\n\n UserRemoteException ure = (Us... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_599 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test( expected = SQLConversionOverflowException.class )\n public void test_getLong_on_FLOAT_thatOverflows_rejectsIt()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new FloatStubAccessor( 1.5e20f ) );\n try {\n uut.getLong( 0 );\n }\... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public long getLong( int rowOffset ) throws InvalidAccessException {\n final long result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case BIGINT:\n result = innerAccessor.getLong( rowOffset );\n break;\n\n // 2. Converted-from types:\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_14 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "dac/daemon/src/test/jav... | {
"body": "@Test\n public void testDependencySort() throws Exception {\n // no dependencies\n UpgradeTask1 upgradeTask1 = new UpgradeTask1(ImmutableList.of());\n // depends on 1\n UpgradeTask2 upgradeTask2 = new UpgradeTask2(ImmutableList.of(upgradeTask1.getTaskUUID()));\n // depends on 1 and 2\n U... | {
"fields": [
{
"declarator": "uuidToTask = Maps.newHashMap()",
"modifier": "private",
"original_string": "private Map<String, UpgradeTask> uuidToTask = Maps.newHashMap();",
"type": "Map<String, UpgradeTask>",
"var_name": "uuidToTask"
}
],
"file": "dac/daemon/src/main/java/co... | {
"body": "public List<UpgradeTask> topologicalTasksSort() {\n List<String> resolved = Lists.newArrayList();\n\n for(UpgradeTask task : uuidToTask.values()) {\n visit(task, resolved, Lists.newArrayList());\n }\n\n List<UpgradeTask> resolvedTasks = Lists.newArrayList();\n for (String dep : resolved... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_433 | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestDatasetManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestDatasetManager.class);",
"type": "org.slf4j.Log... | {
"body": "@Test\n public void ignoreColumnCountOnDrop() throws Exception {\n final NamespaceKey namespaceKey = new NamespaceKey(\"test\");\n\n final ViewExpansionContext viewExpansionContext = mock(ViewExpansionContext.class);\n when(viewExpansionContext.getQueryUser()).thenReturn(\"newaccessuser\");\n\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(DatasetManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DatasetManager.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public DremioTable getTable(\n NamespaceKey key,\n MetadataRequestOptions options,\n boolean ignoreColumnCount\n ){\n\n final ManagedStoragePlugin plugin;\n\n final DatasetConfig config = getConfig(key);\n if(config != null) {\n // canonicalize the path.\n key = new N... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_126 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/TestMediaTypeFilter.java",
"identifier": "TestMediaTypeFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHeaderIsUntouched() throws IOException {\n MediaTypeFilter filter = new MediaTypeFilter();\n ContainerRequest request = ContainerRequestBuilder.from(\"http://localhost/foo/bar\", \"GET\", null).accept(\"random/media\").build();\n filter.filter(request);\n\n assertEquals... | {
"fields": [],
"file": "dac/backend/src/main/java/com/dremio/dac/server/MediaTypeFilter.java",
"identifier": "MediaTypeFilter",
"interfaces": "implements ContainerRequestFilter",
"methods": [
{
"class_method_signature": "MediaTypeFilter.filter(ContainerRequestContext requestContext)",
"constr... | {
"body": "@Override\n public void filter(ContainerRequestContext requestContext)\n throws IOException {\n final UriInfo info = requestContext.getUriInfo();\n MultivaluedMap<String, String> parameters = info.getQueryParameters();\n\n String format = parameters.getFirst(\"format\");\n if (format == n... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_576 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getShort_on_SMALLINT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new SmallIntStubAccessor( (short) 32767 ) );\n assertThat( uut1.getShort( 0 ), equalTo( (short) 32767 ) );\n final SqlAccessor uut2 =\n ... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public short getShort( int rowOffset ) throws InvalidAccessException {\n final short result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case SMALLINT:\n result = innerAccessor.getShort( rowOffset );\n break;\n\n // 2. Converted-from types... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_598 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getLong_on_FLOAT_thatFits_getsIt() throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor(\n new FloatStubAccessor( 9223372036854775807L * 1.0f ) );\n assertThat( uut.getLong( 0 ), equalTo( 9223372036854775807L ) );\n }",... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public long getLong( int rowOffset ) throws InvalidAccessException {\n final long result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case BIGINT:\n result = innerAccessor.getLong( rowOffset );\n break;\n\n // 2. Converted-from types:\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_15 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "dac/daemon/src/test/jav... | {
"body": "@Test\n public void testDependencySortLargeTasksNumber() throws Exception {\n\n UpgradeTaskAny upgradeTaskAny1 = new UpgradeTaskAny(\"upgradeTaskAny1\",\"5\", ImmutableList.of());\n UpgradeTaskAny upgradeTaskAny2 = new UpgradeTaskAny(\"upgradeTaskAny2\", \"7\", ImmutableList.of());\n UpgradeTaskA... | {
"fields": [
{
"declarator": "uuidToTask = Maps.newHashMap()",
"modifier": "private",
"original_string": "private Map<String, UpgradeTask> uuidToTask = Maps.newHashMap();",
"type": "Map<String, UpgradeTask>",
"var_name": "uuidToTask"
}
],
"file": "dac/daemon/src/main/java/co... | {
"body": "public List<UpgradeTask> topologicalTasksSort() {\n List<String> resolved = Lists.newArrayList();\n\n for(UpgradeTask task : uuidToTask.values()) {\n visit(task, resolved, Lists.newArrayList());\n }\n\n List<UpgradeTask> resolvedTasks = Lists.newArrayList();\n for (String dep : resolved... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_432 | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestDatasetManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestDatasetManager.class);",
"type": "org.slf4j.Log... | {
"body": "@Test\n public void testAccessUsernameOverride() throws Exception {\n final NamespaceKey namespaceKey = new NamespaceKey(\"test\");\n\n final ViewExpansionContext viewExpansionContext = mock(ViewExpansionContext.class);\n when(viewExpansionContext.getQueryUser()).thenReturn(\"newaccessuser\");\n\... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(DatasetManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DatasetManager.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public DremioTable getTable(\n NamespaceKey key,\n MetadataRequestOptions options,\n boolean ignoreColumnCount\n ){\n\n final ManagedStoragePlugin plugin;\n\n final DatasetConfig config = getConfig(key);\n if(config != null) {\n // canonicalize the path.\n key = new N... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_127 | {
"fields": [
{
"declarator": "classpathHealthMonitor",
"modifier": "private",
"original_string": "private ClasspathHealthMonitor classpathHealthMonitor;",
"type": "ClasspathHealthMonitor",
"var_name": "classpathHealthMonitor"
},
{
"declarator": "firstJarFolder",
... | {
"body": "@Test\n public void testIsHealthy() {\n assertTrue(classpathHealthMonitor.isHealthy());\n new File(secondJarFolder).setExecutable(false);\n assertFalse(classpathHealthMonitor.isHealthy());\n new File(secondJarFolder).setExecutable(true);\n assertTrue(classpathHealthMonitor.isHealthy());\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(ClasspathHealthMonitor.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ClasspathHealthMonitor.class);",
"type": "org.s... | {
"body": "@Override\n public boolean isHealthy() {\n logger.debug(\"Checking jars {}\", necessaryJarFoldersSet.size());\n\n for(String jarFolderPath : necessaryJarFoldersSet) {\n File jarFolder = new File(jarFolderPath);\n boolean folderAccessible = false;\n try {\n folderAccessible = Fi... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_577 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getShort_on_INTEGER_thatFits_getsIt()\n throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new IntegerStubAccessor( 32767 ) );\n assertThat( uut1.getShort( 0 ), equalTo( (short) 32767 ) );\n final SqlAccessor uut2 =\n ... | {
"fields": [
{
"declarator": "innerAccessor",
"modifier": "private final",
"original_string": "private final SqlAccessor innerAccessor;",
"type": "SqlAccessor",
"var_name": "innerAccessor"
}
],
"file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor... | {
"body": "@Override\n public short getShort( int rowOffset ) throws InvalidAccessException {\n final short result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case SMALLINT:\n result = innerAccessor.getShort( rowOffset );\n break;\n\n // 2. Converted-from types... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_465 | {
"fields": [
{
"declarator": "properties = new TemporarySystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();",
"type": "TemporarySystemProperties",
"var_name": "pro... | {
"body": "@Test\n public void arrayProperties() throws Exception {\n DremioConfig config = DremioConfig.create(getClass().getResource(\"/test-dremio3.conf\"));\n String property = (config.getStringList(DremioConfig.SPILLING_PATH_STRING)).toString();\n // clear relevant parameters.\n final String path = ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public static DremioConfig create() {\n return create(null);\n }",
"class_method_signature": "DremioConfig.create()",
"constructor": false,
"full_signature": "public static DremioConfig create()",
"identifier": "create",
"invocations": [
"create"
],
"modifiers": "public static",
"pa... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_42 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/model/TestFieldTransformationBase.java",
"identifier": "TestFieldTransformationBase",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVisitor() {\n FieldTransformationBase exp = new FieldConvertToJSON();\n String name = exp.accept(new FieldTransformationBase.FieldTransformationVisitor<String>() {\n @Override\n public String visit(FieldConvertCase col) throws Exception {\n throw new Unsuppor... | {
"fields": [
{
"declarator": "acceptor = new Acceptor<FieldTransformationBase, FieldTransformationVisitor<?>, FieldTransformation>(){}",
"modifier": "public static final",
"original_string": "public static final Acceptor<FieldTransformationBase, FieldTransformationVisitor<?>, FieldTransformatio... | {
"body": "public final <T> T accept(FieldTransformationVisitor<T> visitor) throws VisitorException {\n return acceptor.accept(visitor, this);\n }",
"class_method_signature": "FieldTransformationBase.accept(FieldTransformationVisitor<T> visitor)",
"constructor": false,
"full_signature": "public final T acce... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_520 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/TestPathUtils.java",
"identifier": "TestPathUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToFSPath() throws Exception {\n assertEquals(Path.of(\"/a/b/c\"), PathUtils.toFSPath(\"a.b.c\"));\n assertEquals(Path.of(\"/a/b\"), PathUtils.toFSPath(\"a.b\"));\n assertEquals(Path.of(\"/c.txt\"), PathUtils.toFSPath(\"\\\"c.txt\\\"\"));\n assertEquals(Path.of(\"/a/b/c.... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class);",
"type": "org.slf4j.Logger",
"var_n... | {
"body": "public static Path toFSPath(final List<String> schemaPath) {\n if (schemaPath == null || schemaPath.isEmpty()) {\n return ROOT_PATH;\n }\n return ROOT_PATH.resolve(PATH_JOINER.join(schemaPath));\n }",
"class_method_signature": "PathUtils.toFSPath(final List<String> schemaPath)",
"constru... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_170 | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestRpcException.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestRpcException.class);",
"type": "org.slf4j.Logger"... | {
"body": "@Test\n public void testRemoteTestException() throws Exception {\n UserRemoteException ure = UserRemoteException.create(UserException\n .unsupportedError(new UserRpcException(null, \"user rpc exception\", new TestException(\"test message\")))\n .build(logger).getOrCreatePBError(false));\n... | {
"fields": [
{
"declarator": "serialVersionUID = -5964230316010502319L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5964230316010502319L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "log... | {
"body": "public static <T extends Throwable> void propagateIfPossible(@Nullable RpcException e, Class<T> clazz) throws T {\n if (e == null) {\n return;\n }\n\n Throwable cause = e.getCause();\n if (!(cause instanceof UserRemoteException)) {\n return;\n }\n\n UserRemoteException ure = (Us... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_259 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCommentTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setComment(\"$\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"comment => '$'\", tableOptions);\n }",
"class_method_signature": "TestFile... | {
"fields": [
{
"declarator": "buffer = LinkedBuffer.allocate(512)",
"modifier": "@JsonIgnore\n private final",
"original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);",
"type": "LinkedBuffer",
"var_name": "buffer"
},
{
"decla... | {
"body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_609 | {
"fields": [
{
"declarator": "REPEAT_RULE = TestTools.getRepeatRule(false)",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TestRule REPEAT_RULE = TestTools.getRepeatRule(false);",
"type": "TestRule",
"var_name": "REPEAT_RULE"
},
{
"decl... | {
"body": "@Test\n public void buildPropLookup() {\n {\n assertTrue(HiveReaderProtoUtil.buildPropLookup(HiveTableXattr.newBuilder().build()).size() == 0);\n }\n\n {\n HiveTableXattr.Builder xattr = HiveTableXattr.newBuilder()\n .addAllPartitionXattrs(\n Lists.newArrayList(\n ... | {
"fields": [],
"file": "plugins/hive/src/main/java/com/dremio/exec/store/hive/exec/HiveReaderProtoUtil.java",
"identifier": "HiveReaderProtoUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "HiveReaderProtoUtil.encodePropertiesAsDictionary(HiveTableXattr.Builder tableXattr)",
... | {
"body": "@Deprecated\n static Map<Prop, Integer> buildPropLookup(HiveTableXattrOrBuilder tableXattr) {\n int i = 0;\n final Map<Prop, Integer> lookup = Maps.newHashMap();\n for (final PartitionXattr partitionXattr : tableXattr.getPartitionXattrsList()) {\n for (final Prop prop : partitionXattr.getPar... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_54 | {
"fields": [
{
"declarator": "recommender = new ReplaceRecommender()",
"modifier": "private",
"original_string": "private ReplaceRecommender recommender = new ReplaceRecommender();",
"type": "ReplaceRecommender",
"var_name": "recommender"
}
],
"file": "dac/backend/src/test/j... | {
"body": "@Test\n public void ruleSuggestionsSelectNumberAtBeginning() {\n // Select number beginning of the cell text\n Selection selection = new Selection(\"col\", \"883 N Shoreline Blvd, Mountain View, CA 94043\", 0, 3); // \"883\" is selected\n List<ReplacePatternRule> rules = recommender.getRules(sele... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(ReplaceRecommender.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(ReplaceRecommender.class);",
"type": "Logger",
"var_name": "logger"
}
... | {
"body": "@Override\n public List<ReplacePatternRule> getRules(Selection selection, DataType selColType) {\n Preconditions.checkArgument(selColType == DataType.TEXT,\n \"Cards generation for Replace/Keeponly/Exclude transforms is supported only on TEXT type columns\");\n\n List<ReplacePatternRule> rule... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_189 | {
"fields": [],
"file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": "extends FormatTestArtifacts"
} | {
"body": "@Test\n public void testToStringBytes() {\n assertEquals(\"[1, 2, 3, 4]\", KeyUtils.toString(new byte[]{1, 2, 3, 4}));\n }",
"class_method_signature": "KeyUtilsTest.testToStringBytes()",
"constructor": false,
"full_signature": "@Test public void testToStringBytes()",
"identifier": "testToStrin... | {
"fields": [],
"file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java",
"identifier": "KeyUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "KeyUtils.KeyUtils()",
"constructor": true,
"full_signature": "private KeyUtils()",
"... | {
"body": "public static String toString(Object key) {\n if (null == key) {\n return null;\n }\n\n return (key instanceof byte[] ? Arrays.toString((byte[]) key) : key.toString());\n }",
"class_method_signature": "KeyUtils.toString(Object key)",
"constructor": false,
"full_signature": "public stat... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_473 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/util/concurrent/TestDremioFutures.java",
"identifier": "TestDremioFutures",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasic() {\n SettableFuture<Integer> future = SettableFuture.create();\n Integer expectedValue = 1234;\n future.set(expectedValue);\n\n try {\n Integer result = DremioFutures.getChecked(future, TestException.class, TestDremioFutures::testMapper);\n assertEquals... | {
"fields": [],
"file": "common/src/main/java/com/dremio/common/util/concurrent/DremioFutures.java",
"identifier": "DremioFutures",
"interfaces": "",
"methods": [
{
"class_method_signature": "DremioFutures.DremioFutures()",
"constructor": true,
"full_signature": "private DremioFutures()... | {
"body": "public static <T, X extends Exception> T getChecked(\n Future<T> future,\n Class<X> exceptionClass,\n Function<? super Throwable, ? extends X> mapper\n ) throws X {\n try {\n return Futures.getChecked(future, ExecutionException.class);\n } catch (ExecutionException e) {\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_166 | {
"fields": [],
"file": "services/base-rpc/src/test/java/com/dremio/exec/rpc/TestReconnectingConnection.java",
"identifier": "TestReconnectingConnection",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ensureInActiveCausesReconnection() {\n TestReConnection c = conn(\n 100, 100, 1,\n r -> r.connectionSucceeded(newBadConnection()),\n r -> {\n wt(200);\n r.connectionFailed(FailureType.CONNECTION, new IllegalStateException());\n },\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(this.getClass())",
"modifier": "private final",
"original_string": "private final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(this.getClass());",
"type": "org.slf4j.Logger",
"var_name": "logger"... | {
"body": "public <R extends MessageLite, C extends RpcCommand<R, CONNECTION_TYPE>> void runCommand(C cmd) {\n\n if (closed.get()) {\n cmd.connectionFailed(FailureType.CONNECTION, new IOException(\"Connection has been closed: \" + toString()));\n }\n\n ConnectionRunner r = new ConnectionRunner();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_536 | {
"fields": [
{
"declarator": "NON_NULL_VALUE = 58447234",
"modifier": "public static final",
"original_string": "public static final int NON_NULL_VALUE = 58447234;",
"type": "int",
"var_name": "NON_NULL_VALUE"
},
{
"declarator": "PST_CALENDAR = Calendar.getInstance(Tim... | {
"body": "@Test\n public void testGetObject() throws Exception {\n assertEquals(new TimePrintMillis(NON_NULL_VALUE), accessor.getObject(0));\n }",
"class_method_signature": "TestTimeMilliAccessor.testGetObject()",
"constructor": false,
"full_signature": "@Test public void testGetObject()",
"identifier":... | {
"fields": [
{
"declarator": "TYPE = Types.optional(MinorType.TIME)",
"modifier": "private static final",
"original_string": "private static final MajorType TYPE = Types.optional(MinorType.TIME);",
"type": "MajorType",
"var_name": "TYPE"
},
{
"declarator": "defaultTime... | {
"body": "@Override\n public Object getObject(int index) {\n return getTime(index, defaultTimeZone);\n }",
"class_method_signature": "TimeMilliAccessor.getObject(int index)",
"constructor": false,
"full_signature": "@Override public Object getObject(int index)",
"identifier": "getObject",
"invocations... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_424 | {
"fields": [
{
"declarator": "som",
"modifier": "private",
"original_string": "private SystemOptionManager som;",
"type": "SystemOptionManager",
"var_name": "som"
},
{
"declarator": "kvStore",
"modifier": "private",
"original_string": "private LegacyKVStore... | {
"body": "@Test\n public void testIsSet() {\n registerTestOption(OptionValue.Kind.LONG, \"set-option\", \"0\");\n registerTestOption(OptionValue.Kind.LONG, \"not-set-option\", \"1\");\n\n OptionValue optionValue = OptionValue.createLong(OptionValue.OptionType.SYSTEM, \"set-option\", 123);\n OptionValueP... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);",
"type": "org.slf4j.L... | {
"body": "@Override\n public boolean isSet(String name){\n return getOptionProto(name) != null;\n }",
"class_method_signature": "SystemOptionManager.isSet(String name)",
"constructor": false,
"full_signature": "@Override public boolean isSet(String name)",
"identifier": "isSet",
"invocations": [
"... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_561 | {
"fields": [
{
"declarator": "STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE",
"modifier": "private static final",
"original_string": "private static final String STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE;",
"type": "String",
"var_name": "STATUS_... | {
"body": "@Test\n public void test_acceptsURL_rejectsNonDremioJdbc2()\n throws SQLException\n {\n assertThat( uut.acceptsURL(\"jdbc:optiq:\"), equalTo( false ) );\n }",
"class_method_signature": "DriverTest.test_acceptsURL_rejectsNonDremioJdbc2()",
"constructor": false,
"full_signature": "@Test publ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(Driver.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Driver.class);",
"type": "org.slf4j.Logger",
"var_name": ... | {
"body": "@Override\n public boolean acceptsURL( String url ) throws SQLException {\n return impl.acceptsURL( url );\n }",
"class_method_signature": "Driver.acceptsURL( String url )",
"constructor": false,
"full_signature": "@Override public boolean acceptsURL( String url )",
"identifier": "acceptsURL",... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
97518356_131 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/TestDoc.java",
"identifier": "TestDoc",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n Doc docv2 = new Doc(asList(DatasetVersionResource.class));\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(baos);\n docv2.generateDoc(\"V2\", out);\n assertTrue(baos.toString(), baos.toString().c... | {
"fields": [
{
"declarator": "classes",
"modifier": "private",
"original_string": "private Set<? extends Class<?>> classes;",
"type": "Set<? extends Class<?>>",
"var_name": "classes"
},
{
"declarator": "roots = new ArrayList<>()",
"modifier": "private",
"or... | {
"body": "void generateDoc(String linkPrefix, PrintStream out)\n throws JsonMappingException, JsonProcessingException {\n Set<Class<?>> classes = new TreeSet<>(new Comparator<Class<?>>() {\n @Override\n public int compare(Class<?> o1, Class<?> o2) {\n return o1.getName().compareTo(o2.getName()... | {
"created": null,
"fork": null,
"fork_count": 232,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 97518356,
"size": 51402,
"stargazer_count": 737,
"stars": null,
"updates": null,
"url": "https://github.com/dremio/dremio-oss"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.