while (revNode.getParent() != null) {
Action action = getReverseAction(orgP, revNode);
if (action != null) {
Object nextState = revNode.getParent().getState();
double stepCosts = orgP.getStepCostFunction().c(revNode.getState(), action, nextState);
<BUG>orgNode = new Node(nextState, orgNode, action, stepCosts);
</BUG>
revNode = revNode.getParent();
} else {
return SearchUtils.failure();

while (revNode.getParent() != null) {
Action action = getReverseAction(orgP, revNode);
if (action != null) {
Object nextState = revNode.getParent().getState();
double stepCosts = orgP.getStepCostFunction().c(revNode.getState(), action, nextState);
orgNode = nodeExpander.createNode(nextState, orgNode, action, stepCosts);
revNode = revNode.getParent();
} else {
return SearchUtils.failure();
