Program: 88648
Project: 88648
Buggy source:
/** 
 * Return Stmts Creation
 */
private void createReturn(polyglot.ast.Return retStmt){
  polyglot.ast.Expr expr=retStmt.expr();
  soot.Value sootLocal=null;
  if (expr != null) {
    sootLocal=createExpr(expr);
  }
  if (monitorStack != null) {
    Stack putBack=new Stack();
    while (!monitorStack.isEmpty()) {
      soot.Local exitVal=(soot.Local)monitorStack.pop();
      putBack.push(exitVal);
      soot.jimple.ExitMonitorStmt emStmt=soot.jimple.Jimple.v().newExitMonitorStmt(exitVal);
      body.getUnits().add(emStmt);
    }
    while (!putBack.isEmpty()) {
      monitorStack.push(putBack.pop());
    }
  }
  if (tryStack != null && !tryStack.isEmpty()) {
    polyglot.ast.Try currentTry=(polyglot.ast.Try)tryStack.pop();
    createBlock(currentTry.finallyBlock());
    tryStack.push(currentTry);
    ReturnStmtChecker rsc=new ReturnStmtChecker();
    currentTry.finallyBlock().visit(rsc);
    if (rsc.hasRet()) {
      return;
    }
  }
  if (catchStack != null && !catchStack.isEmpty()) {
    polyglot.ast.Try currentTry=(polyglot.ast.Try)catchStack.pop();
    createBlock(currentTry.finallyBlock());
    catchStack.push(currentTry);
    ReturnStmtChecker rsc=new ReturnStmtChecker();
    currentTry.finallyBlock().visit(rsc);
    if (rsc.hasRet()) {
      return;
    }
  }
  if (expr == null) {
    soot.jimple.Stmt retStmtVoid=soot.jimple.Jimple.v().newReturnVoidStmt();
    body.getUnits().add(retStmtVoid);
    Util.addLnPosTags(retStmtVoid,retStmt.position());
  }
 else {
    if (sootLocal instanceof soot.jimple.ConditionExpr) {
      sootLocal=handleCondBinExpr((soot.jimple.ConditionExpr)sootLocal);
    }
    soot.jimple.ReturnStmt retStmtLocal=soot.jimple.Jimple.v().newReturnStmt(sootLocal);
    body.getUnits().add(retStmtLocal);
    Util.addLnPosTags(retStmtLocal.getOpBox(),expr.position());
    Util.addLnPosTags(retStmtLocal,retStmt.position());
  }
}

Fixed version (ground truth):
/** 
 * Return Stmts Creation
 */
private void createReturn(polyglot.ast.Return retStmt){
  polyglot.ast.Expr expr=retStmt.expr();
  soot.Value sootLocal=null;
  if (expr != null) {
    sootLocal=createExpr(expr);
  }
  if (monitorStack != null) {
    Stack putBack=new Stack();
    while (!monitorStack.isEmpty()) {
      soot.Local exitVal=(soot.Local)monitorStack.pop();
      putBack.push(exitVal);
      soot.jimple.ExitMonitorStmt emStmt=soot.jimple.Jimple.v().newExitMonitorStmt(exitVal);
      body.getUnits().add(emStmt);
    }
    while (!putBack.isEmpty()) {
      monitorStack.push(putBack.pop());
    }
  }
  if (tryStack != null && !tryStack.isEmpty()) {
    polyglot.ast.Try currentTry=(polyglot.ast.Try)tryStack.pop();
    if (currentTry.finallyBlock() != null) {
      createBlock(currentTry.finallyBlock());
      tryStack.push(currentTry);
      ReturnStmtChecker rsc=new ReturnStmtChecker();
      currentTry.finallyBlock().visit(rsc);
      if (rsc.hasRet()) {
        return;
      }
    }
 else {
      tryStack.push(currentTry);
    }
  }
  if (catchStack != null && !catchStack.isEmpty()) {
    polyglot.ast.Try currentTry=(polyglot.ast.Try)catchStack.pop();
    if (currentTry.finallyBlock() != null) {
      createBlock(currentTry.finallyBlock());
      catchStack.push(currentTry);
      ReturnStmtChecker rsc=new ReturnStmtChecker();
      currentTry.finallyBlock().visit(rsc);
      if (rsc.hasRet()) {
        return;
      }
    }
 else {
      catchStack.push(currentTry);
    }
  }
  if (expr == null) {
    soot.jimple.Stmt retStmtVoid=soot.jimple.Jimple.v().newReturnVoidStmt();
    body.getUnits().add(retStmtVoid);
    Util.addLnPosTags(retStmtVoid,retStmt.position());
  }
 else {
    if (sootLocal instanceof soot.jimple.ConditionExpr) {
      sootLocal=handleCondBinExpr((soot.jimple.ConditionExpr)sootLocal);
    }
    soot.jimple.ReturnStmt retStmtLocal=soot.jimple.Jimple.v().newReturnStmt(sootLocal);
    body.getUnits().add(retStmtLocal);
    Util.addLnPosTags(retStmtLocal.getOpBox(),expr.position());
    Util.addLnPosTags(retStmtLocal,retStmt.position());
  }
}