amir9979 / bug_miner_runner

0 stars 0 forks source link

commons-scxml #170

Closed amir9979 closed 3 years ago

amir9979 commented 4 years ago

0

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,8691eb95522d9421a8b2883bf65e535d581f1a06,509cb24e2c759eb17556fd3d2a158e3fdf60ab69,org.apache.commons.scxml2.env.javascript.JavaScriptEngineTest.testBindingsGlobal_WithJSBindings,False,[],,,,org.apache.commons.scxml2.env.javascript.jsbindings.get(object)@org.apache.commons.scxml2.env.javascript.jsbindings.keyset()@org.apache.commons.scxml2.env.javascript.jsbindings.union()@org.apache.commons.scxml2.env.javascript.jsbindings.remove(object)@org.apache.commons.scxml2.env.javascript.jsbindings.containsvalue(object)@org.apache.commons.scxml2.env.javascript.jsbindings.clear()@org.apache.commons.scxml2.env.javascript.jsbindings.containskey(object),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\nindex 3ff6aef..c1bafaf 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\n@@ -16,17 +16,79 @@\n /\n package org.apache.commons.scxml2.env.javascript;\n \n+import static org.junit.Assert.assertEquals;\n+\n+import javax.script.Bindings;\n+import javax.script.ScriptContext;\n+import javax.script.ScriptEngine;\n+import javax.script.ScriptEngineManager;\n+\n+import org.apache.commons.scxml2.Context;\n import org.junit.Before;\n import org.junit.Test;\n \n public class JavaScriptEngineTest {\n \n+ private ScriptEngine engine;\n+\n+ private Context context;\n+\n @Before\n public void before() throws Exception {\n- \n+ ScriptEngineManager factory = new ScriptEngineManager();\n+ engine = factory.getEngineByName(""JavaScript"");\n+ context = new JSContext();\n+ }\n+\n+ @Test\n+ public void testSimpleEvaluation() throws Exception {\n+ Object ret = engine.eval(""1.0 + 2.0"");\n+ assertEquals(3.0, ret);\n+ }\n+\n+ @Test\n+ public void testBindingsInput() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ bindings.put(""x"", 1.0);\n+ bindings.put(""y"", 2.0);\n+\n+ Object ret = engine.eval(""x + y;"", bindings);\n+ assertEquals(3.0, ret);\n+ }\n+\n+ @Test\n+ public void testBindingsInput_WithJSBindings() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ JSBindings jsBindings = new JSBindings(context, bindings);\n+ jsBindings.put(""x"", 1.0);\n+ jsBindings.put(""y"", 2.0);\n+\n+ Object ret = engine.eval(""x + y;"", jsBindings);\n+ assertEquals(3.0, ret);\n }\n \n @Test\n- public void testX() throws Exception {\n+ public void testBindingsGlobal() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ bindings.put(""x"", 1.0);\n+ bindings.put(""y"", 2.0);\n+ bindings.put(""z"", 0.0);\n+\n+ engine.eval(""z = x + y;"", bindings);\n+ assertEquals(""z variable is expected to set to 3.0 in global, but it was "" + bindings.get(""z"") + ""."",\n+ 3.0, bindings.get(""z""));\n+ }\n+\n+ @Test\n+ public void testBindingsGlobal_WithJSBindings() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ JSBindings jsBindings = new JSBindings(context, bindings);\n+ jsBindings.put(""x"", 1.0);\n+ jsBindings.put(""y"", 2.0);\n+ jsBindings.put(""z"", 0.0);\n+\n+ engine.eval(""z = x + y;"", jsBindings);\n+ assertEquals(""z variable is expected to set to 3.0 in global, but it was "" + jsBindings.get(""z"") + ""."",\n+ 3.0, jsBindings.get(""z""));\n }\n }'" True,Delta,-1,commons-scxml,8691eb95522d9421a8b2883bf65e535d581f1a06,509cb24e2c759eb17556fd3d2a158e3fdf60ab69,org.apache.commons.scxml2.env.javascript.JavaScriptEngineTest.testBindingsGlobal_WithJSBindings,False,[],,,,org.apache.commons.scxml2.env.javascript.jsbindings.get(object)@org.apache.commons.scxml2.env.javascript.jsbindings.keyset()@org.apache.commons.scxml2.env.javascript.jsbindings.union()@org.apache.commons.scxml2.env.javascript.jsbindings.remove(object)@org.apache.commons.scxml2.env.javascript.jsbindings.containsvalue(object)@org.apache.commons.scxml2.env.javascript.jsbindings.clear()@org.apache.commons.scxml2.env.javascript.jsbindings.containskey(object),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\nindex 3ff6aef..c1bafaf 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java\n@@ -16,17 +16,79 @@\n /\n package org.apache.commons.scxml2.env.javascript;\n \n+import static org.junit.Assert.assertEquals;\n+\n+import javax.script.Bindings;\n+import javax.script.ScriptContext;\n+import javax.script.ScriptEngine;\n+import javax.script.ScriptEngineManager;\n+\n+import org.apache.commons.scxml2.Context;\n import org.junit.Before;\n import org.junit.Test;\n \n public class JavaScriptEngineTest {\n \n+ private ScriptEngine engine;\n+\n+ private Context context;\n+\n @Before\n public void before() throws Exception {\n- \n+ ScriptEngineManager factory = new ScriptEngineManager();\n+ engine = factory.getEngineByName(""JavaScript"");\n+ context = new JSContext();\n+ }\n+\n+ @Test\n+ public void testSimpleEvaluation() throws Exception {\n+ Object ret = engine.eval(""1.0 + 2.0"");\n+ assertEquals(3.0, ret);\n+ }\n+\n+ @Test\n+ public void testBindingsInput() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ bindings.put(""x"", 1.0);\n+ bindings.put(""y"", 2.0);\n+\n+ Object ret = engine.eval(""x + y;"", bindings);\n+ assertEquals(3.0, ret);\n+ }\n+\n+ @Test\n+ public void testBindingsInput_WithJSBindings() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ JSBindings jsBindings = new JSBindings(context, bindings);\n+ jsBindings.put(""x"", 1.0);\n+ jsBindings.put(""y"", 2.0);\n+\n+ Object ret = engine.eval(""x + y;"", jsBindings);\n+ assertEquals(3.0, ret);\n }\n \n @Test\n- public void testX() throws Exception {\n+ public void testBindingsGlobal() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ bindings.put(""x"", 1.0);\n+ bindings.put(""y"", 2.0);\n+ bindings.put(""z"", 0.0);\n+\n+ engine.eval(""z = x + y;"", bindings);\n+ assertEquals(""z variable is expected to set to 3.0 in global, but it was "" + bindings.get(""z"") + ""."",\n+ 3.0, bindings.get(""z""));\n+ }\n+\n+ @Test\n+ public void testBindingsGlobal_WithJSBindings() throws Exception {\n+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);\n+ JSBindings jsBindings = new JSBindings(context, bindings);\n+ jsBindings.put(""x"", 1.0);\n+ jsBindings.put(""y"", 2.0);\n+ jsBindings.put(""z"", 0.0);\n+\n+ engine.eval(""z = x + y;"", jsBindings);\n+ assertEquals(""z variable is expected to set to 3.0 in global, but it was "" + jsBindings.get(""z"") + ""."",\n+ 3.0, jsBindings.get(""z""));\n }\n }'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,3661f45140430ba0ca99445ecec70d16610783e5,d916c50745b109551d81471f408250a2ec18ec84,org.apache.commons.scxml2.io.SCXMLReaderTest.testSCXMLReaderWithInvalidElements,False,[],,,,org.apache.commons.scxml2.notificationregistry.notificationregistry()@org.apache.commons.scxml2.model.transitiontarget.transitiontarget()@org.apache.commons.scxml2.model.scxml.scxml()@org.apache.commons.scxml2.io.modelupdater.updatescxml(scxml),u''

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,762c634e296d2c32a5658170ab2b613d5b087f13,c06cba3eda67d5e2ba02f6efa7296c8927af13fd,org.apache.commons.scxml2.io.SCXMLReaderTest.testSCXMLReaderWithInvalidElements,False,[],,,,org.apache.commons.scxml2.model.parallel.addchild(enterablestate)@org.apache.commons.scxml2.model.history.setparent(enterablestate)@org.apache.commons.scxml2.model.simpletransition.simpletransition()@org.apache.commons.scxml2.model.history.settransition(simpletransition),u''

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,753114980a2c19c86244e26198a712c77ed3b247,e2f293ce22aaeff7c467aecbf6a3299e71d37a07,org.apache.commons.scxml2.io.SCXMLReaderTest.testSCXMLReaderWithInvalidElements,False,[],,,,org.apache.commons.scxml2.scinstance.scinstance(scxmlexecutor)@org.apache.commons.scxml2.scinstance.getinvokers()@org.apache.commons.scxml2.model.transitionalstate.setinvoke(invoke)@org.apache.commons.scxml2.scinstance.getinvoker(transitionalstate)@org.apache.commons.scxml2.model.transitionalstate.getinvoke()@org.apache.commons.scxml2.model.transitionalstate.transitionalstate(),u''

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,e96c9c050d3b0e3b05988aca0bad429f0a77e144,98cad09572f7494607815031bd1ec210196168df,org.apache.commons.scxml2.env.jexl.JexlContextTest.testPrepopulated,False,[],,,,org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(map)@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext()@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(context),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\nindex e11a73e..45ac4eb 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n@@ -19,7 +19,6 @@ package org.apache.commons.scxml2.env.jexl;\n import java.util.HashMap;\n import java.util.Map;\n \n-import org.apache.commons.scxml2.Builtin;\n import org.junit.Assert;\n import org.junit.Test;\n \n@@ -29,8 +28,6 @@ public class JexlContextTest {\n public void testNew() {\n JexlContext ctx = new JexlContext();\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n }\n \n @Test\n@@ -39,24 +36,19 @@ public class JexlContextTest {\n m.put(""foo"", ""bar"");\n JexlContext ctx = new JexlContext(m);\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(2, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n Assert.assertEquals(""bar"", fooValue);\n }\n \n @Test\n public void testSetVars() {\n- JexlContext ctx = new JexlContext();\n- Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Map<String, Object> m = new HashMap<String, Object>();\n m.put(""foo"", ""bar"");\n- ctx.setVars(m);\n- Assert.assertEquals(2, ctx.getVars().size());\n+ JexlContext ctx = new JexlContext(m);\n+ Assert.assertNotNull(ctx);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Assert.assertEquals(""bar"", fooValue);\n }\n \ndiff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\nindex 10a0855..e3f42de 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n@@ -30,10 +30,24 @@ public class JexlEvaluatorTest {\n @Test\n public void testPristine() throws SCXMLExpressionException {\n Evaluator eval = new JexlEvaluator();\n- Assert.assertNotNull(eval);\n Assert.assertTrue(((Boolean) eval.eval(ctx, ""1+1 eq 2"")).booleanValue());\n }\n- \n+\n+ @Test\n+ public void testScript() throws SCXMLExpressionException {\n+ Evaluator eval = new JexlEvaluator();\n+ ctx.set(""x"", 3);\n+ ctx.set(""y"", 0);\n+ String script = \n+ ""if ((x 2) == 5) {"" +\n+ ""y = 1;\n"" +\n+ ""} else {\n"" +\n+ ""y = 2;\n"" +\n+ ""}"";\n+ Assert.assertEquals(2, eval.evalScript(ctx, script));\n+ Assert.assertEquals(2, ctx.get(""y""));\n+ }\n+\n @Test\n public void testErrorMessage() {\n Evaluator eval = new JexlEvaluator();'" True,Regression,-1,commons-scxml,e96c9c050d3b0e3b05988aca0bad429f0a77e144,98cad09572f7494607815031bd1ec210196168df,org.apache.commons.scxml2.env.jexl.JexlContextTest.testPrepopulated,False,[],,,,org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(map)@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext()@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(context),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\nindex e11a73e..45ac4eb 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n@@ -19,7 +19,6 @@ package org.apache.commons.scxml2.env.jexl;\n import java.util.HashMap;\n import java.util.Map;\n \n-import org.apache.commons.scxml2.Builtin;\n import org.junit.Assert;\n import org.junit.Test;\n \n@@ -29,8 +28,6 @@ public class JexlContextTest {\n public void testNew() {\n JexlContext ctx = new JexlContext();\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n }\n \n @Test\n@@ -39,24 +36,19 @@ public class JexlContextTest {\n m.put(""foo"", ""bar"");\n JexlContext ctx = new JexlContext(m);\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(2, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n Assert.assertEquals(""bar"", fooValue);\n }\n \n @Test\n public void testSetVars() {\n- JexlContext ctx = new JexlContext();\n- Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Map<String, Object> m = new HashMap<String, Object>();\n m.put(""foo"", ""bar"");\n- ctx.setVars(m);\n- Assert.assertEquals(2, ctx.getVars().size());\n+ JexlContext ctx = new JexlContext(m);\n+ Assert.assertNotNull(ctx);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Assert.assertEquals(""bar"", fooValue);\n }\n \ndiff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\nindex 10a0855..e3f42de 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n@@ -30,10 +30,24 @@ public class JexlEvaluatorTest {\n @Test\n public void testPristine() throws SCXMLExpressionException {\n Evaluator eval = new JexlEvaluator();\n- Assert.assertNotNull(eval);\n Assert.assertTrue(((Boolean) eval.eval(ctx, ""1+1 eq 2"")).booleanValue());\n }\n- \n+\n+ @Test\n+ public void testScript() throws SCXMLExpressionException {\n+ Evaluator eval = new JexlEvaluator();\n+ ctx.set(""x"", 3);\n+ ctx.set(""y"", 0);\n+ String script = \n+ ""if ((x 2) == 5) {"" +\n+ ""y = 1;\n"" +\n+ ""} else {\n"" +\n+ ""y = 2;\n"" +\n+ ""}"";\n+ Assert.assertEquals(2, eval.evalScript(ctx, script));\n+ Assert.assertEquals(2, ctx.get(""y""));\n+ }\n+\n @Test\n public void testErrorMessage() {\n Evaluator eval = new JexlEvaluator();'" True,Regression,-1,commons-scxml,e96c9c050d3b0e3b05988aca0bad429f0a77e144,98cad09572f7494607815031bd1ec210196168df,org.apache.commons.scxml2.env.jexl.JexlContextTest.testSetVars,False,[],,,,org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(map)@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext()@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(context),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\nindex e11a73e..45ac4eb 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n@@ -19,7 +19,6 @@ package org.apache.commons.scxml2.env.jexl;\n import java.util.HashMap;\n import java.util.Map;\n \n-import org.apache.commons.scxml2.Builtin;\n import org.junit.Assert;\n import org.junit.Test;\n \n@@ -29,8 +28,6 @@ public class JexlContextTest {\n public void testNew() {\n JexlContext ctx = new JexlContext();\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n }\n \n @Test\n@@ -39,24 +36,19 @@ public class JexlContextTest {\n m.put(""foo"", ""bar"");\n JexlContext ctx = new JexlContext(m);\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(2, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n Assert.assertEquals(""bar"", fooValue);\n }\n \n @Test\n public void testSetVars() {\n- JexlContext ctx = new JexlContext();\n- Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Map<String, Object> m = new HashMap<String, Object>();\n m.put(""foo"", ""bar"");\n- ctx.setVars(m);\n- Assert.assertEquals(2, ctx.getVars().size());\n+ JexlContext ctx = new JexlContext(m);\n+ Assert.assertNotNull(ctx);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Assert.assertEquals(""bar"", fooValue);\n }\n \ndiff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\nindex 10a0855..e3f42de 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n@@ -30,10 +30,24 @@ public class JexlEvaluatorTest {\n @Test\n public void testPristine() throws SCXMLExpressionException {\n Evaluator eval = new JexlEvaluator();\n- Assert.assertNotNull(eval);\n Assert.assertTrue(((Boolean) eval.eval(ctx, ""1+1 eq 2"")).booleanValue());\n }\n- \n+\n+ @Test\n+ public void testScript() throws SCXMLExpressionException {\n+ Evaluator eval = new JexlEvaluator();\n+ ctx.set(""x"", 3);\n+ ctx.set(""y"", 0);\n+ String script = \n+ ""if ((x 2) == 5) {"" +\n+ ""y = 1;\n"" +\n+ ""} else {\n"" +\n+ ""y = 2;\n"" +\n+ ""}"";\n+ Assert.assertEquals(2, eval.evalScript(ctx, script));\n+ Assert.assertEquals(2, ctx.get(""y""));\n+ }\n+\n @Test\n public void testErrorMessage() {\n Evaluator eval = new JexlEvaluator();'" True,Regression,-1,commons-scxml,e96c9c050d3b0e3b05988aca0bad429f0a77e144,98cad09572f7494607815031bd1ec210196168df,org.apache.commons.scxml2.env.jexl.JexlContextTest.testSetVars,False,[],,,,org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(map)@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext()@org.apache.commons.scxml2.env.jexl.jexlcontext.jexlcontext(context),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\nindex e11a73e..45ac4eb 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java\n@@ -19,7 +19,6 @@ package org.apache.commons.scxml2.env.jexl;\n import java.util.HashMap;\n import java.util.Map;\n \n-import org.apache.commons.scxml2.Builtin;\n import org.junit.Assert;\n import org.junit.Test;\n \n@@ -29,8 +28,6 @@ public class JexlContextTest {\n public void testNew() {\n JexlContext ctx = new JexlContext();\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n }\n \n @Test\n@@ -39,24 +36,19 @@ public class JexlContextTest {\n m.put(""foo"", ""bar"");\n JexlContext ctx = new JexlContext(m);\n Assert.assertNotNull(ctx);\n- Assert.assertEquals(2, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n Assert.assertEquals(""bar"", fooValue);\n }\n \n @Test\n public void testSetVars() {\n- JexlContext ctx = new JexlContext();\n- Assert.assertNotNull(ctx);\n- Assert.assertEquals(1, ctx.getVars().size());\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Map<String, Object> m = new HashMap<String, Object>();\n m.put(""foo"", ""bar"");\n- ctx.setVars(m);\n- Assert.assertEquals(2, ctx.getVars().size());\n+ JexlContext ctx = new JexlContext(m);\n+ Assert.assertNotNull(ctx);\n+ Assert.assertEquals(1, ctx.getVars().size());\n String fooValue = (String) ctx.get(""foo"");\n- Assert.assertTrue(ctx.get(""_builtin"") instanceof Builtin);\n Assert.assertEquals(""bar"", fooValue);\n }\n \ndiff --git a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\nindex 10a0855..e3f42de 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java\n@@ -30,10 +30,24 @@ public class JexlEvaluatorTest {\n @Test\n public void testPristine() throws SCXMLExpressionException {\n Evaluator eval = new JexlEvaluator();\n- Assert.assertNotNull(eval);\n Assert.assertTrue(((Boolean) eval.eval(ctx, ""1+1 eq 2"")).booleanValue());\n }\n- \n+\n+ @Test\n+ public void testScript() throws SCXMLExpressionException {\n+ Evaluator eval = new JexlEvaluator();\n+ ctx.set(""x"", 3);\n+ ctx.set(""y"", 0);\n+ String script = \n+ ""if ((x 2) == 5) {"" +\n+ ""y = 1;\n"" +\n+ ""} else {\n"" +\n+ ""y = 2;\n"" +\n+ ""}"";\n+ Assert.assertEquals(2, eval.evalScript(ctx, script));\n+ Assert.assertEquals(2, ctx.get(""y""));\n+ }\n+\n @Test\n public void testErrorMessage() {\n Evaluator eval = new JexlEvaluator();'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSequentialEl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSequentialJexl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSequentialJexl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSimultaneousJexl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSequentialEl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Delta,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelParallelSharedSCXML,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSimultaneousJexl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Delta,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelParallelSharedSCXML,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Delta,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelParallelSwapSCXML,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSimultaneousEl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Regression,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelSimultaneousEl,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ */\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'" True,Delta,-1,commons-scxml,7a40cd30e35e0117c21800914d27307cb24a5241,faacf9da6d41b346c73a71393ac4a7c7eacf22fd,org.apache.commons.scxml.model.StatelessModelTest.testStatelessModelParallelSwapSCXML,False,[],,,,org.apache.commons.scxml.scinstance.scinstance(scxmlexecutor),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\nindex d7ce146..4d9acd7 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java\n@@ -17,6 +17,7 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.Iterator;\n import java.util.Set;\n \n import junit.framework.Test;\n@@ -48,9 +49,9 @@ public class StatelessModelTest extends TestCase {\n }\n \n // Test data\n- private URL stateless01jexl, stateless01jsp;\n- private SCXML scxml01jexl, scxml01jsp;\n- private SCXMLExecutor exec01, exec02;\n+ private URL stateless01jexl, stateless01jsp, stateless01par;\n+ private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;\n+ private SCXMLExecutor exec01, exec02, exec03;\n \n /\n * Set up instance variables required by this test case.\n@@ -60,8 +61,12 @@ public class StatelessModelTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/stateless-01.xml"");\n stateless01jsp = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jsp/stateless-01.xml"");\n+ stateless01par = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/stateless-parallel-01.xml"");\n scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);\n scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);\n+ scxml01par = SCXMLTestHelper.digest(stateless01par);\n+ scxml02par = SCXMLTestHelper.digest(stateless01par);\n }\n \n /\n@@ -124,6 +129,83 @@ public class StatelessModelTest extends TestCase {\n }\n }\n \n+ /\n+ Test sharing a single SCXML object between two executors\n+ /\n+ public void testStatelessModelParallelSharedSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ exec02 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec02);\n+ assertFalse(exec01 == exec02);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = exec02.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec02"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state2.event"", exec02);\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.final"", ""exec02"");\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec02);\n+ checkParallelStates(currentStates, ""next"", null, ""exec02"");\n+ }\n+\n+ /\n+ Test sharing two SCXML objects between one executor (not recommended)\n+ /\n+ public void testStatelessModelParallelSwapSCXML() {\n+ exec01 = SCXMLTestHelper.getExecutor(scxml01par);\n+ assertNotNull(exec01);\n+ assertTrue(scxml01par != scxml02par);\n+\n+ Set currentStates = exec01.getCurrentStatus().getStates();\n+ checkParallelStates(currentStates, ""state1.init"", ""state2.init"", ""exec01"");\n+\n+ currentStates = fireEvent(""state1.event"", exec01);\n+ checkParallelStates(currentStates, ""state1.final"", ""state2.init"", ""exec01"");\n+ exec01.setStateMachine(scxml02par);\n+\n+ currentStates = fireEvent(""state2.event"", exec01);\n+ checkParallelStates(currentStates, ""next"", null, ""exec01"");\n+ }\n+\n+ private void checkParallelStates(Set currentStates, String s1, String s2,\n+ String label) {\n+ Iterator i = currentStates.iterator();\n+ assertTrue(""Not enough states"", i.hasNext());\n+ String cs1 = ((State) i.next()).getId();\n+ String cs2 = null;\n+ if (s2 != null) {\n+ assertTrue(""Not enough states, found one state: "" + cs1, i.hasNext());\n+ cs2 = ((State) i.next()).getId();\n+ assertFalse(""Too many states"", i.hasNext());\n+ if (s2.equals(cs2)) {\n+ cs2 = null;\n+ } else if (s1.equals(cs2)) {\n+ cs2 = null;\n+ } else {\n+ fail(label + "" in unexpected state "" + cs2);\n+ }\n+ } else {\n+ assertFalse(""Too many states"", i.hasNext());\n+ }\n+ if (s1 != null && s1.equals(cs1)) {\n+ return;\n+ }\n+ if (s2 != null && s2.equals(cs1)) {\n+ return;\n+ }\n+ fail(label + "" in unexpected state "" + cs1);\n+ }\n+\n private void runSimultaneousTest() {\n try {\n //// Interleaved'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,67ace732f08e5ac19bdf011412379a8d43387541,b17feea4827863c85207c0aaa5c8c5b035d27df1,org.apache.commons.scxml2.io.SCXMLReaderTest.testSCXMLReaderWithInvalidElements,False,[],,,,org.apache.commons.scxml2.scinstance.getcontext(enterablestate)@org.apache.commons.scxml2.scinstance.getglobalscriptcontext()@org.apache.commons.scxml2.model.var.execute(actionexecutioncontext)@org.apache.commons.scxml2.model.send.execute(actionexecutioncontext)@org.apache.commons.scxml2.env.simplecontext.has(string)@org.apache.commons.scxml2.model.script.execute(actionexecutioncontext)@org.apache.commons.scxml2.model.assign.execute(actionexecutioncontext)@org.apache.commons.scxml2.env.groovy.groovycontext.getscriptbaseclass()@org.apache.commons.scxml2.actionexecutioncontext.getscinstance()@org.apache.commons.scxml2.scinstance.setrootcontext(context)@org.apache.commons.scxml2.scxmlexecutor.handleevent(triggerevent)@org.apache.commons.scxml2.scxmlexecutor.reset()@org.apache.commons.scxml2.model.foreach.execute(actionexecutioncontext)@org.apache.commons.scxml2.scinstance.setstatemachine(scxml)@org.apache.commons.scxml2.env.jexl.jexlbuiltin.getallstates()@org.apache.commons.scxml2.scinstance.scinstance(scxmlexecutor)@org.apache.commons.scxml2.scxmlexecutor.seteventdata(triggerevent)@org.apache.commons.scxml2.env.groovy.groovyscxmlscript.getallstates()@org.apache.commons.scxml2.model.if.execute(actionexecutioncontext)@org.apache.commons.scxml2.model.log.execute(actionexecutioncontext),"u'diff --git a/src/test/java/org/apache/commons/scxml2/EventDataTest.java b/src/test/java/org/apache/commons/scxml2/EventDataTest.java\nindex a18474d..506eb4a 100644\n--- a/src/test/java/org/apache/commons/scxml2/EventDataTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/EventDataTest.java\n@@ -30,7 +30,7 @@ import org.junit.Before;\n import org.junit.Test;\n /\n Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.\n- Testing special variable ""_eventdata""\n+ Testing special variable ""_event.data""\n /\n public class EventDataTest {\n \n@@ -62,7 +62,7 @@ public class EventDataTest {\n }\n \n /\n- Test the SCXML documents, usage of ""_eventdata""\n+ Test the SCXML documents, usage of ""_event.data""\n */\n @Test\n public void testEventdata01Sample() throws Exception {\ndiff --git a/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java b/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java\nindex 41397ee..562d91b 100644\n--- a/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java\n@@ -324,21 +324,21 @@ public class SCXMLExecutorTest {\n \n Map<String, Object> payload = new HashMap<String, Object>();\n \n- // with _eventdata[\'keyed\'] set to true, transition should happen as expected.\n+ // with _event.data set to true, transition should happen as expected.\n payload.put(""keyed"", Boolean.TRUE);\n SCXMLTestHelper.assertPostTriggerState(exec, ""open"", payload, ""opened"");\n // turn back to closed\n SCXMLTestHelper.assertPostTriggerState(exec, ""close"", payload, ""closed"");\n \n- // with _eventdata[\'keyed\'] set to false, transition shouldn\'t happen as expected.\n+ // with _event.data set to false, transition shouldn\'t happen as expected.\n payload.put(""keyed"", Boolean.FALSE);\n SCXMLTestHelper.assertPostTriggerState(exec, ""open"", payload, ""closed"");\n \n- // with _eventdata[\'keyed\'] set to null, transition shouldn\'t happen as expected.\n+ // with _event.data set to null, transition shouldn\'t happen as expected.\n payload.clear();\n SCXMLTestHelper.assertPostTriggerState(exec, ""open"", payload, ""closed"");\n \n- // with _eventdata set to null, transition shouldn\'t happen as expected.\n+ // with _event.data set to null, transition shouldn\'t happen as expected.\n SCXMLTestHelper.assertPostTriggerState(exec, ""open"", null, ""closed"");\n \n // transition to locked for testing\ndiff --git a/src/test/java/org/apache/commons/scxml2/WildcardTest.java b/src/test/java/org/apache/commons/scxml2/WildcardTest.java\nindex 2ba102e..980603e 100644\n--- a/src/test/java/org/apache/commons/scxml2/WildcardTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/WildcardTest.java\n@@ -54,7 +54,7 @@ public class WildcardTest {\n }\n \n /*\n- Test the SCXML documents, usage of ""_eventdata""\n+ Test the SCXML documents, usage of ""_event.data""\n /\n @Test\n public void testWildcard01Sample() throws Exception {\ndiff --git a/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java b/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java\nindex d28588a..2fb70ab 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java\n@@ -64,7 +64,11 @@ public class XPathExampleTest {\n }\n \n // TEST METHODS\n+ / TODO: disabled test because the XPathContext cannot yet resolve $_event/data\n+ and the old $_eventdata system variable has been removed.\n+ this probably requires replacing the XPathContext handling with Commons JXPath or similar solution\n @Test\n+ /\n public void testExample01Sample() throws Exception {\n \n SCXML scxml = SCXMLTestHelper.parse(example01);'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,ed72ca041b4bdfdd12391d0206f7512ee5be0178,2834270e6589169f1ad7657d0ff60b09afccf240,org.apache.commons.scxml.model.ParallelTest.testParallel03,False,[],,,,org.apache.commons.scxml.model.action.getparentstate(),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\nindex 5366bc7..e63eeab 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n@@ -54,7 +54,7 @@ public class ActionsTest extends TestCase {\n }\n \n // Test data\n- private URL actionsSample;\n+ private URL actionsSample01, actionsSample02;\n private ELEvaluator evaluator;\n private ELContext ctx;\n private SCXMLExecutor exec;\n@@ -63,8 +63,10 @@ public class ActionsTest extends TestCase {\n Set up instance variables required by this test case.\n /\n public void setUp() {\n- actionsSample = this.getClass().getClassLoader().\n- getResource(""org/apache/commons/scxml/model/actions-test.xml"");\n+ actionsSample01 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-state-test.xml"");\n+ actionsSample02 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-parallel-test.xml"");\n evaluator = new ELEvaluator();\n ctx = new ELContext();\n }\n@@ -73,7 +75,7 @@ public class ActionsTest extends TestCase {\n Tear down instance variables required by this test case.\n /\n public void tearDown() {\n- actionsSample = null;\n+ actionsSample01 = actionsSample02 = null;\n evaluator = null;\n ctx = null;\n exec = null;\n@@ -82,8 +84,8 @@ public class ActionsTest extends TestCase {\n /\n Test the implementation\n /\n- public void testModelActions() {\n- SCXML scxml = SCXMLTestHelper.parse(actionsSample);\n+ public void testStateActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample01);\n exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n ""actionsTest"");\n@@ -92,7 +94,17 @@ public class ActionsTest extends TestCase {\n ""true"", (String) ctx.get(""eventsent""));\n }\n \n- public static void main(String args[]) {\n+ public void testParallelActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample02);\n+ exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n+ ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n+ ""actionsTest"");\n+ assertEquals((String) ctx.get(""foo""), ""foobar"");\n+ assertEquals(""Missed event transition"",\n+ ""true"", (String) ctx.get(""eventsent""));\n+ }\n+\n+ public static void main(String args[]) {\n TestRunner.run(suite());\n }\n }\ndiff --git a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\nindex bea2f7f..bc3c755 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n@@ -17,9 +17,13 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.HashMap;\n+import java.util.Map;\n \n+import org.apache.commons.scxml.Builtin;\n import org.apache.commons.scxml.SCXMLExecutor;\n import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.w3c.dom.Node;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -41,7 +45,7 @@ public class ParallelTest extends TestCase {\n }\n \n // Test data\n- private URL parallel01, parallel02;\n+ private URL parallel01, parallel02, parallel03;\n private SCXMLExecutor exec;\n \n public void setUp() {\n@@ -49,15 +53,17 @@ public class ParallelTest extends TestCase {\n getResource(""org/apache/commons/scxml/model/parallel-01.xml"");\n parallel02 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/model/parallel-02.xml"");\n+ parallel03 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/parallel-03.xml"");\n }\n \n public void tearDown() {\n- parallel01 = parallel02 = null;\n+ parallel01 = parallel02 = parallel03 = null;\n exec = null;\n }\n \n public void testParallel01() {\n- \tSCXML scxml = SCXMLTestHelper.parse(parallel01);\n+ SCXML scxml = SCXMLTestHelper.parse(parallel01);\n assertNotNull(scxml);\n exec = SCXMLTestHelper.getExecutor(scxml);\n assertNotNull(exec);\n@@ -69,15 +75,37 @@ public class ParallelTest extends TestCase {\n }\n \n public void testParallel02() {\n- \tSCXML scxml = SCXMLTestHelper.parse(parallel02);\n+ SCXML scxml = SCXMLTestHelper.parse(parallel02);\n assertNotNull(scxml);\n exec = SCXMLTestHelper.getExecutor(scxml);\n assertNotNull(exec);\n try {\n- \tSCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n SCXMLTestHelper.assertPostTriggerState(exec, ""event1"", ""state1"");\n } catch (Exception e) {\n- \te.printStackTrace();\n+ fail(e.getMessage());\n+ }\n+ }\n+\n+ public void testParallel03() {\n+ SCXML scxml = SCXMLTestHelper.parse(parallel03);\n+ assertNotNull(scxml);\n+ exec = SCXMLTestHelper.getExecutor(scxml);\n+ assertNotNull(exec);\n+ try {\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""para11"", ""para21"" });\n+ Node data = (Node) exec.getRootContext().get(""root"");\n+ Map namespaces = new HashMap();\n+ namespaces.put("""", ""http://www.w3.org/2005/07/scxml"");\n+ Object count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""5.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""foo"", new String[] { ""para12"", ""para21"" });\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""7.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerState(exec, ""bar"", ""end"");\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""14.0"", count.toString());\n+ } catch (Exception e) {\n fail(e.getMessage());\n }\n }'" True,Delta,-1,commons-scxml,ed72ca041b4bdfdd12391d0206f7512ee5be0178,2834270e6589169f1ad7657d0ff60b09afccf240,org.apache.commons.scxml.model.ParallelTest.testParallel03,False,[],,,,org.apache.commons.scxml.model.action.getparentstate(),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\nindex 5366bc7..e63eeab 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n@@ -54,7 +54,7 @@ public class ActionsTest extends TestCase {\n }\n \n // Test data\n- private URL actionsSample;\n+ private URL actionsSample01, actionsSample02;\n private ELEvaluator evaluator;\n private ELContext ctx;\n private SCXMLExecutor exec;\n@@ -63,8 +63,10 @@ public class ActionsTest extends TestCase {\n Set up instance variables required by this test case.\n /\n public void setUp() {\n- actionsSample = this.getClass().getClassLoader().\n- getResource(""org/apache/commons/scxml/model/actions-test.xml"");\n+ actionsSample01 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-state-test.xml"");\n+ actionsSample02 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-parallel-test.xml"");\n evaluator = new ELEvaluator();\n ctx = new ELContext();\n }\n@@ -73,7 +75,7 @@ public class ActionsTest extends TestCase {\n Tear down instance variables required by this test case.\n /\n public void tearDown() {\n- actionsSample = null;\n+ actionsSample01 = actionsSample02 = null;\n evaluator = null;\n ctx = null;\n exec = null;\n@@ -82,8 +84,8 @@ public class ActionsTest extends TestCase {\n /\n Test the implementation\n /\n- public void testModelActions() {\n- SCXML scxml = SCXMLTestHelper.parse(actionsSample);\n+ public void testStateActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample01);\n exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n ""actionsTest"");\n@@ -92,7 +94,17 @@ public class ActionsTest extends TestCase {\n ""true"", (String) ctx.get(""eventsent""));\n }\n \n- public static void main(String args[]) {\n+ public void testParallelActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample02);\n+ exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n+ ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n+ ""actionsTest"");\n+ assertEquals((String) ctx.get(""foo""), ""foobar"");\n+ assertEquals(""Missed event transition"",\n+ ""true"", (String) ctx.get(""eventsent""));\n+ }\n+\n+ public static void main(String args[]) {\n TestRunner.run(suite());\n }\n }\ndiff --git a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\nindex bea2f7f..bc3c755 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n@@ -17,9 +17,13 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n+import java.util.HashMap;\n+import java.util.Map;\n \n+import org.apache.commons.scxml.Builtin;\n import org.apache.commons.scxml.SCXMLExecutor;\n import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.w3c.dom.Node;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -41,7 +45,7 @@ public class ParallelTest extends TestCase {\n }\n \n // Test data\n- private URL parallel01, parallel02;\n+ private URL parallel01, parallel02, parallel03;\n private SCXMLExecutor exec;\n \n public void setUp() {\n@@ -49,15 +53,17 @@ public class ParallelTest extends TestCase {\n getResource(""org/apache/commons/scxml/model/parallel-01.xml"");\n parallel02 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/model/parallel-02.xml"");\n+ parallel03 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/parallel-03.xml"");\n }\n \n public void tearDown() {\n- parallel01 = parallel02 = null;\n+ parallel01 = parallel02 = parallel03 = null;\n exec = null;\n }\n \n public void testParallel01() {\n- \tSCXML scxml = SCXMLTestHelper.parse(parallel01);\n+ SCXML scxml = SCXMLTestHelper.parse(parallel01);\n assertNotNull(scxml);\n exec = SCXMLTestHelper.getExecutor(scxml);\n assertNotNull(exec);\n@@ -69,15 +75,37 @@ public class ParallelTest extends TestCase {\n }\n \n public void testParallel02() {\n- \tSCXML scxml = SCXMLTestHelper.parse(parallel02);\n+ SCXML scxml = SCXMLTestHelper.parse(parallel02);\n assertNotNull(scxml);\n exec = SCXMLTestHelper.getExecutor(scxml);\n assertNotNull(exec);\n try {\n- \tSCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n SCXMLTestHelper.assertPostTriggerState(exec, ""event1"", ""state1"");\n } catch (Exception e) {\n- \te.printStackTrace();\n+ fail(e.getMessage());\n+ }\n+ }\n+\n+ public void testParallel03() {\n+ SCXML scxml = SCXMLTestHelper.parse(parallel03);\n+ assertNotNull(scxml);\n+ exec = SCXMLTestHelper.getExecutor(scxml);\n+ assertNotNull(exec);\n+ try {\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""para11"", ""para21"" });\n+ Node data = (Node) exec.getRootContext().get(""root"");\n+ Map namespaces = new HashMap();\n+ namespaces.put("""", ""http://www.w3.org/2005/07/scxml"");\n+ Object count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""5.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""foo"", new String[] { ""para12"", ""para21"" });\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""7.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerState(exec, ""bar"", ""end"");\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""14.0"", count.toString());\n+ } catch (Exception e) {\n fail(e.getMessage());\n }\n }'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,b99de86a664d42e8e093567b65d1dc5d126c3640,8975dca82978ee4aaa69d784aa4402274bb4f32f,org.apache.commons.scxml.model.ParallelTest.testParallel03,False,[],,,,org.apache.commons.scxml.model.action.getparentstate(),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\nindex 5366bc7..e63eeab 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n@@ -54,7 +54,7 @@ public class ActionsTest extends TestCase {\n }\n \n // Test data\n- private URL actionsSample;\n+ private URL actionsSample01, actionsSample02;\n private ELEvaluator evaluator;\n private ELContext ctx;\n private SCXMLExecutor exec;\n@@ -63,8 +63,10 @@ public class ActionsTest extends TestCase {\n Set up instance variables required by this test case.\n /\n public void setUp() {\n- actionsSample = this.getClass().getClassLoader().\n- getResource(""org/apache/commons/scxml/model/actions-test.xml"");\n+ actionsSample01 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-state-test.xml"");\n+ actionsSample02 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-parallel-test.xml"");\n evaluator = new ELEvaluator();\n ctx = new ELContext();\n }\n@@ -73,7 +75,7 @@ public class ActionsTest extends TestCase {\n Tear down instance variables required by this test case.\n /\n public void tearDown() {\n- actionsSample = null;\n+ actionsSample01 = actionsSample02 = null;\n evaluator = null;\n ctx = null;\n exec = null;\n@@ -82,8 +84,8 @@ public class ActionsTest extends TestCase {\n /\n Test the implementation\n /\n- public void testModelActions() {\n- SCXML scxml = SCXMLTestHelper.parse(actionsSample);\n+ public void testStateActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample01);\n exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n ""actionsTest"");\n@@ -92,7 +94,17 @@ public class ActionsTest extends TestCase {\n ""true"", (String) ctx.get(""eventsent""));\n }\n \n- public static void main(String args[]) {\n+ public void testParallelActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample02);\n+ exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n+ ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n+ ""actionsTest"");\n+ assertEquals((String) ctx.get(""foo""), ""foobar"");\n+ assertEquals(""Missed event transition"",\n+ ""true"", (String) ctx.get(""eventsent""));\n+ }\n+\n+ public static void main(String args[]) {\n TestRunner.run(suite());\n }\n }\ndiff --git a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\nindex 6437136..08d2345 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n@@ -17,14 +17,18 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n-\n-import org.apache.commons.scxml.SCXMLExecutor;\n-import org.apache.commons.scxml.SCXMLTestHelper;\n+import java.util.HashMap;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n import junit.framework.TestSuite;\n \n+import org.apache.commons.scxml.Builtin;\n+import org.apache.commons.scxml.SCXMLExecutor;\n+import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.w3c.dom.Node;\n+\n public class ParallelTest extends TestCase {\n \n public ParallelTest(String testName) {\n@@ -41,7 +45,7 @@ public class ParallelTest extends TestCase {\n }\n \n // Test data\n- private URL parallel01, parallel02;\n+ private URL parallel01, parallel02, parallel03;\n private SCXMLExecutor exec;\n \n public void setUp() {\n@@ -49,10 +53,12 @@ public class ParallelTest extends TestCase {\n getResource(""org/apache/commons/scxml/model/parallel-01.xml"");\n parallel02 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/model/parallel-02.xml"");\n+ parallel03 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/parallel-03.xml"");\n }\n \n public void tearDown() {\n- parallel01 = parallel02 = null;\n+ parallel01 = parallel02 = parallel03 = null;\n exec = null;\n }\n \n@@ -70,11 +76,32 @@ public class ParallelTest extends TestCase {\n exec = SCXMLTestHelper.getExecutor(parallel02);\n assertNotNull(exec);\n try {\n- \tSCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n SCXMLTestHelper.assertPostTriggerState(exec, ""event1"", ""state1"");\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }\n \n+ public void testParallel03() {\n+ exec = SCXMLTestHelper.getExecutor(parallel03);\n+ assertNotNull(exec);\n+ try {\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""para11"", ""para21"" });\n+ Node data = (Node) exec.getRootContext().get(""root"");\n+ Map<String, String> namespaces = new HashMap<String, String>();\n+ namespaces.put("""", ""http://www.w3.org/2005/07/scxml"");\n+ Object count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""5.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""foo"", new String[] { ""para12"", ""para21"" });\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""7.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerState(exec, ""bar"", ""end"");\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""14.0"", count.toString());\n+ } catch (Exception e) {\n+ fail(e.getMessage());\n+ }\n+ }\n+\n }'" True,Delta,-1,commons-scxml,b99de86a664d42e8e093567b65d1dc5d126c3640,8975dca82978ee4aaa69d784aa4402274bb4f32f,org.apache.commons.scxml.model.ParallelTest.testParallel03,False,[],,,,org.apache.commons.scxml.model.action.getparentstate(),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\nindex 5366bc7..e63eeab 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ActionsTest.java\n@@ -54,7 +54,7 @@ public class ActionsTest extends TestCase {\n }\n \n // Test data\n- private URL actionsSample;\n+ private URL actionsSample01, actionsSample02;\n private ELEvaluator evaluator;\n private ELContext ctx;\n private SCXMLExecutor exec;\n@@ -63,8 +63,10 @@ public class ActionsTest extends TestCase {\n Set up instance variables required by this test case.\n /\n public void setUp() {\n- actionsSample = this.getClass().getClassLoader().\n- getResource(""org/apache/commons/scxml/model/actions-test.xml"");\n+ actionsSample01 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-state-test.xml"");\n+ actionsSample02 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/actions-parallel-test.xml"");\n evaluator = new ELEvaluator();\n ctx = new ELContext();\n }\n@@ -73,7 +75,7 @@ public class ActionsTest extends TestCase {\n Tear down instance variables required by this test case.\n /\n public void tearDown() {\n- actionsSample = null;\n+ actionsSample01 = actionsSample02 = null;\n evaluator = null;\n ctx = null;\n exec = null;\n@@ -82,8 +84,8 @@ public class ActionsTest extends TestCase {\n /\n Test the implementation\n /\n- public void testModelActions() {\n- SCXML scxml = SCXMLTestHelper.parse(actionsSample);\n+ public void testStateActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample01);\n exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n ""actionsTest"");\n@@ -92,7 +94,17 @@ public class ActionsTest extends TestCase {\n ""true"", (String) ctx.get(""eventsent""));\n }\n \n- public static void main(String args[]) {\n+ public void testParallelActions() {\n+ SCXML scxml = SCXMLTestHelper.parse(actionsSample02);\n+ exec = SCXMLTestHelper.getExecutor(scxml, ctx, evaluator);\n+ ELContext ctx = (ELContext) SCXMLTestHelper.lookupContext(exec,\n+ ""actionsTest"");\n+ assertEquals((String) ctx.get(""foo""), ""foobar"");\n+ assertEquals(""Missed event transition"",\n+ ""true"", (String) ctx.get(""eventsent""));\n+ }\n+\n+ public static void main(String args[]) {\n TestRunner.run(suite());\n }\n }\ndiff --git a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\nindex 6437136..08d2345 100644\n--- a/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/ParallelTest.java\n@@ -17,14 +17,18 @@\n package org.apache.commons.scxml.model;\n \n import java.net.URL;\n-\n-import org.apache.commons.scxml.SCXMLExecutor;\n-import org.apache.commons.scxml.SCXMLTestHelper;\n+import java.util.HashMap;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n import junit.framework.TestSuite;\n \n+import org.apache.commons.scxml.Builtin;\n+import org.apache.commons.scxml.SCXMLExecutor;\n+import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.w3c.dom.Node;\n+\n public class ParallelTest extends TestCase {\n \n public ParallelTest(String testName) {\n@@ -41,7 +45,7 @@ public class ParallelTest extends TestCase {\n }\n \n // Test data\n- private URL parallel01, parallel02;\n+ private URL parallel01, parallel02, parallel03;\n private SCXMLExecutor exec;\n \n public void setUp() {\n@@ -49,10 +53,12 @@ public class ParallelTest extends TestCase {\n getResource(""org/apache/commons/scxml/model/parallel-01.xml"");\n parallel02 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/model/parallel-02.xml"");\n+ parallel03 = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/model/parallel-03.xml"");\n }\n \n public void tearDown() {\n- parallel01 = parallel02 = null;\n+ parallel01 = parallel02 = parallel03 = null;\n exec = null;\n }\n \n@@ -70,11 +76,32 @@ public class ParallelTest extends TestCase {\n exec = SCXMLTestHelper.getExecutor(parallel02);\n assertNotNull(exec);\n try {\n- \tSCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""state01"", ""state02"" });\n SCXMLTestHelper.assertPostTriggerState(exec, ""event1"", ""state1"");\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }\n \n+ public void testParallel03() {\n+ exec = SCXMLTestHelper.getExecutor(parallel03);\n+ assertNotNull(exec);\n+ try {\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""dummy.event"", new String[] { ""para11"", ""para21"" });\n+ Node data = (Node) exec.getRootContext().get(""root"");\n+ Map<String, String> namespaces = new HashMap<String, String>();\n+ namespaces.put("""", ""http://www.w3.org/2005/07/scxml"");\n+ Object count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""5.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerStates(exec, ""foo"", new String[] { ""para12"", ""para21"" });\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""7.0"", count.toString());\n+ SCXMLTestHelper.assertPostTriggerState(exec, ""bar"", ""end"");\n+ count = Builtin.data(namespaces, data, ""root/count"");\n+ assertEquals(""14.0"", count.toString());\n+ } catch (Exception e) {\n+ fail(e.getMessage());\n+ }\n+ }\n+\n }'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,6fba415ee2020d93a006065139b73b59bcdc2ca9,113f0dd74fe0e0cd59fe747698dc4a00e34ef7bb,org.apache.commons.scxml.io.SCXMLParserTest.testSCXMLParserInitialAttr,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml)@org.apache.commons.scxml.model.scxml.setinitialstate(string)@org.apache.commons.scxml.model.scxml.getinitialstate()@org.apache.commons.scxml.io.modelupdater.updatescxml(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\nindex 19ef4f6..5b2e571 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n@@ -24,6 +24,7 @@ import junit.framework.TestSuite;\n import junit.textui.TestRunner;\n \n import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.apache.commons.scxml.model.Final;\n import org.apache.commons.scxml.model.SCXML;\n /\n Unit tests {@link org.apache.commons.scxml.SCXMLParser}.\n@@ -44,7 +45,7 @@ public class SCXMLParserTest extends TestCase {\n }\n \n // Test data\n- private URL microwave03, microwave04;\n+ private URL microwave03, microwave04, scxmlinitialattr;\n private SCXML scxml;\n private String scxmlAsString;\n \n@@ -56,6 +57,8 @@ public class SCXMLParserTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/microwave-03.xml"");\n microwave04 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jexl/microwave-04.xml"");\n+ scxmlinitialattr = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/io/scxml-initial-attr.xml"");\n }\n \n /\n@@ -84,6 +87,15 @@ public class SCXMLParserTest extends TestCase {\n assertNotNull(scxmlAsString);\n }\n \n+ public void testSCXMLParserInitialAttr() {\n+ scxml = SCXMLTestHelper.parse(scxmlinitialattr);\n+ assertNotNull(scxml);\n+ scxmlAsString = serialize(scxml);\n+ assertNotNull(scxmlAsString);\n+ Final foo = (Final) scxml.getInitialTarget();\n+ assertEquals(""foo"", foo.getId());\n+ }\n+\n private String serialize(final SCXML scxml) {\n scxmlAsString = SCXMLSerializer.serialize(scxml);\n assertNotNull(scxmlAsString);\ndiff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex c1de310..16a7b27 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -53,18 +53,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitialstate(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" version=\""version1\"" ""\n- + ""initialstate=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();'" True,Delta,-1,commons-scxml,6fba415ee2020d93a006065139b73b59bcdc2ca9,113f0dd74fe0e0cd59fe747698dc4a00e34ef7bb,org.apache.commons.scxml.io.SCXMLParserTest.testSCXMLParserInitialAttr,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml)@org.apache.commons.scxml.model.scxml.setinitialstate(string)@org.apache.commons.scxml.model.scxml.getinitialstate()@org.apache.commons.scxml.io.modelupdater.updatescxml(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\nindex 19ef4f6..5b2e571 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n@@ -24,6 +24,7 @@ import junit.framework.TestSuite;\n import junit.textui.TestRunner;\n \n import org.apache.commons.scxml.SCXMLTestHelper;\n+import org.apache.commons.scxml.model.Final;\n import org.apache.commons.scxml.model.SCXML;\n /\n Unit tests {@link org.apache.commons.scxml.SCXMLParser}.\n@@ -44,7 +45,7 @@ public class SCXMLParserTest extends TestCase {\n }\n \n // Test data\n- private URL microwave03, microwave04;\n+ private URL microwave03, microwave04, scxmlinitialattr;\n private SCXML scxml;\n private String scxmlAsString;\n \n@@ -56,6 +57,8 @@ public class SCXMLParserTest extends TestCase {\n getResource(""org/apache/commons/scxml/env/jexl/microwave-03.xml"");\n microwave04 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/env/jexl/microwave-04.xml"");\n+ scxmlinitialattr = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/io/scxml-initial-attr.xml"");\n }\n \n /\n@@ -84,6 +87,15 @@ public class SCXMLParserTest extends TestCase {\n assertNotNull(scxmlAsString);\n }\n \n+ public void testSCXMLParserInitialAttr() {\n+ scxml = SCXMLTestHelper.parse(scxmlinitialattr);\n+ assertNotNull(scxml);\n+ scxmlAsString = serialize(scxml);\n+ assertNotNull(scxmlAsString);\n+ Final foo = (Final) scxml.getInitialTarget();\n+ assertEquals(""foo"", foo.getId());\n+ }\n+\n private String serialize(final SCXML scxml) {\n scxmlAsString = SCXMLSerializer.serialize(scxml);\n assertNotNull(scxmlAsString);\ndiff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex c1de310..16a7b27 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -53,18 +53,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitialstate(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" version=\""version1\"" ""\n- + ""initialstate=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,251bf6b18f83b8391ef3dfe83157ef5c51148fea,de735810f364c954cd03d39c75e3376586f436e2,org.apache.commons.scxml2.env.SimpleContextTest.testEffectiveContextMapMergeStragegy,False,[],,,,org.apache.commons.scxml2.env.effectivecontextmap.effectivecontextmap(context)@org.apache.commons.scxml2.env.effectivecontextmap.entryset(),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\nindex 32fe49a..f3ab7b9 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n@@ -34,7 +34,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasTrue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -44,7 +44,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasNullParent() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -54,12 +54,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentWrongKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""key"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -70,12 +70,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentCorrectKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -93,7 +93,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -103,12 +103,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -119,7 +119,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentNull() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -129,12 +129,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentWrongValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -145,7 +145,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsChangeValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -157,7 +157,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsEmpty() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n context.setVars(vars);\n \n context.set(""key"", ""newValue"");\n@@ -167,12 +167,12 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsParent() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -182,4 +182,35 @@ public class SimpleContextTest {\n \n Assert.assertEquals(""newValue"", context.get(""differentKey""));\n }\n+\n+ @Test\n+ public void testNestedEffectiveContextMapWrappingFails() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext rootEffectiveContext = new SimpleContext(rootContext, new EffectiveContextMap(rootContext));\n+ SimpleContext parentContext = new SimpleContext(rootEffectiveContext);\n+ try {\n+ new EffectiveContextMap(parentContext);\n+ Assert.fail(""Nested EffectiveContextMap wrapping should fail"");\n+ }\n+ catch (IllegalArgumentException e) {\n+ // good\n+ }\n+ }\n+\n+ @Test\n+ public void testEffectiveContextMapMergeStragegy() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext parentContext = new SimpleContext(rootContext);\n+ parentContext.setLocal(""key"", ""parent"");\n+ SimpleContext effectiveContext = new SimpleContext(parentContext, new EffectiveContextMap(parentContext));\n+ Assert.assertEquals(""parent"", effectiveContext.get(""key""));\n+ // ensure EffectiveContextMap provides complete local variable shadowing\n+ for (Map.Entry<String,Object> entry : effectiveContext.getVars().entrySet()) {\n+ if (entry.getKey().equals(""key"")) {\n+ Assert.assertEquals(""parent"", entry.getValue());\n+ }\n+ }\n+ }\n }'" True,Delta,-1,commons-scxml,251bf6b18f83b8391ef3dfe83157ef5c51148fea,de735810f364c954cd03d39c75e3376586f436e2,org.apache.commons.scxml2.env.SimpleContextTest.testNestedEffectiveContextMapWrappingFails,False,[],,,,org.apache.commons.scxml2.env.effectivecontextmap.effectivecontextmap(context)@org.apache.commons.scxml2.env.effectivecontextmap.entryset(),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\nindex 32fe49a..f3ab7b9 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n@@ -34,7 +34,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasTrue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -44,7 +44,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasNullParent() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -54,12 +54,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentWrongKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""key"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -70,12 +70,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentCorrectKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -93,7 +93,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -103,12 +103,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -119,7 +119,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentNull() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -129,12 +129,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentWrongValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -145,7 +145,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsChangeValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -157,7 +157,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsEmpty() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n context.setVars(vars);\n \n context.set(""key"", ""newValue"");\n@@ -167,12 +167,12 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsParent() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -182,4 +182,35 @@ public class SimpleContextTest {\n \n Assert.assertEquals(""newValue"", context.get(""differentKey""));\n }\n+\n+ @Test\n+ public void testNestedEffectiveContextMapWrappingFails() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext rootEffectiveContext = new SimpleContext(rootContext, new EffectiveContextMap(rootContext));\n+ SimpleContext parentContext = new SimpleContext(rootEffectiveContext);\n+ try {\n+ new EffectiveContextMap(parentContext);\n+ Assert.fail(""Nested EffectiveContextMap wrapping should fail"");\n+ }\n+ catch (IllegalArgumentException e) {\n+ // good\n+ }\n+ }\n+\n+ @Test\n+ public void testEffectiveContextMapMergeStragegy() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext parentContext = new SimpleContext(rootContext);\n+ parentContext.setLocal(""key"", ""parent"");\n+ SimpleContext effectiveContext = new SimpleContext(parentContext, new EffectiveContextMap(parentContext));\n+ Assert.assertEquals(""parent"", effectiveContext.get(""key""));\n+ // ensure EffectiveContextMap provides complete local variable shadowing\n+ for (Map.Entry<String,Object> entry : effectiveContext.getVars().entrySet()) {\n+ if (entry.getKey().equals(""key"")) {\n+ Assert.assertEquals(""parent"", entry.getValue());\n+ }\n+ }\n+ }\n }'" True,Delta,-1,commons-scxml,251bf6b18f83b8391ef3dfe83157ef5c51148fea,de735810f364c954cd03d39c75e3376586f436e2,org.apache.commons.scxml2.env.SimpleContextTest.testNestedEffectiveContextMapWrappingFails,False,[],,,,org.apache.commons.scxml2.env.effectivecontextmap.effectivecontextmap(context)@org.apache.commons.scxml2.env.effectivecontextmap.entryset(),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\nindex 32fe49a..f3ab7b9 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n@@ -34,7 +34,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasTrue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -44,7 +44,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasNullParent() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -54,12 +54,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentWrongKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""key"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -70,12 +70,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentCorrectKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -93,7 +93,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -103,12 +103,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -119,7 +119,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentNull() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -129,12 +129,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentWrongValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -145,7 +145,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsChangeValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -157,7 +157,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsEmpty() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n context.setVars(vars);\n \n context.set(""key"", ""newValue"");\n@@ -167,12 +167,12 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsParent() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -182,4 +182,35 @@ public class SimpleContextTest {\n \n Assert.assertEquals(""newValue"", context.get(""differentKey""));\n }\n+\n+ @Test\n+ public void testNestedEffectiveContextMapWrappingFails() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext rootEffectiveContext = new SimpleContext(rootContext, new EffectiveContextMap(rootContext));\n+ SimpleContext parentContext = new SimpleContext(rootEffectiveContext);\n+ try {\n+ new EffectiveContextMap(parentContext);\n+ Assert.fail(""Nested EffectiveContextMap wrapping should fail"");\n+ }\n+ catch (IllegalArgumentException e) {\n+ // good\n+ }\n+ }\n+\n+ @Test\n+ public void testEffectiveContextMapMergeStragegy() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext parentContext = new SimpleContext(rootContext);\n+ parentContext.setLocal(""key"", ""parent"");\n+ SimpleContext effectiveContext = new SimpleContext(parentContext, new EffectiveContextMap(parentContext));\n+ Assert.assertEquals(""parent"", effectiveContext.get(""key""));\n+ // ensure EffectiveContextMap provides complete local variable shadowing\n+ for (Map.Entry<String,Object> entry : effectiveContext.getVars().entrySet()) {\n+ if (entry.getKey().equals(""key"")) {\n+ Assert.assertEquals(""parent"", entry.getValue());\n+ }\n+ }\n+ }\n }'" True,Delta,-1,commons-scxml,251bf6b18f83b8391ef3dfe83157ef5c51148fea,de735810f364c954cd03d39c75e3376586f436e2,org.apache.commons.scxml2.env.SimpleContextTest.testEffectiveContextMapMergeStragegy,False,[],,,,org.apache.commons.scxml2.env.effectivecontextmap.effectivecontextmap(context)@org.apache.commons.scxml2.env.effectivecontextmap.entryset(),"u'diff --git a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\nindex 32fe49a..f3ab7b9 100644\n--- a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n+++ b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java\n@@ -34,7 +34,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasTrue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -44,7 +44,7 @@ public class SimpleContextTest {\n \n @Test\n public void testHasNullParent() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -54,12 +54,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentWrongKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""key"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -70,12 +70,12 @@ public class SimpleContextTest {\n \n @Test\n public void testHasParentCorrectKey() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""value"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -93,7 +93,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -103,12 +103,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -119,7 +119,7 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentNull() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -129,12 +129,12 @@ public class SimpleContextTest {\n \n @Test\n public void testGetParentWrongValue() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -145,7 +145,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsChangeValue() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -157,7 +157,7 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsEmpty() {\n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n context.setVars(vars);\n \n context.set(""key"", ""newValue"");\n@@ -167,12 +167,12 @@ public class SimpleContextTest {\n \n @Test\n public void testSetVarsParent() {\n- Map<String, Object> parentVars = new HashMap<String, Object>();\n+ Map<String, Object> parentVars = new HashMap<>();\n parentVars.put(""differentKey"", ""differentValue"");\n \n SimpleContext parentContext = new SimpleContext(null, parentVars);\n \n- Map<String, Object> vars = new HashMap<String, Object>();\n+ Map<String, Object> vars = new HashMap<>();\n vars.put(""key"", ""value"");\n \n context.setVars(vars);\n@@ -182,4 +182,35 @@ public class SimpleContextTest {\n \n Assert.assertEquals(""newValue"", context.get(""differentKey""));\n }\n+\n+ @Test\n+ public void testNestedEffectiveContextMapWrappingFails() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext rootEffectiveContext = new SimpleContext(rootContext, new EffectiveContextMap(rootContext));\n+ SimpleContext parentContext = new SimpleContext(rootEffectiveContext);\n+ try {\n+ new EffectiveContextMap(parentContext);\n+ Assert.fail(""Nested EffectiveContextMap wrapping should fail"");\n+ }\n+ catch (IllegalArgumentException e) {\n+ // good\n+ }\n+ }\n+\n+ @Test\n+ public void testEffectiveContextMapMergeStragegy() {\n+ SimpleContext rootContext = new SimpleContext();\n+ rootContext.set(""key"", ""root"");\n+ SimpleContext parentContext = new SimpleContext(rootContext);\n+ parentContext.setLocal(""key"", ""parent"");\n+ SimpleContext effectiveContext = new SimpleContext(parentContext, new EffectiveContextMap(parentContext));\n+ Assert.assertEquals(""parent"", effectiveContext.get(""key""));\n+ // ensure EffectiveContextMap provides complete local variable shadowing\n+ for (Map.Entry<String,Object> entry : effectiveContext.getVars().entrySet()) {\n+ if (entry.getKey().equals(""key"")) {\n+ Assert.assertEquals(""parent"", entry.getValue());\n+ }\n+ }\n+ }\n }'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,5a20a626ec33ed2d31b534b70c3dd0c711caec65,c5b152cb5cddb5fd2f8caff2c0986ac325c21b9a,org.apache.commons.scxml.model.StateTest.testGetTransitionsList,False,[],,,,org.apache.commons.scxml.model.parallel.parallel()@org.apache.commons.scxml.model.scxml.scxml()@org.apache.commons.scxml.model.state.state()@org.apache.commons.scxml.model.state.gettransitions()@org.apache.commons.scxml.model.path.getregionsexited()@org.apache.commons.scxml.model.state.gettransitionslist(string)@org.apache.commons.scxml.model.path.getregionsentered()@org.apache.commons.scxml.model.state.gettransitionslist()@org.apache.commons.scxml.model.state.addtransition(transition),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StateTest.java b/src/test/java/org/apache/commons/scxml/model/StateTest.java\nindex bc9bcbe..7668df8 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StateTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StateTest.java\n@@ -16,7 +16,6 @@\n /\n package org.apache.commons.scxml.model;\n \n-import java.util.ArrayList;\n import java.util.List;\n \n import junit.framework.Test;\n@@ -49,11 +48,10 @@ public class StateTest extends TestCase {\n }\n \n public void testGetTransitionsList() {\n- List values = new ArrayList();\n \n- state.getTransitions().put(""event"", values);\n+ state.getTransitionsList().add(new Transition());\n \n- assertNotNull(state.getTransitionsList(""event""));\n+ assertNotNull(state.getTransitionsList(null));\n }\n \n public void testAddTransitionDoesNotContainKey() {\n@@ -62,7 +60,7 @@ public class StateTest extends TestCase {\n \n state.addTransition(transition);\n \n- List events = (List)state.getTransitions().get(""event"");\n+ List events = (List)state.getTransitionsList(""event"");\n \n assertEquals(1, events.size());\n assertEquals(""event"", ((Transition)events.get(0)).getEvent());\n@@ -78,7 +76,7 @@ public class StateTest extends TestCase {\n state.addTransition(transition1);\n state.addTransition(transition2);\n \n- List events = (List)state.getTransitions().get(""event"");\n+ List events = (List)state.getTransitionsList(""event"");\n \n assertEquals(2, events.size());\n }'" True,Regression,-1,commons-scxml,5a20a626ec33ed2d31b534b70c3dd0c711caec65,c5b152cb5cddb5fd2f8caff2c0986ac325c21b9a,org.apache.commons.scxml.model.StateTest.testGetTransitionsList,False,[],,,,org.apache.commons.scxml.model.parallel.parallel()@org.apache.commons.scxml.model.scxml.scxml()@org.apache.commons.scxml.model.state.state()@org.apache.commons.scxml.model.state.gettransitions()@org.apache.commons.scxml.model.path.getregionsexited()@org.apache.commons.scxml.model.state.gettransitionslist(string)@org.apache.commons.scxml.model.path.getregionsentered()@org.apache.commons.scxml.model.state.gettransitionslist()@org.apache.commons.scxml.model.state.addtransition(transition),"u'diff --git a/src/test/java/org/apache/commons/scxml/model/StateTest.java b/src/test/java/org/apache/commons/scxml/model/StateTest.java\nindex bc9bcbe..7668df8 100644\n--- a/src/test/java/org/apache/commons/scxml/model/StateTest.java\n+++ b/src/test/java/org/apache/commons/scxml/model/StateTest.java\n@@ -16,7 +16,6 @@\n /\n package org.apache.commons.scxml.model;\n \n-import java.util.ArrayList;\n import java.util.List;\n \n import junit.framework.Test;\n@@ -49,11 +48,10 @@ public class StateTest extends TestCase {\n }\n \n public void testGetTransitionsList() {\n- List values = new ArrayList();\n \n- state.getTransitions().put(""event"", values);\n+ state.getTransitionsList().add(new Transition());\n \n- assertNotNull(state.getTransitionsList(""event""));\n+ assertNotNull(state.getTransitionsList(null));\n }\n \n public void testAddTransitionDoesNotContainKey() {\n@@ -62,7 +60,7 @@ public class StateTest extends TestCase {\n \n state.addTransition(transition);\n \n- List events = (List)state.getTransitions().get(""event"");\n+ List events = (List)state.getTransitionsList(""event"");\n \n assertEquals(1, events.size());\n assertEquals(""event"", ((Transition)events.get(0)).getEvent());\n@@ -78,7 +76,7 @@ public class StateTest extends TestCase {\n state.addTransition(transition1);\n state.addTransition(transition2);\n \n- List events = (List)state.getTransitions().get(""event"");\n+ List events = (List)state.getTransitionsList(""event"");\n \n assertEquals(2, events.size());\n }'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-scxml,1abc013edc6c8709fc4a9c60630cff5c9cfbec4d,766ef0e45ad054eb36f3eb851bbb2376ada7a37a,org.apache.commons.scxml.io.SCXMLParserTest.testSCXMLParserInitialAttr,False,[],,,,org.apache.commons.scxml.model.scxml.setinitialstate(string)@org.apache.commons.scxml.model.scxml.getinitialstate()@org.apache.commons.scxml.io.modelupdater.updatescxml(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\nindex 5663a6f..23a3e25 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n@@ -26,6 +26,7 @@ import junit.textui.TestRunner;\n \n import org.apache.commons.scxml.SCXMLTestHelper;\n import org.apache.commons.scxml.model.Action;\n+import org.apache.commons.scxml.model.Final;\n import org.apache.commons.scxml.model.SCXML;\n import org.apache.commons.scxml.model.Send;\n import org.apache.commons.scxml.model.State;\n@@ -50,7 +51,7 @@ public class SCXMLParserTest extends TestCase {\n \n // Test data\n private URL microwave01, microwave02, transitions01, prefix01, send01,\n- microwave03, microwave04;\n+ microwave03, microwave04, scxmlinitialattr;\n private SCXML scxml;\n private String scxmlAsString;\n \n@@ -72,6 +73,8 @@ public class SCXMLParserTest extends TestCase {\n getResource(""org/apache/commons/scxml/send-01.xml"");\n prefix01 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/prefix-01.xml"");\n+ scxmlinitialattr = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/io/scxml-initial-attr.xml"");\n }\n \n /*\n@@ -151,6 +154,15 @@ public class SCXMLParserTest extends TestCase {\n /\n }\n \n+ public void testSCXMLParserInitialAttr() {\n+ scxml = SCXMLTestHelper.parse(scxmlinitialattr);\n+ assertNotNull(scxml);\n+ scxmlAsString = serialize(scxml);\n+ assertNotNull(scxmlAsString);\n+ Final foo = (Final) scxml.getInitialTarget();\n+ assertEquals(""foo"", foo.getId());\n+ }\n+\n private String serialize(final SCXML scxml) {\n scxmlAsString = SCXMLSerializer.serialize(scxml);\n assertNotNull(scxmlAsString);\ndiff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 6a2cf18..86e4cfd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -54,18 +54,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitialstate(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" version=\""version1\"" ""\n- + ""initialstate=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();'" True,Delta,-1,commons-scxml,1abc013edc6c8709fc4a9c60630cff5c9cfbec4d,766ef0e45ad054eb36f3eb851bbb2376ada7a37a,org.apache.commons.scxml.io.SCXMLParserTest.testSCXMLParserInitialAttr,False,[],,,,org.apache.commons.scxml.model.scxml.setinitialstate(string)@org.apache.commons.scxml.model.scxml.getinitialstate()@org.apache.commons.scxml.io.modelupdater.updatescxml(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\nindex 5663a6f..23a3e25 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java\n@@ -26,6 +26,7 @@ import junit.textui.TestRunner;\n \n import org.apache.commons.scxml.SCXMLTestHelper;\n import org.apache.commons.scxml.model.Action;\n+import org.apache.commons.scxml.model.Final;\n import org.apache.commons.scxml.model.SCXML;\n import org.apache.commons.scxml.model.Send;\n import org.apache.commons.scxml.model.State;\n@@ -50,7 +51,7 @@ public class SCXMLParserTest extends TestCase {\n \n // Test data\n private URL microwave01, microwave02, transitions01, prefix01, send01,\n- microwave03, microwave04;\n+ microwave03, microwave04, scxmlinitialattr;\n private SCXML scxml;\n private String scxmlAsString;\n \n@@ -72,6 +73,8 @@ public class SCXMLParserTest extends TestCase {\n getResource(""org/apache/commons/scxml/send-01.xml"");\n prefix01 = this.getClass().getClassLoader().\n getResource(""org/apache/commons/scxml/prefix-01.xml"");\n+ scxmlinitialattr = this.getClass().getClassLoader().\n+ getResource(""org/apache/commons/scxml/io/scxml-initial-attr.xml"");\n }\n \n /*\n@@ -151,6 +154,15 @@ public class SCXMLParserTest extends TestCase {\n /\n }\n \n+ public void testSCXMLParserInitialAttr() {\n+ scxml = SCXMLTestHelper.parse(scxmlinitialattr);\n+ assertNotNull(scxml);\n+ scxmlAsString = serialize(scxml);\n+ assertNotNull(scxmlAsString);\n+ Final foo = (Final) scxml.getInitialTarget();\n+ assertEquals(""foo"", foo.getId());\n+ }\n+\n private String serialize(final SCXML scxml) {\n scxmlAsString = SCXMLSerializer.serialize(scxml);\n assertNotNull(scxmlAsString);\ndiff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 6a2cf18..86e4cfd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -54,18 +54,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitialstate(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" version=\""version1\"" ""\n- + ""initialstate=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,c82797194895e8aa6e94fbaceed79b8c6b4e569b,1ba7b4d1aa4371ce3f263fe1a880305fdbca290a,org.apache.commons.scxml.io.SCXMLSerializerTest.testSerializeParallel,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 08251d3..eef36cd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -17,7 +17,9 @@\n package org.apache.commons.scxml.io;\n \n import java.util.ArrayList;\n+import java.util.LinkedHashMap;\n import java.util.List;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -55,18 +57,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitial(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""version1\"" initial=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();\n@@ -327,8 +317,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(s1);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""1.0\"" initial=\""S1\"">\n <state id=\""S1\"">\n \n\n"";\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n+ + ""version=\""1.0\"" initial=\""S1\"">\n \n""\n+ + "" <state id=\""S1\"">\n \n\n"";\n \n assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n }\n@@ -364,8 +355,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(par);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n + ""version=\""1.0\"" initial=\""par\"">\n""\n+ + "" \n""\n + "" <parallel id=\""par\"">\n""\n + "" <state id=\""S1\"">\n""\n + "" <state id=\""S11\"">\n""'" True,Regression,-1,commons-scxml,c82797194895e8aa6e94fbaceed79b8c6b4e569b,1ba7b4d1aa4371ce3f263fe1a880305fdbca290a,org.apache.commons.scxml.io.SCXMLSerializerTest.testSerializeSCXMLState,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 08251d3..eef36cd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -17,7 +17,9 @@\n package org.apache.commons.scxml.io;\n \n import java.util.ArrayList;\n+import java.util.LinkedHashMap;\n import java.util.List;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -55,18 +57,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitial(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""version1\"" initial=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();\n@@ -327,8 +317,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(s1);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""1.0\"" initial=\""S1\"">\n <state id=\""S1\"">\n \n\n"";\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n+ + ""version=\""1.0\"" initial=\""S1\"">\n \n""\n+ + "" <state id=\""S1\"">\n \n\n"";\n \n assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n }\n@@ -364,8 +355,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(par);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n + ""version=\""1.0\"" initial=\""par\"">\n""\n+ + "" \n""\n + "" <parallel id=\""par\"">\n""\n + "" <state id=\""S1\"">\n""\n + "" <state id=\""S11\"">\n""'" True,Regression,-1,commons-scxml,c82797194895e8aa6e94fbaceed79b8c6b4e569b,1ba7b4d1aa4371ce3f263fe1a880305fdbca290a,org.apache.commons.scxml.io.SCXMLSerializerTest.testSerializeSCXMLState,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 08251d3..eef36cd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -17,7 +17,9 @@\n package org.apache.commons.scxml.io;\n \n import java.util.ArrayList;\n+import java.util.LinkedHashMap;\n import java.util.List;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -55,18 +57,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitial(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""version1\"" initial=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();\n@@ -327,8 +317,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(s1);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""1.0\"" initial=\""S1\"">\n <state id=\""S1\"">\n \n\n"";\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n+ + ""version=\""1.0\"" initial=\""S1\"">\n \n""\n+ + "" <state id=\""S1\"">\n \n\n"";\n \n assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n }\n@@ -364,8 +355,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(par);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n + ""version=\""1.0\"" initial=\""par\"">\n""\n+ + "" \n""\n + "" <parallel id=\""par\"">\n""\n + "" <state id=\""S1\"">\n""\n + "" <state id=\""S11\"">\n""'" True,Regression,-1,commons-scxml,c82797194895e8aa6e94fbaceed79b8c6b4e569b,1ba7b4d1aa4371ce3f263fe1a880305fdbca290a,org.apache.commons.scxml.io.SCXMLSerializerTest.testSerializeParallel,False,[],,,,org.apache.commons.scxml.io.scxmlserializer.serialize(scxml),"u'diff --git a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\nindex 08251d3..eef36cd 100644\n--- a/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n+++ b/src/test/java/org/apache/commons/scxml/io/SCXMLSerializerTest.java\n@@ -17,7 +17,9 @@\n package org.apache.commons.scxml.io;\n \n import java.util.ArrayList;\n+import java.util.LinkedHashMap;\n import java.util.List;\n+import java.util.Map;\n \n import junit.framework.Test;\n import junit.framework.TestCase;\n@@ -55,18 +57,6 @@ public class SCXMLSerializerTest extends TestCase {\n junit.textui.TestRunner.main(testCaseName);\n }\n \n- public void testSerializeSCXMLNoStates() {\n- SCXML scxml = new SCXML();\n- scxml.setVersion(""version1"");\n- scxml.setInitial(""off"");\n- scxml.addChild(new State());\n- \n- String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""version1\"" initial=\""off\"">\n \n \n\n"";\n- \n- assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n- }\n \n public void testSerializeSend() {\n Send send = new Send();\n@@ -327,8 +317,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(s1);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n- + ""version=\""1.0\"" initial=\""S1\"">\n <state id=\""S1\"">\n \n\n"";\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n+ + ""version=\""1.0\"" initial=\""S1\"">\n \n""\n+ + "" <state id=\""S1\"">\n \n\n"";\n \n assertEquals(assertValue, SCXMLSerializer.serialize(scxml));\n }\n@@ -364,8 +355,9 @@ public class SCXMLSerializerTest extends TestCase {\n scxml.addChild(par);\n \n String assertValue = ""<?xml version=\""1.0\"" encoding=\""UTF-8\""?>\n""\n- + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" xmlns:cs=\""http://commons.apache.org/scxml\"" ""\n+ + ""<scxml xmlns=\""http://www.w3.org/2005/07/scxml\"" ""\n + ""version=\""1.0\"" initial=\""par\"">\n""\n+ + "" \n""\n + "" <parallel id=\""par\"">\n""\n + "" <state id=\""S1\"">\n""\n + "" <state id=\""S11\"">\n""'"

github-actions[bot] commented 4 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testDataModelExpressions,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'" True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testInvalidDataModelLocations,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'" True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testDataModelLocations,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'" True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testDataModelExpressions,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'" True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testInvalidDataModelLocations,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'" True,Regression,-1,commons-scxml,a6d3fa93eef58cbfb3baed61034768de4d129d1e,a6a63e30d6d72b1f454b966fa2b566888cf1f385,org.apache.commons.scxml.env.javascript.JSEvaluatorTest.testDataModelLocations,False,[],,,,org.apache.commons.scxml.model.data.setname(string)@org.apache.commons.scxml.model.data.getname()@org.apache.commons.scxml.model.data.data(),"u'diff --git a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\nindex 374fc58..561b39c 100644\n--- a/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n+++ b/src/test/java/org/apache/commons/scxml/env/javascript/JSEvaluatorTest.java\n@@ -61,7 +61,7 @@ public class JSEvaluatorTest extends TestCase {\n ""initialstate = \'start\' "" +\n ""version = \'1.0\'>"" +\n """" +\n- ""<data name=\'forest\'>"" +\n+ ""<data id=\'forest\'>"" +\n ""<tree xmlns=\'\'>"" +\n """" +\n ""leaf"" +'"