Program: 12223
Project: 12223
Buggy source:
public void identifyTypeLocalVariableAssignmentsInTypeCheckMethod(){
  List<String> staticFieldNames=typeCheckElimination.getStaticFieldNames();
  Block methodBody=typeCheckElimination.getTypeCheckMethod().getBody();
  if (methodBody != null) {
    List<Statement> statements=methodBody.statements();
    ExpressionExtractor expressionExtractor=new ExpressionExtractor();
    for (    Statement statement : statements) {
      List<Expression> assignments=expressionExtractor.getAssignments(statement);
      for (      Expression expression : assignments) {
        Assignment assignment=(Assignment)expression;
        Expression leftHandSide=assignment.getLeftHandSide();
        SimpleName assignedVariable=null;
        Expression invoker=null;
        if (leftHandSide instanceof SimpleName) {
          assignedVariable=(SimpleName)leftHandSide;
        }
 else         if (leftHandSide instanceof QualifiedName) {
          QualifiedName qualifiedName=(QualifiedName)leftHandSide;
          assignedVariable=qualifiedName.getName();
          invoker=qualifiedName.getQualifier();
        }
 else         if (leftHandSide instanceof FieldAccess) {
          FieldAccess fieldAccess=(FieldAccess)leftHandSide;
          assignedVariable=fieldAccess.getName();
          invoker=fieldAccess.getExpression();
        }
        Expression rightHandSide=assignment.getRightHandSide();
        SimpleName accessedVariable=decomposeRightHandSide(rightHandSide);
        if (assignedVariable != null) {
          IBinding leftHandBinding=assignedVariable.resolveBinding();
          if (leftHandBinding.getKind() == IBinding.VARIABLE) {
            IVariableBinding assignedVariableBinding=(IVariableBinding)leftHandBinding;
            if (typeCheckElimination.getTypeLocalVariable().resolveBinding().isEqualTo(assignedVariableBinding)) {
              if (accessedVariable != null) {
                IBinding rightHandBinding=accessedVariable.resolveBinding();
                if (rightHandBinding.getKind() == IBinding.VARIABLE) {
                  IVariableBinding accessedVariableBinding=(IVariableBinding)rightHandBinding;
                  if (accessedVariableBinding.isField() && (accessedVariableBinding.getModifiers() & Modifier.STATIC) != 0 && !staticFieldNames.contains(accessedVariable.getIdentifier())) {
                    String subclassName="String_Node_Str";
                    StringTokenizer tokenizer=new StringTokenizer(accessedVariable.getIdentifier(),"String_Node_Str");
                    while (tokenizer.hasMoreTokens()) {
                      String tempName=tokenizer.nextToken().toLowerCase().toString();
                      subclassName+=tempName.subSequence(0,1).toString().toUpperCase() + tempName.subSequence(1,tempName.length()).toString();
                    }
                    if (!containsStaticFieldKey(accessedVariable))                     additionalStaticFields.put(accessedVariable,subclassName);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void identifyTypeLocalVariableAssignmentsInTypeCheckMethod(){
  List<String> staticFieldNames=typeCheckElimination.getStaticFieldNames();
  Block methodBody=typeCheckElimination.getTypeCheckMethod().getBody();
  if (methodBody != null) {
    List<Statement> statements=methodBody.statements();
    ExpressionExtractor expressionExtractor=new ExpressionExtractor();
    for (    Statement statement : statements) {
      List<Expression> assignments=expressionExtractor.getAssignments(statement);
      for (      Expression expression : assignments) {
        Assignment assignment=(Assignment)expression;
        Expression leftHandSide=assignment.getLeftHandSide();
        SimpleName assignedVariable=null;
        Expression invoker=null;
        if (leftHandSide instanceof SimpleName) {
          assignedVariable=(SimpleName)leftHandSide;
        }
 else         if (leftHandSide instanceof QualifiedName) {
          QualifiedName qualifiedName=(QualifiedName)leftHandSide;
          assignedVariable=qualifiedName.getName();
          invoker=qualifiedName.getQualifier();
        }
 else         if (leftHandSide instanceof FieldAccess) {
          FieldAccess fieldAccess=(FieldAccess)leftHandSide;
          assignedVariable=fieldAccess.getName();
          invoker=fieldAccess.getExpression();
        }
        Expression rightHandSide=assignment.getRightHandSide();
        SimpleName accessedVariable=decomposeRightHandSide(rightHandSide);
        if (assignedVariable != null) {
          IBinding leftHandBinding=assignedVariable.resolveBinding();
          if (leftHandBinding.getKind() == IBinding.VARIABLE) {
            IVariableBinding assignedVariableBinding=(IVariableBinding)leftHandBinding;
            if (typeCheckElimination.getTypeLocalVariable().resolveBinding().isEqualTo(assignedVariableBinding)) {
              if (accessedVariable != null) {
                IBinding rightHandBinding=accessedVariable.resolveBinding();
                if (rightHandBinding.getKind() == IBinding.VARIABLE) {
                  IVariableBinding accessedVariableBinding=(IVariableBinding)rightHandBinding;
                  if (accessedVariableBinding.isField() && (accessedVariableBinding.getModifiers() & Modifier.STATIC) != 0 && !staticFieldNames.contains(accessedVariable.getIdentifier())) {
                    String subclassName="String_Node_Str";
                    StringTokenizer tokenizer=new StringTokenizer(accessedVariable.getIdentifier(),"String_Node_Str");
                    while (tokenizer.hasMoreTokens()) {
                      String tempName=tokenizer.nextToken().toLowerCase().toString();
                      subclassName+=tempName.subSequence(0,1).toString().toUpperCase() + tempName.subSequence(1,tempName.length()).toString();
                    }
                    if (!containsStaticFieldKey(accessedVariable))                     additionalStaticFields.put(accessedVariable,subclassName);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}