id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
97518356_627 | {
"fields": [],
"file": "plugins/azure/src/test/java/com/dremio/plugins/azure/TestAzureAsyncContainerProvider.java",
"identifier": "TestAzureAsyncContainerProvider",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDoesContainerExists() throws ExecutionException, InterruptedException {\n AzureStorageFileSystem parentClass = mock(AzureStorageFileSystem.class);\n AzureAuthTokenProvider authTokenProvider = getMockAuthTokenProvider();\n AsyncHttpClient client = mock(AsyncHttpClient.class... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class);",
"type": "Logger",
"var_name"... | {
"body": "@Override\n public void assertContainerExists(final String containerName) {\n // API: https://docs.microsoft.com/en-gb/rest/api/storageservices/datalakestoragegen2/filesystem/getproperties\n logger.debug(\"Checking for missing azure container \" + account + \":\" + containerName);\n final Request... | {
"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_277 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractHeaderXlsFile() throws Exception {\n XlsFileConfig fileFormat = new XlsFileConfig();\n fileFormat.setExtractHeader(true);\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'excel'\", tableOptions);\n assertContains(\"xls => true\"... | {
"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_298 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/sabot/exec/TestQueriesClerk.java",
"identifier": "TestQueriesClerk",
"interfaces": "",
"superclass": "extends TestQueriesClerkBase"
} | {
"body": "@Test\n public void testQueriesClerk() throws Exception{\n WorkloadTicketDepot ticketDepot = new WorkloadTicketDepot(mockedRootAlloc, mock(SabotConfig.class), DUMMY_GROUP_MANAGER);\n QueriesClerk clerk = makeClerk(ticketDepot);\n assertLivePhasesCount(clerk, 0);\n int baseNumAllocators = getNu... | {
"fields": [
{
"declarator": "workloadTicketDepot",
"modifier": "private final",
"original_string": "private final WorkloadTicketDepot workloadTicketDepot;",
"type": "WorkloadTicketDepot",
"var_name": "workloadTicketDepot"
}
],
"file": "sabot/kernel/src/main/java/com/dremio/... | {
"body": "QueriesClerk(final WorkloadTicketDepot workloadTicketDepot) {\n this.workloadTicketDepot = workloadTicketDepot;\n }",
"class_method_signature": "QueriesClerk.QueriesClerk(final WorkloadTicketDepot workloadTicketDepot)",
"constructor": true,
"full_signature": " QueriesClerk(final WorkloadTicketDe... | {
"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_332 | {
"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 testAreRowTypesEqualMatchesCharVarchar() {\n final RelDataType type1 = typeFactory.createStructType(\n asList(\n typeFactory.createSqlType(SqlTypeName.CHAR),\n typeFactory.createSqlType(SqlTypeName.VARCHAR)\n ),\n asList(\"charC\", \"varcharC\")\n );\... | {
"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_83 | {
"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 testStarAs() {\n VirtualDatasetState ds = extract(\n getQueryFromSQL(\"select * from \" + table + \" as foo\"));\n assertEquals(\n new VirtualDatasetState()\n .setFrom(new FromTable(table).setAlias(\"foo\").wrap()).setContextList(Collections.<... | {
"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_220 | {
"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 testIndexPutOptionNotSupportedSingleVersion() {\n KVStoreOptionUtility.checkIndexPutOptionIsNotUsed(new KVStore.PutOption[]{versionOption});\n }",
"class_method_signature": "KVStoreOptionUtilityTest.testIndexPutOptionNotSupportedSingleVersion()",
"constructor": false,
"full_s... | {
"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_670 | {
"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 testCreateRoot() throws IOException {\n Path root = new Path(\"/\");\n try {\n fs.create(root, FsPermission.getFileDefault(), true, 0, (short) 1, 4096, null);\n fail(\"Expected create call to throw an exception\");\n } catch (AccessControlException e) {\n // ok\... | {
"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 create(Path f, FsPermission permission, boolean overwrite, int bufferSize,\n short replication, long blockSize, Progressable progress) throws IOException {\n final Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\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_365 | {
"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 testGetOptimalSize() {\n assertEquals(40, BloomFilter.getOptimalSize(1));\n assertEquals(40, BloomFilter.getOptimalSize(4));\n assertEquals(152, BloomFilter.getOptimalSize(100));\n assertEquals(1_232, BloomFilter.getOptimalSize(1_000));\n assertEqua... | {
"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": "public static long getOptimalSize(long expectedInsertions) {\n checkArgument(expectedInsertions > 0);\n long optimalSize = (long) (-expectedInsertions * Math.log(FPP) / (Math.log(2) * Math.log(2))) / 8;\n optimalSize = ((optimalSize + 8) / 8) * 8; // next multiple of 8\n return ... | {
"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_1 | {
"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 testTasksOrder() {\n DACConfig dacConfig = DACConfig.newConfig();\n Upgrade upgrade = new Upgrade(dacConfig, CLASSPATH_SCAN_RESULT, false);\n\n List<? extends UpgradeTask> tasks = upgrade.getUpgradeTasks();\n\n // Get MapR profile variable from Maven surfire plugin\n boo... | {
"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_559 | {
"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_acceptsDremioPlusJunk()\n throws SQLException\n {\n assertThat( uut.acceptsURL(\"jdbc:dremio:should it check this?\"),\n equalTo( true ) );\n }",
"class_method_signature": "DriverTest.test_acceptsURL_acceptsDremioPlusJunk()",
"constructor": fa... | {
"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_109 | {
"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 testDeleteSource() throws Exception {\n SourceConfig sourceConfig = new SourceConfig();\n sourceConfig.setName(\"Foopy3\");\n\n NASConf nasConfig = new NASConf();\n sourceConfig.setType(nasConfig.getType());\n nasConfig.path = \"/\";\n\n sourceConfig.setConfig(nasConf... | {
"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": "@DELETE\n @RolesAllowed(\"admin\")\n @Path(\"/{id}\")\n public Response deleteSource(@PathParam(\"id\") String id) throws NamespaceException {\n SourceConfig config = sourceService.getById(id);\n sourceService.deleteSource(config);\n return Response.ok().build();\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_666 | {
"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 testListStatusIteratorRoot() throws IOException {\n final Path root = new Path(\"/\");\n final RemoteIterator<FileStatus> statusIterator = fs.listStatusIterator(root);\n\n assertTrue(statusIterator.hasNext());\n\n final FileStatus onlyStatus = statusIterator.next();\n as... | {
"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_236 | {
"fields": [],
"file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java",
"identifier": "TestReflectionManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handleGoalTagChangedAndEntryIsInFailedState(){\n // We currently use a noop change as a work around for getting reflections out of a failed state\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HAS... | {
"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_723 | {
"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 testFailedUpdater() throws Exception {\n assumeNonMaprProfile();\n\n YarnController controller = Mockito.mock(YarnController.class);\n\n final TestListener listener = new TestListener();\n YarnService yarnService = new YarnService(listener, controller, Mockito.mock(NodeProv... | {
"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": "@Override\n public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException {\n Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING);\n return startClusterAsync(cluster);\n }",
"class_method_signature": "YarnService.startCluster(Cluster cluster)",
... | {
"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_689 | {
"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 testGetFileBlockLocationsStartGreaterThanLen() throws IOException {\n Path path = new Path(\"/foo/10.0.0.1@bar\");\n\n assertArrayEquals(new BlockLocation[]{}, fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), 4096, 8192));\n }",
"class_method_signatu... | {
"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_373 | {
"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 testFloatSpec() throws Exception{\n String columnName = \"f\";\n Float expectedValue = 1.23f;\n PartitionSpec partitionSpec = PartitionSpec\n .builderFor(schema)\n .identity(columnName)\n .build();\n\n IcebergPartitionData icebergPartitionData = new IcebergPa... | {
"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 setFloat(int position, Float value) {\n set(position, value);\n }",
"class_method_signature": "IcebergPartitionData.setFloat(int position, Float value)",
"constructor": false,
"full_signature": "public void setFloat(int position, Float value)",
"identifier": "setFloat",
"invocatio... | {
"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_261 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQuoteTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setQuote(\"\\\"\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"quote => '\\\"'\", 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_631 | {
"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 testGetAuthzHeaderValue() {\n String authzHeaderValue = authTokenProvider.getAuthzHeaderValue(prepareTestRequest());\n assertEquals(\"SharedKey mock-account:ZwovG4J+nCDc3w58WPei6fvJBQsO96YojteJncy0wwI=\", authzHeaderValue);\n }",
"class_method_signature": "TestAzureSharedKeyAu... | {
"fields": [
{
"declarator": "storageSharedKeyCredential",
"modifier": "private final",
"original_string": "private final StorageSharedKeyCredential storageSharedKeyCredential;",
"type": "StorageSharedKeyCredential",
"var_name": "storageSharedKeyCredential"
}
],
"file": "plu... | {
"body": "@Override\n public String getAuthzHeaderValue(final Request req) {\n try {\n final URL url = new URL(req.getUrl());\n final Map<String, String> headersMap = new HashMap<>();\n req.getHeaders().forEach(header -> headersMap.put(header.getKey(), header.getValue()));\n return this.stora... | {
"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_324 | {
"fields": [
{
"declarator": "N1_EP1 = newNodeEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final NodeEndpoint N1_EP1 = newNodeEndpoint(\"node1\", 30010);",
"type": "NodeEndpoint",
"var_name": "N1_EP1"
},
{
"declara... | {
"body": "@Test\n public void multiNodeClusterNonNormalizedAffinities() throws Exception {\n final Wrapper wrapper = newWrapper(2000, 1, 250,\n ImmutableList.of(\n new EndpointAffinity(N1_EP2, 15, true, 50),\n new EndpointAffinity(N2_EP2, 15, true, 50),\n new EndpointAffin... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(HardAffinityFragmentParallelizer.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = org.slf4j.LoggerFactory.getLogger(HardAffinityFragmentParallelizer.class);",
"typ... | {
"body": "@Override\n public void parallelizeFragment(final Wrapper fragmentWrapper, final ParallelizationParameters parameters,\n final Collection<NodeEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pInfo ... | {
"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_95 | {
"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 testSourceHasDefaultTTL() throws Exception {\n final String sourceName = \"src2\";\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.currentTimeMilli... | {
"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_518 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/TestPathUtils.java",
"identifier": "TestPathUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPathComponents() throws Exception {\n assertEquals(ImmutableList.of(\"a\", \"b\", \"c\"), PathUtils.toPathComponents(Path.of(\"/a/b/c\")));\n assertEquals(ImmutableList.of(\"a\", \"b\", \"c\"), PathUtils.toPathComponents(Path.of(\"a/b/c\")));\n assertEquals(ImmutableList.o... | {
"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 List<String> toPathComponents(String fsPath) {\n if (fsPath == null ) {\n return EMPTY_SCHEMA_PATHS;\n }\n\n final StrTokenizer tokenizer = new StrTokenizer(fsPath, SLASH_CHAR, SqlUtils.QUOTE).setIgnoreEmptyTokens(true);\n return tokenizer.getTokenList();\n }",
"class_meth... | {
"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_148 | {
"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 testGetQueuedTime() {\n Preconditions.checkNotNull(attemptsHelper.getQueuedTime());\n assertTrue(1L == attemptsHelper.getQueuedTime());\n }",
"class_method_signature": "TestAttemptsHelper.testGetQueuedTime()",
"constructor": false,
"full_signature": "@Test public void test... | {
"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 getQueuedTime() {\n return getDuration(State.QUEUED);\n }",
"class_method_signature": "AttemptsHelper.getQueuedTime()",
"constructor": false,
"full_signature": "public Long getQueuedTime()",
"identifier": "getQueuedTime",
"invocations": [
"getDuration"
],
"modifiers": "pub... | {
"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_133 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/admin/profile/TestHostProcessingRateUtil.java",
"identifier": "TestHostProcessingRateUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeRecordProcRateAtPhaseOperatorHostLevel() {\n int major = 1;\n int minor1 = 1;\n int minor2 = 2;\n int minor3 = 3;\n String hostname1 = \"hostname1\";\n String hostname2 = \"hostname2\";\n\n Table<Integer, Integer, String> majorMinorHostTable = HashBasedT... | {
"fields": [
{
"declarator": "TOTAL_MAX_RECORDS = \"maxRecords\"",
"modifier": "private static final",
"original_string": "private static final String TOTAL_MAX_RECORDS = \"maxRecords\";",
"type": "String",
"var_name": "TOTAL_MAX_RECORDS"
},
{
"declarator": "TOTAL_PROC... | {
"body": "public static Set<HostProcessingRate> computeRecordProcRateAtPhaseOperatorHostLevel(int major,\n List<ImmutablePair<UserBitShared.OperatorProfile, Integer>> ops,\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_426 | {
"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 testGetOption() {\n final OptionManager eagerCachingOptionManager = new EagerCachingOptionManager(optionManager);\n assertEquals(optionValueA, eagerCachingOptionManager.getOption(optionValueA.getName()));\n // getOption should not touch underlying option manager\n verify(op... | {
"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 double getOption(DoubleValidator validator) {\n return getOption(validator.getOptionName()).getFloatVal();\n }",
"class_method_signature": "EagerCachingOptionManager.getOption(DoubleValidator validator)",
"constructor": false,
"full_signature": "@Override public double getOpti... | {
"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_308 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/sabot/op/common/ht2/TestPivotDef.java",
"identifier": "TestPivotDef",
"interfaces": "",
"superclass": "extends BaseTestWithAllocator"
} | {
"body": "@Test\n public void pivotDef(){\n try(\n IntVector col1 = new IntVector(\"col1\", allocator);\n IntVector col2 = new IntVector(\"col2\", allocator);\n BigIntVector col3 = new BigIntVector(\"col3\", allocator);\n TimeMilliVector col4 = new TimeMilliVector(\"col4\", allocator)... | {
"fields": [
{
"declarator": "blockWidth",
"modifier": "private final",
"original_string": "private final int blockWidth;",
"type": "int",
"var_name": "blockWidth"
},
{
"declarator": "variableCount",
"modifier": "private final",
"original_string": "private ... | {
"body": "public PivotDef(\n int blockWidth,\n int variableCount,\n int bitCount,\n List<VectorPivotDef> fields) {\n super();\n this.blockWidth = blockWidth;\n this.variableCount = variableCount;\n this.bitCount = bitCount;\n this.vectorPivots = ImmutableList.copyOf(fields);\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_164 | {
"fields": [],
"file": "services/base-rpc/src/test/java/com/dremio/exec/rpc/TestReconnectingConnection.java",
"identifier": "TestReconnectingConnection",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ensureTimeoutFailAndRecover() {\n TestReConnection c = conn(200,100,1,\n r -> {\n wt(100);\n r.connectionFailed(FailureType.CONNECTION, new IllegalStateException());\n },\n r -> r.connectionSucceeded(newRemoteConnection())\n );\n\n c.... | {
"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_534 | {
"fields": [
{
"declarator": "arguments",
"modifier": "private final",
"original_string": "private final List<String> arguments;",
"type": "List<String>",
"var_name": "arguments"
},
{
"declarator": "maxDirectMemory",
"modifier": "private final",
"original_s... | {
"body": "@Test\n public void checkDebugEnabled() {\n assertThat(VM.isDebugEnabled(arguments), is(debugEnabled));\n }",
"class_method_signature": "TestVM.checkDebugEnabled()",
"constructor": false,
"full_signature": "@Test public void checkDebugEnabled()",
"identifier": "checkDebugEnabled",
"invocatio... | {
"fields": [
{
"declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(VM.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(VM.class);",
"type": "org.slf4j.Logger",
"var_name": "LOGGER"... | {
"body": "public static boolean isDebugEnabled() {\n return IS_DEBUG;\n }",
"class_method_signature": "VM.isDebugEnabled()",
"constructor": false,
"full_signature": "public static boolean isDebugEnabled()",
"identifier": "isDebugEnabled",
"invocations": [],
"modifiers": "public static",
"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_56 | {
"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 startsWith() throws Exception {\n final File dataFile = temp.newFile(\"startsWithTest.json\");\n try (final PrintWriter printWriter = new PrintWriter(dataFile)) {\n printWriter.append(\"{ \\\"col\\\" : \\\"amazing restaurant. Very good food.\\\" }\");\n printWriter.appe... | {
"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_471 | {
"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 testWithRoot() {\n try (\n BufferAllocator root = allocatorRule.newAllocator(\"test-memory-debug-info\", 0, 1024 * 1024);\n BufferAllocator child = root.newChildAllocator(\"child\", 0, Integer.MAX_VALUE);\n BufferAllocator grandChild1 = child.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_522 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/TestPathUtils.java",
"identifier": "TestPathUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToFSPathSkipRoot() throws Exception {\n assertEquals(Path.of(\"/b/c\"), PathUtils.toFSPathSkipRoot(Arrays.asList(\"a\", \"b\", \"c\"), \"a\"));\n assertEquals(Path.of(\"/a/b/c\"), PathUtils.toFSPathSkipRoot(Arrays.asList(\"a\", \"b\", \"c\"), \"z\"));\n assertEquals(Path.o... | {
"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 toFSPathSkipRoot(final List<String> schemaPath, final String root) {\n if (schemaPath == null || schemaPath.isEmpty()) {\n return ROOT_PATH;\n }\n if (root == null || !root.equals(schemaPath.get(0))) {\n return toFSPath(schemaPath);\n } else {\n return toFSPath... | {
"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_488 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java",
"identifier": "TestBlackListOutput",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void writeInt32() 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.writeInt32(1, 9, false);\... | {
"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 writeInt32(int fieldNumber, int value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeInt32(fieldNumber, value, repeated);\n }",
"class_method_signature": "BlackListOutput.writeInt32(int fieldNumber, int value... | {
"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_172 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": ... | {
"body": "@Test\n public void testOf() {\n //setup expected exception\n if (!valid) {\n thrown.expect(IllegalArgumentException.class);\n }\n\n KeyPair<String, String> keyPair = KeyPair.of(values);\n\n assertNotNull(keyPair);\n assertEquals(values.get(0), keyPair.getKey1());\n assertEquals(... | {
"fields": [
{
"declarator": "key1",
"modifier": "private final",
"original_string": "private final K1 key1;",
"type": "K1",
"var_name": "key1"
},
{
"declarator": "key2",
"modifier": "private final",
"original_string": "private final K2 key2;",
"type"... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K1, K2> KeyPair<K1, K2> of(List<Object> list) {\n checkArgument(list.size() == 2, \"list should be of size 2, had actually %s elements\", list);\n\n final K1 value1 = (K1) list.get(0);\n final K2 value2 = (K2) list.get(1);\n\n return new KeyPai... | {
"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_467 | {
"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 legacySystemProp() {\n String name = \"dremio_autoPort\";\n\n properties.set(name, \"true\");\n assertEquals(true, DremioConfig.create().getBoolean(DremioConfig.DEBUG_AUTOPORT_BOOL));\n }",
"class_method_signature": "TestDremioConfig.legacySystemProp()",
"constructor": fa... | {
"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_40 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/model/TestTransformBase.java",
"identifier": "TestTransformBase",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvert() throws Exception {\n TransformBase transform = new TransformField(\"source\", \"new\", false, new FieldConvertCase(LOWER_CASE).wrap());\n validate(transform);\n }",
"class_method_signature": "TestTransformBase.testConvert()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "acceptor = new Acceptor<TransformBase, TransformVisitor<?>, Transform>(){}",
"modifier": "public static final",
"original_string": "public static final Acceptor<TransformBase, TransformVisitor<?>, Transform> acceptor = new Acceptor<TransformBase, TransformVisitor<?... | {
"body": "public Transform wrap() {\n return acceptor.wrap(this);\n }",
"class_method_signature": "TransformBase.wrap()",
"constructor": false,
"full_signature": "public Transform wrap()",
"identifier": "wrap",
"invocations": [
"wrap"
],
"modifiers": "public",
"parameters": "()",
"return": ... | {
"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_719 | {
"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 testDistroHDPDefaults() 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 myCluster = cr... | {
"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_349 | {
"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 simpleSelectWithLimitWithHardScan() {\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_125 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/TestMediaTypeFilter.java",
"identifier": "TestMediaTypeFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHeaderChange() throws IOException {\n MediaTypeFilter filter = new MediaTypeFilter();\n ContainerRequest request = ContainerRequestBuilder.from(\"http://localhost/foo/bar?format=unit/test\", \"GET\", null).accept(\"random/media\").build();\n filter.filter(request);\n\n ... | {
"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_575 | {
"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_TINYINT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new TinyIntStubAccessor( (byte) 127 ) );\n assertThat( uut1.getShort( 0 ), equalTo( (short) 127 ) );\n final SqlAccessor uut2 =\n new Typ... | {
"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_17 | {
"fields": [
{
"declarator": "dacConfig = DACConfig.newDebugConfig(DremioTest.DEFAULT_SABOT_CONFIG).autoPort(true).allowTestApis(true)\n .addDefaultUser(true).serveUI(false).inMemoryStorage(false) // Need this to be a on-disk\n // kvstor... | {
"body": "@Test\n public void runWithOptions() throws Exception {\n getCurrentDremioDaemon().close();\n Clean.go(new String[] {});\n Clean.go(new String[] {\"-o\", \"-i\", \"-c\", \"-j=30\", \"-p\"});\n Clean.go(new String[] {\"-h\"});\n }",
"class_method_signature": "TestClean.runWithOptions()",
"... | {
"fields": [],
"file": "dac/daemon/src/main/java/com/dremio/dac/cmd/Clean.java",
"identifier": "Clean",
"interfaces": "",
"methods": [
{
"class_method_signature": "Clean.go(String[] args)",
"constructor": false,
"full_signature": "public static void go(String[] args)",
"identifier... | {
"body": "public static void go(String[] args) throws Exception {\n final DACConfig dacConfig = DACConfig.newConfig();\n final Options options = Options.parse(args);\n\n if(options.help) {\n return;\n }\n\n if (!dacConfig.isMaster) {\n throw new UnsupportedOperationException(\"Cleanup should... | {
"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_430 | {
"fields": [
{
"declarator": "method",
"modifier": "private final",
"original_string": "private final Method method;",
"type": "Method",
"var_name": "method"
}
],
"file": "sabot/kernel/src/test/java/com/dremio/exec/hadoop/TestFSDataInputStreamWrapper.java",
"identifier": "... | {
"body": "@Test\n public void test() throws Exception {\n Class<?> byteBufferPositionedReadableClass = getClass(\"org.apache.hadoop.fs.ByteBufferPositionedReadable\");\n\n assumeNonMaprProfile();\n final IOException ioException = new IOException(\"test io exception\");\n final FSError fsError = newFSErr... | {
"fields": [
{
"declarator": "BYTE_BUFFER_POSITIONED_READ_METHOD_NAME = \"read\"",
"modifier": "private static final",
"original_string": "private static final String BYTE_BUFFER_POSITIONED_READ_METHOD_NAME = \"read\";",
"type": "String",
"var_name": "BYTE_BUFFER_POSITIONED_READ_MET... | {
"body": "public static FSInputStream of(FSDataInputStream in) throws IOException {\n if (in.getWrappedStream() instanceof ByteBufferReadable) {\n return new FSDataInputStreamWrapper(in);\n }\n\n return new ByteArrayFSInputStream(in);\n }",
"class_method_signature": "FSDataInputStreamWrapper.of(FSDa... | {
"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_447 | {
"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 get() {\n assertEquals(instance.get(1526173261000L), 1);\n assertEquals(instance.get(1526259661000L), 2);\n assertEquals(instance.get(1526086861000L), 7);\n }",
"class_method_signature": "DayOfWeekFromSundayDateTimeFieldTest.get()",
"constructor": false,
"full_signature... | {
"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 int get(long instant) {\n return map(chronology.dayOfWeek().get(instant));\n }",
"class_method_signature": "DayOfWeekFromSundayDateTimeField.get(long instant)",
"constructor": false,
"full_signature": "@Override public int get(long instant)",
"identifier": "get",
"invocati... | {
"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_60 | {
"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 isNull() throws Exception {\n final File dataFile = temp.newFile(\"nullTest.json\");\n try (final PrintWriter printWriter = new PrintWriter(dataFile)) {\n printWriter.append(\"{ \\\"col\\\" : \\\"Los Angeles\\\" }\");\n printWriter.append(\"{ \\\"col\\\" : null }\");\n ... | {
"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_502 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java",
"identifier": "TestBlackListOutput",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void writeString() 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.writeString(1, \"1\", fa... | {
"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 writeString(int fieldNumber, String value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeString(fieldNumber, value, repeated);\n }",
"class_method_signature": "BlackListOutput.writeString(int fieldNumber, 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_152 | {
"fields": [],
"file": "services/users/src/test/java/com/dremio/service/users/TestSimpleUserService.java",
"identifier": "TestSimpleUserService",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSearch() throws Exception {\n try(final LegacyKVStoreProvider kvstore =\n LegacyKVStoreProviderAdapter.inMemory(DremioTest.CLASSPATH_SCAN_RESULT)) {\n kvstore.start();\n final SimpleUserService userGroupService = new SimpleUserService(() -> kvstore);\n initUs... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(SimpleUserService.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SimpleUserService.class);",
"type": "org.slf4j.Logge... | {
"body": "@Override\n public Iterable<? extends User> searchUsers(String searchTerm, String sortColumn, SortOrder order,\n Integer limit) throws IOException {\n limit = limit == null ? 10000 : limit;\n\n if (searchTerm == null || searchTerm.isEmpty()) {\n retu... | {
"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_294 | {
"fields": [
{
"declarator": "rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build()",
"modifier": "",
"original_string": "RpcConfig rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build();",
"type": "RpcConfig",
"var_name": "rpcConfig"
},
... | {
"body": "@Test\n public void testHandlePassesNoopTracesByDefault() throws RpcException {\n setup(false);\n\n server.handle(connection, GET_CATALOGS_VALUE, pBody, dBody, responseSender);\n\n verify(ingestor).feedWork(eq(connection), eq(GET_CATALOGS_VALUE), eq(pBody), eq(dBody), captorSender.capture());\n ... | {
"fields": [
{
"declarator": "CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\")",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\");"... | {
"body": "@Override\n protected Response handle(UserClientConnectionImpl connection, int rpcType, byte[] pBody, ByteBuf dBody)\n throws RpcException {\n // there are two #handle methods, since the other one is overridden, this is never invoked\n throw new IllegalStateException(\"UserRPCServer#handle must... | {
"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_37 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/TestDatasetVersionResource.java",
"identifier": "TestDatasetVersionResource",
"interfaces": "",
"superclass": "extends BaseTestServer"
} | {
"body": "@Test\n public void testBrokenVDSEditOriginalSQL() throws Exception {\n Dataset parentVDS = createVDS(Arrays.asList(\"dsvTest\", \"badVDSParent\"),\"select version, commit_id from sys.version\");\n parentVDS = expectSuccess(getBuilder(getPublicAPI(3).path(\"catalog\")).buildPost(Entity.json(parentVD... | {
"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_410 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/server/options/TestOptionValueProtoUtils.java",
"identifier": "TestOptionValueProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBoolOptionToProto() {\n final OptionValue option = OptionValue.createBoolean(OptionValue.OptionType.SYSTEM, \"test.option\", true);\n final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);\n assertTrue(verifyEquivalent(option, optionProto));... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/server/options/OptionValueProtoUtils.java",
"identifier": "OptionValueProtoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionValueProtoUtils.OptionValueProtoUtils()",
"constructor": true,
"full_si... | {
"body": "public static OptionValueProto toOptionValueProto(OptionValue optionValue) {\n checkArgument(optionValue.getType() == OptionValue.OptionType.SYSTEM,\n String.format(\"Invalid OptionType. OptionType must be 'SYSTEM', was given '%s'\", optionValue.getType()));\n\n final OptionValue.Kind kind = opt... | {
"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_105 | {
"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 testUpdateSource() throws Exception {\n SourceConfig sourceConfig = new SourceConfig();\n sourceConfig.setName(\"Foopy2\");\n\n NASConf nasConfig = new NASConf();\n sourceConfig.setType(nasConfig.getType());\n nasConfig.path = \"/\";\n\n sourceConfig.setConfig(nasConf... | {
"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": "@PUT\n @RolesAllowed({\"admin\"})\n @Path(\"/{id}\")\n public SourceDeprecated updateSource(@PathParam(\"id\") String id, SourceDeprecated source) {\n SourceConfig sourceConfig;\n try {\n sourceConfig = sourceService.updateSource(id, source.toSourceConfig());\n\n return fromSourceConfig(... | {
"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_555 | {
"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_connect_declinesNotQuiteDremioUrl()\n throws SQLException\n {\n assertThat( uut.connect( \"jdbc:dremio\", null ), nullValue() );\n }",
"class_method_signature": "DriverTest.test_connect_declinesNotQuiteDremioUrl()",
"constructor": false,
"full_signature": "@Test pu... | {
"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 Connection connect( String url, Properties info ) throws SQLException {\n return impl.connect( url, info );\n }",
"class_method_signature": "Driver.connect( String url, Properties info )",
"constructor": false,
"full_signature": "@Override public Connection connect( String url... | {
"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_386 | {
"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 oneOrMoreFilesOnEachHost() throws Exception {\n final List<CompleteWork> workUnits = asList(\n newWork(\"/10.0.0.1/table/foo\", 1024, ENDPOINT_1_1, 1024f/48124f),\n newWork(\"/10.0.0.1/table/bar\", 4096, ENDPOINT_1_2, 4096f/48124f),\n newWork(\"/10.0.0.1/table/f... | {
"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_693 | {
"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 testCanonicalizeDirectoryFile() throws IOException {\n Path path = new Path(\"/foo/bar\");\n\n Path resolvedPath = fs.canonicalizePath(path);\n assertEquals(new Path(\"/foo/bar\"), resolvedPath);\n }",
"class_method_signature": "TestPseudoDistributedFileSystem.testCanonical... | {
"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 Path canonicalizePath(Path p) throws IOException {\n Path absolutePath = toAbsolutePath(p);\n checkPath(absolutePath);\n\n if (isRemoteFile(absolutePath)) {\n return absolutePath;\n }\n\n if (isDirectory(absolutePath)) {\n return absolutePath;\n }\n\n if (... | {
"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_369 | {
"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 testIntSpec() throws Exception{\n String columnName = \"i\";\n Integer expectedValue = 12322;\n PartitionSpec partitionSpec = PartitionSpec\n .builderFor(schema)\n .identity(columnName)\n .build();\n\n IcebergPartitionData icebergPartitionData = new IcebergPa... | {
"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 setInteger(int position, Integer value) {\n set(position, value);\n }",
"class_method_signature": "IcebergPartitionData.setInteger(int position, Integer value)",
"constructor": false,
"full_signature": "public void setInteger(int position, Integer value)",
"identifier": "setInteger"... | {
"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_406 | {
"fields": [
{
"declarator": "TIMEOUT = TestTools.getTimeoutRule(90, TimeUnit.SECONDS)",
"modifier": "@Rule public final",
"original_string": "@Rule public final TestRule TIMEOUT = TestTools.getTimeoutRule(90, TimeUnit.SECONDS);",
"type": "TestRule",
"var_name": "TIMEOUT"
}
],... | {
"body": "@Test\n public void testReadIntoArrowBuf() throws Exception {\n try (final ArrowBuf buffer = allocator.buffer(256)) {\n final InputStream inputStream = mock(InputStream.class);\n when(inputStream.read(any(byte[].class))).thenReturn(0);\n readIntoArrowBuf(inputStream, buffer, 0);\n a... | {
"fields": [
{
"declarator": "WRITER_TIMER = Metrics.newTimer(Metrics.join(VectorAccessibleSerializable.class.getName(), \"writerTime\"), ResetType.NEVER)",
"modifier": "private static final",
"original_string": "private static final Timer WRITER_TIMER = Metrics.newTimer(Metrics.join(VectorAcce... | {
"body": "public static void readIntoArrowBuf(InputStream inputStream, ArrowBuf outputBuffer, long numBytesToRead)\n throws IOException {\n// Disabling direct reads for this since we have to be careful to avoid issues with compatibilityutil where it caches failure or success in direct reading. Direct reading w... | {
"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_21 | {
"fields": [
{
"declarator": "HOSTNAME = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String HOSTNAME = \"localhost\";",
"type": "String",
"var_name": "HOSTNAME"
},
{
"declarator": "THREAD_COUNT = 2",
"modifier": "p... | {
"body": "@Test\n public void refreshSystemPluginsTest() throws Exception {\n\n SystemStoragePluginInitializer systemInitializer = new SystemStoragePluginInitializer();\n\n SourceConfig c = new SourceConfig();\n InternalFileConf conf = new InternalFileConf();\n conf.connection = \"classpath:///\";\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(SystemStoragePluginInitializer.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemStoragePluginInitializer.class);",
... | {
"body": "@VisibleForTesting\n void createOrUpdateSystemSource(final CatalogService catalogService, final NamespaceService ns, final\n SourceConfig config) throws Exception {\n try {\n config.setAllowCrossSourceSelection(true);\n final boolean isCreated = catalogService.createSourceIfMissingWithThrow(... | {
"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_543 | {
"fields": [
{
"declarator": "NON_NULL_VALUE = \"Non-null value\"",
"modifier": "public static final",
"original_string": "public static final Object NON_NULL_VALUE = \"Non-null value\";",
"type": "Object",
"var_name": "NON_NULL_VALUE"
},
{
"declarator": "genericAccess... | {
"body": "@Test\n public void testIsNull() throws Exception {\n assertFalse(genericAccessor.isNull(0));\n assertTrue(genericAccessor.isNull(1));\n }",
"class_method_signature": "GenericAccessorTest.testIsNull()",
"constructor": false,
"full_signature": "@Test public void testIsNull()",
"identifier": ... | {
"fields": [
{
"declarator": "v",
"modifier": "private",
"original_string": "private ValueVector v;",
"type": "ValueVector",
"var_name": "v"
}
],
"file": "client/jdbc/src/main/java/com/dremio/exec/vector/accessor/GenericAccessor.java",
"identifier": "GenericAccessor",
"i... | {
"body": "@Override\n public boolean isNull(int index) {\n return v.isNull(index);\n }",
"class_method_signature": "GenericAccessor.isNull(int index)",
"constructor": false,
"full_signature": "@Override public boolean isNull(int index)",
"identifier": "isNull",
"invocations": [
"isNull"
],
"mo... | {
"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_113 | {
"fields": [
{
"declarator": "PATH = \"/cluster/stats\"",
"modifier": "private static final",
"original_string": "private static final String PATH = \"/cluster/stats\";",
"type": "String",
"var_name": "PATH"
}
],
"file": "dac/backend/src/test/java/com/dremio/dac/api/TestClus... | {
"body": "@Test\n public void testListSources() throws Exception {\n ClusterStatsResource.ClusterStats stats = expectSuccess(getBuilder(getPublicAPI(3).path(PATH)).buildGet(), ClusterStatsResource.ClusterStats.class);\n assertNotNull(stats);\n assertEquals(stats.getSources().size(), newSourceService().getS... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(ClusterStatsResource.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(ClusterStatsResource.class);",
"type": "Logger",
"var_name": "logger"
... | {
"body": "@VisibleForTesting\n public static Stats getSources(List<SourceConfig> allSources, SabotContext context){\n\n final Stats resource = new Stats();\n\n for (SourceConfig sourceConfig : allSources) {\n int pdsCount = -1;\n\n String type = sourceConfig.getType();\n\n if(type == null && s... | {
"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_390 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/store/parquet/TestManagedSchemaField.java",
"identifier": "TestManagedSchemaField",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsTextField() {\n ManagedSchemaField varcharField = ManagedSchemaField.newFixedLenField(\"varchar_col\", \"varchar(20)\", 20, 0);\n assertTrue(varcharField.isTextField());\n\n ManagedSchemaField charField = ManagedSchemaField.newFixedLenField(\"char_col\", \"char(20)\", 20... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
... | {
"body": "public boolean isTextField() {\n return isTextFieldType(type);\n }",
"class_method_signature": "ManagedSchemaField.isTextField()",
"constructor": false,
"full_signature": "public boolean isTextField()",
"identifier": "isTextField",
"invocations": [
"isTextFieldType"
],
"modifiers": "p... | {
"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_685 | {
"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 testRenameFileSameEndpoint() throws IOException {\n doReturn(true).when(mockLocalFS).rename(\n new Path(\"/foo/bar/file1\"),\n new Path(\"/foo/bar/file3\"));\n\n Path src = new Path(\"/foo/bar/10.0.0.1@file1\");\n Path dst = new Path(\"/foo/bar/10.0.0.1@file3\");... | {
"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_76 | {
"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 ruleSuggestionsSelStateAtTheEnd() {\n Selection selection = new Selection(\"col\", \"883 N Shoreline Blvd., Mountain View, CA 94043\", 38, 2);\n List<ExtractRule> rules = recommender.getRules(selection, TEXT);\n assertEquals(4, rules.size());\n comparePattern(\"\\\\w+\", 6,... | {
"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_451 | {
"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 getAsShortTextFieldValue() {\n assertTrue(\"Sun\".equalsIgnoreCase(instance.getAsShortText(1, Locale.getDefault())));\n assertTrue(\"Mon\".equalsIgnoreCase(instance.getAsShortText(2, Locale.getDefault())));\n assertTrue(\"Sat\".equalsIgnoreCase(instance.getAsShortText(7, Local... | {
"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 getAsShortText(int fieldValue, Locale locale) {\n return chronology.dayOfWeek().getAsShortText(reverse(fieldValue), locale);\n }",
"class_method_signature": "DayOfWeekFromSundayDateTimeField.getAsShortText(int fieldValue, Locale locale)",
"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_144 | {
"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 testGetPendingTime() {\n Preconditions.checkNotNull(attemptsHelper.getPendingTime());\n assertTrue(1L == attemptsHelper.getPendingTime());\n }",
"class_method_signature": "TestAttemptsHelper.testGetPendingTime()",
"constructor": false,
"full_signature": "@Test public void ... | {
"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 getPendingTime() {\n return getDuration(State.PENDING);\n }",
"class_method_signature": "AttemptsHelper.getPendingTime()",
"constructor": false,
"full_signature": "public Long getPendingTime()",
"identifier": "getPendingTime",
"invocations": [
"getDuration"
],
"modifiers":... | {
"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_514 | {
"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 testWrite() throws IOException {\n // Arrange\n\n // Act\n OptimisticByteOutput byteOutput = new OptimisticByteOutput(smallData.length);\n for (byte b : smallData) {\n byteOutput.write(b);\n }\n byte[] outputData = byteOutput.toByteArray();\n\n // Assert\n ... | {
"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": "@Override\n public void write(byte value) {\n checkArray();\n arrayReference[arrayOffset++] = value;\n }",
"class_method_signature": "OptimisticByteOutput.write(byte value)",
"constructor": false,
"full_signature": "@Override public void write(byte value)",
"identifier": "write",
"invocat... | {
"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_99 | {
"fields": [
{
"declarator": "REFLECTIONS_PATH = \"/reflection/\"",
"modifier": "private static final",
"original_string": "private static final String REFLECTIONS_PATH = \"/reflection/\";",
"type": "String",
"var_name": "REFLECTIONS_PATH"
},
{
"declarator": "CATALOG_P... | {
"body": "@Test\n public void testGetReflection() {\n Reflection newReflection = createReflection();\n Reflection response = expectSuccess(getBuilder(getPublicAPI(3).path(REFLECTIONS_PATH)).buildPost(Entity.entity(newReflection, JSON)), Reflection.class);\n\n Reflection response2 = expectSuccess(getBuilder... | {
"fields": [
{
"declarator": "reflectionServiceHelper",
"modifier": "private final",
"original_string": "private final ReflectionServiceHelper reflectionServiceHelper;",
"type": "ReflectionServiceHelper",
"var_name": "reflectionServiceHelper"
},
{
"declarator": "catalo... | {
"body": "@GET\n @Path(\"/{id}\")\n public Reflection getReflection(@PathParam(\"id\") String id) {\n Optional<ReflectionGoal> goal = reflectionServiceHelper.getReflectionById(id);\n\n if (!goal.isPresent()) {\n throw new ReflectionNotFound(id);\n }\n\n String reflectionId = goal.get().getId().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_282 | {
"fields": [],
"file": "services/exec-selector/src/test/java/com/dremio/service/execselector/TestQueueProcessor.java",
"identifier": "TestQueueProcessor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQueueProcessor() throws Exception {\n Pointer<Long> counter = new Pointer<>(0L);\n final ReentrantReadWriteLock rwlock = new ReentrantReadWriteLock();\n Lock readLock = rwlock.readLock();\n Lock writeLock = rwlock.writeLock();\n\n QueueProcessor<Long> qp = new QueueP... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(QueueProcessor.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(QueueProcessor.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public QueueProcessor(String name, Supplier<AutoCloseableLock> lockSupplier, Consumer<T> consumer) {\n this.name = name;\n this.lockSupplier = lockSupplier;\n this.consumer = consumer;\n this.queue = new LinkedBlockingQueue<>();\n this.workerThread = null;\n this.isClosed = false;\n th... | {
"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_328 | {
"fields": [
{
"declarator": "converter",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SqlConverter converter;",
"type": "SqlConverter",
"var_name": "converter"
},
{
"declarator": "session",
"modifier": "@Mock\n private",
"original_... | {
"body": "@Test\n public void testListDiscardsGivenExclusions() {\n when(excluded.getMaterializationFor(converter)).thenReturn(relOptMat1);\n when(excluded.getLayoutId()).thenReturn(\"rid-1\");\n when(included.getMaterializationFor(converter)).thenReturn(relOptMat2);\n when(included.getLayoutId()).thenR... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MaterializationList.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MaterializationList.class);",
"type": "org.slf4j.L... | {
"body": "@VisibleForTesting\n protected List<DremioMaterialization> build(final MaterializationDescriptorProvider provider) {\n final Set<String> exclusions = Sets.newHashSet(session.getSubstitutionSettings().getExclusions());\n final Set<String> inclusions = Sets.newHashSet(session.getSubstitutionSettings()... | {
"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_580 | {
"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_getShort_on_BIGINT_thatOverflows_throws()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new BigIntStubAccessor( 65535 ) );\n try {\n uut.getShort( 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 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_703 | {
"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 validateZipDirectoryValidUpdirMoreTheCorrectDir() throws IOException {\n ZipEntry entry = new ZipEntry(\"../../../../../tmpDir/somedir/somefile\");\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry);\n NativeLibPluginClassLoader.validateZipDirectory(mockTemp... | {
"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_353 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
},
{
"declarator"... | {
"body": "@Test\n public void testDictionaryFileName() throws Exception {\n assertEquals(\"_foo.dict\", GlobalDictionaryBuilder.dictionaryFileName(\"foo\"));\n assertEquals(\"_a.b.c.dict\", GlobalDictionaryBuilder.dictionaryFileName(\"a.b.c\"));\n assertEquals(\"_foo.dict\", GlobalDictionaryBuilder.diction... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(GlobalDictionaryBuilder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(GlobalDictionaryBuilder.class);",
"type": "org... | {
"body": "public static String dictionaryFileName(String columnFullPath) {\n return format(\"_%s.%s\", columnFullPath, DICTIONARY_FILES_EXTENSION);\n }",
"class_method_signature": "GlobalDictionaryBuilder.dictionaryFileName(String columnFullPath)",
"constructor": false,
"full_signature": "public static 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_646 | {
"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 testDeleteWithInvalidPath() throws Exception {\n setupRPC(\n DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath(\"/foo/bar\").setRecursive(true).build(),\n DFS.DeleteResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException(\"File not fo... | {
"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_216 | {
"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 testValidateOptionsConflictWithIndex() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{indexPutOption, createOption, versionOption});\n }",
"class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsConflictW... | {
"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_538 | {
"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 testGetTime() throws Exception {\n assertEquals(\n new TimePrintMillis(LocalDateTime.of(LocalDate.now(), LocalTime.of(8, 14, 07, (int)TimeUnit.MILLISECONDS.toNanos(234)))),\n accessor.getTime(0, PST_CALENDAR));\n assertEquals(new TimePrintMillis(NON_NULL_VALUE), accesso... | {
"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_492 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java",
"identifier": "TestBlackListOutput",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void writeSFixed32() 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.writeSFixed32(1, 9, fa... | {
"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 writeSFixed32(int fieldNumber, int value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeSFixed32(fieldNumber, value, repeated);\n }",
"class_method_signature": "BlackListOutput.writeSFixed32(int fieldNumber, ... | {
"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_168 | {
"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 testNullException() throws Exception {\n RpcException.propagateIfPossible(null, Exception.class);\n }",
"class_method_signature": "TestRpcException.testNullException()",
"constructor": false,
"full_signature": "@Test public void testNullException()",
"identifier": "testNull... | {
"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_187 | {
"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 testEqualsReturnsFalseWithNestedProtoObjectsDifferentUUID() {\n assertFalse(KeyUtils.equals(\n new KeyTriple<>(\n new KeyPair<>(PROTOBUFF_ORIGINAL_STRING, UUID.randomUUID()),\n new KeyTriple<>(\"Some string\", PROTOBUFF_ORIGINAL_STRING, UUID.randomUUID()),\n ... | {
"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_304 | {
"fields": [
{
"declarator": "WORD_BITS = 64",
"modifier": "private static final",
"original_string": "private static final int WORD_BITS = 64;",
"type": "int",
"var_name": "WORD_BITS"
}
],
"file": "sabot/kernel/src/test/java/com/dremio/sabot/op/join/vhash/TestMatchBitSet.ja... | {
"body": "@Test\n public void fullBits() throws Exception {\n final int count = 256*1024;\n BitSet bitSet = new BitSet(count);\n try (MatchBitSet matchBitSet = new MatchBitSet(count, allocator)) {\n for (int i = 0; i < count; i++) {\n bitSet.set(i);\n matchBitSet.set(i);\n }\n\n ... | {
"fields": [
{
"declarator": "LONG_TO_BITS_SHIFT = 6",
"modifier": "private final static",
"original_string": "private final static int LONG_TO_BITS_SHIFT = 6;",
"type": "int",
"var_name": "LONG_TO_BITS_SHIFT"
},
{
"declarator": "BIT_OFFSET_MUSK = (1 << LONG_TO_BITS_SH... | {
"body": "public void set(final int index) {\n final int wordNum = index >>> LONG_TO_BITS_SHIFT;\n final int bit = index & BIT_OFFSET_MUSK;\n final long bitMask = 1L << bit;\n\n final long wordAddr = bufferAddr + wordNum * BYTES_PER_WORD;\n PlatformDependent.putLong(wordAddr, PlatformDependent.getLong... | {
"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_241 | {
"fields": [],
"file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java",
"identifier": "TestReflectionGoalChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMatchesTag() {\n final String testTag = \"testTag\";\n final ReflectionGoal goal = ReflectionGoal.getDefaultInstance().newMessage()\n .setTag(testTag);\n assertTrue(ReflectionGoalChecker.checkGoal(goal, new ReflectionEntry().setGoalVersion(testTag)));\n }",
"class_... | {
"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_611 | {
"fields": [
{
"declarator": "ENDPOINT = \"endpoint\"",
"modifier": "public static final",
"original_string": "public static final String ENDPOINT = \"endpoint\";",
"type": "String",
"var_name": "ENDPOINT"
},
{
"declarator": "CLIEN_ID = \"clienId\"",
"modifier": ... | {
"body": "@Test\n public void testAzureOauthCopyWithAccountProperties() {\n DremioFileSystem fileSystem = new DremioFileSystem();\n Configuration conf = new Configuration();\n conf.set(FS_AZURE_ACCOUNT_OAUTH_CLIENT_ENDPOINT + \".testAccount\", ENDPOINT);\n conf.set(FS_AZURE_ACCOUNT_OAUTH_CLIENT_ID + \".... | {
"fields": [
{
"declarator": "FS_S3A_BUCKET = \"fs.s3a.bucket.\"",
"modifier": "private static final",
"original_string": "private static final String FS_S3A_BUCKET = \"fs.s3a.bucket.\";",
"type": "String",
"var_name": "FS_S3A_BUCKET"
},
{
"declarator": "FS_S3A_AWS_CRE... | {
"body": "void updateOAuthConfig(Configuration conf, String accountName, String accountNameWithoutSuffix) {\n final String CLIENT_ID = \"dremio.azure.clientId\";\n final String TOKEN_ENDPOINT = \"dremio.azure.tokenEndpoint\";\n final String CLIENT_SECRET = \"dremio.azure.clientSecret\";\n String refreshT... | {
"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_484 | {
"fields": [
{
"declarator": "TEST_WORK_NAME = \"span-test-work\"",
"modifier": "private static",
"original_string": "private static String TEST_WORK_NAME = \"span-test-work\";",
"type": "String",
"var_name": "TEST_WORK_NAME"
},
{
"declarator": "tracer = new MockTracer... | {
"body": "@Test\n public void testRunnableDecoration() throws InterruptedException, ExecutionException {\n Span[] runnableSpan = new Span[1];\n\n try (Scope s = tracer.activateSpan(testSpan)) {\n Future<?> future = pool.submit(() -> {\n runnableSpan[0] = tracer.activeSpan();\n });\n futu... | {
"fields": [
{
"declarator": "WORK_OPERATION_NAME = \"thread-pool-work\"",
"modifier": "public static final",
"original_string": "public static final String WORK_OPERATION_NAME = \"thread-pool-work\";",
"type": "String",
"var_name": "WORK_OPERATION_NAME"
},
{
"declarat... | {
"body": "@Override\n public <T> Future<T> submit(Callable<T> task) {\n return delegate.submit(decorate(task));\n }",
"class_method_signature": "ContextMigratingExecutorService.submit(Callable<T> task)",
"constructor": false,
"full_signature": "@Override public Future<T> submit(Callable<T> task)",
"iden... | {
"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_191 | {
"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 testToStringProtoStringBytesKeyPair() {\n assertEquals(\"KeyPair{ key1=somestring, key2=[1, 23, 43, 5]}\", KeyUtils.toString(\n new KeyPair<>(\"somestring\", new byte[]{1, 23, 43, 5})));\n }",
"class_method_signature": "KeyUtilsTest.testToStringProtoStringBytesKeyPair()",
... | {
"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_312 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/rpc/TestRpcCompatibilityEncoder.java",
"identifier": "TestRpcCompatibilityEncoder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIgnoreNonDremioPBErrorMessage() throws Exception {\n RpcCompatibilityEncoder encoder = new RpcCompatibilityEncoder();\n ChannelHandlerContext context = mock(ChannelHandlerContext.class);\n\n OutboundRpcMessage message = new OutboundRpcMessage(RpcMode.RESPONSE_FAILURE, 0, 0... | {
"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_607 | {
"fields": [],
"file": "plugins/hive/src/test/java/com/dremio/exec/store/hive/metadata/TestDictionaryBuilder.java",
"identifier": "TestDictionaryBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmpty() {\n DictionaryBuilder<String> builder = new DictionaryBuilder<>(String.class);\n Iterator<String> iterator = builder.build().iterator();\n assertFalse(iterator.hasNext());\n }",
"class_method_signature": "TestDictionaryBuilder.testEmpty()",
"constructor": fals... | {
"fields": [
{
"declarator": "DEFAULT_VALUE = -1",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_VALUE = -1;",
"type": "int",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "valueAccumulator",
"modifier": "private final"... | {
"body": "public Iterable<T> build() {\n Preconditions.checkArgument(!isBuilt, \"build can only be called once\");\n isBuilt = true;\n\n if (valueAccumulator.isEmpty()) {\n return Collections.emptyList();\n }\n\n final T[] values = ObjectArrays.newArray(clazzType, valueAccumulator.size());\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_257 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLineDelimiterTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setLineDelimiter(\"\\t\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"lineDelimiter => '\\t'\", tableOptions);\n }",
"class_method... | {
"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_579 | {
"fields": [],
"file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java",
"identifier": "TypeConvertingSqlAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getShort_BIGINT_thatFits_getsIt() throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new BigIntStubAccessor( -32678 ) );\n assertThat( uut.getShort( 0 ), equalTo( (short) -32678 ) );\n }",
"class_method_signature": "TypeConve... | {
"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_129 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/server/TestJSONPrettyPrintFilter.java",
"identifier": "TestJSONPrettyPrintFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJSONGeneratorConfigured() throws IOException {\n JSONPrettyPrintFilter filter = new JSONPrettyPrintFilter();\n ContainerRequest request = ContainerRequestBuilder.from(\"http://localhost/foo/bar?pretty\", \"GET\", null).accept(\"random/media\").build();\n ContainerResponse ... | {
"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_596 | {
"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_INTEGER_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new IntegerStubAccessor( 2147483647 ) );\n assertThat( uut1.getLong( 0 ), equalTo( 2147483647L ) );\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_345 | {
"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 simpleSelectNoLimit() {\n Prel input =\n newScreen(\n newProject(exprs(), rowType(),\n newUnionExchange(\n newProject(exprs(), rowType(),\n newSoftScan(rowType())\n )\n )\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_715 | {
"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 testStartCluster() 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 Cluster... | {
"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": "@Override\n public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException {\n Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING);\n return startClusterAsync(cluster);\n }",
"class_method_signature": "YarnService.startCluster(Cluster cluster)",
... | {
"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_200 | {
"fields": [
{
"declarator": "storeName = \"test-store\"",
"modifier": "private static final",
"original_string": "private static final String storeName = \"test-store\";",
"type": "String",
"var_name": "storeName"
},
{
"declarator": "one = \"one\".getBytes(StandardCha... | {
"body": "@Test\n public void delete() throws Exception {\n LuceneSearchIndex index = mock(LuceneSearchIndex.class);\n final boolean[] deleted = {false};\n doAnswer(invocation -> {\n deleted[0] = true;\n return null;\n }).when(index).deleteDocuments(any(Term.class));\n when(indexManager.get... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReIndexer.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReIndexer.class);",
"type": "org.slf4j.Logger",
"var_n... | {
"body": "@Override\n public void delete(String tableName, byte[] key) {\n if (!isIndexed(tableName)) {\n logger.trace(\"Ignoring delete: {} on table '{}'\", key, tableName);\n return;\n }\n\n indexManager.getIndex(tableName)\n .deleteDocuments(keyAsTerm(keyTuple(tableName, key)));\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_650 | {
"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 testRenameWithValidPath() throws Exception {\n setupRPC(\n DFS.RpcType.RENAME_REQUEST, DFS.RenameRequest.newBuilder().setOldpath(\"/foo/bar\").setNewpath(\"/foo/bar2\").build(),\n DFS.RpcType.RENAME_RESPONSE, DFS.RenameResponse.newBuilder().setValue(true).build());\n\n... | {
"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 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 final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath(... | {
"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_501 | {
"fields": [],
"file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java",
"identifier": "TestBlackListOutput",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void writeEnum() 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.writeEnum(1, 1, false);\n ... | {
"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 writeEnum(int fieldNumber, int value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeEnum(fieldNumber, value, repeated);\n }",
"class_method_signature": "BlackListOutput.writeEnum(int fieldNumber, int value, b... | {
"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_151 | {
"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 testGetRunningTime() {\n Preconditions.checkNotNull(attemptsHelper.getRunningTime());\n assertTrue(1L == attemptsHelper.getRunningTime());\n }",
"class_method_signature": "TestAttemptsHelper.testGetRunningTime()",
"constructor": false,
"full_signature": "@Test public void ... | {
"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 getRunningTime() { return getDuration(State.RUNNING);\n }",
"class_method_signature": "AttemptsHelper.getRunningTime()",
"constructor": false,
"full_signature": "public Long getRunningTime()",
"identifier": "getRunningTime",
"invocations": [
"getDuration"
],
"modifiers": "pub... | {
"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_444 | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestCatalogServiceImpl.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestCatalogServiceImpl.class);",
"type": "org.s... | {
"body": "@Test\n public void refreshSourceMetadata_FirstTime_UpdateWithNewDatasets() throws Exception {\n doMockDatasets(mockUpPlugin, mockDatasets);\n catalogService.refreshSource(mockUpKey, CatalogService.REFRESH_EVERYTHING_NOW, CatalogServiceImpl.UpdateType.FULL);\n catalogService.refreshSource(mockUpK... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(CatalogServiceImpl.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(CatalogServiceImpl.class);",
"type": "org.slf4j.Log... | {
"body": "@VisibleForTesting\n public boolean refreshSource(NamespaceKey source, MetadataPolicy metadataPolicy, UpdateType updateType) throws NamespaceException {\n ManagedStoragePlugin plugin = getPlugins().get(source.getRoot());\n if (plugin == null){\n throw UserException.validationError().message(\"U... | {
"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_63 | {
"fields": [
{
"declarator": "recommender = new SplitRecommender()",
"modifier": "private",
"original_string": "private SplitRecommender recommender = new SplitRecommender();",
"type": "SplitRecommender",
"var_name": "recommender"
}
],
"file": "dac/backend/src/test/java/com/... | {
"body": "@Test\n public void splitListCardGen() throws Exception {\n File dataFile = temp.newFile(\"splitExact.json\");\n try (PrintWriter writer = new PrintWriter(dataFile)) {\n writer.append(\"{ \\\"col\\\" : \\\"aBa\\\" }\");\n writer.append(\"{ \\\"col\\\" : \\\"abaBa\\\" }\");\n writer.ap... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(SplitRecommender.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(SplitRecommender.class);",
"type": "Logger",
"var_name": "logger"
}
],
... | {
"body": "public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) {\n return new SplitTransformRuleWrapper(rule);\n }",
"class_method_signature": "SplitRecommender.wrapRule(SplitRule rule)",
"constructor": false,
"full_signature": "public TransformRuleWrapper<SplitRule> wrapRule(SplitRule 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_297 | {
"fields": [
{
"declarator": "rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build()",
"modifier": "",
"original_string": "RpcConfig rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build();",
"type": "RpcConfig",
"var_name": "rpcConfig"
},
... | {
"body": "@Test\n public void testHandleFinishesSpanIfFeedFailure() throws RpcException {\n WorkIngestor ingest = (con, rpc, pb, db, sender) -> { throw new RpcException(); };\n setup(ingest, true);\n\n try {\n server.handle(connection, CANCEL_QUERY_VALUE, pBody, dBody, responseSender);\n } catch (R... | {
"fields": [
{
"declarator": "CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\")",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\");"... | {
"body": "@Override\n protected Response handle(UserClientConnectionImpl connection, int rpcType, byte[] pBody, ByteBuf dBody)\n throws RpcException {\n // there are two #handle methods, since the other one is overridden, this is never invoked\n throw new IllegalStateException(\"UserRPCServer#handle must... | {
"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_278 | {
"fields": [],
"file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java",
"identifier": "TestFileFormat",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHasMergedCellsXlsFile() throws Exception {\n XlsFileConfig fileFormat = new XlsFileConfig();\n fileFormat.setHasMergedCells(true);\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'excel'\", tableOptions);\n assertContains(\"xls => true... | {
"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_628 | {
"fields": [],
"file": "plugins/azure/src/test/java/com/dremio/plugins/azure/TestAzureAsyncContainerProvider.java",
"identifier": "TestAzureAsyncContainerProvider",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDoesContainerExistsNotFound() throws ExecutionException, InterruptedException {\n AzureStorageFileSystem parentClass = mock(AzureStorageFileSystem.class);\n AzureAuthTokenProvider authTokenProvider = getMockAuthTokenProvider();\n AsyncHttpClient client = mock(AsyncHttpClie... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class);",
"type": "Logger",
"var_name"... | {
"body": "@Override\n public void assertContainerExists(final String containerName) {\n // API: https://docs.microsoft.com/en-gb/rest/api/storageservices/datalakestoragegen2/filesystem/getproperties\n logger.debug(\"Checking for missing azure container \" + account + \":\" + containerName);\n final Request... | {
"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_106 | {
"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 testUpdateSourceErrors() throws Exception {\n SourceConfig sourceConfig = new SourceConfig();\n sourceConfig.setName(\"Foopy5\");\n NASConf nasConfig = new NASConf();\n sourceConfig.setType(nasConfig.getType());\n nasConfig.path = \"/\";\n\n sourceConfig.setConfig(nas... | {
"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": "@DELETE\n @RolesAllowed(\"admin\")\n @Path(\"/{id}\")\n public Response deleteSource(@PathParam(\"id\") String id) throws NamespaceException {\n SourceConfig config = sourceService.getById(id);\n sourceService.deleteSource(config);\n return Response.ok().build();\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_556 | {
"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": "@Ignore( \"Just hangs, trying to connect to non-existent local zookeeper.\" )\n @Test\n public void test_connect_acceptsMinimalDremioJdbcUrl()\n throws SQLException\n {\n assertThat( uut.connect( \"jdbc:dremio:\", null ), nullValue() );\n fail( \"Not implemented yet\" );\n }",
"class_metho... | {
"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 Connection connect( String url, Properties info ) throws SQLException {\n return impl.connect( url, info );\n }",
"class_method_signature": "Driver.connect( String url, Properties info )",
"constructor": false,
"full_signature": "@Override public Connection connect( String url... | {
"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_34 | {
"fields": [],
"file": "dac/backend/src/test/java/com/dremio/dac/explore/TestJSONElementLocator.java",
"identifier": "TestJSONElementLocator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseJsonPath3() throws Exception {\n JsonPath p = JSONElementLocator.parsePath(\"value[0][1][2]\");\n assertEquals(p.toString(), 3, p.size());\n assertEquals(new JsonPath(new ArrayJsonPathElement(0), new ArrayJsonPathElement(1), new ArrayJsonPathElement(2)), p);\n }",
... | {
"fields": [
{
"declarator": "cellText",
"modifier": "private final",
"original_string": "private final String cellText;",
"type": "String",
"var_name": "cellText"
},
{
"declarator": "parser",
"modifier": "private",
"original_string": "private JsonParser pa... | {
"body": "public static JsonPath parsePath(String path) {\n if (path.startsWith(VALUE_PLACEHOLDER)) {\n return new JsonPath(path.substring(VALUE_PLACEHOLDER.length()));\n }\n throw new IllegalArgumentException(path + \" must start with 'value'\");\n }",
"class_method_signature": "JSONElementLocator.... | {
"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_413 | {
"fields": [],
"file": "sabot/kernel/src/test/java/com/dremio/exec/server/options/TestOptionValueProtoUtils.java",
"identifier": "TestOptionValueProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDoubleOptionToProto() {\n final OptionValue option = OptionValue.createDouble(OptionValue.OptionType.SYSTEM, \"test.option\", 1234.1234);\n final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);\n assertTrue(verifyEquivalent(option, optionPr... | {
"fields": [],
"file": "sabot/kernel/src/main/java/com/dremio/exec/server/options/OptionValueProtoUtils.java",
"identifier": "OptionValueProtoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "OptionValueProtoUtils.OptionValueProtoUtils()",
"constructor": true,
"full_si... | {
"body": "public static OptionValueProto toOptionValueProto(OptionValue optionValue) {\n checkArgument(optionValue.getType() == OptionValue.OptionType.SYSTEM,\n String.format(\"Invalid OptionType. OptionType must be 'SYSTEM', was given '%s'\", optionValue.getType()));\n\n final OptionValue.Kind kind = opt... | {
"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.