Program: 53530
Project: 53530
Buggy source:
protected void endVisit(TypeDeclaration x){
  JDeclaredType type=curClass.type;
  if (type.getSuperClass() != null) {
    JMethod myClinit=type.getClinitMethod();
    JMethod superClinit=type.getSuperClass().getClinitMethod();
    JMethodCall superClinitCall=new JMethodCall(myClinit.getSourceInfo(),null,superClinit);
    JMethodBody body=(JMethodBody)myClinit.getBody();
    body.getBlock().addStmt(0,superClinitCall.makeStatement());
  }
  if (isSyntheticGetClassNeeded(x,type)) {
    implementGetClass(type);
  }
  if (type instanceof JEnumType) {
    processEnumType((JEnumType)type);
  }
  if (type instanceof JClassType) {
    addBridgeMethods(x.binding);
  }
  Binding[] rescues=artificialRescues.get(x);
  if (rescues != null) {
    for (    Binding rescue : rescues) {
      if (rescue instanceof TypeBinding) {
        type.addArtificialRescue(typeMap.get((TypeBinding)rescue));
      }
 else       if (rescue instanceof FieldBinding) {
        type.addArtificialRescue(typeMap.get((FieldBinding)rescue));
      }
 else       if (rescue instanceof MethodBinding) {
        type.addArtificialRescue(typeMap.get((MethodBinding)rescue));
      }
 else {
        throw new InternalCompilerException("String_Node_Str");
      }
    }
  }
  if (JsInteropUtil.isClassWideJsExport(x)) {
    for (    JMethod m : type.getMethods()) {
      if (m.getExportName() != null) {
        continue;
      }
      if (m.getAccess() == AccessModifier.PUBLIC && (m.isStatic() || (m instanceof JConstructor && !((JConstructor)m).isDefaultConstructor()))) {
        m.setExportName("String_Node_Str");
      }
    }
    for (    JField f : type.getFields()) {
      if (f.getExportName() != null) {
        continue;
      }
      if (f.isStatic()) {
        f.setExportName("String_Node_Str");
      }
    }
  }
  JsInteropUtil.maybeSetJsNamespace(type,x);
  curClass=classStack.pop();
}

Fixed version (ground truth):
protected void endVisit(TypeDeclaration x){
  JDeclaredType type=curClass.type;
  if (type.getSuperClass() != null) {
    JMethod myClinit=type.getClinitMethod();
    JMethod superClinit=type.getSuperClass().getClinitMethod();
    JMethodCall superClinitCall=new JMethodCall(myClinit.getSourceInfo(),null,superClinit);
    JMethodBody body=(JMethodBody)myClinit.getBody();
    body.getBlock().addStmt(0,superClinitCall.makeStatement());
  }
  if (isSyntheticGetClassNeeded(x,type)) {
    implementGetClass(type);
  }
  if (type instanceof JEnumType) {
    processEnumType((JEnumType)type);
  }
  if (type instanceof JClassType) {
    addBridgeMethods(x.binding);
  }
  Binding[] rescues=artificialRescues.get(x);
  if (rescues != null) {
    for (    Binding rescue : rescues) {
      if (rescue instanceof TypeBinding) {
        type.addArtificialRescue(typeMap.get((TypeBinding)rescue));
      }
 else       if (rescue instanceof FieldBinding) {
        type.addArtificialRescue(typeMap.get((FieldBinding)rescue));
      }
 else       if (rescue instanceof MethodBinding) {
        type.addArtificialRescue(typeMap.get((MethodBinding)rescue));
      }
 else {
        throw new InternalCompilerException("String_Node_Str");
      }
    }
  }
  if (JsInteropUtil.isClassWideJsExport(x)) {
    for (    JMethod m : type.getMethods()) {
      if (m.getExportName() != null) {
        continue;
      }
      if (m.getAccess() == AccessModifier.PUBLIC && (m.isStatic() || (m instanceof JConstructor))) {
        m.setExportName("String_Node_Str");
      }
    }
    for (    JField f : type.getFields()) {
      if (f.getExportName() != null) {
        continue;
      }
      if (f.isStatic()) {
        f.setExportName("String_Node_Str");
      }
    }
  }
  JsInteropUtil.maybeSetJsNamespace(type,x);
  curClass=classStack.pop();
}