Program: 17027
Project: 17027
Buggy source:
/** 
 * post visit   {@link AssignExpr}
 * @param assignExpr
 */
private void postVisitAssignExpr(AssignExpr assignExpr){
  final ILHS lhs=assignExpr.getLHS();
  JstIdentifier identifier=null;
  if (lhs instanceof JstIdentifier) {
    identifier=(JstIdentifier)lhs;
    final LinkerSymbolInfo info=findTypeInSymbolMap(identifier.toExprText(),JstExpressionTypeLinkerHelper.getVarTablesBottomUp(assignExpr));
    if (info == null) {
      IExpr rhsExpr=assignExpr.getExpr();
      if (rhsExpr instanceof CastExpr) {
        identifier.setType(rhsExpr.getResultType());
      }
      handleGlobalVarBinding(identifier,assignExpr,rhsExpr,false);
      if (identifier.getType() == null) {
        identifier.setType(JstCache.getInstance().getType("String_Node_Str"));
      }
    }
  }
  final IJstType lhsType=lhs.getType();
  final IExpr rhsExpr=assignExpr.getExpr();
  final boolean rhsResolveNeeded=JstExpressionTypeLinkerHelper.doesExprRequireResolve(rhsExpr);
  if (lhsType != null && !(lhsType instanceof IInferred) && rhsResolveNeeded) {
    JstExpressionTypeLinkerHelper.doExprTypeResolve(m_resolver,this,rhsExpr,lhsType);
  }
 else   if (lhsType instanceof IInferred && !rhsResolveNeeded && identifier != null && rhsExpr != null) {
    IJstType rhsType=rhsExpr.getResultType();
    if (rhsType == null) {
      rhsType=new JstInferredType(JstCache.getInstance().getType("String_Node_Str"));
    }
 else     if (rhsType instanceof JstInferredType) {
      rhsType=((JstInferredType)rhsType).getType();
    }
    if (!isSameType(lhsType,rhsType)) {
      IJstNode binding=identifier.getJstBinding();
      IJstType originalType=null;
      if (binding instanceof JstIdentifier) {
        originalType=((JstIdentifier)binding).getType();
      }
      if (originalType instanceof JstInferredType) {
        int pos=lhs.getSource().getStartOffSet();
        ((JstInferredType)originalType).setCurrentType(rhsType,pos,m_scopeStack.peek());
      }
    }
  }
 else   if (lhsType == null && lhs instanceof FieldAccessExpr && rhsExpr != null) {
    IExpr qualifier=((FieldAccessExpr)lhs).getExpr();
    if (qualifier instanceof JstIdentifier) {
      IJstNode binding=((JstIdentifier)qualifier).getJstBinding();
      IJstType qualifierType=null;
      if (binding instanceof JstIdentifier) {
        qualifierType=((JstIdentifier)binding).getType();
      }
      if (qualifierType instanceof JstInferredType) {
        IJstType rhsType=rhsExpr.getResultType();
        if (rhsType == null) {
          rhsType=new JstInferredType(JstCache.getInstance().getType("String_Node_Str"));
        }
        int pos=lhs.getSource().getStartOffSet();
        Set<Object> scopes=new HashSet<Object>();
        scopes.addAll(m_scopeStack);
        ((JstInferredType)qualifierType).addNewProperty(((FieldAccessExpr)lhs).getName().getName(),rhsType,pos,scopes);
      }
    }
  }
 else   if (lhs instanceof FieldAccessExpr && rhsExpr != null) {
    constructForAssigment(lhs,rhsExpr);
  }
 else   if ((lhs instanceof JstIdentifier) && (rhsExpr != null) && (rhsExpr instanceof MtdInvocationExpr)) {
    constructForAssigment(lhs,rhsExpr);
  }
}

Fixed version (ground truth):
/** 
 * post visit   {@link AssignExpr}
 * @param assignExpr
 */
