id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
124004218_84 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testBooleanType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"booleanKey\", new BsonBoolean(true));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMapReaderI... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_10 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void simpleCase1() throws Exception {\n final Wrapper wrapper = newWrapper(200, 1, 20, Collections.singletonList(new EndpointAffinity(N1_EP1, 1.0, true, MAX_VALUE)));\n INSTANCE.parallelizeFragment(wrapper, newParameters(SLICE_TARGET_DEFAULT, 5, 20), null);\n\n // Expect the fragme... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_51 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/work/metadata/TestMetadataProvider.java",
"identifier": "TestMetadataProvider",
"interfaces": "",
"superclass": "extends BaseTestQuery"
} | {
"body": "@Test\n public void tables() throws Exception {\n // test(\"SELECT * FROM INFORMATION_SCHEMA.`TABLES`\"); // SQL equivalent\n\n GetTablesResp resp = client.getTables(null, null, null, null).get();\n\n assertEquals(RequestStatus.OK, resp.getStatus());\n List<TableMetadata> tables = resp.getTabl... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class);",
"type": "org.slf4j.Logger"... | {
"body": "public static Runnable tables(final UserSession session, final DrillbitContext dContext,\n final GetTablesReq req, final ResponseSender responseSender) {\n return new TablesProvider(session, dContext, req, responseSender);\n }",
"class_method_signature": "MetadataProvider.tables(final UserSessio... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_9 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/planner/logical/DrillOptiqTest.java",
"identifier": "DrillOptiqTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnsupportedRexNode() {\n try {\n // Create the data type factory.\n RelDataTypeFactory relFactory = new SqlTypeFactoryImpl(DrillRelDataTypeSystem.DRILL_REL_DATATYPE_SYSTEM);\n // Create the rex builder\n RexBuilder rex = new RexBuilder(relFactory);\n Rel... | {
"fields": [
{
"declarator": "UNSUPPORTED_REX_NODE_ERROR = \"Cannot convert RexNode to equivalent Drill expression. \"",
"modifier": "public static final",
"original_string": "public static final String UNSUPPORTED_REX_NODE_ERROR = \"Cannot convert RexNode to equivalent Drill expression. \";",
... | {
"body": "public static LogicalExpression toDrill(DrillParseContext context, RelNode input, RexNode expr) {\n return toDrill(context, Lists.newArrayList(input), expr);\n }",
"class_method_signature": "DrillOptiq.toDrill(DrillParseContext context, RelNode input, RexNode expr)",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_71 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/store/dfs/TestFormatPluginOptionExtractor.java",
"identifier": "TestFormatPluginOptionExtractor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() {\n DrillConfig config = DrillConfig.create();\n ScanResult scanResult = RunTimeScan.fromPrescan(config);\n FormatPluginOptionExtractor e = new FormatPluginOptionExtractor(scanResult);\n Collection<FormatPluginOptionsDescriptor> options = e.getOptions();\n for (Fo... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FormatPluginOptionExtractor.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = org.slf4j.LoggerFactory.getLogger(FormatPluginOptionExtractor.class);",
"type": "Logge... | {
"body": "@VisibleForTesting\n Collection<FormatPluginOptionsDescriptor> getOptions() {\n return optionsByTypeName.values();\n }",
"class_method_signature": "FormatPluginOptionExtractor.getOptions()",
"constructor": false,
"full_signature": "@VisibleForTesting Collection<FormatPluginOptionsDescriptor> get... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_26 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listAll(fs, new Path(base, \"a\"), false);\n assertEquals(\"Directory and file count should match\", 4, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListAl... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listAll(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature": "F... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_30 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllEmptyResult() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listAll(fs, base, false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"xyz\");\n }\n });\n assertEquals(\... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listAll(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature": "F... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_88 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/store/easy/text/compliant/TestHeaderBuilder.java",
"identifier": "TestHeaderBuilder",
"interfaces": "",
"superclass": "extends DrillTest"
} | {
"body": "@Test\n public void testUnicode() {\n HeaderBuilder hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\"Αθήνα\");\n validateHeader(hb, new String[] {\"Αθήνα\"});\n\n hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\"Москва\");\n validateHeader(hb, new String[] {\"Моск... | {
"fields": [
{
"declarator": "MAX_HEADER_LEN = 1024",
"modifier": "public static final",
"original_string": "public static final int MAX_HEADER_LEN = 1024;",
"type": "int",
"var_name": "MAX_HEADER_LEN"
},
{
"declarator": "COLUMN_PREFIX = \"col_\"",
"modifier": "p... | {
"body": "@Override\n public void startBatch() { }",
"class_method_signature": "HeaderBuilder.startBatch()",
"constructor": false,
"full_signature": "@Override public void startBatch()",
"identifier": "startBatch",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "vo... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_111 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsOnlyDelim() throws Exception{\n // Test to check when connection string has only delimiter coma\n final String drillBitConnection = \" , \";\n\n try{\n final List<CoordinationProtos.DrillbitEndpoint> endpointsList = DrillClient.parseAndVerify... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_5 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Ignore // TODO(DRILL-2740)\n @Test(expected = IllegalStateException.class)\n public void testAllocator_unreleasedEmpty() throws Exception {\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n @SuppressWarnings(\"unused\")\n final DrillBuf drillBuf = roo... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public DrillBuf buffer(final int initialRequestSize) {\n assertOpen();\n\n return buffer(initialRequestSize, null);\n }",
"class_method_signature": "BaseAllocator.buffer(final int initialRequestSize)",
"constructor": false,
"full_signature": "@Override public DrillBuf buffer(final... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_4 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testRootAllocator_getEmpty() throws Exception {\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n final DrillBuf drillBuf = rootAllocator.buffer(0);\n assertNotNull(\"allocation failed\", drillBuf);\n assertEquals(\"capacity was... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public DrillBuf buffer(final int initialRequestSize) {\n assertOpen();\n\n return buffer(initialRequestSize, null);\n }",
"class_method_signature": "BaseAllocator.buffer(final int initialRequestSize)",
"constructor": false,
"full_signature": "@Override public DrillBuf buffer(final... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_110 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsNonNumericPort() throws Exception{\n // Test to check when connection string has non-numeric port\n final String drillBitConnection = \"10.10.100.161:5ab0\";\n\n try{\n final List<CoordinationProtos.DrillbitEndpoint> endpointsList = DrillClient.... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_89 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testPermissionAndDeleteOnExitFalseForFileWithParent() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path file = addNLevelsAndFile(initialPath, 2, true);\n Path firstCreatedParentPath = addNLevelsAndFile(initialPath, 1, false);\n\n Path createdParentPa... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createFileAndApply(FileSystem fs, Path file) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, file.getParent());\n if (!fs.createNewFile(file)) {\n throw new IOException(String.format(\"File [%s] already exists on file system [%s].\",\n file.toUri().... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_66 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testJarNameByFunctionSignature() {\n FunctionHolder functionHolder = newJars.get(built_in).get(0);\n assertEquals(\"Jar name should match\",\n built_in, registryHolder.getJarNameByFunctionSignature(functionHolder.getName(), functionHolder.getSignature()));\n assertNull(... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public String getJarNameByFunctionSignature(String functionName, String functionSignature) {\n try (AutoCloseableLock lock = readLock.open()) {\n for (Map.Entry<String, Map<String, Queue<String>>> jar : jars.entrySet()) {\n Queue<String> functionSignatures = jar.getValue().get(functionName);... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_31 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testMergeFiltersWithMissingParameters() {\n PathFilter filter = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"a\");\n }\n };\n\n assertEquals(\"Should have returned initial filter\", filter, FileS... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static PathFilter mergeFilters(PathFilter filter, PathFilter[] filters) {\n if (filters == null || filters.length == 0) {\n return filter;\n }\n\n int length = filters.length;\n PathFilter[] newFilters = Arrays.copyOf(filters, length + 1);\n newFilters[length] = filter;\n retu... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_27 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listAll(fs, new Path(base, \"a\"), false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\") || path.getName().endsWith... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listAll(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature": "F... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_70 | {
"fields": [
{
"declarator": "EMPTY_STATUSES = ImmutableList.of()",
"modifier": "private static final",
"original_string": "private static final List<FileStatus> EMPTY_STATUSES = ImmutableList.of();",
"type": "List<FileStatus>",
"var_name": "EMPTY_STATUSES"
},
{
"decla... | {
"body": "@Test\n public void testCreateReturnsNullWhenArgumentsAreIllegal() {\n for (final Object statuses : new Object[] { null, EMPTY_STATUSES}) {\n for (final Object files : new Object[]{null, EMPTY_FILES}) {\n for (final Object root : new Object[]{null, EMPTY_ROOT}) {\n final FileSelect... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FileSelection.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FileSelection.class);",
"type": "org.slf4j.Logger",
... | {
"body": "public static FileSelection create(final DrillFileSystem fs, final String parent, final String path) throws IOException {\n Stopwatch timer = Stopwatch.createStarted();\n boolean hasWildcard = path.contains(WILD_CARD);\n\n final Path combined = new Path(parent, removeLeadingSlash(path));\n fina... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_8 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testAllocator_slicesOfSlices() throws Exception {\n// final AllocatorOwner allocatorOwner = new NamedOwner(\"slicesOfSlices\");\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n // Populate a buffer with byte values corresponding to th... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public DrillBuf buffer(final int initialRequestSize) {\n assertOpen();\n\n return buffer(initialRequestSize, null);\n }",
"class_method_signature": "BaseAllocator.buffer(final int initialRequestSize)",
"constructor": false,
"full_signature": "@Override public DrillBuf buffer(final... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_50 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/work/metadata/TestMetadataProvider.java",
"identifier": "TestMetadataProvider",
"interfaces": "",
"superclass": "extends BaseTestQuery"
} | {
"body": "@Test\n public void schemas() throws Exception {\n // test(\"SELECT * FROM INFORMATION_SCHEMA.SCHEMATA\"); // SQL equivalent\n\n GetSchemasResp resp = client.getSchemas(null, null).get();\n\n assertEquals(RequestStatus.OK, resp.getStatus());\n List<SchemaMetadata> schemas = resp.getSchemasList... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class);",
"type": "org.slf4j.Logger"... | {
"body": "public static Runnable schemas(final UserSession session, final DrillbitContext dContext,\n final GetSchemasReq req, final ResponseSender responseSender) {\n return new SchemasProvider(session, dContext, req, responseSender);\n }",
"class_method_signature": "MetadataProvider.schemas(final UserSe... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_11 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void simpleCase2() throws Exception {\n // Set the slice target to 1\n final Wrapper wrapper = newWrapper(200, 1, 20, Collections.singletonList(new EndpointAffinity(N1_EP1, 1.0, true, MAX_VALUE)));\n INSTANCE.parallelizeFragment(wrapper, newParameters(1, 5, 20), null);\n\n // Ex... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_85 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testBinaryTypes() throws IOException {\n // test with different binary types\n BsonDocument bsonDoc = new BsonDocument();\n // Binary\n // String\n byte[] bytes = \"binaryValue\".getBytes();\n bsonDoc.append(\"binaryKey\", new BsonBinary(BsonBinarySubType.BINARY, byte... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_93 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test(expected = IOException.class)\n public void testFailureOnExistentFile() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path file = addNLevelsAndFile(initialPath, 0, true);\n fs.createNewFile(file);\n assertTrue(\"File should exist\", fs.exists(file));\n try {\n ... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createFileAndApply(FileSystem fs, Path file) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, file.getParent());\n if (!fs.createNewFile(file)) {\n throw new IOException(String.format(\"File [%s] already exists on file system [%s].\",\n file.toUri().... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_45 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listAll(fs, new Path(base, \"a\"), true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"a\") || path.get... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listAll(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUtil.listAll... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_12 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void multiNodeCluster1() throws Exception {\n final Wrapper wrapper = newWrapper(200, 1, 20,\n ImmutableList.of(\n new EndpointAffinity(N1_EP1, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N1_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N2... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_69 | {
"fields": [
{
"declarator": "CLASS_NAME = \"com.drill.udf.CustomLowerFunction\"",
"modifier": "private static final",
"original_string": "private static final String CLASS_NAME = \"com.drill.udf.CustomLowerFunction\";",
"type": "String",
"var_name": "CLASS_NAME"
},
{
... | {
"body": "@Test\n public void testConcurrentFunctionBodyLoad() throws Exception {\n final FunctionInitializer functionInitializer = new FunctionInitializer(CLASS_NAME, classLoader);\n\n final AtomicInteger counter = new AtomicInteger();\n new MockUp<FunctionInitializer>() {\n @Mock\n Java.Compila... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionInitializer.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionInitializer.class);",
"type": "org.slf4j.L... | {
"body": "public String getMethod(String methodName) {\n loadFunctionBody();\n return methods.get(methodName);\n }",
"class_method_signature": "FunctionInitializer.getMethod(String methodName)",
"constructor": false,
"full_signature": "public String getMethod(String methodName)",
"identifier": "getMet... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_86 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/store/easy/text/compliant/TestHeaderBuilder.java",
"identifier": "TestHeaderBuilder",
"interfaces": "",
"superclass": "extends DrillTest"
} | {
"body": "@Test\n public void testWhiteSpace() {\n HeaderBuilder hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\"a\");\n validateHeader(hb, new String[] {\"a\"});\n\n hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\" a \");\n validateHeader(hb, new String[] {\"a\"});\n\n ... | {
"fields": [
{
"declarator": "MAX_HEADER_LEN = 1024",
"modifier": "public static final",
"original_string": "public static final int MAX_HEADER_LEN = 1024;",
"type": "int",
"var_name": "MAX_HEADER_LEN"
},
{
"declarator": "COLUMN_PREFIX = \"col_\"",
"modifier": "p... | {
"body": "@Override\n public void startBatch() { }",
"class_method_signature": "HeaderBuilder.startBatch()",
"constructor": false,
"full_signature": "@Override public void startBatch()",
"identifier": "startBatch",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "vo... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_28 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listAll(fs, new Path(base, \"a\"), true);\n assertEquals(\"Directory and file count should match\", 7, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.te... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listAll(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature": "F... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_90 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testPermissionAndDeleteOnExitTrueForFileWithParent() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path file = addNLevelsAndFile(initialPath, 2, true);\n Path firstCreatedParentPath = addNLevelsAndFile(initialPath, 1, false);\n\n Path createdParentPat... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createFileAndApply(FileSystem fs, Path file) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, file.getParent());\n if (!fs.createNewFile(file)) {\n throw new IOException(String.format(\"File [%s] already exists on file system [%s].\",\n file.toUri().... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_7 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testAllocator_sliceRanges() throws Exception {\n// final AllocatorOwner allocatorOwner = new NamedOwner(\"sliceRanges\");\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n // Populate a buffer with byte values corresponding to their in... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public DrillBuf buffer(final int initialRequestSize) {\n assertOpen();\n\n return buffer(initialRequestSize, null);\n }",
"class_method_signature": "BaseAllocator.buffer(final int initialRequestSize)",
"constructor": false,
"full_signature": "@Override public DrillBuf buffer(final... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_49 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/work/metadata/TestMetadataProvider.java",
"identifier": "TestMetadataProvider",
"interfaces": "",
"superclass": "extends BaseTestQuery"
} | {
"body": "@Test\n public void catalogs() throws Exception {\n // test(\"SELECT * FROM INFORMATION_SCHEMA.CATALOGS\"); // SQL equivalent\n\n GetCatalogsResp resp = client.getCatalogs(null).get();\n\n assertEquals(RequestStatus.OK, resp.getStatus());\n List<CatalogMetadata> catalogs = resp.getCatalogsList... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class);",
"type": "org.slf4j.Logger"... | {
"body": "public static Runnable catalogs(final UserSession session, final DrillbitContext dContext,\n final GetCatalogsReq req, final ResponseSender responseSender) {\n return new CatalogsProvider(session, dContext, req, responseSender);\n }",
"class_method_signature": "MetadataProvider.catalogs(final Us... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_65 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testFunctionsSize() {\n int count = 0;\n for (List<FunctionHolder> functionHolders : newJars.values()) {\n count += functionHolders.size();\n }\n assertEquals(\"Functions size should match\", count, registryHolder.functionsSize());\n }",
"class_method_signature": "F... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public int functionsSize() {\n try (AutoCloseableLock lock = readLock.open()) {\n return functions.size();\n }\n }",
"class_method_signature": "FunctionRegistryHolder.functionsSize()",
"constructor": false,
"full_signature": "public int functionsSize()",
"identifier": "functionsSize",
... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_32 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void mergeFiltersTrue() {\n Path file = new Path(\"abc.txt\");\n\n PathFilter firstFilter = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"a\");\n }\n };\n\n PathFilter secondFilter = new PathFilter(... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static PathFilter mergeFilters(PathFilter filter, PathFilter[] filters) {\n if (filters == null || filters.length == 0) {\n return filter;\n }\n\n int length = filters.length;\n PathFilter[] newFilters = Arrays.copyOf(filters, length + 1);\n newFilters[length] = filter;\n retu... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_24 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listFiles(fs, base, true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\") || path.getName().endsWith(\".t... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listFiles(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listFiles(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_105 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsWithMultiplePort() throws Exception{\n // Test to check when connection string has multiple port with one ip\n final String drillBitConnection = \"10.10.100.161:5000:6000\";\n\n try {\n final List<CoordinationProtos.DrillbitEndpoint> endpointsLi... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_104 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsWithOnlyPort() throws Exception{\n // Test to check when connection string has port with no ip\n final String drillBitConnection = \":5000\";\n\n try {\n final List<CoordinationProtos.DrillbitEndpoint> endpointsList = DrillClient.parseAndVerifyE... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_25 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesEmptyResult() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listFiles(fs, base, false);\n assertEquals(\"File count should match\", 0, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListFilesEmptyResult()",
"constru... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listFiles(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listFiles(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_33 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void mergeFiltersFalse() {\n Path file = new Path(\"abc.txt\");\n\n PathFilter firstFilter = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"a\");\n }\n };\n\n PathFilter secondFilter = new PathFilter... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static PathFilter mergeFilters(PathFilter filter, PathFilter[] filters) {\n if (filters == null || filters.length == 0) {\n return filter;\n }\n\n int length = filters.length;\n PathFilter[] newFilters = Arrays.copyOf(filters, length + 1);\n newFilters[length] = filter;\n retu... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_64 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testContainsJar() {\n assertTrue(\"Jar should be present in registry holder\", registryHolder.containsJar(built_in));\n assertFalse(\"Jar should be absent in registry holder\", registryHolder.containsJar(\"unknown.jar\"));\n }",
"class_method_signature": "FunctionRegistryHolde... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public boolean containsJar(String jarName) {\n try (AutoCloseableLock lock = readLock.open()) {\n return jars.containsKey(jarName);\n }\n }",
"class_method_signature": "FunctionRegistryHolder.containsJar(String jarName)",
"constructor": false,
"full_signature": "public boolean containsJar... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_112 | {
"fields": [
{
"declarator": "timer = Stopwatch.createUnstarted()",
"modifier": "",
"original_string": "Stopwatch timer = Stopwatch.createUnstarted();",
"type": "Stopwatch",
"var_name": "timer"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xs... | {
"body": "@Test\n public void testSpill() throws Exception {\n OperatorFixtureBuilder builder = OperatorFixture.builder();\n builder.configBuilder()\n .put(ExecConstants.EXTERNAL_SORT_BATCH_LIMIT, 2);\n try (OperatorFixture fixture = builder.build()) {\n BatchSchema schema = SortTestUtilities.non... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(ExternalSortBatch.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ExternalSortBatch.class);",
"type": "org.slf4j.Logger",
"var_n... | {
"body": "public SortMetrics getMetrics() { return metrics; }",
"class_method_signature": "SortImpl.getMetrics()",
"constructor": false,
"full_signature": "public SortMetrics getMetrics()",
"identifier": "getMetrics",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "SortMetric... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_6 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testAllocator_manyAllocations() throws Exception {\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n try(final BufferAllocator childAllocator =\n rootAllocator.newChildAllocator(\"manyAllocations\", 0, MAX_ALLOCATION)) {\n ... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public BufferAllocator newChildAllocator(\n final String name,\n final long initReservation,\n final long maxAllocation) {\n assertOpen();\n\n final ChildAllocator childAllocator = new ChildAllocator(this, name, initReservation, maxAllocation);\n\n if (DEBUG) {\n s... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_91 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testPermissionAndDeleteOnExitFalseForFileOnly() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path file = addNLevelsAndFile(initialPath, 0, true);\n\n Path createdFile = PERSISTENT_STRATEGY.createFileAndApply(fs, file);\n\n assertEquals(\"Path should ... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createFileAndApply(FileSystem fs, Path file) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, file.getParent());\n if (!fs.createNewFile(file)) {\n throw new IOException(String.format(\"File [%s] already exists on file system [%s].\",\n file.toUri().... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_29 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listAll(fs, new Path(base, \"a\"), true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\") || path.getName().... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listAll(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature": "F... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_87 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/store/easy/text/compliant/TestHeaderBuilder.java",
"identifier": "TestHeaderBuilder",
"interfaces": "",
"superclass": "extends DrillTest"
} | {
"body": "@Test\n public void testSyntax() {\n HeaderBuilder hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\"a_123\");\n validateHeader(hb, new String[] {\"a_123\"});\n\n hb = new HeaderBuilder();\n hb.startBatch();\n parse(hb,\"a_123_\");\n validateHeader(hb, new String[] {\"a_123... | {
"fields": [
{
"declarator": "MAX_HEADER_LEN = 1024",
"modifier": "public static final",
"original_string": "public static final int MAX_HEADER_LEN = 1024;",
"type": "int",
"var_name": "MAX_HEADER_LEN"
},
{
"declarator": "COLUMN_PREFIX = \"col_\"",
"modifier": "p... | {
"body": "@Override\n public void startBatch() { }",
"class_method_signature": "HeaderBuilder.startBatch()",
"constructor": false,
"full_signature": "@Override public void startBatch()",
"identifier": "startBatch",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "vo... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_13 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void multiNodeCluster2() throws Exception {\n final Wrapper wrapper = newWrapper(200, 1, 20,\n ImmutableList.of(\n new EndpointAffinity(N1_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N2_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N3... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_44 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listAll(fs, base, true);\n assertEquals(\"Directory and file count should match\", 6, statuses.size());\n }",
"class_method_signature": "DrillFileSystemUtilTest.testListA... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listAll(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUtil.listAll... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_52 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/work/metadata/TestMetadataProvider.java",
"identifier": "TestMetadataProvider",
"interfaces": "",
"superclass": "extends BaseTestQuery"
} | {
"body": "@Test\n public void columns() throws Exception {\n // test(\"SELECT * FROM INFORMATION_SCHEMA.COLUMNS\"); // SQL equivalent\n\n GetColumnsResp resp = client.getColumns(null, null, null, null).get();\n\n assertEquals(RequestStatus.OK, resp.getStatus());\n List<ColumnMetadata> columns = resp.get... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MetadataProvider.class);",
"type": "org.slf4j.Logger"... | {
"body": "public static Runnable columns(final UserSession session, final DrillbitContext dContext,\n final GetColumnsReq req, final ResponseSender responseSender) {\n return new ColumnsProvider(session, dContext, req, responseSender);\n }",
"class_method_signature": "MetadataProvider.columns(final UserSe... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_1 | {
"fields": [],
"file": "exec/memory/base/src/test/java/org/apache/drill/exec/memory/TestAccountant.java",
"identifier": "TestAccountant",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nested() {\n final Accountant parent = new Accountant(null, 0, Long.MAX_VALUE);\n ensureAccurateReservations(parent);\n assertEquals(0, parent.getAllocatedMemory());\n }",
"class_method_signature": "TestAccountant.nested()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "parent",
"modifier": "protected final",
"original_string": "protected final Accountant parent;",
"type": "Accountant",
"var_name": "parent"
},
{
"declarator": "reservation",
"modifier": "protected final",
"original_string": "pr... | {
"body": "public long getAllocatedMemory() {\n return locallyHeldMemory.get();\n }",
"class_method_signature": "Accountant.getAllocatedMemory()",
"constructor": false,
"full_signature": "public long getAllocatedMemory()",
"identifier": "getAllocatedMemory",
"invocations": [
"get"
],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_59 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testGetAllJarNames() {\n ArrayList<String> expectedResult = Lists.newArrayList(newJars.keySet());\n compareTwoLists(expectedResult, registryHolder.getAllJarNames());\n }",
"class_method_signature": "FunctionRegistryHolderTest.testGetAllJarNames()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public List<String> getAllJarNames() {\n try (AutoCloseableLock lock = readLock.open()) {\n return Lists.newArrayList(jars.keySet());\n }\n }",
"class_method_signature": "FunctionRegistryHolder.getAllJarNames()",
"constructor": false,
"full_signature": "public List<String> getAllJarNames(... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_18 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listDirectories(fs, base, true);\n assertEquals(\"Directory count should match\", 5, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListDire... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listDirectories(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_63 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testGetHoldersByFunctionName() {\n List<DrillFuncHolder> expectedResult = Lists.newArrayList();\n for (List<FunctionHolder> functionHolders : newJars.values()) {\n for (FunctionHolder functionHolder : functionHolders) {\n if (\"lower\".equals(functionHolder.getName())... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public List<DrillFuncHolder> getHoldersByFunctionName(String functionName, AtomicLong version) {\n try (AutoCloseableLock lock = readLock.open()) {\n if (version != null) {\n version.set(this.version);\n }\n Map<String, DrillFuncHolder> holders = functions.get(functionName);\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_34 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listDirectories(fs, base, false);\n assertEquals(\"Directory count should match\", 2, statuses.size());\n }",
"class_method_signature": "DrillFileSystemUtilTest.testListDi... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listDirectories(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "Drill... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_22 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listFiles(fs, new Path(base, \"a\"), false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\".txt\");\n }\n });\... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listFiles(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listFiles(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_103 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsOnlyPortDelim() throws Exception{\n // Test to check when connection string only has delimiter\n final String drillBitConnection = \":\";\n\n try {\n final List<CoordinationProtos.DrillbitEndpoint> endpointsList = DrillClient.parseAndVerifyEndpo... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_75 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testIntType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"seqNo\", new BsonInt64(10));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMapReaderImpl) writer.g... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_43 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listAll(fs, new Path(base, \"a\"), false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\") || path.getName().end... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listAll(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUtil.listAll... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_14 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void multiNodeClusterNegative1() throws Exception {\n final Wrapper wrapper = newWrapper(200, 1, 20,\n ImmutableList.of(\n new EndpointAffinity(N1_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N2_EP2, 0.15, true, MAX_VALUE),\n new EndpointAff... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_80 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testObjectIdType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n BsonObjectId value = new BsonObjectId(new ObjectId());\n bsonDoc.append(\"_idKey\", value);\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMa... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_38 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, new Path(base, \"a\"), false);\n assertEquals(\"File count should match\", 1, statuses.size());\n assertEquals(\"File name should match\", \"f.txt\", statuses.get(... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listFiles(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listFiles(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUt... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_79 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testSpecialCharStringType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"stringKey\", new BsonString(\"§§§§§§§§§1\"));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader =... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_96 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testCreateNoPath() throws Exception {\n Path path = prepareStorageDirectory();\n\n Path createdParentPath = TEMPORARY_STRATEGY.createPathAndApply(fs, path);\n\n assertNull(\"Path should be null\", createdParentPath);\n assertEquals(\"Permission should match\", FULL_PERMISSI... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createPathAndApply(FileSystem fs, Path path) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, path);\n if (locations.isEmpty()) {\n return null;\n }\n fs.mkdirs(path);\n for (Path location : locations) {\n applyStrategy(fs, location, getFolderPe... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_78 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testStringType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"stringKey\", new BsonString(\"test_string\"));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMa... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_39 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, new Path(base, \"a\"), false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\".txt\");\n }\n ... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listFiles(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listFiles(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUt... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_81 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testNullType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"nullKey\", new BsonNull());\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMapReaderImpl) writer.g... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_15 | {
"fields": [
{
"declarator": "N1_EP1 = newDrillbitEndpoint(\"node1\", 30010)",
"modifier": "private static final",
"original_string": "private static final DrillbitEndpoint N1_EP1 = newDrillbitEndpoint(\"node1\", 30010);",
"type": "DrillbitEndpoint",
"var_name": "N1_EP1"
},
... | {
"body": "@Test\n public void multiNodeClusterNegative2() throws Exception {\n final Wrapper wrapper = newWrapper(200, 1, 3,\n ImmutableList.of(\n new EndpointAffinity(N1_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffinity(N2_EP2, 0.15, true, MAX_VALUE),\n new EndpointAffi... | {
"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<DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pI... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_42 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListAllWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listAll(fs, new Path(base, \"a\"), false);\n assertEquals(\"File count should match\", 2, statuses.size());\n\n Collections.sort(statuses);\n assertEquals(\"File name should ma... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listAll(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listAll(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUtil.listAll... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_102 | {
"fields": [
{
"declarator": "config = DrillConfig.create()",
"modifier": "private final",
"original_string": "private final DrillConfig config = DrillConfig.create();",
"type": "DrillConfig",
"var_name": "config"
}
],
"file": "exec/java-exec/src/test/java/org/apache/drill/e... | {
"body": "@Test\n public void testParseAndVerifyEndpointsEmptyString() throws Exception {\n\n // Test with empty string\n final String drillBitConnection = \"\";\n try {\n final List<CoordinationProtos.DrillbitEndpoint> endpointsList = DrillClient.parseAndVerifyEndpoints\n (drillBitConnection, ... | {
"fields": [
{
"declarator": "DEFAULT_CLIENT_NAME = \"Apache Drill Java client\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CLIENT_NAME = \"Apache Drill Java client\";",
"type": "String",
"var_name": "DEFAULT_CLIENT_NAME"
},
{... | {
"body": "static List<DrillbitEndpoint> parseAndVerifyEndpoints(String drillbits, String defaultUserPort)\n throws InvalidConnectionInfoException {\n // If no drillbits is provided then throw exception\n drillbits = drillbits.trim();\n if (drillbits.isEmpty()) {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_23 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listFiles(fs, base, true);\n assertEquals(\"File count should match\", 11, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListFilesRecursiveWithou... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listFiles(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listFiles(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_35 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listDirectories(fs, base, false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\");\n }\n });\n ... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listDirectories(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "Drill... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_62 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testGetAllFunctionsWithSignatures() {\n ListMultimap<String, String> expectedResult = ArrayListMultimap.create();\n for (List<FunctionHolder> functionHolders : newJars.values()) {\n for(FunctionHolder functionHolder : functionHolders) {\n expectedResult.put(functionHo... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public ListMultimap<String, String> getAllFunctionsWithSignatures() {\n try (AutoCloseableLock lock = readLock.open()) {\n ListMultimap<String, String> functionsWithSignatures = ArrayListMultimap.create();\n for (Map.Entry<String, Map<String, DrillFuncHolder>> function : functions.entrySet()) ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_19 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listDirectories(fs, base, true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\");\n }\n });\... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listDirectories(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_58 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testRemoveJar() {\n registryHolder.removeJar(built_in);\n assertFalse(\"Jar should be absent\", registryHolder.containsJar(built_in));\n assertTrue(\"Jar should be present\", registryHolder.containsJar(udf_jar));\n assertEquals(\"Functions size should match\", newJars.get(u... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public void removeJar(String jarName) {\n try (AutoCloseableLock lock = writeLock.open()) {\n removeAllByJar(jarName);\n }\n }",
"class_method_signature": "FunctionRegistryHolder.removeJar(String jarName)",
"constructor": false,
"full_signature": "public void removeJar(String jarName)",
... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
5243237_13 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test\n public void fail_noArgs() throws Exception {\n try {\n underTest.call(new Object[0]);\n }\n catch (MojoExecutionException e) {\n assertThat(e.getMessage(), is(FailClosureTarget.FAILED));\n }\n }",
"class_method_signature": "FailClosureTargetTest.fail_noArgs()",
"construc... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_0 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private GroovyRuntimeFactory underTest;",
"type": "GroovyRuntimeFactory",
"var_name": "underTest"
},
{
"declarator": "classLoader",
"modifier": "@Mock\n private",
"origina... | {
"body": "@Test(expected = IllegalStateException.class)\n public void create_noServices() {\n underTest.create(classLoader);\n fail();\n }",
"class_method_signature": "GroovyRuntimeFactoryTest.create_noServices()",
"constructor": false,
"full_signature": "@Test(expected = IllegalStateException.class) p... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/java/or... | {
"body": "public GroovyRuntime create(final ClassLoader classLoader) {\n checkNotNull(classLoader);\n\n Iterator<GroovyRuntime> services = findServices(classLoader);\n\n checkState(services.hasNext(), \"No GroovyRuntime service found\");\n\n GroovyRuntime runtime = services.next();\n\n checkState(!ser... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_1 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private GroovyRuntimeFactory underTest;",
"type": "GroovyRuntimeFactory",
"var_name": "underTest"
},
{
"declarator": "classLoader",
"modifier": "@Mock\n private",
"origina... | {
"body": "@Test(expected = IllegalStateException.class)\n public void create_multipuleServices() {\n services.add(mock(GroovyRuntime.class));\n services.add(mock(GroovyRuntime.class));\n underTest.create(classLoader);\n fail();\n }",
"class_method_signature": "GroovyRuntimeFactoryTest.create_multipul... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/java/or... | {
"body": "public GroovyRuntime create(final ClassLoader classLoader) {\n checkNotNull(classLoader);\n\n Iterator<GroovyRuntime> services = findServices(classLoader);\n\n checkState(services.hasNext(), \"No GroovyRuntime service found\");\n\n GroovyRuntime runtime = services.next();\n\n checkState(!ser... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_12 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test\n public void fail_null() throws Exception {\n try {\n underTest.call(null);\n }\n catch (MojoExecutionException e) {\n assertThat(e.getMessage(), is(FailClosureTarget.FAILED));\n }\n }",
"class_method_signature": "FailClosureTargetTest.fail_null()",
"constructor": false,
... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_15 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test\n public void fail_throwable() throws Exception {\n @SuppressWarnings(\"ThrowableInstanceNeverThrown\")\n Throwable cause = new Throwable(\"foo\");\n try {\n underTest.call(new Object[]{cause});\n }\n catch (MojoExecutionException e) {\n assertThat(e.getMessage(), is(\"foo\"... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_6 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private ClassSourceFactory underTest;",
"type": "ClassSourceFactory",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/ClassSourceFactoryTes... | {
"body": "@Test\n public void create_inlineIncrementsCounter() {\n ClassSourceFactory.scriptCounter.set(0);\n\n underTest.create(\"println 1234\");\n assertThat(ClassSourceFactory.scriptCounter.get(), is(1));\n\n underTest.create(\"println 5678\");\n assertThat(ClassSourceFactory.scriptCounter.get(),... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "scriptCounter = new Atom... | {
"body": "public ClassSource create(final String source) {\n checkNotNull(source);\n\n String trimmed = source.trim();\n log.trace(\"Creating class-source from: {}\", trimmed);\n\n // First try and parse the source as a URL\n try {\n return new ClassSourceImpl(new URL(trimmed), null, null);\n ... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_7 | {
"fields": [
{
"declarator": "prepareCount = new AtomicInteger(0)",
"modifier": "private",
"original_string": "private AtomicInteger prepareCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "prepareCount"
},
{
"declarator": "runCount = new AtomicInte... | {
"body": "@Test\n public void execute_prepare_run_cleanup() throws Exception {\n MojoSupport underTest = new MojoSupportTester();\n\n underTest.execute();\n\n assertThat(prepareCount.get(), is(1));\n assertThat(runCount.get(), is(1));\n assertThat(cleanupCount.get(), is(1));\n }",
"class_method_si... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/jav... | {
"body": "public void execute() throws MojoExecutionException, MojoFailureException {\n try {\n try {\n log.trace(\"Prepare\");\n prepare();\n\n log.trace(\"Run\");\n run();\n }\n finally {\n log.trace(\"Cleanup\");\n cleanup();\n }\n }\n catch (... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_14 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test\n public void fail_object() throws Exception {\n try {\n underTest.call(new Object[]{\"foo\"});\n }\n catch (MojoExecutionException e) {\n assertThat(e.getMessage(), is(\"foo\"));\n assertThat(e.getCause(), nullValue());\n }\n }",
"class_method_signature": "FailClosureT... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_18 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test(expected = Error.class)\n public void fail_tooManyArgs() throws Exception {\n underTest.call(new Object[]{1, 2, 3});\n }",
"class_method_signature": "FailClosureTargetTest.fail_tooManyArgs()",
"constructor": false,
"full_signature": "@Test(expected = Error.class) public void fail_tooManyAr... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_8 | {
"fields": [
{
"declarator": "prepareCount = new AtomicInteger(0)",
"modifier": "private",
"original_string": "private AtomicInteger prepareCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "prepareCount"
},
{
"declarator": "runCount = new AtomicInte... | {
"body": "@Test\n public void execute_prepareExceptionCallsCleanup() throws Exception {\n MojoSupport underTest = new MojoSupportTester()\n {\n @Override\n protected void prepare() throws Exception {\n throw new Exception(\"fail\");\n }\n };\n\n try {\n underTest.execute();\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/jav... | {
"body": "public void execute() throws MojoExecutionException, MojoFailureException {\n try {\n try {\n log.trace(\"Prepare\");\n prepare();\n\n log.trace(\"Run\");\n run();\n }\n finally {\n log.trace(\"Cleanup\");\n cleanup();\n }\n }\n catch (... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_4 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private VersionHelper underTest;",
"type": "VersionHelper",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/util/VersionHelperTest.java",
... | {
"body": "@Test\n public void before() {\n VersionRange range = underTest.before(1, 2, 3);\n log(range);\n assertThat(range.toString(), is(\"(,1.2.3-\" + VersionHelper.EARLIEST_SUFFIX + \")\"));\n }",
"class_method_signature": "VersionHelperTest.before()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "EARLIEST_SUFFIX = \"alph... | {
"body": "public VersionRange before(final int... parts) {\n checkNotNull(parts);\n checkArgument(parts.length != 0);\n\n StringBuilder buff = new StringBuilder()\n .append(\"(,\");\n\n for (int i = 0; i < parts.length; i++) {\n buff.append(parts[i]);\n if (i + 1 < parts.length) {\n ... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_17 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test(expected = Error.class)\n public void fail_invalidArgs() throws Exception {\n underTest.call(new Object[]{1, 2});\n }",
"class_method_signature": "FailClosureTargetTest.fail_invalidArgs()",
"constructor": false,
"full_signature": "@Test(expected = Error.class) public void fail_invalidArgs(... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_16 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private FailClosureTarget underTest;",
"type": "FailClosureTarget",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/FailClosureTargetTest.j... | {
"body": "@Test\n public void fail_objectAndThrowable() throws Exception {\n @SuppressWarnings(\"ThrowableInstanceNeverThrown\")\n Throwable cause = new Throwable(\"bar\");\n try {\n underTest.call(new Object[]{\"foo\", cause});\n }\n catch (MojoExecutionException e) {\n assertThat(e.getMes... | {
"fields": [
{
"declarator": "FAILED = \"Failed\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String FAILED = \"Failed\";",
"type": "String",
"var_name": "FAILED"
}
],
"file": "groovy-maven-plugin/src/main/java/o... | {
"body": "public Object call(final @Nullable Object[] args) throws Exception {\n if (args == null || args.length == 0) {\n throw new MojoExecutionException(FAILED);\n }\n else if (args.length == 1) {\n if (args[0] instanceof Throwable) {\n Throwable cause = (Throwable) args[0];\n thr... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_5 | {
"fields": [],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/util/Maps2Test.java",
"identifier": "Maps2Test",
"interfaces": "",
"superclass": "extends TestSupport"
} | {
"body": "@Test\n public void fromProperties_entryWithNullValue() throws Exception {\n Properties props1 = new Properties() {\n @Override\n public Enumeration<?> propertyNames() {\n return Iterators.asEnumeration(ImmutableList.of(\"foo\").iterator());\n }\n\n @Override\n public St... | {
"fields": [],
"file": "groovy-maven-plugin/src/main/java/org/codehaus/gmaven/plugin/util/Maps2.java",
"identifier": "Maps2",
"interfaces": "",
"methods": [
{
"class_method_signature": "Maps2.Maps2()",
"constructor": true,
"full_signature": "private Maps2()",
"identifier": "Maps2... | {
"body": "public static Map<String,String> fromProperties(final Properties properties) {\n checkNotNull(properties);\n Map<String,String> result = new HashMap<String, String>(properties.size());\n Enumeration names = properties.propertyNames();\n while (names.hasMoreElements()) {\n String name = (St... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_9 | {
"fields": [
{
"declarator": "prepareCount = new AtomicInteger(0)",
"modifier": "private",
"original_string": "private AtomicInteger prepareCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "prepareCount"
},
{
"declarator": "runCount = new AtomicInte... | {
"body": "@Test\n public void execute_runExceptionCallsCleanup() throws Exception {\n MojoSupport underTest = new MojoSupportTester()\n {\n @Override\n protected void run() throws Exception {\n throw new Exception(\"fail\");\n }\n };\n\n try {\n underTest.execute();\n fai... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/jav... | {
"body": "public void execute() throws MojoExecutionException, MojoFailureException {\n try {\n try {\n log.trace(\"Prepare\");\n prepare();\n\n log.trace(\"Run\");\n run();\n }\n finally {\n log.trace(\"Cleanup\");\n cleanup();\n }\n }\n catch (... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_2 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private GroovyRuntimeFactory underTest;",
"type": "GroovyRuntimeFactory",
"var_name": "underTest"
},
{
"declarator": "classLoader",
"modifier": "@Mock\n private",
"origina... | {
"body": "@Test\n public void create_singleService() {\n services.add(mock(GroovyRuntime.class));\n GroovyRuntime runtime = underTest.create(classLoader);\n assertThat(runtime, notNullValue());\n }",
"class_method_signature": "GroovyRuntimeFactoryTest.create_singleService()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/java/or... | {
"body": "public GroovyRuntime create(final ClassLoader classLoader) {\n checkNotNull(classLoader);\n\n Iterator<GroovyRuntime> services = findServices(classLoader);\n\n checkState(services.hasNext(), \"No GroovyRuntime service found\");\n\n GroovyRuntime runtime = services.next();\n\n checkState(!ser... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_11 | {
"fields": [
{
"declarator": "prepareCount = new AtomicInteger(0)",
"modifier": "private",
"original_string": "private AtomicInteger prepareCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "prepareCount"
},
{
"declarator": "runCount = new AtomicInte... | {
"body": "@Test\n public void execute_MojoFailureException_propagates() throws Exception {\n MojoSupport underTest = new MojoSupportTester()\n {\n @Override\n protected void run() throws Exception {\n throw new MojoFailureException(\"fail\");\n }\n };\n\n try {\n underTest.exe... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/jav... | {
"body": "public void execute() throws MojoExecutionException, MojoFailureException {\n try {\n try {\n log.trace(\"Prepare\");\n prepare();\n\n log.trace(\"Run\");\n run();\n }\n finally {\n log.trace(\"Cleanup\");\n cleanup();\n }\n }\n catch (... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_10 | {
"fields": [
{
"declarator": "prepareCount = new AtomicInteger(0)",
"modifier": "private",
"original_string": "private AtomicInteger prepareCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "prepareCount"
},
{
"declarator": "runCount = new AtomicInte... | {
"body": "@Test\n public void execute_MojoExecutionException_propagates() throws Exception {\n MojoSupport underTest = new MojoSupportTester()\n {\n @Override\n protected void run() throws Exception {\n throw new MojoExecutionException(\"fail\");\n }\n };\n\n try {\n underTest... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
}
],
"file": "groovy-maven-plugin/src/main/jav... | {
"body": "public void execute() throws MojoExecutionException, MojoFailureException {\n try {\n try {\n log.trace(\"Prepare\");\n prepare();\n\n log.trace(\"Run\");\n run();\n }\n finally {\n log.trace(\"Cleanup\");\n cleanup();\n }\n }\n catch (... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
5243237_3 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private VersionHelper underTest;",
"type": "VersionHelper",
"var_name": "underTest"
}
],
"file": "groovy-maven-plugin/src/test/java/org/codehaus/gmaven/plugin/util/VersionHelperTest.java",
... | {
"body": "@Test\n public void range() {\n VersionRange range = underTest.range(1, 2, 3);\n log(range);\n assertThat(range.toString(), is(\"[1.2.3,1.2.4)\"));\n }",
"class_method_signature": "VersionHelperTest.range()",
"constructor": false,
"full_signature": "@Test public void range()",
"identifie... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "EARLIEST_SUFFIX = \"alph... | {
"body": "public VersionRange range(final int... parts) {\n checkNotNull(parts);\n checkArgument(parts.length != 0);\n\n StringBuilder buff = new StringBuilder()\n .append(\"[\");\n\n for (int i = 0; i < parts.length; i++) {\n buff.append(parts[i]);\n if (i + 1 < parts.length) {\n ... | {
"created": null,
"fork": null,
"fork_count": 14,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 5243237,
"size": 4727,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/groovy/gmaven"
} |
50092217_2 | {
"fields": [
{
"declarator": "cityService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityService cityService;",
"type": "CityService",
"var_name": "cityService"
},
{
"declarator": "thrown= ExpectedException.none()",
"modi... | {
"body": "@Test(expected =NumberFormatException.class)\n// @Test\n public void testTransation() {\n// thrown.expect(NumberFormatException.class);\n// thrown.expectMessage(\"转换异常 Integer.parseInt(\\\"d\\\");\");\n cityService.transation();\n }",
"class_method_signature": "CityServiceT... | {
"fields": [
{
"declarator": "cityDao",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityDao cityDao;",
"type": "CityDao",
"var_name": "cityDao"
}
],
"file": "eureka-client-b/src/main/java/com/ggj/service/CityService.java",
"identifier... | {
"body": "@Transactional(readOnly = false)\n public void transation(){\n City city=new City(\"shanghai\",\"SH\");\n cityDao.insert(city);\n Integer.parseInt(\"d\");\n }",
"class_method_signature": "CityService.transation()",
"constructor": false,
"full_signature": "@Transactional(rea... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 50092217,
"size": 345,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/ggj2010/springcloudsamples-ggj"
} |
50092217_3 | {
"fields": [
{
"declarator": "cityAnnationService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityAnnationService cityAnnationService;",
"type": "CityAnnationService",
"var_name": "cityAnnationService"
}
],
"file": "eureka-client-b/sr... | {
"body": "@Test\n public void testGetCity() throws Exception {\n City city=cityAnnationService.getCity(1);\n assertTrue(\"执行出错!\"+city.getName(),\"beijin\".equals(city.getName()));\n }",
"class_method_signature": "CityAnnationServiceTest.testGetCity()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "cityAnnationDao",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityAnnationDao cityAnnationDao;",
"type": "CityAnnationDao",
"var_name": "cityAnnationDao"
}
],
"file": "eureka-client-b/src/main/java/com/ggj/... | {
"body": "public City getCity(int id){\n return cityAnnationDao.getCity(id);\n }",
"class_method_signature": "CityAnnationService.getCity(int id)",
"constructor": false,
"full_signature": "public City getCity(int id)",
"identifier": "getCity",
"invocations": [
"getCity"
],
"modifiers": "... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 50092217,
"size": 345,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/ggj2010/springcloudsamples-ggj"
} |
50092217_4 | {
"fields": [
{
"declarator": "cityAnnationService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityAnnationService cityAnnationService;",
"type": "CityAnnationService",
"var_name": "cityAnnationService"
}
],
"file": "eureka-client-b/sr... | {
"body": "@Test\n public void testInsert() throws Exception {\n City city=new City(\"shanghai-annation\",\"SH-annation\");\n cityAnnationService.insert(city);\n }",
"class_method_signature": "CityAnnationServiceTest.testInsert()",
"constructor": false,
"full_signature": "@Test public void t... | {
"fields": [
{
"declarator": "cityAnnationDao",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityAnnationDao cityAnnationDao;",
"type": "CityAnnationDao",
"var_name": "cityAnnationDao"
}
],
"file": "eureka-client-b/src/main/java/com/ggj/... | {
"body": "@Transactional(readOnly = false)\n public void insert(City city){\n cityAnnationDao.insert(city);\n }",
"class_method_signature": "CityAnnationService.insert(City city)",
"constructor": false,
"full_signature": "@Transactional(readOnly = false) public void insert(City city)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 50092217,
"size": 345,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/ggj2010/springcloudsamples-ggj"
} |
50092217_0 | {
"fields": [
{
"declarator": "cityService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityService cityService;",
"type": "CityService",
"var_name": "cityService"
},
{
"declarator": "thrown= ExpectedException.none()",
"modi... | {
"body": "@Test\n public void testGetCity() {\n City city= cityService.getCity(1);\n assertTrue(\"执行出错!\"+city.getName(),\"beijin\".equals(city.getName()));\n }",
"class_method_signature": "CityServiceTest.testGetCity()",
"constructor": false,
"full_signature": "@Test public void testGetCi... | {
"fields": [
{
"declarator": "cityDao",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityDao cityDao;",
"type": "CityDao",
"var_name": "cityDao"
}
],
"file": "eureka-client-b/src/main/java/com/ggj/service/CityService.java",
"identifier... | {
"body": "public City getCity(int id){\n return cityDao.getCity(id);\n }",
"class_method_signature": "CityService.getCity(int id)",
"constructor": false,
"full_signature": "public City getCity(int id)",
"identifier": "getCity",
"invocations": [
"getCity"
],
"modifiers": "public",
"param... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 50092217,
"size": 345,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/ggj2010/springcloudsamples-ggj"
} |
50092217_1 | {
"fields": [
{
"declarator": "cityService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityService cityService;",
"type": "CityService",
"var_name": "cityService"
},
{
"declarator": "thrown= ExpectedException.none()",
"modi... | {
"body": "@Test\n public void testInsert() {\n City city=new City(\"shanghai\",\"SH\");\n cityService.insert(city);\n }",
"class_method_signature": "CityServiceTest.testInsert()",
"constructor": false,
"full_signature": "@Test public void testInsert()",
"identifier": "testInsert",
"invo... | {
"fields": [
{
"declarator": "cityDao",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CityDao cityDao;",
"type": "CityDao",
"var_name": "cityDao"
}
],
"file": "eureka-client-b/src/main/java/com/ggj/service/CityService.java",
"identifier... | {
"body": "@Transactional(readOnly = false)\n public void insert(City city){\n cityDao.insert(city);\n }",
"class_method_signature": "CityService.insert(City city)",
"constructor": false,
"full_signature": "@Transactional(readOnly = false) public void insert(City city)",
"identifier": "insert",
... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 50092217,
"size": 345,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/ggj2010/springcloudsamples-ggj"
} |
20473418_48 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSchema() {\n assertTrue(JDBCUtil.getSchema(\"localhost;schema=TEST\", new Properties(), null).equals(\"TEST\"));\n assertNull(JDBCUtil.getSchema(\"localhost;schema=\", new Properties(), null));\n assertNull(JDBCUtil.getSchema(\"localhost;\", new Properties(),... | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCU... | {
"body": "public static String getSchema(String url, Properties info, String defaultValue) {\n String schema = findProperty(url, info, PhoenixRuntime.SCHEMA_ATTRIB);\n return (schema == null || schema.equals(\"\")) ? defaultValue : schema;\n }",
"class_method_signature": "JDBCUtil.getSchema(String... | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_188 | {
"fields": [
{
"declarator": "schema",
"modifier": "private static",
"original_string": "private static String schema;",
"type": "String",
"var_name": "schema"
},
{
"declarator": "baseTable",
"modifier": "private static",
"original_string": "private static ... | {
"body": "@Test\n //Testing the case when Mutation code thrown from sever is not handled by MetaDataClient\n public void testHandleCreateTableMutationCodeWithNewCode() throws SQLException {\n MetaDataProtocol.MetaDataMutationResult result = new MetaDataProtocol\n .MetaDataMutationResult(M... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataClient.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@VisibleForTesting\n public boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent) throws SQLException {\n switch(code) {\n case TABL... | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_72 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixContextExecutorTest.java",
"identifier": "PhoenixContextExecutorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCall() {\n URLClassLoader customerClassLoader = new URLClassLoader(new URL[]{});\n ClassLoader saveCcl = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(customerClassLoader);\n try {\n PhoenixCo... | {
"fields": [
{
"declarator": "CACHED_CLASSLOADER = PhoenixContextExecutor.class.getClassLoader()",
"modifier": "private static final",
"original_string": "private static final ClassLoader CACHED_CLASSLOADER = PhoenixContextExecutor.class.getClassLoader();",
"type": "ClassLoader",
"v... | {
"body": "public static <T> T call(Callable<T> target) throws Exception {\n ClassLoader saveCcl = Thread.currentThread().getContextClassLoader();\n try {\n Thread.currentThread().setContextClassLoader(CACHED_CLASSLOADER);\n return target.call();\n } finally {\n T... | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_167 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java",
"identifier": "PhoenixPreparedStatementTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testQueriesUsingExecuteUpdateShouldFail() throws Exception {\n Properties connectionProperties = new Properties();\n Connection connection = DriverManager.getConnection(getUrl(), connectionProperties);\n PreparedStatement stmt = connection.prepareStatement(\"SELE... | {
"fields": [
{
"declarator": "parameterCount",
"modifier": "private final",
"original_string": "private final int parameterCount;",
"type": "int",
"var_name": "parameterCount"
},
{
"declarator": "parameters",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public int executeUpdate() throws SQLException {\n throwIfUnboundParameters();\n if (!statement.getOperation().isMutation()) {\n throw new ExecuteUpdateNotApplicableException(statement.getOperation());\n }\n if (!batch.isEmpty()) {\n throw ne... | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_0 | {
"fields": [],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/util/ResourceListTest.java",
"identifier": "ResourceListTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMissingJarFileReturnsGracefully() {\n ResourceList rl = new ResourceList(\"foo\");\n File missingFile = new File(\"abracadabraphoenix.txt\");\n assertFalse(\"Did not expect a fake test file to actually exist\", missingFile.exists());\n assertEquals(Collections.emptyList... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(ResourceList.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ResourceList.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "Collection<String> getResourcesFromJarFile(\n final File file,\n final Pattern pattern) {\n final List<String> retVal = new ArrayList<>();\n ZipFile zf;\n try {\n zf = new ZipFile(file);\n } catch (FileNotFoundException|NoSuchFileException e) {\n... | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.