Program: 85195
Project: 85195
Buggy source:
public void caseAssignStmt(AssignStmt stmt){
  Value lhs=stmt.getLeftOp();
  Value rhs=stmt.getRightOp();
  Type tlhs=null;
  if (lhs instanceof Local) {
    tlhs=this.tg.get((Local)lhs);
  }
 else   if (lhs instanceof ArrayRef) {
    ArrayRef aref=(ArrayRef)lhs;
    Local base=(Local)aref.getBase();
    ArrayType at=null;
    Type tgType=this.tg.get(base);
    if (tgType instanceof ArrayType) {
      at=(ArrayType)tgType;
    }
 else {
      if (tgType == Scene.v().getObjectType() && rhs instanceof Local) {
        Type rhsType=this.tg.get((Local)rhs);
        if (rhsType instanceof PrimType) {
          if (defs == null) {
            defs=LocalDefs.Factory.newLocalDefs(jb);
            uses=LocalUses.Factory.newLocalUses(jb,defs);
          }
          for (          Unit defU : defs.getDefsOfAt(base,stmt)) {
            if (defU instanceof AssignStmt) {
              AssignStmt defUas=(AssignStmt)defU;
              if (defUas.getRightOp() instanceof NewArrayExpr) {
                at=(ArrayType)defUas.getRightOp().getType();
                break;
              }
            }
          }
        }
      }
      if (at == null) {
        at=tgType.makeArrayType();
      }
    }
    tlhs=((ArrayType)at).getElementType();
    this.handleArrayRef(aref,stmt);
    aref.setBase((Local)this.uv.visit(aref.getBase(),at,stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
    stmt.setLeftOp(this.uv.visit(lhs,tlhs,stmt));
  }
 else   if (lhs instanceof FieldRef) {
    tlhs=((FieldRef)lhs).getFieldRef().type();
    if (lhs instanceof InstanceFieldRef) {
      this.handleInstanceFieldRef((InstanceFieldRef)lhs,stmt);
    }
  }
  lhs=stmt.getLeftOp();
  rhs=stmt.getRightOp();
  if (rhs instanceof Local) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof ArrayRef) {
    ArrayRef aref=(ArrayRef)rhs;
    Local base=(Local)aref.getBase();
    ArrayType at=null;
    Type et=null;
    if (this.tg.get(base) instanceof ArrayType) {
      at=(ArrayType)this.tg.get(base);
    }
 else {
      Type bt=this.tg.get(base);
      if (bt instanceof RefType || bt instanceof NullType) {
        RefType rt=bt instanceof NullType ? null : (RefType)bt;
        if (rt == null || rt.getSootClass().getName().equals("String_Node_Str") || rt.getSootClass().getName().equals("String_Node_Str") || rt.getSootClass().getName().equals("String_Node_Str")) {
          if (defs == null) {
            defs=LocalDefs.Factory.newLocalDefs(jb);
            uses=LocalUses.Factory.newLocalUses(jb,defs);
          }
          outer:           for (          UnitValueBoxPair usePair : uses.getUsesOf(stmt)) {
            Stmt useStmt=(Stmt)usePair.getUnit();
            if (useStmt.containsInvokeExpr()) {
              for (int i=0; i < useStmt.getInvokeExpr().getArgCount(); i++) {
                if (useStmt.getInvokeExpr().getArg(i) == usePair.getValueBox().getValue()) {
                  et=useStmt.getInvokeExpr().getMethod().getParameterType(i);
                  at=et.makeArrayType();
                  break outer;
                }
              }
            }
 else             if (useStmt instanceof IfStmt) {
              IfStmt ifStmt=(IfStmt)useStmt;
              if (ifStmt.getCondition() instanceof EqExpr) {
                EqExpr expr=(EqExpr)ifStmt.getCondition();
                final Value other;
                if (expr.getOp1() == usePair.getValueBox().getValue()) {
                  other=expr.getOp2();
                }
 else {
                  other=expr.getOp1();
                }
                Type newEt=getTargetType(other);
                if (newEt != null) {
                  et=newEt;
                }
              }
            }
 else             if (useStmt instanceof AssignStmt) {
              AssignStmt useAssignStmt=(AssignStmt)useStmt;
              if (useAssignStmt.getRightOp() instanceof BinopExpr) {
                BinopExpr binOp=(BinopExpr)useAssignStmt.getRightOp();
                final Value other;
                if (binOp.getOp1() == usePair.getValueBox().getValue()) {
                  other=binOp.getOp2();
                }
 else {
                  other=binOp.getOp1();
                }
                Type newEt=getTargetType(other);
                if (newEt != null) {
                  et=newEt;
                }
              }
            }
 else             if (useStmt instanceof ReturnStmt) {
              et=jb.getMethod().getReturnType();
            }
          }
        }
      }
      if (at == null) {
        at=et.makeArrayType();
      }
    }
    Type trhs=((ArrayType)at).getElementType();
    this.handleArrayRef(aref,stmt);
    aref.setBase((Local)this.uv.visit(aref.getBase(),at,stmt));
    stmt.setRightOp(this.uv.visit(rhs,trhs,stmt));
  }
 else   if (rhs instanceof InstanceFieldRef) {
    this.handleInstanceFieldRef((InstanceFieldRef)rhs,stmt);
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof BinopExpr) {
    this.handleBinopExpr((BinopExpr)rhs,stmt,tlhs);
  }
 else   if (rhs instanceof InvokeExpr) {
    this.handleInvokeExpr((InvokeExpr)rhs,stmt);
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof CastExpr) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof InstanceOfExpr) {
    InstanceOfExpr ioe=(InstanceOfExpr)rhs;
    ioe.setOp(this.uv.visit(ioe.getOp(),RefType.v("String_Node_Str"),stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NewArrayExpr) {
    NewArrayExpr nae=(NewArrayExpr)rhs;
    nae.setSize(this.uv.visit(nae.getSize(),IntType.v(),stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NewMultiArrayExpr) {
    NewMultiArrayExpr nmae=(NewMultiArrayExpr)rhs;
    for (int i=0; i < nmae.getSizeCount(); i++) {
      nmae.setSize(i,this.uv.visit(nmae.getSize(i),IntType.v(),stmt));
    }
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof LengthExpr) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NegExpr) {
    ((NegExpr)rhs).setOp(this.uv.visit(((NegExpr)rhs).getOp(),tlhs,stmt));
  }
 else   if (rhs instanceof Constant) {
    if (!(rhs instanceof NullConstant)) {
      stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
    }
  }
}

Fixed version (ground truth):
public void caseAssignStmt(AssignStmt stmt){
  Value lhs=stmt.getLeftOp();
  Value rhs=stmt.getRightOp();
  Type tlhs=null;
  if (lhs instanceof Local) {
    tlhs=this.tg.get((Local)lhs);
  }
 else   if (lhs instanceof ArrayRef) {
    ArrayRef aref=(ArrayRef)lhs;
    Local base=(Local)aref.getBase();
    ArrayType at=null;
    Type tgType=this.tg.get(base);
    if (tgType instanceof ArrayType) {
      at=(ArrayType)tgType;
    }
 else {
      if (tgType == Scene.v().getObjectType() && rhs instanceof Local) {
        Type rhsType=this.tg.get((Local)rhs);
        if (rhsType instanceof PrimType) {
          if (defs == null) {
            defs=LocalDefs.Factory.newLocalDefs(jb);
            uses=LocalUses.Factory.newLocalUses(jb,defs);
          }
          for (          Unit defU : defs.getDefsOfAt(base,stmt)) {
            if (defU instanceof AssignStmt) {
              AssignStmt defUas=(AssignStmt)defU;
              if (defUas.getRightOp() instanceof NewArrayExpr) {
                at=(ArrayType)defUas.getRightOp().getType();
                break;
              }
            }
          }
        }
      }
      if (at == null) {
        at=tgType.makeArrayType();
      }
    }
    tlhs=((ArrayType)at).getElementType();
    this.handleArrayRef(aref,stmt);
    aref.setBase((Local)this.uv.visit(aref.getBase(),at,stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
    stmt.setLeftOp(this.uv.visit(lhs,tlhs,stmt));
  }
 else   if (lhs instanceof FieldRef) {
    tlhs=((FieldRef)lhs).getFieldRef().type();
    if (lhs instanceof InstanceFieldRef) {
      this.handleInstanceFieldRef((InstanceFieldRef)lhs,stmt);
    }
  }
  lhs=stmt.getLeftOp();
  rhs=stmt.getRightOp();
  if (rhs instanceof Local) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof ArrayRef) {
    ArrayRef aref=(ArrayRef)rhs;
    Local base=(Local)aref.getBase();
    ArrayType at=null;
    Type et=null;
    if (this.tg.get(base) instanceof ArrayType) {
      at=(ArrayType)this.tg.get(base);
    }
 else {
      Type bt=this.tg.get(base);
      et=bt;
      if (bt instanceof RefType || bt instanceof NullType) {
        RefType rt=bt instanceof NullType ? null : (RefType)bt;
        if (rt == null || rt.getSootClass().getName().equals("String_Node_Str") || rt.getSootClass().getName().equals("String_Node_Str") || rt.getSootClass().getName().equals("String_Node_Str")) {
          if (defs == null) {
            defs=LocalDefs.Factory.newLocalDefs(jb);
            uses=LocalUses.Factory.newLocalUses(jb,defs);
          }
          outer:           for (          UnitValueBoxPair usePair : uses.getUsesOf(stmt)) {
            Stmt useStmt=(Stmt)usePair.getUnit();
            if (useStmt.containsInvokeExpr()) {
              for (int i=0; i < useStmt.getInvokeExpr().getArgCount(); i++) {
                if (useStmt.getInvokeExpr().getArg(i) == usePair.getValueBox().getValue()) {
                  et=useStmt.getInvokeExpr().getMethod().getParameterType(i);
                  at=et.makeArrayType();
                  break outer;
                }
              }
            }
 else             if (useStmt instanceof IfStmt) {
              IfStmt ifStmt=(IfStmt)useStmt;
              if (ifStmt.getCondition() instanceof EqExpr) {
                EqExpr expr=(EqExpr)ifStmt.getCondition();
                final Value other;
                if (expr.getOp1() == usePair.getValueBox().getValue()) {
                  other=expr.getOp2();
                }
 else {
                  other=expr.getOp1();
                }
                Type newEt=getTargetType(other);
                if (newEt != null) {
                  et=newEt;
                }
              }
            }
 else             if (useStmt instanceof AssignStmt) {
              AssignStmt useAssignStmt=(AssignStmt)useStmt;
              if (useAssignStmt.getRightOp() instanceof BinopExpr) {
                BinopExpr binOp=(BinopExpr)useAssignStmt.getRightOp();
                final Value other;
                if (binOp.getOp1() == usePair.getValueBox().getValue()) {
                  other=binOp.getOp2();
                }
 else {
                  other=binOp.getOp1();
                }
                Type newEt=getTargetType(other);
                if (newEt != null) {
                  et=newEt;
                }
              }
            }
 else             if (useStmt instanceof ReturnStmt) {
              et=jb.getMethod().getReturnType();
            }
          }
        }
      }
      if (at == null) {
        at=et.makeArrayType();
      }
    }
    Type trhs=((ArrayType)at).getElementType();
    this.handleArrayRef(aref,stmt);
    aref.setBase((Local)this.uv.visit(aref.getBase(),at,stmt));
    stmt.setRightOp(this.uv.visit(rhs,trhs,stmt));
  }
 else   if (rhs instanceof InstanceFieldRef) {
    this.handleInstanceFieldRef((InstanceFieldRef)rhs,stmt);
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof BinopExpr) {
    this.handleBinopExpr((BinopExpr)rhs,stmt,tlhs);
  }
 else   if (rhs instanceof InvokeExpr) {
    this.handleInvokeExpr((InvokeExpr)rhs,stmt);
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof CastExpr) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof InstanceOfExpr) {
    InstanceOfExpr ioe=(InstanceOfExpr)rhs;
    ioe.setOp(this.uv.visit(ioe.getOp(),RefType.v("String_Node_Str"),stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NewArrayExpr) {
    NewArrayExpr nae=(NewArrayExpr)rhs;
    nae.setSize(this.uv.visit(nae.getSize(),IntType.v(),stmt));
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NewMultiArrayExpr) {
    NewMultiArrayExpr nmae=(NewMultiArrayExpr)rhs;
    for (int i=0; i < nmae.getSizeCount(); i++) {
      nmae.setSize(i,this.uv.visit(nmae.getSize(i),IntType.v(),stmt));
    }
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof LengthExpr) {
    stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
  }
 else   if (rhs instanceof NegExpr) {
    ((NegExpr)rhs).setOp(this.uv.visit(((NegExpr)rhs).getOp(),tlhs,stmt));
  }
 else   if (rhs instanceof Constant) {
    if (!(rhs instanceof NullConstant)) {
      stmt.setRightOp(this.uv.visit(rhs,tlhs,stmt));
    }
  }
}