Program: 83361
Project: 83361
Buggy source:
JMethodCall processSuperConstructorCall(ExplicitConstructorCall x){
  SourceInfo info=makeSourceInfo(x);
  JMethod ctor=(JMethod)typeMap.get(x.binding);
  JExpression trueQualifier=createThisRef(info,currentClass);
  JMethodCall call=new JMethodCall(program,info,trueQualifier,ctor);
  ReferenceBinding superClass=x.binding.declaringClass;
  if (superClass instanceof NestedTypeBinding && !superClass.isStatic()) {
    NestedTypeBinding myBinding=(NestedTypeBinding)currentClassScope.referenceType().binding;
    NestedTypeBinding superBinding=(NestedTypeBinding)superClass;
    if (superBinding.enclosingInstances != null) {
      JExpression qualifier=dispProcessExpression(x.qualification);
      for (int j=0; j < superBinding.enclosingInstances.length; ++j) {
        SyntheticArgumentBinding arg=superBinding.enclosingInstances[j];
        JClassType classType=(JClassType)typeMap.get(arg.type);
        if (qualifier == null) {
          List workList=new ArrayList();
          Iterator paramIt=currentMethod.params.iterator();
          for (int i=0; i < myBinding.enclosingInstances.length; ++i) {
            workList.add(createVariableRef(info,(JParameter)paramIt.next()));
          }
          call.getArgs().add(createThisRef(classType,workList));
        }
 else {
          call.getArgs().add(createThisRef(classType,qualifier));
        }
      }
    }
    if (superBinding.outerLocalVariables != null) {
      for (int j=0; j < superBinding.outerLocalVariables.length; ++j) {
        SyntheticArgumentBinding arg=superBinding.outerLocalVariables[j];
        JType varType=(JType)typeMap.get(arg.type);
        String varName=String.valueOf(arg.name);
        JParameter param=null;
        for (int i=0; i < currentMethod.params.size(); ++i) {
          JParameter paramIt=(JParameter)currentMethod.params.get(i);
          if (varType == paramIt.getType() && varName.equals(paramIt.getName())) {
            param=paramIt;
          }
        }
        if (param == null) {
          throw new InternalCompilerException("String_Node_Str");
        }
        call.getArgs().add(createVariableRef(info,param));
      }
    }
  }
  if (x.arguments != null) {
    for (int i=0, n=x.arguments.length; i < n; ++i) {
      call.getArgs().add(dispProcessExpression(x.arguments[i]));
    }
  }
  return call;
}

Fixed version (ground truth):
JMethodCall processSuperConstructorCall(ExplicitConstructorCall x){
  SourceInfo info=makeSourceInfo(x);
  JMethod ctor=(JMethod)typeMap.get(x.binding);
  JExpression trueQualifier=createThisRef(info,currentClass);
  JMethodCall call=new JMethodCall(program,info,trueQualifier,ctor);
  if (x.arguments != null) {
    for (int i=0, n=x.arguments.length; i < n; ++i) {
      call.getArgs().add(dispProcessExpression(x.arguments[i]));
    }
  }
  ReferenceBinding superClass=x.binding.declaringClass;
  if (superClass instanceof NestedTypeBinding && !superClass.isStatic()) {
    NestedTypeBinding myBinding=(NestedTypeBinding)currentClassScope.referenceType().binding;
    NestedTypeBinding superBinding=(NestedTypeBinding)superClass;
    if (superBinding.enclosingInstances != null) {
      JExpression qualifier=dispProcessExpression(x.qualification);
      for (int j=0; j < superBinding.enclosingInstances.length; ++j) {
        SyntheticArgumentBinding arg=superBinding.enclosingInstances[j];
        JClassType classType=(JClassType)typeMap.get(arg.type);
        if (qualifier == null) {
          List workList=new ArrayList();
          Iterator paramIt=getSyntheticsIterator(currentMethod);
          for (int i=0; i < myBinding.enclosingInstances.length; ++i) {
            workList.add(createVariableRef(info,(JParameter)paramIt.next()));
          }
          call.getArgs().add(createThisRef(classType,workList));
        }
 else {
          call.getArgs().add(createThisRef(classType,qualifier));
        }
      }
    }
    if (superBinding.outerLocalVariables != null) {
      for (int j=0; j < superBinding.outerLocalVariables.length; ++j) {
        SyntheticArgumentBinding arg=superBinding.outerLocalVariables[j];
        JType varType=(JType)typeMap.get(arg.type);
        String varName=String.valueOf(arg.name);
        JParameter param=null;
        for (int i=0; i < currentMethod.params.size(); ++i) {
          JParameter paramIt=(JParameter)currentMethod.params.get(i);
          if (varType == paramIt.getType() && varName.equals(paramIt.getName())) {
            param=paramIt;
          }
        }
        if (param == null) {
          throw new InternalCompilerException("String_Node_Str");
        }
        call.getArgs().add(createVariableRef(info,param));
      }
    }
  }
  return call;
}