private double pathCost;
public Node(Object state) {
this.state = state;
pathCost = 0.0;
}
<BUG>public Node(Object state, Node parent, Action action, double stepCost) {
</BUG>
this(state);
this.parent = parent;
<BUG>this.action = action;
if (parent != null)
this.pathCost = parent.pathCost + stepCost;</BUG>
}

private double pathCost;
public Node(Object state) {
this.state = state;
pathCost = 0.0;
}
public Node(Object state, Node parent, Action action, double pathCost) {
this(state);
this.parent = parent;
this.action = action;
this.pathCost = pathCost;
}
