id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
2383782_217 | {
"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": "@Test\n public void testParseWorkflowAction() {\n JSONObject json = createJsonWorkflowAction();\n WorkflowAction action = JsonToBean.createWorkflowAction(json);\n\n assertEquals(\"a\", action.getId());\n assertEquals(\"b\", action.getName());\n assertEquals(\"c\", acti... | {
"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 WorkflowAction createWorkflowAction(JSONObject json) {\n return (WorkflowAction) Proxy.newProxyInstance(JsonToBean.class.getClassLoader(),\n new Class[]{WorkflowAction.class},\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_128 | {
"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 testCrossingDependencyLines() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").build();\n MapReduceActionBuilder.create().withName(\"C\").withParent(a).withParent(b).bui... | {
"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_72 | {
"fields": [
{
"declarator": "NAME = \"hive-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"hive-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "pr... | {
"body": "@Test\n public void testSameConfigPropertyAddedTwiceThrows() {\n final HiveActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAPRE... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final PigActionBuilder delegate;",
"type": "PigActionBuilder",
"var_name": "delegate"
},
{
"declarator": "query",
"modifier": "protected final",
"original_stri... | {
"body": "public HiveActionBuilder withConfigProperty(final String key, final String value) {\n this.delegate.withConfigProperty(key, value);\n return this;\n }",
"class_method_signature": "HiveActionBuilder.withConfigProperty(final String key, final String value)",
"constructor": false,
"full... | {
"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_344 | {
"fields": [
{
"declarator": "services",
"modifier": "protected",
"original_string": "protected Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "hcatServer",
"modifier": "private",
"original_string": "private String hcatSe... | {
"body": "@Test\n public void testDryRunPushDependencies() {\n try {\n CoordinatorJobBean job = addRecordToCoordJobTableForWaiting(\"coord-job-for-action-input-check.xml\",\n CoordinatorJob.Status.RUNNING, false, true);\n Path appPath = new Path(getFsTestCaseDir(), ... | {
"fields": [
{
"declarator": "CURRENT = 0",
"modifier": "public static final",
"original_string": "public static final int CURRENT = 0;",
"type": "int",
"var_name": "CURRENT"
},
{
"declarator": "LATEST = 1",
"modifier": "public static final",
"original_stri... | {
"body": "static String dryRunCoord(Element eAction, CoordinatorActionBean actionBean) throws Exception {\n String action = XmlUtils.prettyPrint(eAction).toString();\n StringBuilder actionXml = new StringBuilder(action);\n Configuration actionConf = new XConfiguration(new StringReader(actionBean... | {
"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_201 | {
"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 testYarnClientFilesAndArchivesArgsParsing() throws Exception {\n final Configuration actionConf = new Configuration();\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"yarn\");\n actionConf.set(SparkActionExecutor.SPARK_MODE, \"client\");\n actionConf.... | {
"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_25 | {
"fields": [
{
"declarator": "NAME = \"sqoop-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"sqoop-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"modifier": "... | {
"body": "@Test\n public void testClearArguments() {\n final SqoopActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArgument(file);\n }\n\n builder.clearArguments();\n\n final SqoopAction action = builder.build();\n\n ... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "command",
"modifie... | {
"body": "public SqoopActionBuilder clearArguments() {\n this.attributesBuilder.clearArgs();\n return this;\n }",
"class_method_signature": "SqoopActionBuilder.clearArguments()",
"constructor": false,
"full_signature": "public SqoopActionBuilder clearArguments()",
"identifier": "clearArgumen... | {
"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_190 | {
"fields": [
{
"declarator": "conf",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Configuration conf;",
"type": "Configuration",
"var_name": "conf"
}
],
"file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestLauncherAMUtils.java"... | {
"body": "@Test\n public void testHandlingWhenArgsContainNullsAndNullsNotAllowed() {\n setupConf(Arrays.asList(\"a\", null, \"b\", null, \"c\"));\n setEnableNullArgsAllowed(false);\n\n String args[] = LauncherAMUtils.getMainArguments(conf);\n\n assertTrue(Arrays.equals(new String[] { \... | {
"fields": [
{
"declarator": "CONF_OOZIE_ACTION_MAIN_CLASS = \"oozie.launcher.action.main.class\"",
"modifier": "static final",
"original_string": "static final String CONF_OOZIE_ACTION_MAIN_CLASS = \"oozie.launcher.action.main.class\";",
"type": "String",
"var_name": "CONF_OOZIE_AC... | {
"body": "public static String[] getMainArguments(Configuration conf) {\n String[] args = new String[conf.getInt(CONF_OOZIE_ACTION_MAIN_ARG_COUNT, 0)];\n\n String[] retArray;\n\n if (conf.getBoolean(CONF_OOZIE_NULL_ARGS_ALLOWED, true)) {\n for (int i = 0; i < args.length; 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_313 | {
"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 testMissingValue() throws ServletException {\n expectedException.expect(ServletException.class);\n FilterParser.parseFilter(\"key1=\");\n }",
"class_method_signature": "TestFilterParser.testMissingValue()",
"constructor": false,
"full_signature": "@Test public ... | {
"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_256 | {
"fields": [
{
"declarator": "predicate =\n new PersistenceExceptionSubclassFilterRetryPredicate()",
"modifier": "private final",
"original_string": "private final PersistenceExceptionSubclassFilterRetryPredicate predicate =\n new PersistenceExceptionSubclassFilterRetryPre... | {
"body": "@Test\n public void testNonJPAExceptions() {\n assertTrue(predicate.test(new IllegalStateException()));\n assertTrue(predicate.test(new Exception()));\n }",
"class_method_signature": "TestPersistenceExceptionSubclassFilterRetryPredicate.testNonJPAExceptions()",
"constructor": false,... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class)",
"modifier": "private static final",
"original_string": "private static final XLog LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class);",
"type": "XLog",
"v... | {
"body": "@Override\n public boolean test(final Throwable throwable) {\n LOG.trace(\"Retry predicate investigation started. [throwable.class={0}]\", throwable.getClass().getName());\n\n boolean applies = true;\n\n if ((throwable.getCause() == null) && BLACKLIST_WITHOUT_CAUSE.contains(throwabl... | {
"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_221 | {
"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 testParseCoordinatorAction() {\n JSONObject json = createJsonCoordinatorAction();\n CoordinatorAction action = JsonToBean.createCoordinatorAction(json);\n\n assertEquals(\"a\", action.getId());\n assertEquals(\"b\", ac... | {
"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 CoordinatorAction createCoordinatorAction(JSONObject json) {\n return (CoordinatorAction) Proxy.newProxyInstance(JsonToBean.class.getClassLoader(),\n new Class[]{CoordinatorAction.class},\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_364 | {
"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 whenEmptyInputIsGivenException() {\n expectedException.expect(IllegalArgumentException.class);\n\n new BytesAndUOMConverter().toMegabytes(null);\n }",
"class_method_signature": "TestBytesAndUOMConverter.whenEmptyInputIsGivenException()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(BytesAndUOMConverter.class)",
"modifier": "private static final",
"original_string": "private static final XLog LOG = XLog.getLog(BytesAndUOMConverter.class);",
"type": "XLog",
"var_name": "LOG"
}
],
"file": "core/src/main/java... | {
"body": "long toMegabytes(final String unitAndUOM) {\n Preconditions.checkArgument(!Strings.isNullOrEmpty(unitAndUOM), \"unitAndUOM should not be empty\");\n Preconditions.checkArgument(unitAndUOM.toUpperCase().endsWith(\"K\")\n || unitAndUOM.toUpperCase().endsWith(\"M\")\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_52 | {
"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 testWithMap() {\n final String map = \"map\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withMap(map);\n\n final Pipes pipes = builder.build();\n assertEquals(map, pipes.getMap());\n }",
"class_method_signature": "TestPipesB... | {
"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 withMap(final String map) {\n this.map.set(map);\n return this;\n }",
"class_method_signature": "PipesBuilder.withMap(final String map)",
"constructor": false,
"full_signature": "public PipesBuilder withMap(final String map)",
"identifier": "withMap",
"invocat... | {
"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_108 | {
"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 testNameNodeAddedTwiceThrows() {\n final FSActionBuilder builder = getBuilderInstance();\n builder.withNameNode(NAME_NODE);\n\n expectedException.expect(IllegalStateException.class);\n builder.withNameNode(\"any_string\");\n }",
"class_method_signatur... | {
"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 withNameNode(final String nameNode) {\n attributesBuilder.withNameNode(nameNode);\n return this;\n }",
"class_method_signature": "FSActionBuilder.withNameNode(final String nameNode)",
"constructor": false,
"full_signature": "public FSActionBuilder withNameNode(... | {
"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_276 | {
"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 testCheckStaticExistenceWithValidExpressions() throws ELEvaluationException {\n assertFalse(ASSERT_MESSAGE_CHECK_STATIC_EXISTENCE, StringUtils.checkStaticExistence(\"ab\", \",\"));\n assertTrue(ASSERT_MESSAGE_CHECK_STATIC_EXISTENCE, StringUtils.checkStaticExistence(\"${... | {
"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 boolean checkStaticExistence(String expr, String sequence) throws ELEvaluationException {\n int curlyBracketDept = 0;\n int functionDepth = 0;\n int index = 0;\n boolean foundSequence = false;\n while (index < expr.length()) {\n String substring =... | {
"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_299 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckFrequency() {\n ParamChecker.checkFrequency(\"10\");\n\n String cron = \"20,30 * * 10 *\";\n ParamChecker.checkFrequency(cron);\n\n cron = \"0/10 10-12 3 5 MON,FRI\";\n ParamChecker.checkFrequency(cron);\n\n try {\n ParamC... | {
"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 checkFrequency(String val) {\n try {\n Integer.parseInt(val);\n }\n catch (NumberFormatException ex) {\n try {\n // this part is necessary since Quartz\n // doesn't support for specifying both a day-of-week\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_333 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
}
],
"file": "core/src/test/java/org/apache/oozie/service/TestJMSTopicService.java",
"identifier": "TestJMSTopicServi... | {
"body": "@Test\n public void testIncorrectConfigurationJobType() {\n try {\n services = setupServicesForTopic();\n services.getConf().set(JMSTopicService.TOPIC_NAME,\n \"InvalidJobType\" + \" = workflow,\" + JMSTopicService.JobType.COORDINATOR.getValue() + \"=coord... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"JMSTopicService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"JMSTopicService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
},
... | {
"body": "@Override\n public void init(Services services) throws ServiceException {\n LOG = XLog.getLog(getClass());\n conf = services.getConf();\n parseTopicConfiguration();\n topicPrefix = conf.get(TOPIC_PREFIX, \"\");\n }",
"class_method_signature": "JMSTopicService.init(Servic... | {
"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_260 | {
"fields": [
{
"declarator": "predicate =\n new PersistenceExceptionSubclassFilterRetryPredicate()",
"modifier": "private final",
"original_string": "private final PersistenceExceptionSubclassFilterRetryPredicate predicate =\n new PersistenceExceptionSubclassFilterRetryPre... | {
"body": "@Test\n public void testPlainJPAExecutorExceptionWithMessage() {\n assertFalse(predicate.test(wrapMessage(\"No WorkflowJobBean found in database\")));\n assertFalse(predicate.test(wrapMessage(\"Some other message\")));\n\n assertFalse(predicate.test(wrapMessageRuntime(\"Some runtime... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class)",
"modifier": "private static final",
"original_string": "private static final XLog LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class);",
"type": "XLog",
"v... | {
"body": "@Override\n public boolean test(final Throwable throwable) {\n LOG.trace(\"Retry predicate investigation started. [throwable.class={0}]\", throwable.getClass().getName());\n\n boolean applies = true;\n\n if ((throwable.getCause() == null) && BLACKLIST_WITHOUT_CAUSE.contains(throwabl... | {
"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_325 | {
"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 testSubmissionWhenQueueSizeIsIgnored() {\n asyncExecutor = createExecutor(true, 2, DEFAULT_MAXWAIT, TEST_PRIORITIES, AWAIT_TERMINATION_TIMEOUT_SECONDS);\n callableWrapper = mock(CallableWrapper.class, Mockito.RETURNS_DEEP_STUBS);\n when(callableWrapper.filterDupl... | {
"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_13 | {
"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 testExceptionThrownWithInvalidNumWorkflows() throws Exception {\n argParser.getNumWorkflows();\n }",
"class_method_signature": "TestArgParser.testExceptionThrownWithInvalidNumWorkflows()",
"constructor": false,
"full_signatur... | {
"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 getNumWorkflows() {\n final Integer numWorkflows = Integer.valueOf(commandLine.getOptionValue(NUM_WORKFLOWS_OPTION, \"0\"));\n Preconditions.checkArgument(numWorkflows >= 0,\n NUM_WORKFLOWS_OPTION + \" cannot be negative\");\n return numWorkflows;\n }",
"cla... | {
"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_149 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/dag/TestJoiningNodeBase.java",
"identifier": "TestJoiningNodeBase",
"interfaces": "",
"superclass": "extends TestNodeBase<JoiningNodeBase<B>>"
} | {
"body": "@Test\n public void testCorrespondingBranchingIsCorrect() {\n B branching = getBranchingInstance(\"branching\");\n J joining = getJoiningInstance(\"joining\", branching);\n\n assertEquals(branching, joining.getBranchingPair());\n }",
"class_method_signature": "TestJoiningNodeBa... | {
"fields": [
{
"declarator": "parents",
"modifier": "private final",
"original_string": "private final List<NodeBase> parents;",
"type": "List<NodeBase>",
"var_name": "parents"
},
{
"declarator": "child",
"modifier": "private",
"original_string": "private N... | {
"body": "T getBranchingPair() {\n return branching;\n }",
"class_method_signature": "JoiningNodeBase.getBranchingPair()",
"constructor": false,
"full_signature": " T getBranchingPair()",
"identifier": "getBranchingPair",
"invocations": [],
"modifiers": "",
"parameters": "()",
"return": "T"... | {
"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_237 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestELConstantsFunctions.java",
"identifier": "TestELConstantsFunctions",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTrim() {\n assertEquals(\"\", ELConstantsFunctions.trim(null));\n assertEquals(\"a\", ELConstantsFunctions.trim(\" a \"));\n }",
"class_method_signature": "TestELConstantsFunctions.testTrim()",
"constructor": false,
"full_signature": "@Test public void test... | {
"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 trim(String input) {\n return org.apache.commons.lang3.StringUtils.trimToEmpty(input);\n }",
"class_method_signature": "ELConstantsFunctions.trim(String input)",
"constructor": false,
"full_signature": "public static String trim(String input)",
"identifier": "trim",
... | {
"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_372 | {
"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 whenGigabytesAreGivenConvertedCorrectly() {\n assertEquals(\"gigabytes count should be converted correctly\",\n 1024L,\n new BytesAndUOMConverter().toMegabytes(\"1G\"));\n }",
"class_method_signature": "TestBytesAndUOMConverter.whenGigabytesA... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(BytesAndUOMConverter.class)",
"modifier": "private static final",
"original_string": "private static final XLog LOG = XLog.getLog(BytesAndUOMConverter.class);",
"type": "XLog",
"var_name": "LOG"
}
],
"file": "core/src/main/java... | {
"body": "long toMegabytes(final String unitAndUOM) {\n Preconditions.checkArgument(!Strings.isNullOrEmpty(unitAndUOM), \"unitAndUOM should not be empty\");\n Preconditions.checkArgument(unitAndUOM.toUpperCase().endsWith(\"K\")\n || unitAndUOM.toUpperCase().endsWith(\"M\")\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_44 | {
"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 testWithMapper() {\n final String mapperName = \"mapper-name.sh\";\n\n final StreamingBuilder builder = new StreamingBuilder();\n builder.withMapper(mapperName);\n\n final Streaming streaming = builder.build();\n assertEquals(mapperName, streaming.g... | {
"fields": [
{
"declarator": "mapper",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> mapper;",
"type": "ModifyOnce<String>",
"var_name": "mapper"
},
{
"declarator": "reducer",
"modifier": "private final",
"original_string... | {
"body": "public StreamingBuilder withMapper(final String mapper) {\n this.mapper.set(mapper);\n return this;\n }",
"class_method_signature": "StreamingBuilder.withMapper(final String mapper)",
"constructor": false,
"full_signature": "public StreamingBuilder withMapper(final String mapper)",
... | {
"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_309 | {
"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 testEmptyString() throws ServletException {\n Multimap<String, String> filterMap = FilterParser.parseFilter(\"\");\n assertEquals(\"Filter map size should be zero for empty filter\", 0, filterMap.size());\n }",
"class_method_signature": "TestFilterParser.testEmptyS... | {
"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_165 | {
"fields": [],
"file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/workflow/TestCredentialBuilder.java",
"identifier": "TestCredentialBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateFromExisting() {\n final Credential credential = CredentialBuilder.create()\n .withName(\"hive2\")\n .withType(\"hive\")\n .withConfigurationEntry(\"jdbcUrl\", \"jdbc://localhost/hive\")\n .build();\n\n ... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final ModifyOnce<String> name;",
"type": "ModifyOnce<String>",
"var_name": "name"
},
{
"declarator": "type",
"modifier": "private final",
"original_string": "priva... | {
"body": "public static CredentialBuilder createFromExisting(final Credential credential) {\n return new CredentialBuilder(new ModifyOnce<>(credential.getName()),\n new ModifyOnce<>(credential.getType()),\n new ArrayList<>(credential.getConfigurationEntries()));\n }",
"class... | {
"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_87 | {
"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 testAddParents() {\n final N parent1 = Mockito.spy(getBuilderInstance().build());\n final N parent2 = Mockito.spy(getBuilderInstance().build());\n\n final B builder = getBuilderInstance();\n builder.withParent(parent1)\n .withParent(parent2)... | {
"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 withParent(final Node parent) {\n checkNoDuplicateParent(parent);\n\n parents.add(parent);\n return ensureRuntimeSelfReference();\n }",
"class_method_signature": "NodeBuilderBaseImpl.withParent(final Node parent)",
"constructor": false,
"full_signature": "public B 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_132 | {
"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 testTrivialRedundantEdge() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").withParent(a).build();\n MapReduceActionBuilder.create().withName(\"C\").withParent(a).withPa... | {
"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_68 | {
"fields": [
{
"declarator": "NAME = \"map-reduce-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"map-reduce-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NAME_NODE = \"${nameNode}\"",
"mo... | {
"body": "@Test\n public void testClearJobXmls() {\n final MapReduceActionBuilder builder = getBuilderInstance();\n\n for (final String jobXml : JOB_XMLS) {\n builder.withJobXml(jobXml);\n }\n\n builder.clearJobXmls();\n\n final MapReduceAction mrAction = builder.buil... | {
"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 MapReduceActionBuilder clearJobXmls() {\n attributesBuilder.clearJobXmls();\n return this;\n }",
"class_method_signature": "MapReduceActionBuilder.clearJobXmls()",
"constructor": false,
"full_signature": "public MapReduceActionBuilder clearJobXmls()",
"identifier": "clearJob... | {
"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_348 | {
"fields": [
{
"declarator": "services",
"modifier": "protected",
"original_string": "protected Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "hcatServer",
"modifier": "private",
"original_string": "private String hcatSe... | {
"body": "@Test\n public void testCoordAbsolute() throws Exception {\n CoordinatorJobBean job = addRecordToCoordJobTableForWaiting(\"coord-dataset-absolute.xml\",\n CoordinatorJob.Status.RUNNING, false, true);\n Path appPath = new Path(getFsTestCaseDir(), \"coord\");\n String a... | {
"fields": [
{
"declarator": "CURRENT = 0",
"modifier": "public static final",
"original_string": "public static final int CURRENT = 0;",
"type": "int",
"var_name": "CURRENT"
},
{
"declarator": "LATEST = 1",
"modifier": "public static final",
"original_stri... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static String materializeOneInstance(String jobId, boolean dryrun, Element eAction, Date nominalTime,\n Date actualTime, int instanceCount, Configuration conf, CoordinatorActionBean actionBean) throws Exception {\n String actionId = Services.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_124 | {
"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 Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n MapReduceActionBuilder.create().withName(\"B\").withParent(a).build();\n MapReduceActionBuilder.create().withName(\"C\").withParent(a).build();\n\n final St... | {
"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 String getName() {\n return name;\n }",
"class_method_signature": "Graph.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_91 | {
"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 testWithoutParent() {\n final N parent1 = Mockito.spy(getBuilderInstance().build());\n final N parent2 = Mockito.spy(getBuilderInstance().build());\n\n final B builder = getBuilderInstance();\n builder.withParent(parent1)\n .withParent(paren... | {
"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 withoutParent(final Node parent) {\n if (parents.contains(parent)) {\n parents.remove(parent);\n } else {\n int index = indexOfParentAmongParentsWithConditions(parent);\n if (index >= 0) {\n parentsWithConditions.remove(index);\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_7 | {
"fields": [],
"file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java",
"identifier": "TestECPolicyDisabler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOtherRuntimeExceptionThrown() {\n MockDistributedFileSystem fs = mock(MockDistributedFileSystem.class);\n when(fs.getErasureCodingPolicy(any())).thenReturn(ReplicationPolicy.OTHER);\n Mockito.doThrow(new RuntimeException(\"mock io exception\")).when(fs).setEr... | {
"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_173 | {
"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 testMaskEnvironmentVariable() {\n assertEquals(\"DUMMY_PASSWORD=*****\", passwordMasker.maskPasswordsIfNecessary(\"DUMMY_PASSWORD=dummy\"));\n }",
"class_method_signature": "TestPasswordMasker.testMaskEnvironmentVariable()",
"constructor": false,
"full_signature": "@T... | {
"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_29 | {
"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 testSameConfigPropertyAddedTwiceThrows() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty... | {
"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": "public void withConfigProperty(final String key, final String value) {\n ModifyOnce<String> mappedValue = this.configuration.get(key);\n\n if (mappedValue == null) {\n mappedValue = new ModifyOnce<>(value);\n this.configuration.put(key, mappedValue);\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_314 | {
"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 testSingleParameter() throws ServletException {\n ListMultimap<String, String> filterMap = FilterParser.parseFilter(\"key1=value1\");\n ListMultimap<String, String> expectedMap = LinkedListMultimap.create();\n expectedMap.put(\"key1\", \"value1\");\n asser... | {
"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_251 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSupportsParameters() throws Exception {\n assertFalse(ParameterVerifier.supportsParameters(\"uri:oozie:workflow:0.3\"));\n assertTrue(ParameterVerifier.supportsParameters(\"uri:oozie:workflow:0.4\"));\n assertTrue(ParameterVerifier.supportsParameters(\"uri:oo... | {
"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": "static boolean supportsParameters(String namespaceURI) {\n boolean supports = false;\n Matcher m = nsVersionPattern.matcher(namespaceURI);\n if (m.matches() && m.groupCount() == 2) {\n String type = m.group(1);\n double ver = Double.parseDouble(m.group(2));\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_178 | {
"fields": [
{
"declarator": "seqFileWriterFactoryMock",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SequenceFileWriterFactory seqFileWriterFactoryMock;",
"type": "SequenceFileWriterFactory",
"var_name": "seqFileWriterFactoryMock"
},
{
"dec... | {
"body": "@Test\n public void testActionDataUploadToHdfsSucceeds() throws Exception {\n hdfsOperations.uploadActionDataToHDFS(configurationMock, path, actionData);\n\n verify(seqFileWriterFactoryMock).createSequenceFileWriter(eq(configurationMock),\n any(Path.class), eq(Text.class), e... | {
"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_22 | {
"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 testActualCondition() {\n final String conditionString = \"some_condition\";\n final Condition actualCondition = Condition.actualCondition(conditionString);\n\n assertEquals(conditionString, actualCondition.getCondition());\n assertFalse(actualCondition.is... | {
"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 actualCondition(final String condition) {\n Preconditions.checkArgument(condition != null, \"The argument 'condition' must not be null.\");\n\n return new Condition(condition, false);\n }",
"class_method_signature": "Condition.actualCondition(final String conditio... | {
"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_197 | {
"fields": [
{
"declarator": "input",
"modifier": "private",
"original_string": "private String input;",
"type": "String",
"var_name": "input"
},
{
"declarator": "output",
"modifier": "private",
"original_string": "private List<String> output;",
"type... | {
"body": "@Test\n public void test() {\n assertThat(\"Error for input >>\" + input + \"<<\", SparkOptionsSplitter.splitSparkOpts(input), is(output));\n }",
"class_method_signature": "TestSparkOptionsSplitter.test()",
"constructor": false,
"full_signature": "@Test public void test()",
"identifier... | {
"fields": [
{
"declarator": "OPTION_KEY_PREFIX = Pattern.compile(\"\\\\s*--[a-zA-Z0-9.]+[\\\\-a-zA-Z0-9.]*[=]?\")",
"modifier": "private static final",
"original_string": "private static final Pattern OPTION_KEY_PREFIX = Pattern.compile(\"\\\\s*--[a-zA-Z0-9.]+[\\\\-a-zA-Z0-9.]*[=]?\");",
... | {
"body": "static List<String> splitSparkOpts(final String sparkOpts) {\n final List<String> result = new ArrayList<>();\n final Matcher matcher = OPTION_KEY_PREFIX.matcher(sparkOpts);\n\n int start = 0, end;\n while (matcher.find()) {\n end = matcher.start();\n\n if ... | {
"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_343 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private... | {
"body": "@Test\n public void testConnection() throws Exception {\n HCatAccessorService hcatService = services.get(HCatAccessorService.class);\n JMSAccessorService jmsService = services.get(JMSAccessorService.class);\n // both servers should connect to default JMS server\n JMSConnectio... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"JMSAccessorService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"JMSAccessorService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
... | {
"body": "public ConnectionContext createConnectionContext(JMSConnectionInfo connInfo) {\n ConnectionContext connCtxt = connectionMap.get(connInfo);\n if (connCtxt == null) {\n try {\n connCtxt = getConnectionContextImpl();\n connCtxt.createConnection(connInfo.g... | {
"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_206 | {
"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 testPropertiesArePrependedToSparkArgs() throws IOException, OozieActionConfiguratorException, URISyntaxException {\n final Configuration actionConf = new Configuration();\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"yarn\");\n actionConf.set(SparkActionEx... | {
"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_75 | {
"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 testWithPermissionsCalledTwiceThrows() {\n final String group1 = \"group1\";\n final String group2 = \"group1\";\n\n final ChgrpBuilder builder = new ChgrpBuilder();\n builder.withGroup(group1);\n\n expectedException.expect(IllegalStateException.cla... | {
"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_355 | {
"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 testGetDSTOffsetOfDaylightChangeFromDSTToStandardGivesPositiveOffset() throws ParseException {\n final long dstOffset = DaylightOffsetCalculator.getDSTOffset(TZ_DST,\n DateUtils.parseDateOozieTZ(\"2013-07-18T00:00Z\"),\n DateUtils.parseDateOozieTZ... | {
"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_210 | {
"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 testKeytabDuplicateWithSymlink() throws OozieActionConfiguratorException, IOException, URISyntaxException {\n final Configuration actionConf = new Configuration();\n\n actionConf.set(SparkActionExecutor.SPARK_MASTER, \"yarn\");\n actionConf.set(SparkActionExecuto... | {
"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_139 | {
"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 testGetChildren() {\n final End instance = getInstance(\"end\");\n\n assertTrue(instance.getChildren().isEmpty());\n }",
"class_method_signature": "TestEnd.testGetChildren()",
"constructor": false,
"full_signature": "@Test public void testGetChildren()",
"ide... | {
"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 List<NodeBase> getChildren() {\n return Arrays.asList();\n }",
"class_method_signature": "End.getChildren()",
"constructor": false,
"full_signature": "@Override public List<NodeBase> getChildren()",
"identifier": "getChildren",
"invocations": [
"asList"
],
... | {
"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_63 | {
"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 testWithProgramCalledTwiceThrows() {\n final String program1 = \"program1\";\n final String program2 = \"program2\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withProgram(program1);\n\n expectedException.expect(IllegalStateExcep... | {
"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_302 | {
"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 testTooEarlyErrorStreamRead() {\n final BufferDrainer bufferDrainer = new BufferDrainer(null, 0);\n expectedException.expect(IllegalStateException.class);\n bufferDrainer.getErrorBuffer();\n }",
"class_method_signature": "TestBufferDrainer.testTooEarlyErrorS... | {
"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 StringBuffer getErrorBuffer() {\n if (drainBuffersFinished) {\n return errorBuffer;\n }\n else {\n throw new IllegalStateException(\"Buffer draining has not been finished yet\");\n }\n }",
"class_method_signature": "BufferDrainer.getErrorBuffer(... | {
"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_247 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParameterVerifier.java",
"identifier": "TestParameterVerifier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerifyParametersEmpty() throws Exception {\n Configuration conf = new Configuration(false);\n conf.set(\"A\", \"a\");\n\n ParameterVerifier.verifyParameters(conf, XmlUtils.parseXml(\"<root xmlns=\\\"uri:oozie:workflow:0.4\\\"></root>\"));\n assertEqual... | {
"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_181 | {
"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 testLog4jPropertiesPresentAndReadable() throws UnsupportedEncodingException {\n final LauncherMain noop = new NoopLauncherMain();\n noop.setupLog4jProperties();\n\n assertTrue(outContent.toString(StandardCharsets.UTF_8.name()).contains(\n \"INFO: l... | {
"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": "@VisibleForTesting\n protected void setupLog4jProperties() {\n if (tryLoadLog4jPropertiesFromResource(HADOOP_LOG4J_LOCATION)) {\n return;\n }\n\n tryLoadLog4jPropertiesFromResource(DEFAULT_LOG4J_LOCATION);\n }",
"class_method_signature": "LauncherMain.setupLog4jPrope... | {
"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_34 | {
"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 testWithoutMkdir() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Mkdir mkdir : MKDIRS) {\n builder.withMkdir(mkdir);\n }\n\n builder.withoutMkdir(MKDIRS[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 withoutMkdir(final Mkdir mkdir) {\n mkdirs.remove(mkdir);\n }",
"class_method_signature": "ActionAttributesBuilder.withoutMkdir(final Mkdir mkdir)",
"constructor": false,
"full_signature": " void withoutMkdir(final Mkdir mkdir)",
"identifier": "withoutMkdir",
"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_396 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java",
"identifier": "TestInputLogicParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDataIn() throws JDOMException {\n //@formatter:off\n String xml=\n \"<input-logic>\"+\n \"<data-in dataset=\\\"A\\\" />\"+\n \"</input-logic>\";\n //@formatter:on\n Element root = XmlUtils.parseXml(xml);\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_379 | {
"fields": [
{
"declarator": "originalList",
"modifier": "private",
"original_string": "private String originalList;",
"type": "String",
"var_name": "originalList"
},
{
"declarator": "deduplicatedList",
"modifier": "private",
"original_string": "private Str... | {
"body": "@Test\n public void testDeduplication() {\n conf.set(KEY, originalList);\n deduplicator.deduplicate(conf, KEY);\n Assert.assertEquals(\n String.format(\"Deduplicator should provide [%s] for input [%s]\", deduplicatedList, originalList),\n deduplicatedLi... | {
"fields": [
{
"declarator": "LOG = XLog.getLog(DependencyDeduplicator.class)",
"modifier": "public static final",
"original_string": "public static final XLog LOG = XLog.getLog(DependencyDeduplicator.class);",
"type": "XLog",
"var_name": "LOG"
},
{
"declarator": "SYML... | {
"body": "public void deduplicate(final Configuration conf, final String key) {\n if(conf == null || key == null) {\n return;\n }\n\n final String commaSeparatedFilePaths = conf.get(key);\n LOG.debug(\"Oozie tries to deduplicate dependencies with key [{0}], which has value of [... | {
"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_400 | {
"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_Created_When_Setup_Called_And_ScratchDir_Did_Not_Exist() throws IOException, URISyntaxException {\n when(mockScratchDir.exists()).thenReturn(false);\n when(mockScratchDir.mkdirs()).thenReturn(true);\n\n jspHandler.setupWebAppContext(mockWebAppContex... | {
"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_115 | {
"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 testWithoutMove() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Move move : MOVES) {\n builder.withMove(move);\n }\n\n builder.withoutMove(MOVES[0]);\n\n final FSAction fsAction = builder.build();\n\n fin... | {
"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 withoutMove(final Move move) {\n attributesBuilder.withoutMove(move);\n return this;\n }",
"class_method_signature": "FSActionBuilder.withoutMove(final Move move)",
"constructor": false,
"full_signature": "public FSActionBuilder withoutMove(final Move move)",
... | {
"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_284 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestPriorityDelayQueue.java",
"identifier": "TestPriorityDelayQueue",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPeek() throws Exception {\n PriorityDelayQueue<Integer> q = new PriorityDelayQueue<Integer>(3, 500, TimeUnit.MILLISECONDS, -1);\n\n //test immediate offer peeking\n\n q.offer(new TestQueueElement<Integer>(1));\n assertEquals((Integer) 1, q.peek().getEl... | {
"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 public QueueElement<E> peek() {\n lock.lock();\n try {\n antiStarvation();\n QueueElement<E> e = null;\n\n QueueElement<E> [] seeks = new QueueElement[priorities];\n boolean foundElement = false;\n for (int i = priorities -... | {
"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_18 | {
"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 testGetJavaSystemProperties() throws Exception {\n Map<String, String> testSysProps = new HashMap<>();\n testSysProps.put(\"javax.xml.parsers.DocumentBuilderFactory\", \"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl\");\n doReturn(testSysProps).when(mockDiagC... | {
"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 storeJavaSystemProperties(final File outputDir) {\n try {\n System.out.print(\"Getting Java System Properties...\");\n final Map<String, String> javaSysProps = client.getJavaSystemProperties();\n\n try (DiagBundleEntryWriter configEntryWriter = new DiagBundleEnt... | {
"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_142 | {
"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 testClearExistingParent() {\n new Start(\"parent\");\n final Start instance = getInstance(\"instance\");\n\n instance.clearParents();\n }",
"class_method_signature": "TestStart.testClearExistingParent()",
"constructor": false,
"full_signature": "@Test pu... | {
"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_338 | {
"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 testRetentionOverflow() throws Exception {\n getOozieConfig().set(ShareLibService.LAUNCHERJAR_LIB_RETENTION, \"25\");\n services.init();\n ShareLibService shareLibService = services.get(ShareLibService.class);\n assertTrue(shareLibService.retentionTime > 0... | {
"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_292 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidIdentifier() {\n assertTrue(ParamChecker.isValidIdentifier(\"a\"));\n assertTrue(ParamChecker.isValidIdentifier(\"a1\"));\n assertTrue(ParamChecker.isValidIdentifier(\"a_\"));\n assertTrue(ParamChecker.isValidIdentifier(\"_\"));\n assertFal... | {
"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 boolean isValidIdentifier(String token) {\n ParamChecker.notEmpty(token, \"identifier\");\n for (int i = 0; i < token.length(); i++) {\n char c = token.charAt(i);\n if (!(c >= '0' && c <= '9') && !(c >= 'A' && c <= 'Z') && !(c >= 'a' && c <= 'z') && !(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_154 | {
"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 testAddingParentWhenItAlreadyExistsThrows() {\n final NodeBase parent1 = getInstance(\"parent1\");\n final NodeBase parent2 = getInstance(\"parent2\");\n\n final ExplicitNode instance = getInstance(\"instance\");\n\n instance.addParent(parent1);\n\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 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_380 | {
"fields": [
{
"declarator": "shellSplitter",
"modifier": "private",
"original_string": "private ShellSplitter shellSplitter;",
"type": "ShellSplitter",
"var_name": "shellSplitter"
},
{
"declarator": "input",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void test() throws ShellSplitterException {\n if (expectedExceptionClass != null) {\n expectedException.expect(expectedExceptionClass);\n shellSplitter.split(input);\n }\n else {\n assertEquals(\"Invalid splitting\", expectedOutput, sh... | {
"fields": [
{
"declarator": "BACKSPACE = '\\\\'",
"modifier": "private static final",
"original_string": "private static final char BACKSPACE = '\\\\';",
"type": "char",
"var_name": "BACKSPACE"
},
{
"declarator": "SINGLE_QUOTE = '\\''",
"modifier": "private stat... | {
"body": "List<String> split(final String commandLine) throws ShellSplitterException {\n if (commandLine == null) {\n return null;\n }\n ensureFields();\n for (int i = 0; i < commandLine.length(); i++) {\n char c = commandLine.charAt(i);\n processCharacter... | {
"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_59 | {
"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 testWithPartitionerCalledTwiceThrows() {\n final String partitioner1 = \"partitioner1\";\n final String partitioner2 = \"partitioner2\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withPartitioner(partitioner1);\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 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_103 | {
"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 testContentTypeAddedTwiceThrows() {\n final EmailActionBuilder builder = getBuilderInstance();\n builder.withContentType(\"content_type\");\n\n expectedException.expect(IllegalStateException.class);\n builder.withContentType(\"any_content_type\");\n }",... | {
"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 withContentType(final String contentType) {\n this.contentType.set(contentType);\n return this;\n }",
"class_method_signature": "EmailActionBuilder.withContentType(final String contentType)",
"constructor": false,
"full_signature": "public EmailActionBuilder... | {
"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_174 | {
"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 testMaskTwoEnvironmentVariables() {\n assertEquals(\"DUMMY_PASSWORD=*****:ANOTHER_PASSWORD=*****\",\n passwordMasker.maskPasswordsIfNecessary(\"DUMMY_PASSWORD=dummy:ANOTHER_PASSWORD=pwd123\"));\n }",
"class_method_signature": "TestPasswordMasker.testMaskTwo... | {
"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_318 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
},
{
"declarator": "uriService",
"modifier": "private",
"original_string": "private URIHandlerService... | {
"body": "@Test\n public void testExists() throws Exception {\n //setting current user as test user because directory structure created by HCat have current user permissions (755).\n setSystemProperty(XTestCase.TEST_USER1_PROP, System.getProperty(\"user.name\"));\n createTestTable();\n\n ... | {
"fields": [
{
"declarator": "supportedSchemes",
"modifier": "private",
"original_string": "private Set<String> supportedSchemes;",
"type": "Set<String>",
"var_name": "supportedSchemes"
},
{
"declarator": "dependencyTypes",
"modifier": "private",
"original_... | {
"body": "@Override\n public boolean exists(URI uri, Context context) throws URIHandlerException {\n HCatClient client = ((HCatContext) context).getHCatClient();\n return exists(uri, client, false);\n }",
"class_method_signature": "HCatURIHandler.exists(URI uri, Context context)",
"constructo... | {
"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_0 | {
"fields": [],
"file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java",
"identifier": "TestECPolicyDisabler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotSupported() {\n FileSystem fs = mock(FileSystem.class);\n ECPolicyDisabler.Result result = ECPolicyDisabler.check(fs, null);\n Assert.assertEquals(\"result is expected\", Result.NOT_SUPPORTED, result);\n }",
"class_method_signature": "TestECPolicyDisa... | {
"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_123 | {
"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 testIfThereAreParentsThenThrows() {\n final String name = \"error-handler\";\n final Node parent = MapReduceActionBuilder.create().withName(\"parent\").build();\n final Builder<MapReduceAction> handlerBuilder = MapReduceActionBuilder.create()\n .wi... | {
"fields": [
{
"declarator": "handlerNode",
"modifier": "private final",
"original_string": "private final Node handlerNode;",
"type": "Node",
"var_name": "handlerNode"
}
],
"file": "fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/action/ErrorHandler.j... | {
"body": "public static ErrorHandler buildAsErrorHandler(final Builder<? extends Node> builder) {\n final Node handlerNode = builder.build();\n return new ErrorHandler(handlerNode);\n }",
"class_method_signature": "ErrorHandler.buildAsErrorHandler(final Builder<? extends Node> builder)",
"constr... | {
"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_96 | {
"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 testSameConfigPropertyAddedTwiceThrows() {\n final SparkActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAPR... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "master",
"modifier... | {
"body": "public SparkActionBuilder withConfigProperty(final String key, final String value) {\n this.attributesBuilder.withConfigProperty(key, value);\n return this;\n }",
"class_method_signature": "SparkActionBuilder.withConfigProperty(final String key, final String value)",
"constructor": fal... | {
"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_79 | {
"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 testClearArgs() {\n final PigActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArg(file);\n }\n\n builder.clearArgs();\n\n final PigAction action = builder.build();\n\n final List<Stri... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "protected final",
"original_string": "protected final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "script",
"modi... | {
"body": "public PigActionBuilder clearArgs() {\n this.attributesBuilder.clearArgs();\n return this;\n }",
"class_method_signature": "PigActionBuilder.clearArgs()",
"constructor": false,
"full_signature": "public PigActionBuilder 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_80 | {
"fields": [
{
"declarator": "NAME = \"ssh-name\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"ssh-name\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "ARGS = {\"arg1\", \"arg2\", \"arg3\"}",
"modifi... | {
"body": "@Test\n public void testClearArgs() {\n final SshActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArg(file);\n }\n\n builder.clearArgs();\n\n final SshAction action = builder.build();\n\n final List<Stri... | {
"fields": [
{
"declarator": "attributesBuilder",
"modifier": "private final",
"original_string": "private final ActionAttributesBuilder attributesBuilder;",
"type": "ActionAttributesBuilder",
"var_name": "attributesBuilder"
},
{
"declarator": "host",
"modifier":... | {
"body": "public SshActionBuilder clearArgs() {\n this.attributesBuilder.clearArgs();\n return this;\n }",
"class_method_signature": "SshActionBuilder.clearArgs()",
"constructor": false,
"full_signature": "public SshActionBuilder 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_135 | {
"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 testMultipleRoots() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n final Node g = MapReduceActionBuilder.create().withName(\"G\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").withParent(a).withParent(g... | {
"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_359 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/servlet/TestErrorServlet.java",
"identifier": "TestErrorServlet",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testServlet() throws Exception {\n String testErrorMsg = \"test-error\";\n int testErrorCode = 400;\n StringWriter stringWriter = new StringWriter();\n\n HttpServletRequest request = mock(HttpServletRequest.class);\n HttpServletResponse response = m... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/java/org/apache/oozie/servlet/ErrorServ... | {
"body": "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n handleError(request, response);\n }",
"class_method_signature": "ErrorServlet.doGet(HttpServletRequest request, HttpServletResponse response)",
"... | {
"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_162 | {
"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 testCreateFromExisting() {\n final Credentials credentials = CredentialsBuilder.create()\n .withCredential(\"hive2\",\n \"hive\",\n Collections.singletonList(\n new ConfigurationEntry(\... | {
"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 createFromExisting(final Credentials credentials) {\n return new CredentialsBuilder(new ImmutableList.Builder<Credential>().addAll(credentials.getCredentials()));\n }",
"class_method_signature": "CredentialsBuilder.createFromExisting(final Credentials credential... | {
"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_38 | {
"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 testWithoutChmod() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Chmod chmod : CHMODS) {\n builder.withChmod(chmod);\n }\n\n builder.withoutChmod(CHMODS[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 withoutChmod(final Chmod chmod) {\n chmods.remove(chmod);\n }",
"class_method_signature": "ActionAttributesBuilder.withoutChmod(final Chmod chmod)",
"constructor": false,
"full_signature": " void withoutChmod(final Chmod chmod)",
"identifier": "withoutChmod",
"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_43 | {
"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 testClearChgrps() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final Chgrp chgrp : CHGRPS) {\n builder.withChgrp(chgrp);\n }\n\n builder.clearChgrps();\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 clearChgrps() {\n chgrps.clear();\n }",
"class_method_signature": "ActionAttributesBuilder.clearChgrps()",
"constructor": false,
"full_signature": " void clearChgrps()",
"identifier": "clearChgrps",
"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_119 | {
"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 testWithoutTouchz() {\n final FSActionBuilder builder = getBuilderInstance();\n\n for (final Touchz touchz : TOUCHZS) {\n builder.withTouchz(touchz);\n }\n\n builder.withoutTouchz(TOUCHZS[0]);\n\n final FSAction fsAction = builder.build()... | {
"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 withoutTouchz(final Touchz touchz) {\n attributesBuilder.withoutTouchz(touchz);\n return this;\n }",
"class_method_signature": "FSActionBuilder.withoutTouchz(final Touchz touchz)",
"constructor": false,
"full_signature": "public FSActionBuilder withoutTouchz(fi... | {
"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_230 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestDateUtils.java",
"identifier": "TestDateUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void testInvalidOozieTimeZone() throws Exception {\n Configuration conf = new XConfiguration();\n conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, \"US/Los Angeles\");\n DateUtils.setConf(conf);\n }",
"class_method_signature": ... | {
"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_375 | {
"fields": [
{
"declarator": "defaultValue = \"default\"",
"modifier": "public final",
"original_string": "public final String defaultValue = \"default\";",
"type": "String",
"var_name": "defaultValue"
},
{
"declarator": "serverConfigSharelib = \"serverConfigSharelib\"... | {
"body": "@Test\n public void testResolvingOrder() {\n Configuration oozieServerConfiguration = new Configuration(false);\n XConfiguration workflowConf = new XConfiguration();\n Configuration actionConf = new Configuration(false);\n\n SharelibResolver resolver =\n new Sh... | {
"fields": [
{
"declarator": "defaultValue",
"modifier": "private final",
"original_string": "private final String[] defaultValue;",
"type": "String[]",
"var_name": "defaultValue"
},
{
"declarator": "configProviders",
"modifier": "private final",
"original_... | {
"body": "public String[] resolve() {\n for (SharelibNameProvider cp : configProviders) {\n if (isValidSharelibProperty(cp.getSharelibNames())) {\n return cp.getSharelibNames();\n }\n }\n return defaultValue;\n }",
"class_method_signature": "SharelibReso... | {
"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_14 | {
"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 testExceptionThrownWithInvalidNumCoordinators() throws Exception {\n argParser.getNumCoordinators();\n }",
"class_method_signature": "TestArgParser.testExceptionThrownWithInvalidNumCoordinators()",
"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 getNumCoordinators() {\n final Integer numCoords = Integer.valueOf(commandLine.getOptionValue(NUM_COORDS_OPTION, \"0\"));\n Preconditions.checkArgument(numCoords >= 0,\n NUM_COORDS_OPTION + \" cannot be negative\");\n return numCoords;\n }",
"class_method_si... | {
"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_267 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestIOUtils.java",
"identifier": "TestIOUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetReaderAsString() throws IOException {\n try {\n IOUtils.getReaderAsString(new StringReader(\"1234\"), 2);\n fail();\n }\n catch (IllegalArgumentException ex) {\n //nop\n }\n assertEquals(\"1234\", IOUtils.getR... | {
"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 String getReaderAsString(Reader reader, int maxLen) throws IOException {\n Objects.requireNonNull(reader, \"reader cannot be null\");\n StringBuilder sb = new StringBuilder();\n char[] buffer = new char[2048];\n int read;\n int count = 0;\n while ((re... | {
"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_322 | {
"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 testSubmissionSuccessfulAfterDelayWhenMaxConcurrencyCheckDisabled() {\n asyncExecutor = createExecutor(false, 2, DEFAULT_MAXWAIT, TEST_PRIORITIES, AWAIT_TERMINATION_TIMEOUT_SECONDS);\n when(callableWrapper.getInitialDelay()).thenReturn(100L);\n when(callableWrapp... | {
"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_288 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotNullElements() {\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_158 | {
"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 testAddParentWhenItAlreadyExistsThrows() {\n final NodeBase parent1 = new ExplicitNode(\"parent1\", null);\n final NodeBase parent2 = new ExplicitNode(\"parent2\", null);\n\n final Decision instance = getInstance(\"instance\");\n\n instance.addParent(paren... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
},
{
"declarator": "childrenWithConditions",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public void addParent(final NodeBase parent) {\n Preconditions.checkState(this.parent == null, \"Decision nodes cannot have multiple parents.\");\n\n this.parent = parent;\n this.parent.addChild(this);\n }",
"class_method_signature": "Decision.addParent(final NodeBa... | {
"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_271 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestClassUtils.java",
"identifier": "TestClassUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainingJar() {\n assertTrue(ClassUtils.findContainingJar(JSONArray.class).contains(\"json-simple\"));\n }",
"class_method_signature": "TestClassUtils.testContainingJar()",
"constructor": false,
"full_signature": "@Test public void testContainingJar()",
"ident... | {
"fields": [],
"file": "core/src/main/java/org/apache/oozie/util/ClassUtils.java",
"identifier": "ClassUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ClassUtils.findContainingJar(Class clazz)",
"constructor": false,
"full_signature": "public static String findContai... | {
"body": "public static String findContainingJar(Class clazz) {\n ClassLoader loader = clazz.getClassLoader();\n String class_file = clazz.getName().replaceAll(\"\\\\.\", \"/\") + \".class\";\n try {\n for (Enumeration itr = loader.getResources(class_file); itr.hasMoreElements();) {\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_334 | {
"fields": [
{
"declarator": "services",
"modifier": "private",
"original_string": "private Services services;",
"type": "Services",
"var_name": "services"
}
],
"file": "core/src/test/java/org/apache/oozie/service/TestJMSTopicService.java",
"identifier": "TestJMSTopicServi... | {
"body": "@Test\n public void testIncorrectConfigurationDefault() {\n try {\n services = setupServicesForTopic();\n services.getConf().set(JMSTopicService.TOPIC_NAME, \"default=\" + \"invalidvalue\");\n services.init();\n fail(\"Expected Service Exception\");\n ... | {
"fields": [
{
"declarator": "CONF_PREFIX = Service.CONF_PREFIX + \"JMSTopicService.\"",
"modifier": "public static final",
"original_string": "public static final String CONF_PREFIX = Service.CONF_PREFIX + \"JMSTopicService.\";",
"type": "String",
"var_name": "CONF_PREFIX"
},
... | {
"body": "@Override\n public void init(Services services) throws ServiceException {\n LOG = XLog.getLog(getClass());\n conf = services.getConf();\n parseTopicConfiguration();\n topicPrefix = conf.get(TOPIC_PREFIX, \"\");\n }",
"class_method_signature": "JMSTopicService.init(Servic... | {
"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_55 | {
"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 testWithReduceCalledTwiceThrows() {\n final String reduce1 = \"reduce1\";\n final String reduce2= \"reduce2\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withReduce(reduce1);\n\n expectedException.expect(IllegalStateException.cla... | {
"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 withReduce(final String reduce) {\n this.reduce.set(reduce);\n return this;\n }",
"class_method_signature": "PipesBuilder.withReduce(final String reduce)",
"constructor": false,
"full_signature": "public PipesBuilder withReduce(final String reduce)",
"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_226 | {
"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": "@Test\n public void testParseBulkResponseList() {\n JSONArray array = createJsonBulkResponseList();\n List<BulkResponse> list = JsonToBean.createBulkResponseList(array);\n\n assertEquals(2, list.size());\n assertEquals(\"cj1\", list.get(0).getCoordinator().getId());\n ... | {
"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<BulkResponse> createBulkResponseList(JSONArray json) {\n List<BulkResponse> list = new ArrayList<BulkResponse>();\n for (Object obj : json) {\n list.add(createBulkResponse((JSONObject) obj));\n }\n return list;\n }",
"class_method_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_363 | {
"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 testACLisEmptyWhenMRACLsDisabled() {\n setupYarnACLHandler(false);\n setModifyACL();\n setViewACL();\n\n yarnACLSetter.setACLs(contextMock);\n\n assertViewACLset();\n assertModifyACLset();\n }",
"class_method_signature": "TestYarnACLHand... | {
"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_227 | {
"fields": [],
"file": "client/src/test/java/org/apache/oozie/cli/TestCLIParser.java",
"identifier": "TestCLIParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyParser() throws Exception {\n try {\n CLIParser parser = new CLIParser(\"oozie\", new String[]{});\n CLIParser.Command c = parser.parse(new String[]{\"a\"});\n fail();\n }\n catch (ParseException ex) {\n //nop\... | {
"fields": [
{
"declarator": "LEFT_PADDING = \" \"",
"modifier": "private static final",
"original_string": "private static final String LEFT_PADDING = \" \";",
"type": "String",
"var_name": "LEFT_PADDING"
},
{
"declarator": "cliName",
"modifier": "priv... | {
"body": "public Command parse(String[] args) throws ParseException {\n if (args.length == 0) {\n throw new ParseException(\"missing sub-command\");\n }\n else {\n if (commands.containsKey(args[0])) {\n GnuParser parser ;\n String[] minusComman... | {
"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_362 | {
"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 testACLisEmptyWhenEnabledAndNoACLsDefined() {\n setupYarnACLHandler(true);\n\n yarnACLSetter.setACLs(contextMock);\n\n assertNoACLset();\n }",
"class_method_signature": "TestYarnACLHandler.testACLisEmptyWhenEnabledAndNoACLsDefined()",
"constructor": false,... | {
"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_54 | {
"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 testWithReduce() {\n final String reduce = \"reduce\";\n\n final PipesBuilder builder = new PipesBuilder();\n builder.withReduce(reduce);\n\n final Pipes pipes = builder.build();\n assertEquals(reduce, pipes.getReduce());\n }",
"class_method_si... | {
"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 withReduce(final String reduce) {\n this.reduce.set(reduce);\n return this;\n }",
"class_method_signature": "PipesBuilder.withReduce(final String reduce)",
"constructor": false,
"full_signature": "public PipesBuilder withReduce(final String reduce)",
"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_270 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestIOUtils.java",
"identifier": "TestIOUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCopyStream() throws IOException {\n byte[] original = new byte[]{0, 1, 2};\n ByteArrayInputStream is = new ByteArrayInputStream(original);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n IOUtils.copyStream(is, os);\n byte[] copy = os... | {
"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 void copyStream(InputStream is, OutputStream os) throws IOException {\n Objects.requireNonNull(is, \"is cannot be null\");\n Objects.requireNonNull(os, \"os cannot be null\");\n byte[] buffer = new byte[4096];\n int read;\n while ((read = is.read(buffer)) > ... | {
"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_335 | {
"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 testfailFast() throws Exception {\n Configuration conf = getOozieConfig();\n conf.set(ShareLibService.FAIL_FAST_ON_STARTUP, \"true\");\n // Set dummyfile as metafile which doesn't exist.\n conf.set(ShareLibService.SHARELIB_MAPPING_FILE, String.valueOf(new ... | {
"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_159 | {
"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 Decision instance = getInstance(\"instance\");\n\n expectedException.expect(IllegalArgumentException.class);\n instance.removeParent(parent);\n }",
"class_meth... | {
"fields": [
{
"declarator": "parent",
"modifier": "private",
"original_string": "private NodeBase parent;",
"type": "NodeBase",
"var_name": "parent"
},
{
"declarator": "childrenWithConditions",
"modifier": "private final",
"original_string": "private final... | {
"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_266 | {
"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 testEmbeddedRetryHandlersWhenInnerHandlerThrowsSQLError() throws Exception {\n @SuppressWarnings(\"unchecked\")\n final Callable<String> innerOperation = mock(Callable.class);\n final MutableInt callCount = new MutableInt(0);\n\n // internal operation whic... | {
"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_323 | {
"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 testExceptionThrownDuringSubmission() {\n doThrow(new RuntimeException()).when(executor).execute(any(Runnable.class));\n\n boolean exceptionThrown = false;\n try {\n asyncExecutor.queue(callableWrapper, false);\n } catch (RuntimeException e) {\n... | {
"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_289 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java",
"identifier": "TestParamChecker",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotEmpty() {\n ParamChecker.notEmpty(\"value\", \"name\");\n try {\n ParamChecker.notEmpty(null, \"name\");\n fail();\n }\n catch (IllegalArgumentException ex) {\n // nop\n }\n try {\n ParamChec... | {
"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 notEmpty(String str, String name) {\n return notEmpty(str, name, null);\n }",
"class_method_signature": "ParamChecker.notEmpty(String str, String name)",
"constructor": false,
"full_signature": "public static String notEmpty(String str, String name)",
"identifier": "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_15 | {
"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 testExceptionThrownWithInvalidNumBundles() throws Exception {\n argParser.getNumBundles();\n }",
"class_method_signature": "TestArgParser.testExceptionThrownWithInvalidNumBundles()",
"constructor": false,
"full_signature": "@... | {
"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 getNumBundles() {\n final Integer numBundles = Integer.valueOf(commandLine.getOptionValue(NUM_BUNDLES_OPTION, \"0\"));\n Preconditions.checkArgument(numBundles >= 0,\n NUM_BUNDLES_OPTION + \" cannot be negative\");\n return numBundles;\n }",
"class_method_si... | {
"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_231 | {
"fields": [],
"file": "core/src/test/java/org/apache/oozie/util/TestDateUtils.java",
"identifier": "TestDateUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void testInvalidOozieTimeZoneGMTPrefix() throws Exception {\n Configuration conf = new XConfiguration();\n conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, \"xGMT-0300\");\n DateUtils.setConf(conf);\n }",
"class_method_signatur... | {
"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_374 | {
"fields": [
{
"declarator": "EMPTY_ARRAY = {}",
"modifier": "private static final",
"original_string": "private static final String[] EMPTY_ARRAY = {};",
"type": "String[]",
"var_name": "EMPTY_ARRAY"
},
{
"declarator": "shareLibExcluder",
"modifier": "private",
... | {
"body": "@Test\n public void testWithNullLibPathArgShouldThrowException() {\n servicesConf.set(excludeProperty, ALL_JACKSON_PATTERN);\n shareLibExcluder = new ShareLibExcluder(actionConf, servicesConf, jobConf, executorType, sharelibRootURI);\n\n // expect exception when illegal parameters p... | {
"fields": [
{
"declarator": "shareLibRoot",
"modifier": "private final",
"original_string": "private final URI shareLibRoot;",
"type": "URI",
"var_name": "shareLibRoot"
},
{
"declarator": "configuredExcludePattern",
"modifier": "private final",
"original_s... | {
"body": "boolean shouldExclude(final URI actionLibURI) {\n Objects.requireNonNull(actionLibURI, () -> String.format(VALUE_NULL_MSG, \"actionLibURI\"));\n\n if (configuredExcludePattern != null && shareLibRoot != null) {\n if (configuredExcludePattern.matcher(shareLibRoot.relativize(actionLi... | {
"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.