private void postVisitAssignExpr(AssignExpr assignExpr){
  final ILHS lhs=assignExpr.getLHS();
  JstIdentifier identifier=null;
  if (lhs instanceof JstIdentifier) {
    identifier=(JstIdentifier)lhs;
    final LinkerSymbolInfo info=findTypeInSymbolMap(identifier.toExprText(),JstExpressionTypeLinkerHelper.getVarTablesBottomUp(assignExpr));
    if (info == null) {
      IExpr rhsExpr=assignExpr.getExpr();
      if (rhsExpr instanceof CastExpr) {
        identifier.setType(rhsExpr.getResultType());
      }
      handleGlobalVarBinding(identifier,assignExpr,rhsExpr,false);
      if (identifier.getType() == null) {
        identifier.setType(JstCache.getInstance().getType("String_Node_Str"));
      }
    }
  }
  final IJstType lhsType=lhs.getType();
  final IExpr rhsExpr=assignExpr.getExpr();
  final boolean rhsResolveNeeded=JstExpressionTypeLinkerHelper.doesExprRequireResolve(rhsExpr);
  if (lhsType != null && !(lhsType instanceof IInferred) && rhsResolveNeeded) {
    JstExpressionTypeLinkerHelper.doExprTypeResolve(m_resolver,this,rhsExpr,lhsType);
  }
 else   if (lhsType instanceof IInferred && !rhsResolveNeeded && identifier != null && rhsExpr != null) {
    IJstType rhsType=rhsExpr.getResultType();
    if (rhsType == null) {
      rhsType=new JstInferredType(JstCache.getInstance().getType("String_Node_Str"));
    }
 else     if (rhsType instanceof JstInferredType) {
      rhsType=((JstInferredType)rhsType).getType();
    }
    if (!isSameType(lhsType,rhsType)) {
      IJstNode binding=identifier.getJstBinding();
      IJstType originalType=null;
      if (binding instanceof JstIdentifier) {
        originalType=((JstIdentifier)binding).getType();
      }
      if (originalType instanceof JstInferredType) {
        int pos=lhs.getSource().getStartOffSet();
        ((JstInferredType)originalType).setCurrentType(rhsType,pos,m_scopeStack.peek());
      }
    }
  }
 else   if (lhsType == null && lhs instanceof FieldAccessExpr && rhsExpr != null) {
    IExpr qualifier=((FieldAccessExpr)lhs).getExpr();
    if (qualifier instanceof JstIdentifier) {
      IJstNode binding=((JstIdentifier)qualifier).getJstBinding();
      IJstType qualifierType=null;
      if (binding instanceof JstIdentifier) {
        qualifierType=((JstIdentifier)binding).getType();
      }
      if (qualifierType instanceof JstInferredType) {
        IJstType rhsType=rhsExpr.getResultType();
        if (rhsType == null) {
          rhsType=new JstInferredType(JstCache.getInstance().getType("String_Node_Str"));
        }
        int pos=lhs.getSource().getStartOffSet();
        Set<Object> scopes=new HashSet<Object>();
        scopes.addAll(m_scopeStack);
        ((JstInferredType)qualifierType).addNewProperty(((FieldAccessExpr)lhs).getName().getName(),rhsType,pos,scopes);
      }
      if (rhsResolveNeeded && rhsExpr instanceof ObjLiteral) {
        IJstType rhsType=rhsExpr.getResultType();
        if (rhsType == null) {
          rhsType=new JstInferredType(JstCache.getInstance().getType("String_Node_Str"));
        }
        JstExpressionTypeLinkerHelper.doObjLiteralAndOTypeBindings((ObjLiteral)rhsExpr,(SynthOlType)rhsExpr.getResultType(),rhsType,this);
      }
    }
  }
 else   if (lhs instanceof FieldAccessExpr && rhsExpr != null) {
    constructForAssigment(lhs,rhsExpr);
  }
 else   if ((lhs instanceof JstIdentifier) && (rhsExpr != null) && (rhsExpr instanceof MtdInvocationExpr)) {
    constructForAssigment(lhs,rhsExpr);
  }
}