Program: 12198
Project: 12198
Buggy source:
private void modifySourceVariableInstructionsInSubclass(List<Expression> oldVariableInstructions,List<Expression> newVariableInstructions,AST subclassAST,ASTRewrite subclassRewriter,Set<VariableDeclarationFragment> accessedFields,Set<VariableDeclarationFragment> assignedFields,Set<IVariableBinding> superAccessedFields,Set<IVariableBinding> superAssignedFields){
  int j=0;
  Set<IVariableBinding> accessedFieldBindings=new LinkedHashSet<IVariableBinding>();
  for (  VariableDeclarationFragment fragment : accessedFields) {
    accessedFieldBindings.add(fragment.resolveBinding());
  }
  accessedFieldBindings.addAll(superAccessedFields);
  Set<IVariableBinding> assignedFieldBindings=new LinkedHashSet<IVariableBinding>();
  for (  VariableDeclarationFragment fragment : assignedFields) {
    assignedFieldBindings.add(fragment.resolveBinding());
  }
  assignedFieldBindings.addAll(superAccessedFields);
  for (  Expression expression : newVariableInstructions) {
    SimpleName newSimpleName=(SimpleName)expression;
    SimpleName oldSimpleName=(SimpleName)oldVariableInstructions.get(j);
    Expression newParentExpression=null;
    Expression oldParentExpression=null;
    if (newSimpleName.getParent() instanceof QualifiedName) {
      newParentExpression=(QualifiedName)newSimpleName.getParent();
      oldParentExpression=(QualifiedName)oldSimpleName.getParent();
    }
 else     if (newSimpleName.getParent() instanceof FieldAccess) {
      newParentExpression=(FieldAccess)newSimpleName.getParent();
      oldParentExpression=(FieldAccess)oldSimpleName.getParent();
    }
 else {
      newParentExpression=newSimpleName;
      oldParentExpression=oldSimpleName;
    }
    if (newParentExpression.getParent() instanceof Assignment) {
      Assignment newAssignment=(Assignment)newParentExpression.getParent();
      Assignment oldAssignment=(Assignment)oldParentExpression.getParent();
      Expression newLeftHandSide=newAssignment.getLeftHandSide();
      Expression oldLeftHandSide=oldAssignment.getLeftHandSide();
      SimpleName newLeftHandSideName=null;
      SimpleName oldLeftHandSideName=null;
      if (newLeftHandSide instanceof SimpleName) {
        newLeftHandSideName=(SimpleName)newLeftHandSide;
        oldLeftHandSideName=(SimpleName)oldLeftHandSide;
      }
 else       if (newLeftHandSide instanceof QualifiedName) {
        QualifiedName newLeftHandSideQualifiedName=(QualifiedName)newLeftHandSide;
        newLeftHandSideName=newLeftHandSideQualifiedName.getName();
        QualifiedName oldLeftHandSideQualifiedName=(QualifiedName)oldLeftHandSide;
        oldLeftHandSideName=oldLeftHandSideQualifiedName.getName();
      }
 else       if (newLeftHandSide instanceof FieldAccess) {
        FieldAccess newLeftHandSideFieldAccess=(FieldAccess)newLeftHandSide;
        newLeftHandSideName=newLeftHandSideFieldAccess.getName();
        FieldAccess oldLeftHandSideFieldAccess=(FieldAccess)oldLeftHandSide;
        oldLeftHandSideName=oldLeftHandSideFieldAccess.getName();
      }
      Expression newRightHandSide=newAssignment.getRightHandSide();
      Expression oldRightHandSide=oldAssignment.getRightHandSide();
      SimpleName newRightHandSideName=null;
      SimpleName oldRightHandSideName=null;
      if (newRightHandSide instanceof SimpleName) {
        newRightHandSideName=(SimpleName)newRightHandSide;
        oldRightHandSideName=(SimpleName)oldRightHandSide;
      }
 else       if (newRightHandSide instanceof QualifiedName) {
        QualifiedName newRightHandSideQualifiedName=(QualifiedName)newRightHandSide;
        newRightHandSideName=newRightHandSideQualifiedName.getName();
        QualifiedName oldRightHandSideQualifiedName=(QualifiedName)oldRightHandSide;
        oldRightHandSideName=oldRightHandSideQualifiedName.getName();
      }
 else       if (newRightHandSide instanceof FieldAccess) {
        FieldAccess newRightHandSideFieldAccess=(FieldAccess)newRightHandSide;
        newRightHandSideName=newRightHandSideFieldAccess.getName();
        FieldAccess oldRightHandSideFieldAccess=(FieldAccess)oldRightHandSide;
        oldRightHandSideName=oldRightHandSideFieldAccess.getName();
      }
      String invokerName=sourceTypeDeclaration.getName().getIdentifier();
      invokerName=invokerName.substring(0,1).toLowerCase() + invokerName.substring(1,invokerName.length());
      if (newLeftHandSideName != null && newLeftHandSideName.equals(newSimpleName)) {
        for (        IVariableBinding assignedFieldBinding : assignedFieldBindings) {
          if (assignedFieldBinding.isEqualTo(oldLeftHandSideName.resolveBinding())) {
            IMethodBinding setterMethodBinding=null;
            if (superAssignedFields.contains(assignedFieldBinding)) {
              setterMethodBinding=typeCheckElimination.getSetterMethodBindingOfSuperAssignedField(assignedFieldBinding);
            }
 else {
              setterMethodBinding=findSetterMethodInContext(assignedFieldBinding);
            }
            String leftHandMethodName;
            if (setterMethodBinding != null) {
              leftHandMethodName=setterMethodBinding.getName();
            }
 else {
              leftHandMethodName=assignedFieldBinding.getName();
              leftHandMethodName="String_Node_Str" + leftHandMethodName.substring(0,1).toUpperCase() + leftHandMethodName.substring(1,leftHandMethodName.length());
            }
            MethodInvocation leftHandMethodInvocation=subclassAST.newMethodInvocation();
            subclassRewriter.set(leftHandMethodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(leftHandMethodName),null);
            subclassRewriter.set(leftHandMethodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
            ListRewrite methodInvocationArgumentsRewrite=subclassRewriter.getListRewrite(leftHandMethodInvocation,MethodInvocation.ARGUMENTS_PROPERTY);
            if (newRightHandSideName != null) {
              boolean accessedFieldFound=false;
              for (              IVariableBinding accessedFieldBinding : accessedFieldBindings) {
                if (accessedFieldBinding.isEqualTo(oldRightHandSideName.resolveBinding())) {
                  if ((accessedFieldBinding.getModifiers() & Modifier.STATIC) != 0 && (accessedFieldBinding.getModifiers() & Modifier.PUBLIC) != 0) {
                    SimpleName qualifier=subclassAST.newSimpleName(accessedFieldBinding.getDeclaringClass().getName());
                    if (newRightHandSideName.getParent() instanceof FieldAccess) {
                      FieldAccess fieldAccess=(FieldAccess)newRightHandSideName.getParent();
                      subclassRewriter.set(fieldAccess,FieldAccess.EXPRESSION_PROPERTY,qualifier,null);
                      methodInvocationArgumentsRewrite.insertLast(fieldAccess,null);
                    }
 else                     if (newRightHandSideName.getParent() instanceof QualifiedName) {
                      QualifiedName qualifiedName=(QualifiedName)newRightHandSideName.getParent();
                      methodInvocationArgumentsRewrite.insertLast(qualifiedName,null);
                    }
 else {
                      SimpleName simpleName=subclassAST.newSimpleName(newRightHandSideName.getIdentifier());
                      QualifiedName newQualifiedName=subclassAST.newQualifiedName(qualifier,simpleName);
                      subclassRewriter.replace(newRightHandSideName,newQualifiedName,null);
                      methodInvocationArgumentsRewrite.insertLast(newQualifiedName,null);
                    }
                  }
 else {
                    IMethodBinding getterMethodBinding=null;
                    if (superAccessedFields.contains(accessedFieldBinding)) {
                      getterMethodBinding=typeCheckElimination.getGetterMethodBindingOfSuperAccessedField(accessedFieldBinding);
                    }
 else {
                      getterMethodBinding=findGetterMethodInContext(accessedFieldBinding);
                    }
                    String rightHandMethodName;
                    if (getterMethodBinding != null) {
                      rightHandMethodName=getterMethodBinding.getName();
                    }
 else {
                      rightHandMethodName=accessedFieldBinding.getName();
                      rightHandMethodName="String_Node_Str" + rightHandMethodName.substring(0,1).toUpperCase() + rightHandMethodName.substring(1,rightHandMethodName.length());
                    }
                    MethodInvocation rightHandMethodInvocation=subclassAST.newMethodInvocation();
                    subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(rightHandMethodName),null);
                    subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
                    methodInvocationArgumentsRewrite.insertLast(rightHandMethodInvocation,null);
                  }
                  accessedFieldFound=true;
                  break;
                }
              }
              if (!accessedFieldFound)               methodInvocationArgumentsRewrite.insertLast(newAssignment.getRightHandSide(),null);
            }
 else {
              methodInvocationArgumentsRewrite.insertLast(newAssignment.getRightHandSide(),null);
            }
            subclassRewriter.replace(newAssignment,leftHandMethodInvocation,null);
            break;
          }
        }
      }
    }
 else {
      for (      IVariableBinding accessedFieldBinding : accessedFieldBindings) {
        if (accessedFieldBinding.isEqualTo(oldSimpleName.resolveBinding())) {
          if ((accessedFieldBinding.getModifiers() & Modifier.STATIC) != 0 && (accessedFieldBinding.getModifiers() & Modifier.PUBLIC) != 0) {
            SimpleName qualifier=subclassAST.newSimpleName(accessedFieldBinding.getDeclaringClass().getName());
            if (newSimpleName.getParent() instanceof FieldAccess) {
              FieldAccess fieldAccess=(FieldAccess)newSimpleName.getParent();
              subclassRewriter.set(fieldAccess,FieldAccess.EXPRESSION_PROPERTY,qualifier,null);
            }
 else             if (!(newSimpleName.getParent() instanceof QualifiedName)) {
              SimpleName simpleName=subclassAST.newSimpleName(newSimpleName.getIdentifier());
              QualifiedName newQualifiedName=subclassAST.newQualifiedName(qualifier,simpleName);
              subclassRewriter.replace(newSimpleName,newQualifiedName,null);
            }
          }
 else {
            IMethodBinding getterMethodBinding=null;
            if (superAccessedFields.contains(accessedFieldBinding)) {
              getterMethodBinding=typeCheckElimination.getGetterMethodBindingOfSuperAccessedField(accessedFieldBinding);
            }
 else {
              getterMethodBinding=findGetterMethodInContext(accessedFieldBinding);
            }
            String methodName;
            if (getterMethodBinding != null) {
              methodName=getterMethodBinding.getName();
            }
 else {
              methodName=accessedFieldBinding.getName();
              methodName="String_Node_Str" + methodName.substring(0,1).toUpperCase() + methodName.substring(1,methodName.length());
            }
            MethodInvocation methodInvocation=subclassAST.newMethodInvocation();
            subclassRewriter.set(methodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(methodName),null);
            String invokerName=sourceTypeDeclaration.getName().getIdentifier();
            invokerName=invokerName.substring(0,1).toLowerCase() + invokerName.substring(1,invokerName.length());
            subclassRewriter.set(methodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
            if (newSimpleName.getParent() instanceof FieldAccess) {
              FieldAccess fieldAccess=(FieldAccess)newSimpleName.getParent();
              subclassRewriter.replace(fieldAccess,methodInvocation,null);
            }
 else             if (newSimpleName.getParent() instanceof QualifiedName) {
              QualifiedName qualifiedName=(QualifiedName)newSimpleName.getParent();
              subclassRewriter.replace(qualifiedName,methodInvocation,null);
            }
 else {
              subclassRewriter.replace(newSimpleName,methodInvocation,null);
            }
          }
          break;
        }
      }
    }
    j++;
  }
}

Fixed version (ground truth):
private void modifySourceVariableInstructionsInSubclass(List<Expression> oldVariableInstructions,List<Expression> newVariableInstructions,AST subclassAST,ASTRewrite subclassRewriter,Set<VariableDeclarationFragment> accessedFields,Set<VariableDeclarationFragment> assignedFields,Set<IVariableBinding> superAccessedFields,Set<IVariableBinding> superAssignedFields){
  int j=0;
  Set<IVariableBinding> accessedFieldBindings=new LinkedHashSet<IVariableBinding>();
  for (  VariableDeclarationFragment fragment : accessedFields) {
    accessedFieldBindings.add(fragment.resolveBinding());
  }
  accessedFieldBindings.addAll(superAccessedFields);
  Set<IVariableBinding> assignedFieldBindings=new LinkedHashSet<IVariableBinding>();
  for (  VariableDeclarationFragment fragment : assignedFields) {
    assignedFieldBindings.add(fragment.resolveBinding());
  }
  assignedFieldBindings.addAll(superAccessedFields);
  for (  Expression expression : newVariableInstructions) {
    SimpleName newSimpleName=(SimpleName)expression;
    SimpleName oldSimpleName=(SimpleName)oldVariableInstructions.get(j);
    Expression newParentExpression=null;
    Expression oldParentExpression=null;
    if (newSimpleName.getParent() instanceof QualifiedName) {
      newParentExpression=(QualifiedName)newSimpleName.getParent();
      oldParentExpression=(QualifiedName)oldSimpleName.getParent();
    }
 else     if (newSimpleName.getParent() instanceof FieldAccess) {
      newParentExpression=(FieldAccess)newSimpleName.getParent();
      oldParentExpression=(FieldAccess)oldSimpleName.getParent();
    }
 else {
      newParentExpression=newSimpleName;
      oldParentExpression=oldSimpleName;
    }
    if (newParentExpression.getParent() instanceof Assignment) {
      Assignment newAssignment=(Assignment)newParentExpression.getParent();
      Assignment oldAssignment=(Assignment)oldParentExpression.getParent();
      Expression newLeftHandSide=newAssignment.getLeftHandSide();
      Expression oldLeftHandSide=oldAssignment.getLeftHandSide();
      SimpleName newLeftHandSideName=null;
      SimpleName oldLeftHandSideName=null;
      if (newLeftHandSide instanceof SimpleName) {
        newLeftHandSideName=(SimpleName)newLeftHandSide;
        oldLeftHandSideName=(SimpleName)oldLeftHandSide;
      }
 else       if (newLeftHandSide instanceof QualifiedName) {
        QualifiedName newLeftHandSideQualifiedName=(QualifiedName)newLeftHandSide;
        newLeftHandSideName=newLeftHandSideQualifiedName.getName();
        QualifiedName oldLeftHandSideQualifiedName=(QualifiedName)oldLeftHandSide;
        oldLeftHandSideName=oldLeftHandSideQualifiedName.getName();
      }
 else       if (newLeftHandSide instanceof FieldAccess) {
        FieldAccess newLeftHandSideFieldAccess=(FieldAccess)newLeftHandSide;
        newLeftHandSideName=newLeftHandSideFieldAccess.getName();
        FieldAccess oldLeftHandSideFieldAccess=(FieldAccess)oldLeftHandSide;
        oldLeftHandSideName=oldLeftHandSideFieldAccess.getName();
      }
      Expression newRightHandSide=newAssignment.getRightHandSide();
      Expression oldRightHandSide=oldAssignment.getRightHandSide();
      SimpleName newRightHandSideName=null;
      SimpleName oldRightHandSideName=null;
      if (newRightHandSide instanceof SimpleName) {
        newRightHandSideName=(SimpleName)newRightHandSide;
        oldRightHandSideName=(SimpleName)oldRightHandSide;
      }
 else       if (newRightHandSide instanceof QualifiedName) {
        QualifiedName newRightHandSideQualifiedName=(QualifiedName)newRightHandSide;
        newRightHandSideName=newRightHandSideQualifiedName.getName();
        QualifiedName oldRightHandSideQualifiedName=(QualifiedName)oldRightHandSide;
        oldRightHandSideName=oldRightHandSideQualifiedName.getName();
      }
 else       if (newRightHandSide instanceof FieldAccess) {
        FieldAccess newRightHandSideFieldAccess=(FieldAccess)newRightHandSide;
        newRightHandSideName=newRightHandSideFieldAccess.getName();
        FieldAccess oldRightHandSideFieldAccess=(FieldAccess)oldRightHandSide;
        oldRightHandSideName=oldRightHandSideFieldAccess.getName();
      }
      String invokerName=sourceTypeDeclaration.getName().getIdentifier();
      invokerName=invokerName.substring(0,1).toLowerCase() + invokerName.substring(1,invokerName.length());
      if (newLeftHandSideName != null && newLeftHandSideName.equals(newSimpleName)) {
        for (        IVariableBinding assignedFieldBinding : assignedFieldBindings) {
          if (assignedFieldBinding.isEqualTo(oldLeftHandSideName.resolveBinding())) {
            IMethodBinding setterMethodBinding=null;
            if (superAssignedFields.contains(assignedFieldBinding)) {
              setterMethodBinding=typeCheckElimination.getSetterMethodBindingOfSuperAssignedField(assignedFieldBinding);
            }
 else {
              setterMethodBinding=findSetterMethodInContext(assignedFieldBinding);
            }
            String leftHandMethodName;
            if (setterMethodBinding != null) {
              leftHandMethodName=setterMethodBinding.getName();
            }
 else {
              leftHandMethodName=assignedFieldBinding.getName();
              leftHandMethodName="String_Node_Str" + leftHandMethodName.substring(0,1).toUpperCase() + leftHandMethodName.substring(1,leftHandMethodName.length());
            }
            MethodInvocation leftHandMethodInvocation=subclassAST.newMethodInvocation();
            subclassRewriter.set(leftHandMethodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(leftHandMethodName),null);
            subclassRewriter.set(leftHandMethodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
            ListRewrite methodInvocationArgumentsRewrite=subclassRewriter.getListRewrite(leftHandMethodInvocation,MethodInvocation.ARGUMENTS_PROPERTY);
            if (newRightHandSideName != null) {
              boolean accessedFieldFound=false;
              for (              IVariableBinding accessedFieldBinding : accessedFieldBindings) {
                if (accessedFieldBinding.isEqualTo(oldRightHandSideName.resolveBinding())) {
                  if ((accessedFieldBinding.getModifiers() & Modifier.STATIC) != 0 && (accessedFieldBinding.getModifiers() & Modifier.PUBLIC) != 0) {
                    SimpleName qualifier=subclassAST.newSimpleName(accessedFieldBinding.getDeclaringClass().getName());
                    if (newRightHandSideName.getParent() instanceof FieldAccess) {
                      FieldAccess fieldAccess=(FieldAccess)newRightHandSideName.getParent();
                      subclassRewriter.set(fieldAccess,FieldAccess.EXPRESSION_PROPERTY,qualifier,null);
                      methodInvocationArgumentsRewrite.insertLast(fieldAccess,null);
                    }
 else                     if (newRightHandSideName.getParent() instanceof QualifiedName) {
                      QualifiedName qualifiedName=(QualifiedName)newRightHandSideName.getParent();
                      methodInvocationArgumentsRewrite.insertLast(qualifiedName,null);
                    }
 else {
                      SimpleName simpleName=subclassAST.newSimpleName(newRightHandSideName.getIdentifier());
                      QualifiedName newQualifiedName=subclassAST.newQualifiedName(qualifier,simpleName);
                      subclassRewriter.replace(newRightHandSideName,newQualifiedName,null);
                      methodInvocationArgumentsRewrite.insertLast(newQualifiedName,null);
                    }
                  }
 else {
                    IMethodBinding getterMethodBinding=null;
                    if (superAccessedFields.contains(accessedFieldBinding)) {
                      getterMethodBinding=typeCheckElimination.getGetterMethodBindingOfSuperAccessedField(accessedFieldBinding);
                    }
 else {
                      getterMethodBinding=findGetterMethodInContext(accessedFieldBinding);
                    }
                    String rightHandMethodName;
                    if (getterMethodBinding != null) {
                      rightHandMethodName=getterMethodBinding.getName();
                    }
 else {
                      rightHandMethodName=accessedFieldBinding.getName();
                      rightHandMethodName="String_Node_Str" + rightHandMethodName.substring(0,1).toUpperCase() + rightHandMethodName.substring(1,rightHandMethodName.length());
                    }
                    MethodInvocation rightHandMethodInvocation=subclassAST.newMethodInvocation();
                    subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(rightHandMethodName),null);
                    subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
                    methodInvocationArgumentsRewrite.insertLast(rightHandMethodInvocation,null);
                  }
                  accessedFieldFound=true;
                  break;
                }
              }
              if (!accessedFieldFound)               methodInvocationArgumentsRewrite.insertLast(newAssignment.getRightHandSide(),null);
            }
 else {
              methodInvocationArgumentsRewrite.insertLast(newAssignment.getRightHandSide(),null);
            }
            subclassRewriter.replace(newAssignment,leftHandMethodInvocation,null);
            break;
          }
        }
      }
      if (newRightHandSideName != null && newRightHandSideName.equals(newSimpleName)) {
        for (        IVariableBinding accessedFieldBinding : accessedFieldBindings) {
          if (accessedFieldBinding.isEqualTo(oldRightHandSideName.resolveBinding())) {
            if ((accessedFieldBinding.getModifiers() & Modifier.STATIC) != 0 && (accessedFieldBinding.getModifiers() & Modifier.PUBLIC) != 0) {
              SimpleName qualifier=subclassAST.newSimpleName(accessedFieldBinding.getDeclaringClass().getName());
              if (newSimpleName.getParent() instanceof FieldAccess) {
                FieldAccess fieldAccess=(FieldAccess)newSimpleName.getParent();
                subclassRewriter.set(fieldAccess,FieldAccess.EXPRESSION_PROPERTY,qualifier,null);
              }
 else               if (!(newSimpleName.getParent() instanceof QualifiedName)) {
                SimpleName simpleName=subclassAST.newSimpleName(newSimpleName.getIdentifier());
                QualifiedName newQualifiedName=subclassAST.newQualifiedName(qualifier,simpleName);
                subclassRewriter.replace(newSimpleName,newQualifiedName,null);
              }
            }
 else {
              IMethodBinding getterMethodBinding=null;
              if (superAccessedFields.contains(accessedFieldBinding)) {
                getterMethodBinding=typeCheckElimination.getGetterMethodBindingOfSuperAccessedField(accessedFieldBinding);
              }
 else {
                getterMethodBinding=findGetterMethodInContext(accessedFieldBinding);
              }
              String rightHandMethodName;
              if (getterMethodBinding != null) {
                rightHandMethodName=getterMethodBinding.getName();
              }
 else {
                rightHandMethodName=accessedFieldBinding.getName();
                rightHandMethodName="String_Node_Str" + rightHandMethodName.substring(0,1).toUpperCase() + rightHandMethodName.substring(1,rightHandMethodName.length());
              }
              MethodInvocation rightHandMethodInvocation=subclassAST.newMethodInvocation();
              subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(rightHandMethodName),null);
              subclassRewriter.set(rightHandMethodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
              subclassRewriter.set(newAssignment,Assignment.RIGHT_HAND_SIDE_PROPERTY,rightHandMethodInvocation,null);
            }
            break;
          }
        }
      }
    }
 else {
      for (      IVariableBinding accessedFieldBinding : accessedFieldBindings) {
        if (accessedFieldBinding.isEqualTo(oldSimpleName.resolveBinding())) {
          if ((accessedFieldBinding.getModifiers() & Modifier.STATIC) != 0 && (accessedFieldBinding.getModifiers() & Modifier.PUBLIC) != 0) {
            SimpleName qualifier=subclassAST.newSimpleName(accessedFieldBinding.getDeclaringClass().getName());
            if (newSimpleName.getParent() instanceof FieldAccess) {
              FieldAccess fieldAccess=(FieldAccess)newSimpleName.getParent();
              subclassRewriter.set(fieldAccess,FieldAccess.EXPRESSION_PROPERTY,qualifier,null);
            }
 else             if (!(newSimpleName.getParent() instanceof QualifiedName)) {
              SimpleName simpleName=subclassAST.newSimpleName(newSimpleName.getIdentifier());
              QualifiedName newQualifiedName=subclassAST.newQualifiedName(qualifier,simpleName);
              subclassRewriter.replace(newSimpleName,newQualifiedName,null);
            }
          }
 else {
            IMethodBinding getterMethodBinding=null;
            if (superAccessedFields.contains(accessedFieldBinding)) {
              getterMethodBinding=typeCheckElimination.getGetterMethodBindingOfSuperAccessedField(accessedFieldBinding);
            }
 else {
              getterMethodBinding=findGetterMethodInContext(accessedFieldBinding);
            }
            String methodName;
            if (getterMethodBinding != null) {
              methodName=getterMethodBinding.getName();
            }
 else {
              methodName=accessedFieldBinding.getName();
              methodName="String_Node_Str" + methodName.substring(0,1).toUpperCase() + methodName.substring(1,methodName.length());
            }
            MethodInvocation methodInvocation=subclassAST.newMethodInvocation();
            subclassRewriter.set(methodInvocation,MethodInvocation.NAME_PROPERTY,subclassAST.newSimpleName(methodName),null);
            String invokerName=sourceTypeDeclaration.getName().getIdentifier();
            invokerName=invokerName.substring(0,1).toLowerCase() + invokerName.substring(1,invokerName.length());
            subclassRewriter.set(methodInvocation,MethodInvocation.EXPRESSION_PROPERTY,subclassAST.newSimpleName(invokerName),null);
            if (newSimpleName.getParent() instanceof FieldAccess) {
              FieldAccess fieldAccess=(FieldAccess)newSimpleName.getParent();
              subclassRewriter.replace(fieldAccess,methodInvocation,null);
            }
 else             if (newSimpleName.getParent() instanceof QualifiedName) {
              QualifiedName qualifiedName=(QualifiedName)newSimpleName.getParent();
              subclassRewriter.replace(qualifiedName,methodInvocation,null);
            }
 else {
              subclassRewriter.replace(newSimpleName,methodInvocation,null);
            }
          }
          break;
        }
      }
    }
    j++;
  }
}