Repository: graphwalker/graphwalker-project
Issue: Using the name context for a variable, does not work.

The unit test in core below will fail.

```
diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
index 1dc8f2d..461b1ee 100644
--- a/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
+++ b/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
@@ -136,6 +136,20 @@ public class SimpleMachineTest {
     assertThat(context.getProfiler().getTotalVisitCount(), is(5L));
   }

+  @Test
+  public void executeActionWithVariableNameContext() {
+    Vertex vertex1 = new Vertex();
+    Vertex vertex2 = new Vertex();
+    Model model = new Model()
+      .addEdge(new Edge().setSourceVertex(vertex1).setTargetVertex(vertex2))
+      .addEdge(new Edge().setSourceVertex(vertex2).setTargetVertex(vertex1));
+    model.addAction(new Action("context = 1;"));
+    Context context = new TestExecutionContext(model, new RandomPath(new EdgeCoverage(100)));
+    context.setNextElement(vertex1);
+    Machine machine = new SimpleMachine(context);
+    assertThat(machine.getCurrentContext().getKeys().containsKey("context"), is(true));
+  }
+
   @Test(expected = MachineException.class)
   public void honorGuard() {
     Vertex vertex1 = new Vertex();
```


Changed files:
graphwalker-core/src/main/java/org/graphwalker/core/machine/ExecutionContext.java
graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java

diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machine/ExecutionContext.java b/graphwalker-core/src/main/java/org/graphwalker/core/machine/ExecutionContext.java
index 349c1295..97179fee 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/machine/ExecutionContext.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/machine/ExecutionContext.java
@@ -360,6 +360,6 @@ public abstract class ExecutionContext extends SimpleScriptContext implements Co
   }
 
   private boolean isVariable(String key, List<String> methods) {
-    return !"impl".equals(key) && !methods.contains(key) && !"print".equals(key) && !"println".equals(key) && !"context".equals(key);
+    return !"impl".equals(key) && !methods.contains(key) && !"print".equals(key) && !"println".equals(key);
   }
 }
diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
index 1dc8f2db..9c6dfcae 100644
--- a/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
+++ b/graphwalker-core/src/test/java/org/graphwalker/core/machine/SimpleMachineTest.java
@@ -356,4 +356,17 @@ public class SimpleMachineTest {
     assertArrayEquals(expectedPath.toArray(), context.getProfiler().getPath().toArray());
   }
 
+  @Test
+  public void executeActionWithVariableNameContext() {
+    Vertex vertex1 = new Vertex();
+    Vertex vertex2 = new Vertex();
+    Model model = new Model()
+      .addEdge(new Edge().setSourceVertex(vertex1).setTargetVertex(vertex2))
+      .addEdge(new Edge().setSourceVertex(vertex2).setTargetVertex(vertex1));
+    model.addAction(new Action("context = 1;"));
+    Context context = new TestExecutionContext(model, new RandomPath(new EdgeCoverage(100)));
+    context.setNextElement(vertex1);
+    Machine machine = new SimpleMachine(context);
+    assertThat(machine.getCurrentContext().getKeys().containsKey("context"), is(true));
+  }
 }