id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
2383782_42 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithoutChgrp() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Chgrp chgrp : CHGRPS) {\n builder.withChgrp(chgrp);\n }\n\n builder.withoutChgrp(CHGRPS[0]);\n\n final ActionAttributes attributes = build... | {
"fields": [
{
"declarator": "resourceManager",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> resourceManager;",
"type": "ModifyOnce<String>",
"var_name": "resourceManager"
},
{
"declarator": "nameNode",
"modifier": "private fi... | {
"body": "void withoutChgrp(final Chgrp chgrp) {\n chgrps.remove(chgrp);\n }",
"class_method_signature": "ActionAttributesBuilder.withoutChgrp(final Chgrp chgrp)",
"constructor": false,
"full_signature": " void withoutChgrp(final Chgrp chgrp)",
"identifier": "withoutChgrp",
"invocations": [
"... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_118 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testClearChmods() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Chmod chmod : CHMODS) {\n builder.withChmod(chmod);\n }\n\n builder.clearChmods();\n\n final FSAction fsAction = builder.build();\n\n assert... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder clearChmods() {\n attributesBuilder.clearChmods();\n return this;\n }",
"class_method_signature": "FSActionBuilder.clearChmods()",
"constructor": false,
"full_signature": "public FSActionBuilder clearChmods()",
"identifier": "clearChmods",
"invocations": [
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_163 | {
"fields": [
{
"declarator": "builder",
"modifier": "private",
"original_string": "private ParametersBuilder builder;",
"type": "ParametersBuilder",
"var_name": "builder"
}
],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/workflow/TestParame... | {
"body": "@Test\n public void testCreateFromExisting() {\n final Parameters existing = builder\n .withParameter(\"name1\", \"value1\")\n .withParameter(\"name2\", \"value2\")\n .build();\n\n final Parameters fromExisting = ParametersBuilder.createFromExis... | {
"fields": [
{
"declarator": "parameters",
"modifier": "private final",
"original_string": "private final ImmutableList.Builder<Parameter> parameters;",
"type": "ImmutableList.Builder<Parameter>",
"var_name": "parameters"
}
],
"file": "fluent-job/fluent-job-api/src/main/java... | {
"body": "public static ParametersBuilder createFromExisting(final Parameters parameters) {\n return new ParametersBuilder(new ImmutableList.Builder<Parameter>().addAll(parameters.getParameters()));\n }",
"class_method_signature": "ParametersBuilder.createFromExisting(final Parameters parameters)",
"co... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_39 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testClearChmods() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Chmod chmod : CHMODS) {\n builder.withChmod(chmod);\n }\n\n builder.clearChmods();\n\n final ActionAttributes attributes = builder.build();... | {
"fields": [
{
"declarator": "resourceManager",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> resourceManager;",
"type": "ModifyOnce<String>",
"var_name": "resourceManager"
},
{
"declarator": "nameNode",
"modifier": "private fi... | {
"body": "void clearChmods() {\n chmods.clear();\n }",
"class_method_signature": "ActionAttributesBuilder.clearChmods()",
"constructor": false,
"full_signature": " void clearChmods()",
"identifier": "clearChmods",
"invocations": [
"clear"
],
"modifiers": "",
"parameters": "()",
"retur... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_358 | {
"fields": [
{
"declarator": "server",
"modifier": "private",
"original_string": "private String server;",
"type": "String",
"var_name": "server"
},
{
"declarator": "services = null",
"modifier": "private",
"original_string": "private Services services = nu... | {
"body": "@Test\n public void testResolveCoordConfiguration() throws Exception {\n String db = \"default\";\n String table = \"tablename\";\n String newHCatDependency1 = \"hcat://\" + server + \"/\" + db + \"/\" + table + \"/dt=20120412;country=brazil\";\n String newHCatDependency2 = \... | {
"fields": [
{
"declarator": "actionId",
"modifier": "protected",
"original_string": "protected String actionId;",
"type": "String",
"var_name": "actionId"
},
{
"declarator": "jpaService = null",
"modifier": "protected",
"original_string": "protected JPASer... | {
"body": "private String resolveCoordConfiguration() throws CommandException {\n try {\n Configuration actionConf = new XConfiguration(new StringReader(coordAction.getRunConf()));\n StringBuilder actionXml = new StringBuilder(coordAction.getActionXml());\n String newActionXml ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_81 | {
"fields": [
{
"declarator": "NAME = \"distcp-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"distcp-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "RESOURCE_MANAGER = \"${resourceManager}\"",
... | {
"body": "@Test\n public void testSameConfigPropertyAddedTwiceThrows() {\n final DistcpActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAP... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public DistcpActionBuilder withConfigProperty(final String key, final String value) {\n attributesBuilder.withConfigProperty(key, value);\n return this;\n }",
"class_method_signature": "DistcpActionBuilder.withConfigProperty(final String key, final String value)",
"constructor": false,... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_134 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testLateUncle() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").withParent(a).build();\n final Node c = MapReduceActionBuilder.create().withName(\"C\").withParent(a).bu... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "start = new Start(\"start\")",
"modifier": "private final",
"original_string": "priva... | {
"body": "public Collection<NodeBase> getNodes() {\n return nodesByName.values();\n }",
"class_method_signature": "Graph.getNodes()",
"constructor": false,
"full_signature": "public Collection<NodeBase> getNodes()",
"identifier": "getNodes",
"invocations": [
"values"
],
"modifiers": "publ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_122 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testClearChgrps() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Chgrp chgrp : CHGRPS) {\n builder.withChgrp(chgrp);\n }\n\n builder.clearChgrps();\n\n final FSAction fsAction = builder.build();\n\n assert... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder clearChgrps() {\n attributesBuilder.clearChgrps();\n return this;\n }",
"class_method_signature": "FSActionBuilder.clearChgrps()",
"constructor": false,
"full_signature": "public FSActionBuilder clearChgrps()",
"identifier": "clearChgrps",
"invocations": [
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_97 | {
"fields": [
{
"declarator": "NAME = \"spark-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"spark-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "... | {
"body": "@Test\n public void testClearArgs() {\n final SparkActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArg(file);\n }\n\n builder.clearArgs();\n\n final SparkAction action = builder.build();\n\n final List<... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "master",
"modifier... | {
"body": "public SparkActionBuilder clearArgs() {\n this.attributesBuilder.clearArgs();\n return this;\n }",
"class_method_signature": "SparkActionBuilder.clearArgs()",
"constructor": false,
"full_signature": "public SparkActionBuilder clearArgs()",
"identifier": "clearArgs",
"invocations"... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_78 | {
"fields": [
{
"declarator": "NAME = \"pig-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"pig-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "priv... | {
"body": "@Test\n public void testSameConfigPropertyAddedTwiceThrows() {\n final PigActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAPRED... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "protected final",
"original_string": "protected final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "script",
"modi... | {
"body": "public PigActionBuilder withConfigProperty(final String key, final String value) {\n this.attributesBuilder.withConfigProperty(key, value);\n return this;\n }",
"class_method_signature": "PigActionBuilder.withConfigProperty(final String key, final String value)",
"constructor": false,
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_319 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
}
],
"file": "core/src/test/java/org/apache/oozie/service/TestHCatAccessorService.java",
"identifier": "TestHCatAcces... | {
"body": "@Test\n public void testGetJMSConnectionInfo() throws Exception {\n services.destroy();\n services = super.setupServicesForHCatalog();\n Configuration conf = services.getConf();\n String server1 = \"default=java.naming.factory.initial#org.apache.activemq.jndi.ActiveMQInitialC... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"HCatAccessorService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"HCatAccessorService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
... | {
"body": "public JMSConnectionInfo getJMSConnectionInfo(URI publisherURI) {\n String publisherAuthority = publisherURI.getAuthority();\n JMSConnectionInfo connInfo = null;\n if (publisherJMSConnInfoMap.containsKey(publisherAuthority)) {\n connInfo = publisherJMSConnInfoMap.get(publish... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_1 | {
"fields": [],
"file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java",
"identifier": "TestECPolicyDisabler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOkNotChanged() {\n MockDistributedFileSystem fs = mock(MockDistributedFileSystem.class);\n when(fs.getErasureCodingPolicy(any())).thenReturn(ReplicationPolicy.DEFAULT);\n ECPolicyDisabler.Result result = ECPolicyDisabler.check(fs, null);\n assertEquals... | {
"fields": [
{
"declarator": "GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\"",
"modifier": "private static final",
"original_string": "private static final String GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\";",
"type": "String",
"var_name": "GETREPLICATIONPOLICY_ME... | {
"body": "static Result check(FileSystem fs, Path path) {\n if (fs instanceof DistributedFileSystem && supportsErasureCoding()) {\n System.out.println(\"Found Hadoop that supports Erasure Coding. Trying to disable Erasure Coding for path: \"+ path);\n DistributedFileSystem dfs = (Distrib... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_175 | {
"fields": [
{
"declarator": "passwordMasker",
"modifier": "private",
"original_string": "private PasswordMasker passwordMasker;",
"type": "PasswordMasker",
"var_name": "passwordMasker"
}
],
"file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestPasswordMas... | {
"body": "@Test\n public void testMaskRandomMatchingStuff() {\n assertEquals(\"aa -Djava.sysprop.password=***** bb DUMMY_PASSWORD=***** cc\",\n passwordMasker.maskPasswordsIfNecessary(\"aa -Djava.sysprop.password=1234 bb DUMMY_PASSWORD=dummy cc\"));\n }",
"class_method_signature": "Test... | {
"fields": [
{
"declarator": "PASSWORD_MASK = \"*****\"",
"modifier": "private static final",
"original_string": "private static final String PASSWORD_MASK = \"*****\";",
"type": "String",
"var_name": "PASSWORD_MASK"
},
{
"declarator": "PASSWORD_KEY = \"pass\"",
... | {
"body": "public String maskPasswordsIfNecessary(String unmasked) {\n if (containsPasswordFragment(unmasked)) {\n return maskPasswordFragments(unmasked);\n } else {\n return unmasked;\n }\n }",
"class_method_signature": "PasswordMasker.maskPasswordsIfNecessary(String u... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_58 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithPartitioner() {\n final String partitioner = \"partitioner\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withPartitioner(partitioner);\n\n final Pipes pipes = builder.build();\n assertEquals(partitioner, pipes.getPartitio... | {
"fields": [
{
"declarator": "map",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> map;",
"type": "ModifyOnce<String>",
"var_name": "map"
},
{
"declarator": "reduce",
"modifier": "private final",
"original_string": "privat... | {
"body": "public PipesBuilder withPartitioner(final String partitioner) {\n this.partitioner.set(partitioner);\n return this;\n }",
"class_method_signature": "PipesBuilder.withPartitioner(final String partitioner)",
"constructor": false,
"full_signature": "public PipesBuilder withPartitioner(f... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_102 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/action/TestEmailActionBuilder.java",
"identifier": "TestEmailActionBuilder",
"interfaces": "",
"superclass": "extends TestNodeBuilderBaseImpl<EmailAction, EmailActionBuilder>"
} | {
"body": "@Test\n public void testBodyAddedTwiceThrows() {\n final EmailActionBuilder builder = getBuilderInstance();\n builder.withBody(\"Email body.\");\n\n expectedException.expect(IllegalStateException.class);\n builder.withBody(\"Any email body.\");\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "to",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> to;",
"type": "ModifyOnce<String>",
"var_name": "to"
},
{
"declarator": "cc",
"modifier": "private final",
"original_string": "private final... | {
"body": "public EmailActionBuilder withBody(final String body) {\n this.body.set(body);\n return this;\n }",
"class_method_signature": "EmailActionBuilder.withBody(final String body)",
"constructor": false,
"full_signature": "public EmailActionBuilder withBody(final String body)",
"identifi... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_381 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/action/hadoop/TestHadoopTokenHelper.java",
"identifier": "TestHadoopTokenHelper",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMRDelegationTokenRenewer() throws Exception {\n HadoopTokenHelper hadoopTokenHelper = new HadoopTokenHelper();\n Configuration configuration = new Configuration(false);\n configuration.set(\"yarn.resourcemanager.address\", \"localhost:8032\");\n con... | {
"fields": [
{
"declarator": "RM_PRINCIPAL = \"yarn.resourcemanager.principal\"",
"modifier": "protected static final",
"original_string": "protected static final String RM_PRINCIPAL = \"yarn.resourcemanager.principal\";",
"type": "String",
"var_name": "RM_PRINCIPAL"
},
{
... | {
"body": "String getServerPrincipal(final Configuration configuration) throws IOException {\n return getServerPrincipal(configuration, getServicePrincipal(configuration));\n }",
"class_method_signature": "HadoopTokenHelper.getServerPrincipal(final Configuration configuration)",
"constructor": false,
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_155 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testRemoveNonexistentParentThrows() {\n final ExplicitNode parent = getInstance(\"parent\");\n final ExplicitNode instance = getInstance(\"instance\");\n\n expectedException.expect(IllegalArgumentException.class);\n instance.removeParent(parent);\n }",
... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
},
{
"declarator": "child",
"modifier": "private",
"original_string": "private NodeBase child;",
"typ... | {
"body": "@Override\n public void removeParent(final NodeBase parent) {\n Preconditions.checkArgument(this.parent == parent, \"Trying to remove a nonexistent parent.\");\n\n if (this.parent != null) {\n this.parent.removeChild(this);\n }\n\n this.parent = null;\n }",
"c... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_339 | {
"fields": [
{
"declarator": "HDFS_SCHEME_PREFIX = \"hdfs\"",
"modifier": "private static final",
"original_string": "private static final String HDFS_SCHEME_PREFIX = \"hdfs\";",
"type": "String",
"var_name": "HDFS_SCHEME_PREFIX"
},
{
"declarator": "TEST_HDFS_HOME = \"... | {
"body": "@Test\n public void testShareLibLoadFilesFromHDFS() throws Exception {\n FileSystem fs = getFileSystem();\n setupShareLibLoadFiles(fs, TEST_HDFS_HOME);\n validateShareLibLoadFiles(fs, HDFS_SCHEME_PREFIX);\n }",
"class_method_signature": "TestShareLibService.testShareLibLoadFile... | {
"fields": [
{
"declarator": "LAUNCHERJAR_LIB_RETENTION = CONF_PREFIX + \"ShareLibService.temp.sharelib.retention.days\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHERJAR_LIB_RETENTION = CONF_PREFIX + \"ShareLibService.temp.sharelib.retention.days\"... | {
"body": "public FileSystem getFileSystem() {\n return fs;\n }",
"class_method_signature": "ShareLibService.getFileSystem()",
"constructor": false,
"full_signature": "public FileSystem getFileSystem()",
"identifier": "getFileSystem",
"invocations": [],
"modifiers": "public",
"parameters": "()... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_293 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckGTZero() {\n assertEquals(120, ParamChecker.checkGTZero(120, \"test\"));\n try {\n ParamChecker.checkGTZero(0, \"test\");\n fail();\n }\n catch (Exception ex) {\n }\n try {\n ParamChecker.checkGTZero(... | {
"fields": [
{
"declarator": "MAX_NODE_NAME_LEN = 128",
"modifier": "private static final",
"original_string": "private static final int MAX_NODE_NAME_LEN = 128;",
"type": "int",
"var_name": "MAX_NODE_NAME_LEN"
}
],
"file": "core/src/main/java/org/apache/oozie/util/ParamChec... | {
"body": "public static int checkGTZero(int value, String name) {\n if (value <= 0) {\n throw new IllegalArgumentException(XLog.format(\"parameter [{0}] = [{1}] must be greater than zero\", name,\n value));\n }\n return value;\... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_19 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
},
{
"declarator": "mockDiagClient",
... | {
"body": "@Test\n public void testGetOsEnv() throws Exception {\n Map<String, String> testSysProps = new HashMap<>();\n testSysProps.put(\"JETTY_OUT\", \"jetty.out\");\n doReturn(testSysProps).when(mockDiagClient).getOSEnv();\n\n serverInfoCollector.storeOsEnv(testTempFolder);\n\n ... | {
"fields": [
{
"declarator": "client",
"modifier": "private final",
"original_string": "private final DiagOozieClient client;",
"type": "DiagOozieClient",
"var_name": "client"
}
],
"file": "tools/src/main/java/org/apache/oozie/tools/diag/ServerInfoCollector.java",
"identif... | {
"body": "void storeOsEnv(final File outputDir) {\n try {\n System.out.print(\"Getting OS Environment Variables...\");\n final Map<String, String> osEnv = client.getOSEnv();\n\n try (DiagBundleEntryWriter configEntryWriter = new DiagBundleEntryWriter(outputDir,\"os-env-vars.tx... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_143 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testClearNonExistentParent() {\n new Start(\"parent\");\n final Start instance = getInstance(\"instance\");\n\n instance.clearParents();\n }",
"class_method_signature": "TestStart.testClearNonExistentParent()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "child",
"modifier": "private",
"original_string": "private NodeBase child;",
"type": "NodeBase",
"var_name": "child"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/Start.java",
"identifier": "Start",
... | {
"body": "@Override\n public void clearParents() {\n\n }",
"class_method_signature": "Start.clearParents()",
"constructor": false,
"full_signature": "@Override public void clearParents()",
"identifier": "clearParents",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"ret... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_285 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestPriorityDelayQueue.java",
"identifier": "TestPriorityDelayQueue",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAntiStarvation() throws Exception {\n PriorityDelayQueue<Integer> q = new PriorityDelayQueue<Integer>(3, 500, TimeUnit.MILLISECONDS, -1);\n q.offer(new TestQueueElement<Integer>(1));\n q.peek();\n assertEquals(1, q.sizes()[0]);\n Thread.sleep(60... | {
"fields": [
{
"declarator": "ANTI_STARVATION_INTERVAL = 500",
"modifier": "public static final",
"original_string": "public static final long ANTI_STARVATION_INTERVAL = 500;",
"type": "long",
"var_name": "ANTI_STARVATION_INTERVAL"
},
{
"declarator": "priorities",
... | {
"body": "protected void antiStarvation() {\n long now = System.currentTimeMillis();\n if (now - lastAntiStarvationCheck > ANTI_STARVATION_INTERVAL) {\n for (int i = 0; i < queues.length - 1; i++) {\n antiStarvation(queues[i], queues[i + 1], \"from P[\" + i + \"] to P[\" + (i ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_401 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void scratchDir_Cannot_Be_Created_When_Setup_Called_And_ScratchDir_Did_Not_Exist()\n throws IOException, URISyntaxException {\n when(mockScratchDir.exists()).thenReturn(false);\n when(mockScratchDir.mkdirs()).thenReturn(false);\n\n expectedException.expect(... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JspHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JspHandler.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator":... | {
"body": "public void setupWebAppContext(WebAppContext servletContextHandler)\n throws IOException, URISyntaxException\n {\n Objects.requireNonNull(servletContextHandler, \"servletContextHandler is null\");\n\n File scratchDir = getScratchDir();\n servletContextHandler.setAttribute... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_114 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testClearMkdirs() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Mkdir mkdir : MKDIRS) {\n builder.withMkdir(mkdir);\n }\n\n builder.clearMkdirs();\n\n final FSAction fsAction = builder.build();\n\n assert... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder clearMkdirs() {\n attributesBuilder.clearMkdirs();\n return this;\n }",
"class_method_signature": "FSActionBuilder.clearMkdirs()",
"constructor": false,
"full_signature": "public FSActionBuilder clearMkdirs()",
"identifier": "clearMkdirs",
"invocations": [
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_397 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java",
"identifier": "TestInputLogicParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOrAndDataIn() throws JDOMException {\n //@formatter:off\n String xml =\n \"<input-logic>\" +\n \"<or>\" +\n \"<and>\" +\n \"<data-in dataset=\\\"A\\\"/> \" +\n ... | {
"fields": [
{
"declarator": "COORD_INPUT_EVENTS_DATA_IN = \"data-in\"",
"modifier": "public final static",
"original_string": "public final static String COORD_INPUT_EVENTS_DATA_IN = \"data-in\";",
"type": "String",
"var_name": "COORD_INPUT_EVENTS_DATA_IN"
},
{
"decla... | {
"body": "public String parse(Element root) {\n return parseWithName(root, null);\n\n }",
"class_method_signature": "InputLogicParser.parse(Element root)",
"constructor": false,
"full_signature": "public String parse(Element root)",
"identifier": "parse",
"invocations": [
"parseWithName"
],... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_378 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "OOZIE_HOME_DIR = null",
"modifier": "private static",
"original_string": "private... | {
"body": "@Test\n public void testAddToJobConfFromOozieConfig() throws Exception {\n services.init();\n HCatCredentialHelper hcatCredHelper = Mockito.mock(HCatCredentialHelper.class);\n PowerMockito.whenNew(HCatCredentialHelper.class).withNoArguments().thenReturn(hcatCredHelper);\n Cre... | {
"fields": [
{
"declarator": "HCAT_METASTORE_PRINCIPAL = \"hcat.metastore.principal\"",
"modifier": "private static final",
"original_string": "private static final String HCAT_METASTORE_PRINCIPAL = \"hcat.metastore.principal\";",
"type": "String",
"var_name": "HCAT_METASTORE_PRINCI... | {
"body": "@Override\n public void updateCredentials(Credentials credentials, Configuration config, CredentialsProperties props,\n Context context) throws Exception {\n try {\n\n String principal = getProperty(props.getProperties(), HCAT_METASTORE_PRINCIPAL, HIVE_METASTORE_PRINCIPAL);\... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_180 | {
"fields": [
{
"declarator": "seqFileWriterFactoryMock",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SequenceFileWriterFactory seqFileWriterFactoryMock;",
"type": "SequenceFileWriterFactory",
"var_name": "seqFileWriterFactoryMock"
},
{
"dec... | {
"body": "@Test(expected = IOException.class)\n public void testActionDataUploadToHdfsFailsWhenWriterIsNull() throws Exception {\n given(seqFileWriterFactoryMock.createSequenceFileWriter(eq(configurationMock),\n any(Path.class), eq(Text.class), eq(Text.class))).willReturn(null);\n\n h... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = StandardCharsets.UTF_8",
"modifier": "private static final",
"original_string": "private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;",
"type": "Charset",
"var_name": "DEFAULT_CHARSET"
},
{
"declarator":... | {
"body": "public void uploadActionDataToHDFS(final Configuration launcherJobConf, final Path actionDir,\n final Map<String, String> actionData) throws IOException, InterruptedException {\n Path finalPath = new Path(actionDir, LauncherAM.ACTION_DATA_SEQUENCE_FILE);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_35 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testClearMkdirs() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Mkdir mkdir : MKDIRS) {\n builder.withMkdir(mkdir);\n }\n\n builder.clearMkdirs();\n\n final ActionAttributes attributes = builder.build();... | {
"fields": [
{
"declarator": "resourceManager",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> resourceManager;",
"type": "ModifyOnce<String>",
"var_name": "resourceManager"
},
{
"declarator": "nameNode",
"modifier": "private fi... | {
"body": "void clearMkdirs() {\n mkdirs.clear();\n }",
"class_method_signature": "ActionAttributesBuilder.clearMkdirs()",
"constructor": false,
"full_signature": " void clearMkdirs()",
"identifier": "clearMkdirs",
"invocations": [
"clear"
],
"modifiers": "",
"parameters": "()",
"retur... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_303 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testMultipleDrainBufferCalls() throws IOException {\n Process process = BlockingWritesExitValueProcess.createFastWritingProcess(\"\", \"\");\n final BufferDrainer bufferDrainer = new BufferDrainer(process, 0);\n bufferDrainer.drainBuffers();\n expectedExce... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(getClass())",
"modifier": "private final",
"original_string": "private final XLog LOG = XLog.getLog(getClass());",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "DRAIN_BUFFER_SLEEP_TIME_MS = 500",
"modifier":... | {
"body": "public int drainBuffers() throws IOException {\n if (drainBuffersFinished) {\n throw new IllegalStateException(\"Buffer draining has already been finished\");\n }\n LOG.trace(\"drainBuffers() start\");\n\n int exitValue = -1;\n\n int inBytesRead = 0;\n i... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_246 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerifyParametersNull() throws Exception {\n try {\n ParameterVerifier.verifyParameters(null, XmlUtils.parseXml(\"<root xmlns=\\\"uri:oozie:workflow:0.4\\\"></root>\"));\n fail();\n } catch (IllegalArgumentException | NullPointerException ex) {\... | {
"fields": [
{
"declarator": "nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\d+.\\\\d+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\... | {
"body": "public static void verifyParameters(Configuration conf, Element rootElement) throws ParameterVerifierException {\n Objects.requireNonNull(conf, \"conf cannot be null\");\n if (rootElement == null) {\n return;\n }\n\n if (supportsParameters(rootElement.getNamespaceURI(... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_138 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testAddedAsParentThrows () {\n final End instance = getInstance(\"instance\");\n final ExplicitNode child = new ExplicitNode(\"child\", null);\n\n expectedException.expect(IllegalStateException.class);\n child.addParent(instance);\n }",
"class_method_... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/End.java",
"identifier": "End",
... | {
"body": "@Override\n public void addParent(final NodeBase parent) {\n Preconditions.checkState(this.parent == null, \"End nodes cannot have multiple parents.\");\n\n this.parent = parent;\n parent.addChild(this);\n }",
"class_method_signature": "End.addParent(final NodeBase parent)",
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_62 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithProgram() {\n final String program = \"program\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withProgram(program);\n\n final Pipes pipes = builder.build();\n assertEquals(program, pipes.getProgram());\n }",
"class_me... | {
"fields": [
{
"declarator": "map",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> map;",
"type": "ModifyOnce<String>",
"var_name": "map"
},
{
"declarator": "reduce",
"modifier": "private final",
"original_string": "privat... | {
"body": "public PipesBuilder withProgram(final String program) {\n this.program.set(program);\n return this;\n }",
"class_method_signature": "PipesBuilder.withProgram(final String program)",
"constructor": false,
"full_signature": "public PipesBuilder withProgram(final String program)",
"id... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_354 | {
"fields": [
{
"declarator": "TZ_DST = TimeZone.getTimeZone(\"America/Los_Angeles\")",
"modifier": "private final static",
"original_string": "private final static TimeZone TZ_DST = TimeZone.getTimeZone(\"America/Los_Angeles\");",
"type": "TimeZone",
"var_name": "TZ_DST"
},
... | {
"body": "@Test\n public void testGetDSTOffsetOfNonDaylightChangeGivesZeroOffset() throws ParseException {\n final long dstOffset = DaylightOffsetCalculator.getDSTOffset(TZ_DST,\n DateUtils.parseDateOozieTZ(\"2013-07-18T00:00Z\"),\n DateUtils.parseDateOozieTZ(\"2013-07-19T00:0... | {
"fields": [
{
"declarator": "startMatdTime",
"modifier": "private final",
"original_string": "private final Date startMatdTime;",
"type": "Date",
"var_name": "startMatdTime"
},
{
"declarator": "endMatdTime",
"modifier": "private final",
"original_string": ... | {
"body": "static long getDSTOffset(final TimeZone tz, final Date beginDate, final Date endDate) {\n if (tz.inDaylightTime(beginDate) && !tz.inDaylightTime(endDate)) {\n final Calendar cal = Calendar.getInstance(tz);\n cal.setTime(beginDate);\n\n return cal.get(Calendar.DST_OFF... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_211 | {
"fields": [],
"file": "sharelib/spark/src/test/java/org/apache/oozie/action/hadoop/TestJarFilter.java",
"identifier": "TestJarFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJarFilter() throws URISyntaxException, IOException, OozieActionConfiguratorException {\n LinkedList<URI> listUris = new LinkedList<URI>();\n String sparkVersion = \"2.1.0\";\n String sparkYarnJar = \"spark-yarn-\" + sparkVersion + \".jar\";\n String ap... | {
"fields": [
{
"declarator": "sparkVersion = \"1.X.X\"",
"modifier": "private",
"original_string": "private String sparkVersion = \"1.X.X\";",
"type": "String",
"var_name": "sparkVersion"
},
{
"declarator": "sparkYarnJar",
"modifier": "private",
"original_s... | {
"body": "JarFilter(final Collection<URI> listUris, final String jarPath) throws URISyntaxException, IOException {\n this.listUris = listUris;\n applicationJar = jarPath;\n final Path p = new Path(jarPath);\n if (p.isAbsolute()) {\n applicationJar = HadoopUriFinder.getFixedUri(... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_74 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/action/TestChgrpBuilder.java",
"identifier": "TestChgrpBuilder",
"interfaces": "",
"superclass": "extends TestChBaseBuilder<Chgrp, ChgrpBuilder>"
} | {
"body": "@Test\n public void testWithGroup() {\n final String group = \"root\";\n\n final ChgrpBuilder builder = new ChgrpBuilder();\n builder.withGroup(group);\n\n final Chgrp chgrp = builder.build();\n assertEquals(group, chgrp.getGroup());\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "group",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> group;",
"type": "ModifyOnce<String>",
"var_name": "group"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/action/Chgr... | {
"body": "public ChgrpBuilder withGroup(final String group) {\n this.group.set(group);\n return this;\n }",
"class_method_signature": "ChgrpBuilder.withGroup(final String group)",
"constructor": false,
"full_signature": "public ChgrpBuilder withGroup(final String group)",
"identifier": "with... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_342 | {
"fields": [
{
"declarator": "output = new StringBuilder()",
"modifier": "static",
"original_string": "static StringBuilder output = new StringBuilder();",
"type": "StringBuilder",
"var_name": "output"
}
],
"file": "core/src/test/java/org/apache/oozie/service/TestEventHandle... | {
"body": "@Test\n public void testEventLogging() throws Exception {\n EventHandlerService ehs = _testEventHandlerService();\n // job event\n WorkflowJobEvent event = new WorkflowJobEvent(\"jobid\", \"parentid\", WorkflowJob.Status.RUNNING, getTestUser(),\n \"myapp\", null, null... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"EventHandlerService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"EventHandlerService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
... | {
"body": "public void queueEvent(Event event) {\n LOG = LogUtils.setLogPrefix(LOG, event);\n LOG.debug(\"Queueing event : {0}\", event);\n LOG.trace(\"Stack trace while queueing event : {0}\", event, new Throwable());\n eventQueue.add(event);\n LogUtils.clearLogPrefix();\n }",
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_207 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testIfUrisAreDecoded() {\n final SparkArgsExtractor extractor = new SparkArgsExtractor(new Configuration());\n final Collection<String> result = extractor.decodeUriPaths(Arrays.asList(\n new Path(LOCAL_FILE).toUri(),\n new Path(HDFS_FILE).t... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "@VisibleForTesting\n Collection<String> decodeUriPaths(final Collection<URI> uris) {\n if (uris == null || uris.isEmpty()) {\n return new ArrayList<>();\n }\n final Collection<String> result = new ArrayList<>(uris.size());\n for (final URI uri : uris) {\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_179 | {
"fields": [
{
"declarator": "seqFileWriterFactoryMock",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SequenceFileWriterFactory seqFileWriterFactoryMock;",
"type": "SequenceFileWriterFactory",
"var_name": "seqFileWriterFactoryMock"
},
{
"dec... | {
"body": "@Test(expected = IOException.class)\n public void testActionDataUploadToHdfsFailsWhenAppendingToWriter() throws Exception {\n willThrow(new IOException()).given(writerMock).append(any(Text.class), any(Text.class));\n\n hdfsOperations.uploadActionDataToHDFS(configurationMock, path, actionDa... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = StandardCharsets.UTF_8",
"modifier": "private static final",
"original_string": "private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;",
"type": "Charset",
"var_name": "DEFAULT_CHARSET"
},
{
"declarator":... | {
"body": "public void uploadActionDataToHDFS(final Configuration launcherJobConf, final Path actionDir,\n final Map<String, String> actionData) throws IOException, InterruptedException {\n Path finalPath = new Path(actionDir, LauncherAM.ACTION_DATA_SEQUENCE_FILE);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_23 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/TestCondition.java",
"identifier": "TestCondition",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaultCondition() {\n final Condition defaultCondition = Condition.defaultCondition();\n\n assertTrue(defaultCondition.isDefault());\n }",
"class_method_signature": "TestCondition.testDefaultCondition()",
"constructor": false,
"full_signature": "@Test publ... | {
"fields": [
{
"declarator": "condition",
"modifier": "private final",
"original_string": "private final String condition;",
"type": "String",
"var_name": "condition"
},
{
"declarator": "isDefault",
"modifier": "private final",
"original_string": "private f... | {
"body": "public static Condition defaultCondition() {\n return new Condition(null, true);\n }",
"class_method_signature": "Condition.defaultCondition()",
"constructor": false,
"full_signature": "public static Condition defaultCondition()",
"identifier": "defaultCondition",
"invocations": [],
"... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_196 | {
"fields": [],
"file": "sharelib/hcatalog/src/test/java/org/apache/oozie/util/TestHCatURI.java",
"identifier": "TestHCatURI",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEqualsNegative() {\n HCatURI uri1 = null;\n HCatURI uri2 = null;\n HCatURI uri3 = null;\n HCatURI uri4 = null;\n HCatURI uri5 = null;\n try {\n uri1 = new HCatURI(\"hcat://hcat.server.com:5080/mydb/clicks/datastamp=12;region=us... | {
"fields": [
{
"declarator": "PARTITION_SEPARATOR = \";\"",
"modifier": "public static final",
"original_string": "public static final String PARTITION_SEPARATOR = \";\";",
"type": "String",
"var_name": "PARTITION_SEPARATOR"
},
{
"declarator": "PARTITION_KEYVAL_SEPARAT... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n HCatURI other = (HCatURI) obj;\n return uri.equals(other.uri);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_315 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testTwoParameters() throws ServletException {\n Multimap<String, String> filterMap = FilterParser.parseFilter(\"key1=value1;key2=value2\");\n ListMultimap<String, String> expectedMap = LinkedListMultimap.create();\n expectedMap.put(\"key1\", \"value1\");\n ... | {
"fields": [
{
"declarator": "PARAMETER_DELIMITER = \";\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_DELIMITER = \";\";",
"type": "String",
"var_name": "PARAMETER_DELIMITER"
},
{
"declarator": "PARAMETER_EQUALS = \"=... | {
"body": "public static ListMultimap<String, String> parseFilter(String filterString) throws ServletException {\n ListMultimap<String, String> filterFieldMap = LinkedListMultimap.create();\n if (filterString != null) {\n StringTokenizer st = new StringTokenizer(filterString, PARAMETER_DELIMI... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_250 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerifyParametersEmptyName() throws Exception {\n Configuration conf = new Configuration(false);\n\n String str = \"<root xmlns=\\\"uri:oozie:workflow:0.4\\\"><parameters>\"\n + \"<property><name></name></property>\"\n + \"</parameters><... | {
"fields": [
{
"declarator": "nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\d+.\\\\d+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\... | {
"body": "public static void verifyParameters(Configuration conf, Element rootElement) throws ParameterVerifierException {\n Objects.requireNonNull(conf, \"conf cannot be null\");\n if (rootElement == null) {\n return;\n }\n\n if (supportsParameters(rootElement.getNamespaceURI(... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_101 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/action/TestEmailActionBuilder.java",
"identifier": "TestEmailActionBuilder",
"interfaces": "",
"superclass": "extends TestNodeBuilderBaseImpl<EmailAction, EmailActionBuilder>"
} | {
"body": "@Test\n public void testSubjectAddedTwiceThrows() {\n final EmailActionBuilder builder = getBuilderInstance();\n builder.withSubject(\"Subject\");\n\n expectedException.expect(IllegalStateException.class);\n builder.withSubject(\"Any subject\");\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "to",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> to;",
"type": "ModifyOnce<String>",
"var_name": "to"
},
{
"declarator": "cc",
"modifier": "private final",
"original_string": "private final... | {
"body": "public EmailActionBuilder withSubject(final String subject) {\n this.subject.set(subject);\n return this;\n }",
"class_method_signature": "EmailActionBuilder.withSubject(final String subject)",
"constructor": false,
"full_signature": "public EmailActionBuilder withSubject(final Strin... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_382 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "jpaService",
"modifier": "private",
"original_string": "private JPAService jpaSer... | {
"body": "@Test\n public void testLoadOnRestart() throws Exception {\n SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();\n slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());\n SLARegistrationBean slaRegBean1 = _createSLARegistration(\"job-1-W\", AppType... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(SLACalculatorMemory.class)",
"modifier": "private static",
"original_string": "private static XLog LOG = XLog.getLog(SLACalculatorMemory.class);",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "slaMap",
"modi... | {
"body": "private void loadOnRestart() {\n try {\n List<SLASummaryBean> summaryBeans = jpaService\n .execute(new SLASummaryGetRecordsOnRestartJPAExecutor(modifiedAfter));\n for (SLASummaryBean summaryBean : summaryBeans) {\n String jobId = summaryBean.ge... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_228 | {
"fields": [
{
"declarator": "START = \"2009-02-01T01:00Z\"",
"modifier": "private static final",
"original_string": "private static final String START = \"2009-02-01T01:00Z\";",
"type": "String",
"var_name": "START"
},
{
"declarator": "END = \"2009-02-01T02:00Z\"",
... | {
"body": "@Test\n public void testExitStatusIs_1_IfTooFewCLIArgs() throws IOException, ParseException {\n final String[] too_few_args = {START, END, FREQUENCY, TIMEUNIT};\n\n LauncherSecurityManager securityManager = new LauncherSecurityManager();\n securityManager.enable();\n\n try {\... | {
"fields": [
{
"declarator": "UTC = getTimeZone(\"UTC\")",
"modifier": "private static final",
"original_string": "private static final TimeZone UTC = getTimeZone(\"UTC\");",
"type": "TimeZone",
"var_name": "UTC"
},
{
"declarator": "DATE_LIST_SEPARATOR = \",\"",
... | {
"body": "public static void main(String[] args) throws IOException, ParseException {\n if (!checkArgsOk(args)) {\n System.exit(1);\n }\n\n String dateList = createDateListFromArgs(args);\n\n System.out.println(\"datelist :\" + dateList+ \":\");\n writeWorkflowOutput(dat... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_156 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testNormalAddedAsParentWhenItAlreadyHasAChildThrows() {\n final ExplicitNode instance = getInstance(\"instance\");\n final NodeBase child1 = new ExplicitNode(\"child1\", null);\n final NodeBase child2 = new ExplicitNode(\"child2\", null);\n\n child1.addPar... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
},
{
"declarator": "child",
"modifier": "private",
"original_string": "private NodeBase child;",
"typ... | {
"body": "@Override\n public void addParent(final NodeBase parent) {\n Preconditions.checkState(this.parent == null, \"An explicit node cannot have multiple parents.\");\n\n this.parent = parent;\n parent.addChild(this);\n }",
"class_method_signature": "ExplicitNode.addParent(final NodeB... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_290 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotEmptyElements() {\n ParamChecker.notEmptyElements(new ArrayList<String>(), \"name\");\n ParamChecker.notEmptyElements(Arrays.asList(\"a\"), \"name\");\n try {\n ParamChecker.notEmptyElements(null, \"name\");\n fail();\n }\n ... | {
"fields": [
{
"declarator": "MAX_NODE_NAME_LEN = 128",
"modifier": "private static final",
"original_string": "private static final int MAX_NODE_NAME_LEN = 128;",
"type": "int",
"var_name": "MAX_NODE_NAME_LEN"
}
],
"file": "core/src/main/java/org/apache/oozie/util/ParamChec... | {
"body": "public static List<String> notEmptyElements(List<String> list, String name) {\n Objects.requireNonNull(list, () -> String.format(\"%s cannot be null\", name));\n for (int i = 0; i < list.size(); i++) {\n notEmpty(list.get(i), XLog.format(\"list [{0}] element [{1}]\", name, i));\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_140 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testAddParent() {\n final ExplicitNode parent = new ExplicitNode(\"parent\", null);\n final Start start = getInstance(\"start\");\n\n expectedException.expect(IllegalStateException.class);\n start.addParent(parent);\n }",
"class_method_signature": "Te... | {
"fields": [
{
"declarator": "child",
"modifier": "private",
"original_string": "private NodeBase child;",
"type": "NodeBase",
"var_name": "child"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/Start.java",
"identifier": "Start",
... | {
"body": "@Override\n public void addParent(final NodeBase parent) {\n throw new IllegalStateException(\"Start nodes cannot have parents.\");\n }",
"class_method_signature": "Start.addParent(final NodeBase parent)",
"constructor": false,
"full_signature": "@Override public void addParent(final Nod... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_286 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestPriorityDelayQueue.java",
"identifier": "TestPriorityDelayQueue",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIterator() throws Exception {\n PriorityDelayQueue<Integer> q = new PriorityDelayQueue<Integer>(3, 500, TimeUnit.MILLISECONDS, -1);\n\n q.offer(new TestQueueElement<Integer>(1, 1, 10, TimeUnit.MILLISECONDS));\n q.offer(new TestQueueElement<Integer>(10, 0, 0, ... | {
"fields": [
{
"declarator": "ANTI_STARVATION_INTERVAL = 500",
"modifier": "public static final",
"original_string": "public static final long ANTI_STARVATION_INTERVAL = 500;",
"type": "long",
"var_name": "ANTI_STARVATION_INTERVAL"
},
{
"declarator": "priorities",
... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public Iterator<QueueElement<E>> iterator() {\n QueueElement[][] queueElements = new QueueElement[queues.length][];\n lock.lock();\n try {\n for (int i = 0; i < queues.length; i++) {\n queueElements[i] = que... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_269 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestIOUtils.java",
"identifier": "TestIOUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetResourceAsReader() throws IOException {\n IOUtils.getResourceAsReader(\"test-ioutils.txt\", 10);\n }",
"class_method_signature": "TestIOUtils.testGetResourceAsReader()",
"constructor": false,
"full_signature": "@Test public void testGetResourceAsReader()",
"i... | {
"fields": [],
"file": "core/src/main/java/org/apache/oozie/util/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.delete(File file)",
"constructor": false,
"full_signature": "public static void delete(File file)",
"identif... | {
"body": "public static Reader getResourceAsReader(String path, int maxLen) throws IOException {\n return new InputStreamReader(getResourceAsStream(path, maxLen), StandardCharsets.UTF_8);\n }",
"class_method_signature": "IOUtils.getResourceAsReader(String path, int maxLen)",
"constructor": false,
"fu... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_117 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testWithoutChmod() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Chmod chmod : CHMODS) {\n builder.withChmod(chmod);\n }\n\n builder.withoutChmod(CHMODS[0]);\n\n final FSAction fsAction = builder.build();\n\n ... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder withoutChmod(final Chmod chmod) {\n attributesBuilder.withoutChmod(chmod);\n return this;\n }",
"class_method_signature": "FSActionBuilder.withoutChmod(final Chmod chmod)",
"constructor": false,
"full_signature": "public FSActionBuilder withoutChmod(final Chmod... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_402 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void scratchDir_Is_Reused_When_Setup_Called_And_ScratchDir_Existed() throws IOException, URISyntaxException {\n when(mockScratchDir.exists()).thenReturn(true);\n\n jspHandler.setupWebAppContext(mockWebAppContext);\n\n verify(mockScratchDir, times(0)).mkdirs();\n }"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JspHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JspHandler.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator":... | {
"body": "public void setupWebAppContext(WebAppContext servletContextHandler)\n throws IOException, URISyntaxException\n {\n Objects.requireNonNull(servletContextHandler, \"servletContextHandler is null\");\n\n File scratchDir = getScratchDir();\n servletContextHandler.setAttribute... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_394 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java",
"identifier": "TestInputLogicParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComplex1() throws JDOMException {\n //@formatter:off\n String xml=\n \"<input-logic>\"+\n \"<and name=\\\"test\\\">\"+\n \"<or>\"+\n \"<and>\" +\n \"<data-in dataset=\\\"A... | {
"fields": [
{
"declarator": "COORD_INPUT_EVENTS_DATA_IN = \"data-in\"",
"modifier": "public final static",
"original_string": "public final static String COORD_INPUT_EVENTS_DATA_IN = \"data-in\";",
"type": "String",
"var_name": "COORD_INPUT_EVENTS_DATA_IN"
},
{
"decla... | {
"body": "public String parse(Element root) {\n return parseWithName(root, null);\n\n }",
"class_method_signature": "InputLogicParser.parse(Element root)",
"constructor": false,
"full_signature": "public String parse(Element root)",
"identifier": "parse",
"invocations": [
"parseWithName"
],... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_183 | {
"fields": [
{
"declarator": "outContent = new ByteArrayOutputStream()",
"modifier": "private final",
"original_string": "private final ByteArrayOutputStream outContent = new ByteArrayOutputStream();",
"type": "ByteArrayOutputStream",
"var_name": "outContent"
},
{
"dec... | {
"body": "@Test\n public void testConfigWrite() throws IOException {\n File f = new File(tmp.newFolder(), \"nonExistentFile\");\n assertFalse(f.exists());\n try (FileOutputStream fos = LauncherMain.createStreamIfFileNotExists(f)) {\n Configuration c = new Configuration(false);\n ... | {
"fields": [
{
"declarator": "ACTION_PREFIX = \"oozie.action.\"",
"modifier": "public static final",
"original_string": "public static final String ACTION_PREFIX = \"oozie.action.\";",
"type": "String",
"var_name": "ACTION_PREFIX"
},
{
"declarator": "EXTERNAL_CHILD_IDS... | {
"body": "static FileOutputStream createStreamIfFileNotExists(File output) throws IOException {\n if (output.exists()) {\n System.out.println(output + \" exists, skipping. The action will use the \"\n + output.getName() + \" defined in the workflow.\");\n return null;\... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_36 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithoutMove() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Move move : MOVES) {\n builder.withMove(move);\n }\n\n builder.withoutMove(MOVES[0]);\n\n final ActionAttributes attributes = builder.build... | {
"fields": [
{
"declarator": "resourceManager",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> resourceManager;",
"type": "ModifyOnce<String>",
"var_name": "resourceManager"
},
{
"declarator": "nameNode",
"modifier": "private fi... | {
"body": "void withoutMove(final Move move) {\n moves.remove(move);\n }",
"class_method_signature": "ActionAttributesBuilder.withoutMove(final Move move)",
"constructor": false,
"full_signature": " void withoutMove(final Move move)",
"identifier": "withoutMove",
"invocations": [
"remove"
],... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_245 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestELConstantsFunctions.java",
"identifier": "TestELConstantsFunctions",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToConfigurationStr() throws Exception {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"a\", \"A\");\n map.put(\"b\", \"&\");\n String str = ELConstantsFunctions.toConfigurationStr(map);\n Element e = XmlUtils.parseXml(\"<... | {
"fields": [
{
"declarator": "KB = 1024",
"modifier": "public static final",
"original_string": "public static final long KB = 1024;",
"type": "long",
"var_name": "KB"
},
{
"declarator": "MB = KB * 1024",
"modifier": "public static final",
"original_string"... | {
"body": "public static String toConfigurationStr(Map<String, String> map) {\n Configuration conf = new Configuration(false);\n for (Map.Entry<String, String> entry: map.entrySet()) {\n conf.set(entry.getKey(), entry.getValue());\n }\n return XmlUtils.escapeCharsForXML(XmlUtils... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_300 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidateActionName() {\n String actionName = \"actionName\";\n ParamChecker.validateActionName(actionName);\n\n actionName = \"actionName01\";\n ParamChecker.validateActionName(actionName);\n\n actionName = \"actionName01_02\";\n ParamChe... | {
"fields": [
{
"declarator": "MAX_NODE_NAME_LEN = 128",
"modifier": "private static final",
"original_string": "private static final int MAX_NODE_NAME_LEN = 128;",
"type": "int",
"var_name": "MAX_NODE_NAME_LEN"
}
],
"file": "core/src/main/java/org/apache/oozie/util/ParamChec... | {
"body": "public static String validateActionName(String actionName) {\n ParamChecker.notEmpty(actionName, \"action name\");\n if (actionName.length() > MAX_NODE_NAME_LEN) {\n throw new IllegalArgumentException(XLog.format(\"name [{0}] must be {1} chars or less\", actionName,\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_61 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithWriterCalledTwiceThrows() {\n final String writer1 = \"writer1\";\n final String writer2 = \"writer2\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withWriter(writer1);\n\n expectedException.expect(IllegalStateException.cl... | {
"fields": [
{
"declarator": "map",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> map;",
"type": "ModifyOnce<String>",
"var_name": "map"
},
{
"declarator": "reduce",
"modifier": "private final",
"original_string": "privat... | {
"body": "public PipesBuilder withWriter(final String writer) {\n this.writer.set(writer);\n return this;\n }",
"class_method_signature": "PipesBuilder.withWriter(final String writer)",
"constructor": false,
"full_signature": "public PipesBuilder withWriter(final String writer)",
"identifier... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_212 | {
"fields": [],
"file": "client/src/test/java/org/apache/oozie/client/rest/TestJsonUtils.java",
"identifier": "TestJsonUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidNonGMTTimeZone() throws Exception {\n String gmtTime = \"Thu, 01 Jan 2009 08:00:00 GMT\";\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss zzz\", Locale.US);\n Date date = dateFormatter.parse(gmtTime);\n String p... | {
"fields": [
{
"declarator": "GMT_TZ = TimeZone.getTimeZone(\"GMT\")",
"modifier": "private static",
"original_string": "private static TimeZone GMT_TZ = TimeZone.getTimeZone(\"GMT\");",
"type": "TimeZone",
"var_name": "GMT_TZ"
}
],
"file": "client/src/main/java/org/apache/o... | {
"body": "public static String formatDateRfc822(Date date, String timeZoneId) {\n if (date != null) {\n TimeZone tZone = \"GMT\".equals(timeZoneId) ? GMT_TZ : TimeZone.getTimeZone(timeZoneId);\n SimpleDateFormat dateFormater = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss zzz\", Local... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_357 | {
"fields": [
{
"declarator": "TZ_DST = TimeZone.getTimeZone(\"America/Los_Angeles\")",
"modifier": "private final static",
"original_string": "private final static TimeZone TZ_DST = TimeZone.getTimeZone(\"America/Los_Angeles\");",
"type": "TimeZone",
"var_name": "TZ_DST"
},
... | {
"body": "@Test\n public void testGetDSTOffsetGivenStandardTZGivesZeroOffset() throws ParseException {\n final long dstOffset = DaylightOffsetCalculator.getDSTOffset(TZ_STANDARD,\n DateUtils.parseDateOozieTZ(\"2013-01-18T00:00Z\"),\n DateUtils.parseDateOozieTZ(\"2013-07-19T00:... | {
"fields": [
{
"declarator": "startMatdTime",
"modifier": "private final",
"original_string": "private final Date startMatdTime;",
"type": "Date",
"var_name": "startMatdTime"
},
{
"declarator": "endMatdTime",
"modifier": "private final",
"original_string": ... | {
"body": "static long getDSTOffset(final TimeZone tz, final Date beginDate, final Date endDate) {\n if (tz.inDaylightTime(beginDate) && !tz.inDaylightTime(endDate)) {\n final Calendar cal = Calendar.getInstance(tz);\n cal.setTime(beginDate);\n\n return cal.get(Calendar.DST_OFF... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_77 | {
"fields": [
{
"declarator": "NAME = \"hive2-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"hive2-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "... | {
"body": "@Test\n public void testClearArgs() {\n final Hive2ActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArg(file);\n }\n\n builder.clearArgs();\n\n final Hive2Action action = builder.build();\n\n final List<... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final HiveActionBuilder delegate;",
"type": "HiveActionBuilder",
"var_name": "delegate"
},
{
"declarator": "jdbcUrl",
"modifier": "private final",
"original_st... | {
"body": "public Hive2ActionBuilder clearArgs() {\n delegate.clearArgs();\n return this;\n }",
"class_method_signature": "Hive2ActionBuilder.clearArgs()",
"constructor": false,
"full_signature": "public Hive2ActionBuilder clearArgs()",
"identifier": "clearArgs",
"invocations": [
"clear... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_98 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/action/TestEmailActionBuilder.java",
"identifier": "TestEmailActionBuilder",
"interfaces": "",
"superclass": "extends TestNodeBuilderBaseImpl<EmailAction, EmailActionBuilder>"
} | {
"body": "@Test\n public void testRecipientAddedTwiceThrows() {\n final EmailActionBuilder builder = getBuilderInstance();\n builder.withRecipient(\"some.recipient@something.com\");\n\n expectedException.expect(IllegalStateException.class);\n builder.withRecipient(\"any.recipient@somet... | {
"fields": [
{
"declarator": "to",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> to;",
"type": "ModifyOnce<String>",
"var_name": "to"
},
{
"declarator": "cc",
"modifier": "private final",
"original_string": "private final... | {
"body": "public EmailActionBuilder withRecipient(final String to) {\n this.to.set(to);\n return this;\n }",
"class_method_signature": "EmailActionBuilder.withRecipient(final String to)",
"constructor": false,
"full_signature": "public EmailActionBuilder withRecipient(final String to)",
"ide... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_204 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testQuotedPlainDriverJavaOptions() throws Exception {\n final Configuration actionConf = new Configuration();\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"yarn\");\n actionConf.set(SparkActionExecutor.SPARK_MODE, \"client\");\n actionConf.set(Spark... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "List<String> extract(final String[] mainArgs) throws OozieActionConfiguratorException, IOException, URISyntaxException {\n final List<String> sparkArgs = new ArrayList<>();\n\n sparkArgs.add(MASTER_OPTION);\n final String master = actionConf.get(SparkActionExecutor.SPARK_MASTER);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_341 | {
"fields": [
{
"declarator": "output = new StringBuilder()",
"modifier": "static",
"original_string": "static StringBuilder output = new StringBuilder();",
"type": "StringBuilder",
"var_name": "output"
}
],
"file": "core/src/test/java/org/apache/oozie/service/TestEventHandle... | {
"body": "@Test\n public void testEventListener() throws Exception {\n EventHandlerService ehs = _testEventHandlerService();\n /*\n * Workflow Job events\n */\n WorkflowJobEvent event = new WorkflowJobEvent(\"jobid\", \"parentid\", WorkflowJob.Status.RUNNING, getTestUser(),\n ... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"EventHandlerService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"EventHandlerService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
... | {
"body": "public void queueEvent(Event event) {\n LOG = LogUtils.setLogPrefix(LOG, event);\n LOG.debug(\"Queueing event : {0}\", event);\n LOG.trace(\"Stack trace while queueing event : {0}\", event, new Throwable());\n eventQueue.add(event);\n LogUtils.clearLogPrefix();\n }",
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_20 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
},
{
"declarator": "mockDiagClient",
... | {
"body": "@Test\n public void testGetServerConfiguration() throws Exception {\n final Map<String, String> testSysProps = new HashMap<>();\n testSysProps.put(\"oozie.services\", \"org.apache.oozie.service.SchedulerService\");\n doReturn(testSysProps).when(mockDiagClient).getServerConfiguration... | {
"fields": [
{
"declarator": "client",
"modifier": "private final",
"original_string": "private final DiagOozieClient client;",
"type": "DiagOozieClient",
"var_name": "client"
}
],
"file": "tools/src/main/java/org/apache/oozie/tools/diag/ServerInfoCollector.java",
"identif... | {
"body": "void storeServerConfiguration(File outputDir) {\n try {\n System.out.print(\"Getting Configuration...\");\n final Map<String, String> serverConfigMap = client.getServerConfiguration();\n final Configuration serverConfig = new Configuration(false);\n for (M... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_195 | {
"fields": [],
"file": "sharelib/hcatalog/src/test/java/org/apache/oozie/util/TestHCatURI.java",
"identifier": "TestHCatURI",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHCatUri() {\n Map<String, String> partitions = new LinkedHashMap<String, String>();\n partitions.put(\"datastamp\", \"12\");\n partitions.put(\"region\", \"us\");\n String hcatUri = HCatURI.getHCatURI(\"hcat\", \"hcat.server.com:5080\", \"mydb\", \"... | {
"fields": [
{
"declarator": "PARTITION_SEPARATOR = \";\"",
"modifier": "public static final",
"original_string": "public static final String PARTITION_SEPARATOR = \";\";",
"type": "String",
"var_name": "PARTITION_SEPARATOR"
},
{
"declarator": "PARTITION_KEYVAL_SEPARAT... | {
"body": "public static String getHCatURI(String server, String db, String table, Map<String, String> partitions) {\n return getHCatURI(\"hcat\", server, db, table, partitions);\n }",
"class_method_signature": "HCatURI.getHCatURI(String server, String db, String table, Map<String, String> partitions)",
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_253 | {
"fields": [
{
"declarator": "TABLE_COLUMNS = new HashMap<Table, List<Column>>()",
"modifier": "public static",
"original_string": "public static Map<Table, List<Column>> TABLE_COLUMNS = new HashMap<Table, List<Column>>();",
"type": "Map<Table, List<Column>>",
"var_name": "TABLE_COL... | {
"body": "@Test\n public void testGenerateCreateScript() throws SQLException {\n Connection conn = getDirectConnection();\n prepareDB(conn);\n ResultSet rs = conn.prepareStatement(\"SELECT COUNT(*) FROM \" + TestTable.TEST_TABLE).executeQuery();\n rs.next();\n assertEquals(0, rs... | {
"fields": [],
"file": "core/src/main/java/org/apache/oozie/util/db/Schema.java",
"identifier": "Schema",
"interfaces": "",
"methods": [
{
"class_method_signature": "Schema.getDbDataType(Column column, DBType dbType)",
"constructor": false,
"full_signature": "public static String getDbD... | {
"body": "public static String generateCreateIndexScript(Index index, DBType dbType) {\n StringBuilder sb = new StringBuilder(\"CREATE INDEX \").append(index).append(\" ON \").append(\n index.column().table()).append(\"( \" + index.column().columnName() + \" )\");\n return sb.toString();... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_316 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testRepeatedKeys() throws ServletException {\n Multimap<String, String> filterMap = FilterParser.parseFilter(\"key1=value1;key1=value2\");\n ListMultimap<String, String> expectedMap = LinkedListMultimap.create();\n expectedMap.put(\"key1\", \"value1\");\n ... | {
"fields": [
{
"declarator": "PARAMETER_DELIMITER = \";\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_DELIMITER = \";\";",
"type": "String",
"var_name": "PARAMETER_DELIMITER"
},
{
"declarator": "PARAMETER_EQUALS = \"=... | {
"body": "public static ListMultimap<String, String> parseFilter(String filterString) throws ServletException {\n ListMultimap<String, String> filterFieldMap = LinkedListMultimap.create();\n if (filterString != null) {\n StringTokenizer st = new StringTokenizer(filterString, PARAMETER_DELIMI... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_361 | {
"fields": [
{
"declarator": "VIEW_ACL_VALUE = \"viewacl\"",
"modifier": "private static final",
"original_string": "private static final String VIEW_ACL_VALUE = \"viewacl\";",
"type": "String",
"var_name": "VIEW_ACL_VALUE"
},
{
"declarator": "MODIFY_ACL_VALUE = \"modi... | {
"body": "@Test\n public void testModifyACLisSet() {\n setupYarnACLHandler(true);\n setModifyACL();\n\n yarnACLSetter.setACLs(contextMock);\n\n assertModifyACLset();\n }",
"class_method_signature": "TestYarnACLHandler.testModifyACLisSet()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(getClass())",
"modifier": "private",
"original_string": "private XLog LOG = XLog.getLog(getClass());",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "launcherConf",
"modifier": "private final",
"origina... | {
"body": "public void setACLs(ContainerLaunchContext containerLaunchContext) {\n Map<ApplicationAccessType, String> aclDefinition = new HashMap<>();\n\n String viewAcl = launcherConf.get(JavaActionExecutor.LAUNCER_VIEW_ACL);\n if (viewAcl != null) {\n LOG.info(\"Setting view-acl: [{0}... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_224 | {
"fields": [
{
"declarator": "CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\"",
"modifier": "static",
"original_string": "static String CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\";",
"type": "String",
"var_name": "CREATED_TIME"
},
{
"declarator": "START_TIME = \"... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testParseCoordinatorJobs() {\n JSONArray array = createJsonCoordinatorJobList();\n List<CoordinatorJob> list = JsonToBean.createCoordinatorJobList(array);\n\n assertEquals(2, list.size());\n assertEquals(\"cj1\", list.... | {
"fields": [
{
"declarator": "WF_JOB = new HashMap<String, Property>()",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final Map<String, Property> WF_JOB = new HashMap<String, Property>();",
"type": "Map<String, Property>",
"v... | {
"body": "public static List<CoordinatorJob> createCoordinatorJobList(JSONArray json) {\n List<CoordinatorJob> list = new ArrayList<CoordinatorJob>();\n for (Object obj : json) {\n list.add(createCoordinatorJob((JSONObject) obj));\n }\n return list;\n }",
"class_method_sig... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_57 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testWithInputformatCalledTwiceThrows() {\n final String inputformat1 = \"inputformat1\";\n final String inputformat2 = \"inputformat2\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withInputformat(inputformat1);\n\n expectedExcept... | {
"fields": [
{
"declarator": "map",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> map;",
"type": "ModifyOnce<String>",
"var_name": "map"
},
{
"declarator": "reduce",
"modifier": "private final",
"original_string": "privat... | {
"body": "public PipesBuilder withInputformat(final String inputformat) {\n this.inputformat.set(inputformat);\n return this;\n }",
"class_method_signature": "PipesBuilder.withInputformat(final String inputformat)",
"constructor": false,
"full_signature": "public PipesBuilder withInputformat(f... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_336 | {
"fields": [
{
"declarator": "HDFS_SCHEME_PREFIX = \"hdfs\"",
"modifier": "private static final",
"original_string": "private static final String HDFS_SCHEME_PREFIX = \"hdfs\";",
"type": "String",
"var_name": "HDFS_SCHEME_PREFIX"
},
{
"declarator": "TEST_HDFS_HOME = \"... | {
"body": "@Test\n public void testAddShareLibDistributedCache() throws Exception {\n setShipLauncherInOozieConfig();\n\n services.init();\n String actionXml = \"<java>\" + \"<job-tracker>\" + getJobTrackerUri() + \"</job-tracker>\" + \"<name-node>\"\n + getNameNodeUri() + \"</n... | {
"fields": [
{
"declarator": "LAUNCHERJAR_LIB_RETENTION = CONF_PREFIX + \"ShareLibService.temp.sharelib.retention.days\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHERJAR_LIB_RETENTION = CONF_PREFIX + \"ShareLibService.temp.sharelib.retention.days\"... | {
"body": "@Override\n public void init(Services services) throws ServiceException {\n this.services = services;\n sharelibMappingFile = ConfigurationService.get(services.getConf(), SHARELIB_MAPPING_FILE);\n isShipLauncherEnabled = ConfigurationService.getBoolean(services.getConf(), SHIP_LAUNC... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_273 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testTrimTabReplacement() {\n assertEquals(\"A string\", StringUtils.trim(\"A \\t string\"));\n }",
"class_method_signature": "TestStringUtils.testTrimTabReplacement()",
"constructor": false,
"full_signature": "@Test public void testTrimTabReplacement()",
"identifie... | {
"fields": [],
"file": "core/src/main/java/org/apache/oozie/util/StringUtils.java",
"identifier": "StringUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringUtils.trim(String str)",
"constructor": false,
"full_signature": "public static String trim(String str)",
... | {
"body": "public static String trim(String str) {\n if (str != null) {\n str = str.replaceAll(\"\\\\n\", \"\");\n str = str.replaceAll(\"\\\\t\", \"\");\n str = str.trim();\n }\n return str;\n }",
"class_method_signature": "StringUtils.trim(String str)",
"... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_320 | {
"fields": [
{
"declarator": "DEFAULT_TYPE = \"test\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_TYPE = \"test\";",
"type": "String",
"var_name": "DEFAULT_TYPE"
},
{
"declarator": "DEFAULT_MAX_ACTIVE_COMMANDS = 5",
... | {
"body": "@Test\n public void testSubmissionSuccessfulAfterDelay() {\n when(callableWrapper.getInitialDelay()).thenReturn(100L);\n when(callableWrapper.getDelay(eq(TimeUnit.MILLISECONDS))).thenReturn(50L);\n when(callableQueueService.canSubmitCallable(any(XCallable.class))).thenReturn(true);\... | {
"fields": [
{
"declarator": "MIN_PRIORITY = 0",
"modifier": "public static final",
"original_string": "public static final int MIN_PRIORITY = 0;",
"type": "int",
"var_name": "MIN_PRIORITY"
},
{
"declarator": "ANTI_STARVATION_INTERVAL = 500",
"modifier": "public ... | {
"body": "public synchronized boolean queue(CallableWrapper<?> wrapper, boolean ignoreQueueSize) {\n if (!ignoreQueueSize && activeCommands.get() >= maxActiveCommands) {\n log.warn(\"queue full, ignoring queuing for [{0}]\", wrapper.getElement().getKey());\n return false;\n }\n\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_265 | {
"fields": [
{
"declarator": "testRetryPredicate = new Predicate<Throwable>() {\n @Override\n public boolean test(Throwable input) {\n return input.getClass() == RuntimeException.class;\n }\n }",
"modifier": "private final",
"original_string": "private final P... | {
"body": "@Test\n public void testNoRetriesOnNonSQLError() throws Exception {\n @SuppressWarnings(\"unchecked\")\n Callable<String> operation = mock(Callable.class);\n final MutableInt callCount = new MutableInt(0);\n\n willAnswer(new Answer<Void>() {\n @Override\n ... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(OperationRetryHandler.class)",
"modifier": "private static",
"original_string": "private static XLog LOG = XLog.getLog(OperationRetryHandler.class);",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "RETRY_ATTEMPT_ST... | {
"body": "public <V> V executeWithRetry(final Callable<V> operation) throws Exception {\n int retries = 0;\n long waitTime = initialWaitTime;\n Exception lastException = null;\n\n if (!shouldRetry) {\n try {\n LOG.trace(\"Configured not to retry, calling operatio... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_16 | {
"fields": [
{
"declarator": "mockCommandLine = mock(CommandLine.class)",
"modifier": "private",
"original_string": "private CommandLine mockCommandLine = mock(CommandLine.class);",
"type": "CommandLine",
"var_name": "mockCommandLine"
},
{
"declarator": "argParser = n... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testExceptionThrownWithInvalidMaxChildActions() throws Exception {\n argParser.getMaxChildActions();\n }",
"class_method_signature": "TestArgParser.testExceptionThrownWithInvalidMaxChildActions()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "OOZIE_OPTION = \"oozie\"",
"modifier": "private static final",
"original_string": "private static final String OOZIE_OPTION = \"oozie\";",
"type": "String",
"var_name": "OOZIE_OPTION"
},
{
"declarator": "NUM_WORKFLOWS_OPTION = \"numworkflo... | {
"body": "Integer getMaxChildActions() {\n final Integer maxChildActions = Integer.valueOf(commandLine.getOptionValue(MAX_CHILD_ACTIONS, \"10\"));\n Preconditions.checkArgument(maxChildActions >= 0,\n MAX_CHILD_ACTIONS + \" cannot be negative\");\n return maxChildActions;\n }",... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_377 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "OOZIE_HOME_DIR = null",
"modifier": "private static",
"original_string": "private... | {
"body": "@Test\n public void testAddToJobConfFromHiveConf() throws Exception {\n services.init();\n CredentialsProperties credProps = new CredentialsProperties(\"\", \"\");\n credProps.setProperties(new HashMap<String, String>());\n HCatCredentials hcatCred = new HCatCredentials();\n ... | {
"fields": [
{
"declarator": "HCAT_METASTORE_PRINCIPAL = \"hcat.metastore.principal\"",
"modifier": "private static final",
"original_string": "private static final String HCAT_METASTORE_PRINCIPAL = \"hcat.metastore.principal\";",
"type": "String",
"var_name": "HCAT_METASTORE_PRINCI... | {
"body": "@Override\n public void updateCredentials(Credentials credentials, Configuration config, CredentialsProperties props,\n Context context) throws Exception {\n try {\n\n String principal = getProperty(props.getProperties(), HCAT_METASTORE_PRINCIPAL, HIVE_METASTORE_PRINCIPAL);\... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_398 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "session1",
"modifier": "private",
"original_string": "private Session session1;",... | {
"body": "@Test\n public void testThreadLocalSession() throws JMSException {\n String jmsProps = services.getConf().get(JMSJobEventListener.JMS_CONNECTION_PROPERTIES);\n JMSConnectionInfo connInfo = new JMSConnectionInfo(jmsProps);\n ConnectionContext jmsContext = Services.get().get(JMSAccess... | {
"fields": [
{
"declarator": "connection",
"modifier": "protected",
"original_string": "protected Connection connection;",
"type": "Connection",
"var_name": "connection"
},
{
"declarator": "connectionFactoryName",
"modifier": "protected",
"original_string":... | {
"body": "@Override\n public Session createThreadLocalSession(final int sessionOpts) throws JMSException {\n Session session = th.get();\n if (session != null) {\n return session;\n }\n th.remove();\n session = createSession(sessionOpts);\n th.set(session);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_232 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestDateUtils.java",
"identifier": "TestDateUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void testInvalidOozieTimeZoneGMTPostfix() throws Exception {\n Configuration conf = new XConfiguration();\n conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, \"GMT-0300x\");\n DateUtils.setConf(conf);\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(DateUtils.class)",
"modifier": "private static final",
"original_string": "private static final XLog LOG = XLog.getLog(DateUtils.class);",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "GMT_OFFSET_COLON_PATTERN = P... | {
"body": "public static void setConf(Configuration conf) {\n String tz = ConfigurationService.get(conf, OOZIE_PROCESSING_TIMEZONE_KEY);\n if (!VALID_TIMEZONE_PATTERN.matcher(tz).matches()) {\n throw new RuntimeException(\"Invalid Oozie timezone, it must be 'UTC' or 'GMT(+/-)####\");\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_41 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testClearTouchzs() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Touchz touchz : TOUCHZS) {\n builder.withTouchz(touchz);\n }\n\n builder.clearTouchzs();\n\n final ActionAttributes attributes = builder.b... | {
"fields": [
{
"declarator": "resourceManager",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> resourceManager;",
"type": "ModifyOnce<String>",
"var_name": "resourceManager"
},
{
"declarator": "nameNode",
"modifier": "private fi... | {
"body": "void clearTouchzs() {\n touchzs.clear();\n }",
"class_method_signature": "ActionAttributesBuilder.clearTouchzs()",
"constructor": false,
"full_signature": " void clearTouchzs()",
"identifier": "clearTouchzs",
"invocations": [
"clear"
],
"modifiers": "",
"parameters": "()",
"... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_249 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerifyParametersDefined() throws Exception {\n Configuration conf = new Configuration(false);\n conf.set(\"hello\", \"planet\");\n\n String str = \"<root xmlns=\\\"uri:oozie:workflow:0.4\\\"><parameters>\"\n + \"<property><name>hello</name></pr... | {
"fields": [
{
"declarator": "nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\d+.\\\\d+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\... | {
"body": "public static void verifyParameters(Configuration conf, Element rootElement) throws ParameterVerifierException {\n Objects.requireNonNull(conf, \"conf cannot be null\");\n if (rootElement == null) {\n return;\n }\n\n if (supportsParameters(rootElement.getNamespaceURI(... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_160 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testNameIsCorrect() {\n final T instance = getInstance(NAME);\n assertEquals(NAME, instance.getName());\n }",
"class_method_signature": "TestNodeBase.testNameIsCorrect()",
"constructor": false,
"full_signature": "@Test public void testNameIsCorrect()",
"ident... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final String name;",
"type": "String",
"var_name": "name"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/NodeBase.java",
"identifier": "N... | {
"body": "public String getName() {\n return name;\n }",
"class_method_signature": "NodeBase.getName()",
"constructor": false,
"full_signature": "public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_82 | {
"fields": [
{
"declarator": "NAME = \"distcp-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"distcp-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "RESOURCE_MANAGER = \"${resourceManager}\"",
... | {
"body": "@Test\n public void testClearArgs() {\n final DistcpActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArg(file);\n }\n\n builder.clearArgs();\n\n final DistcpAction mrAction = builder.build();\n\n final L... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public DistcpActionBuilder clearArgs() {\n attributesBuilder.clearArgs();\n return this;\n }",
"class_method_signature": "DistcpActionBuilder.clearArgs()",
"constructor": false,
"full_signature": "public DistcpActionBuilder clearArgs()",
"identifier": "clearArgs",
"invocations": ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_137 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testRemoveNonexistentParentThrows() {\n final Start parent = new Start(\"parent\");\n final End instance = getInstance(\"instance\");\n\n expectedException.expect(IllegalArgumentException.class);\n instance.removeParent(parent);\n }",
"class_method_si... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/End.java",
"identifier": "End",
... | {
"body": "@Override\n public void removeParent(final NodeBase parent) {\n Preconditions.checkArgument(this.parent == parent, \"Trying to remove a nonexistent parent.\");\n\n if (this.parent != null) {\n this.parent.removeChild(this);\n }\n\n this.parent = null;\n }",
"c... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_208 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testDecodeUriPathsNullInput() {\n assertTrue(\"In case providing empty or null input, empty list shall be returned\",\n new SparkArgsExtractor(new Configuration()).decodeUriPaths(null).isEmpty());\n }",
"class_method_signature": "TestSparkArgsExtractor.test... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "@VisibleForTesting\n Collection<String> decodeUriPaths(final Collection<URI> uris) {\n if (uris == null || uris.isEmpty()) {\n return new ArrayList<>();\n }\n final Collection<String> result = new ArrayList<>(uris.size());\n for (final URI uri : uris) {\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_121 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testWithoutChgrp() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Chgrp chgrp : CHGRPS) {\n builder.withChgrp(chgrp);\n }\n\n builder.withoutChgrp(CHGRPS[0]);\n\n final FSAction fsAction = builder.build();\n\n ... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder withoutChgrp(final Chgrp chgrp) {\n attributesBuilder.withoutChgrp(chgrp);\n return this;\n }",
"class_method_signature": "FSActionBuilder.withoutChgrp(final Chgrp chgrp)",
"constructor": false,
"full_signature": "public FSActionBuilder withoutChgrp(final Chgrp... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_94 | {
"fields": [
{
"declarator": "NAME = \"map-reduce-name\"",
"modifier": "static final",
"original_string": "static final String NAME = \"map-reduce-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "expectedException = ExpectedException.none()",
"m... | {
"body": "@Test\n public void testNameAdded() {\n final B builder = getBuilderInstance();\n builder.withName(NAME);\n\n final N action = builder.build();\n assertEquals(NAME, action.getName());\n }",
"class_method_signature": "TestNodeBuilderBaseImpl.testNameAdded()",
"construct... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> name;",
"type": "ModifyOnce<String>",
"var_name": "name"
},
{
"declarator": "credentials",
"modifier": "private final",
"original_string":... | {
"body": "public B withName(final String name) {\n this.name.set(name);\n return ensureRuntimeSelfReference();\n }",
"class_method_signature": "NodeBuilderBaseImpl.withName(final String name)",
"constructor": false,
"full_signature": "public B withName(final String name)",
"identifier": "wit... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_2 | {
"fields": [],
"file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java",
"identifier": "TestECPolicyDisabler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOkChanged() {\n MockDistributedFileSystem fs = mock(MockDistributedFileSystem.class);\n when(fs.getErasureCodingPolicy(any())).thenReturn(ReplicationPolicy.OTHER);\n ECPolicyDisabler.Result result = ECPolicyDisabler.check(fs, null);\n assertEquals(\"re... | {
"fields": [
{
"declarator": "GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\"",
"modifier": "private static final",
"original_string": "private static final String GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\";",
"type": "String",
"var_name": "GETREPLICATIONPOLICY_ME... | {
"body": "static Result check(FileSystem fs, Path path) {\n if (fs instanceof DistributedFileSystem && supportsErasureCoding()) {\n System.out.println(\"Found Hadoop that supports Erasure Coding. Trying to disable Erasure Coding for path: \"+ path);\n DistributedFileSystem dfs = (Distrib... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_199 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testLocalClientArgsParsing() throws Exception {\n final Configuration actionConf = new Configuration();\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"local[*]\");\n actionConf.set(SparkActionExecutor.SPARK_MODE, \"client\");\n actionConf.set(SparkAc... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "List<String> extract(final String[] mainArgs) throws OozieActionConfiguratorException, IOException, URISyntaxException {\n final List<String> sparkArgs = new ArrayList<>();\n\n sparkArgs.add(MASTER_OPTION);\n final String master = actionConf.get(SparkActionExecutor.SPARK_MASTER);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_176 | {
"fields": [
{
"declarator": "passwordMasker",
"modifier": "private",
"original_string": "private PasswordMasker passwordMasker;",
"type": "PasswordMasker",
"var_name": "passwordMasker"
}
],
"file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestPasswordMas... | {
"body": "@Test\n public void testMaskNullArgument() {\n assertEquals(null, passwordMasker.maskPasswordsIfNecessary(null));\n }",
"class_method_signature": "TestPasswordMasker.testMaskNullArgument()",
"constructor": false,
"full_signature": "@Test public void testMaskNullArgument()",
"identifier... | {
"fields": [
{
"declarator": "PASSWORD_MASK = \"*****\"",
"modifier": "private static final",
"original_string": "private static final String PASSWORD_MASK = \"*****\";",
"type": "String",
"var_name": "PASSWORD_MASK"
},
{
"declarator": "PASSWORD_KEY = \"pass\"",
... | {
"body": "public String maskPasswordsIfNecessary(String unmasked) {\n if (containsPasswordFragment(unmasked)) {\n return maskPasswordFragments(unmasked);\n } else {\n return unmasked;\n }\n }",
"class_method_signature": "PasswordMasker.maskPasswordsIfNecessary(String u... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_198 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testAppendOoziePropertiesToSparkConf() throws Exception {\n final List<String> sparkArgs = new ArrayList<>();\n final Configuration actionConf = new Configuration();\n actionConf.set(\"foo\", \"foo-not-to-include\");\n actionConf.set(\"oozie.launcher\", \"... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "@VisibleForTesting\n void appendOoziePropertiesToSparkConf(final List<String> sparkArgs) {\n for (final Map.Entry<String, String> oozieConfig : actionConf\n .getValByRegex(\"^oozie\\\\.(?!launcher|spark).+\").entrySet()) {\n sparkArgs.add(CONF_OPTION);\n spark... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_177 | {
"fields": [
{
"declarator": "passwordMasker",
"modifier": "private",
"original_string": "private PasswordMasker passwordMasker;",
"type": "PasswordMasker",
"var_name": "passwordMasker"
}
],
"file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestPasswordMas... | {
"body": "@Test\n public void testMaskEmptyArgument() {\n assertEquals(\"\", passwordMasker.maskPasswordsIfNecessary(\"\"));\n }",
"class_method_signature": "TestPasswordMasker.testMaskEmptyArgument()",
"constructor": false,
"full_signature": "@Test public void testMaskEmptyArgument()",
"identif... | {
"fields": [
{
"declarator": "PASSWORD_MASK = \"*****\"",
"modifier": "private static final",
"original_string": "private static final String PASSWORD_MASK = \"*****\";",
"type": "String",
"var_name": "PASSWORD_MASK"
},
{
"declarator": "PASSWORD_KEY = \"pass\"",
... | {
"body": "public String maskPasswordsIfNecessary(String unmasked) {\n if (containsPasswordFragment(unmasked)) {\n return maskPasswordFragments(unmasked);\n } else {\n return unmasked;\n }\n }",
"class_method_signature": "PasswordMasker.maskPasswordsIfNecessary(String u... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_3 | {
"fields": [],
"file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java",
"identifier": "TestECPolicyDisabler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testServerNotSupports() {\n MockDistributedFileSystem fs = mock(MockDistributedFileSystem.class);\n when(fs.getErasureCodingPolicy(any())).thenReturn(ReplicationPolicy.OTHER);\n Mockito.doThrow(createNoSuchMethodException()).when(fs).setErasureCodingPolicy(any(),... | {
"fields": [
{
"declarator": "GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\"",
"modifier": "private static final",
"original_string": "private static final String GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\";",
"type": "String",
"var_name": "GETREPLICATIONPOLICY_ME... | {
"body": "static Result check(FileSystem fs, Path path) {\n if (fs instanceof DistributedFileSystem && supportsErasureCoding()) {\n System.out.println(\"Found Hadoop that supports Erasure Coding. Trying to disable Erasure Coding for path: \"+ path);\n DistributedFileSystem dfs = (Distrib... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_120 | {
"fields": [
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "private static final",
"original_string": "private static final String NAME_NODE = \"${nameNode}\";",
"type": "String",
"var_name": "NAME_NODE"
},
{
"declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j... | {
"body": "@Test\n public void testClearTouchzs() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Touchz touchz : TOUCHZS) {\n builder.withTouchz(touchz);\n }\n\n builder.clearTouchzs();\n\n final FSAction fsAction = builder.build();\n\n ... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
}
],
"file": "fluent-job/fluent-job-api/src/main/j... | {
"body": "public FSActionBuilder clearTouchzs() {\n attributesBuilder.clearTouchzs();\n return this;\n }",
"class_method_signature": "FSActionBuilder.clearTouchzs()",
"constructor": false,
"full_signature": "public FSActionBuilder clearTouchzs()",
"identifier": "clearTouchzs",
"invocations... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_95 | {
"fields": [
{
"declarator": "NAME = \"map-reduce-name\"",
"modifier": "static final",
"original_string": "static final String NAME = \"map-reduce-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "expectedException = ExpectedException.none()",
"m... | {
"body": "@Test\n public void testNameAddedTwiceThrows() {\n final B builder = getBuilderInstance();\n builder.withName(NAME);\n\n expectedException.expect(IllegalStateException.class);\n builder.withName(\"any_name\");\n }",
"class_method_signature": "TestNodeBuilderBaseImpl.test... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> name;",
"type": "ModifyOnce<String>",
"var_name": "name"
},
{
"declarator": "credentials",
"modifier": "private final",
"original_string":... | {
"body": "public B withName(final String name) {\n this.name.set(name);\n return ensureRuntimeSelfReference();\n }",
"class_method_signature": "NodeBuilderBaseImpl.withName(final String name)",
"constructor": false,
"full_signature": "public B withName(final String name)",
"identifier": "wit... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_209 | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\"",
"modifier": "private static final",
"original_string": "private static final String SPARK_DEFAULTS_PROPERTIES = \"spark-defaults.conf\";",
"type": "String",
"var_name": "SPARK_DEFAULTS_PROPERTIES"
... | {
"body": "@Test\n public void testKeytabDuplicateWithFileName()\n throws OozieActionConfiguratorException, IOException, URISyntaxException {\n final Configuration actionConf = new Configuration();\n\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"yarn\");\n actionConf.set(Spar... | {
"fields": [
{
"declarator": "SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\")",
"modifier": "private static final",
"original_string": "private static final Pattern SPARK_DEFAULTS_FILE_PATTERN = Pattern.compile(\"spark-defaults.conf\");",
"type": "Pattern",
"v... | {
"body": "List<String> extract(final String[] mainArgs) throws OozieActionConfiguratorException, IOException, URISyntaxException {\n final List<String> sparkArgs = new ArrayList<>();\n\n sparkArgs.add(MASTER_OPTION);\n final String master = actionConf.get(SparkActionExecutor.SPARK_MASTER);\n ... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_83 | {
"fields": [
{
"declarator": "NAME = \"ssh-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"ssh-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "priv... | {
"body": "@Test\n public void testSameConfigPropertyAddedTwiceThrows() {\n final JavaActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAPRE... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "mainClass",
"modif... | {
"body": "public JavaActionBuilder withConfigProperty(final String key, final String value) {\n this.attributesBuilder.withConfigProperty(key, value);\n return this;\n }",
"class_method_signature": "JavaActionBuilder.withConfigProperty(final String key, final String value)",
"constructor": false... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_136 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedExcepti... | {
"body": "@Test\n public void testAddParentWhenItAlreadyExists() {\n final Start parent1 = new Start(\"parent1\");\n final Start parent2 = new Start(\"parent2\");\n final End instance = getInstance(\"instance\");\n\n instance.addParent(parent1);\n\n expectedException.expect(Ille... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/dag/End.java",
"identifier": "End",
... | {
"body": "@Override\n public void addParent(final NodeBase parent) {\n Preconditions.checkState(this.parent == null, \"End nodes cannot have multiple parents.\");\n\n this.parent = parent;\n parent.addChild(this);\n }",
"class_method_signature": "End.addParent(final NodeBase parent)",
... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_161 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/workflow/TestCredentialsBuilder.java",
"identifier": "TestCredentialsBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreate() {\n final Credentials credentials = CredentialsBuilder.create()\n .withCredential(\"hive2\",\n \"hive\",\n Collections.singletonList(\n new ConfigurationEntry(\"jdbcUrl\", ... | {
"fields": [
{
"declarator": "credentials",
"modifier": "private final",
"original_string": "private final ImmutableList.Builder<Credential> credentials;",
"type": "ImmutableList.Builder<Credential>",
"var_name": "credentials"
}
],
"file": "fluent-job/fluent-job-api/src/main... | {
"body": "public static CredentialsBuilder create() {\n return new CredentialsBuilder(new ImmutableList.Builder<Credential>());\n }",
"class_method_signature": "CredentialsBuilder.create()",
"constructor": false,
"full_signature": "public static CredentialsBuilder create()",
"identifier": "create",... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
2383782_248 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerifyParametersMissing() throws Exception {\n Configuration conf = new Configuration(false);\n\n String str = \"<root xmlns=\\\"uri:oozie:workflow:0.4\\\"><parameters>\"\n + \"<property><name>hello</name></property>\"\n + \"</parameter... | {
"fields": [
{
"declarator": "nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\d+.\\\\d+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern nsVersionPattern = Pattern.compile(\"uri:oozie:(workflow|coordinator|bundle):(\\\\... | {
"body": "public static void verifyParameters(Configuration conf, Element rootElement) throws ParameterVerifierException {\n Objects.requireNonNull(conf, \"conf cannot be null\");\n if (rootElement == null) {\n return;\n }\n\n if (supportsParameters(rootElement.getNamespaceURI(... | {
"created": "9/14/2011 7:00:10 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2383782,
"size": null,
"stargazer_count": null,
"stars": 542,
"updates": "2020-01-18T12:54:24+00:00",
"url": "https://github.com/apache/oozie"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.