Program: 85276
Project: 85276
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;
    if (this.tg.get(base) instanceof ArrayType)     at=(ArrayType)this.tg.get(base);
 else     at=this.tg.get(base).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;
    Type et=null;
    if (this.tg.get(base) instanceof ArrayType)     at=(ArrayType)this.tg.get(base);
 else {
      Type bt=this.tg.get(base);
      at=bt.makeArrayType();
      if (bt instanceof RefType) {
        RefType rt=(RefType)bt;
        if (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;
            }
          }
        }
      }
    }
    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;
    Type et=null;
    if (this.tg.get(base) instanceof ArrayType)     at=(ArrayType)this.tg.get(base);
 else {
      Type bt=this.tg.get(base);
      at=bt.makeArrayType();
      if (bt instanceof RefType) {
        RefType rt=(RefType)bt;
        if (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;
            }
          }
        }
      }
    }
    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));
}