Program: 11736
Project: 11736
Buggy source:
/** 
 * @since 2.9
 */
@Override public Diagnostic getMarkerDiagnostics(Object object,IFile file){
  if (file == null) {
    file=getFile(object);
  }
  if (object instanceof Resource) {
    Resource resource=(Resource)object;
    EditingDomain editingDomain=AdapterFactoryEditingDomain.getEditingDomainFor(resource.getResourceSet());
    BasicDiagnostic diagnostic=new BasicDiagnostic(getDiagnosticSource(),0,null,new Object[]{resource});
    if (file != null) {
      try {
        for (        IMarker marker : file.findMarkers(null,true,IResource.DEPTH_ZERO)) {
          String message=marker.getAttribute(IMarker.MESSAGE,"String_Node_Str");
          int severity=marker.getAttribute(IMarker.SEVERITY,IMarker.SEVERITY_INFO);
          String sourceID=marker.getAttribute(IMarker.SOURCE_ID,"String_Node_Str");
          List<?> data=getTargetObjects(editingDomain,marker);
          diagnostic.add(new BasicDiagnostic(severity == IMarker.SEVERITY_ERROR ? Diagnostic.ERROR : severity == IMarker.SEVERITY_WARNING ? Diagnostic.WARNING : Diagnostic.INFO,sourceID,0,message,data.toArray(new Object[data.size()])));
        }
      }
 catch (      CoreException exception) {
        CommonUIPlugin.INSTANCE.log(exception);
      }
    }
    for (    Resource.Diagnostic resourceDiagnostic : resource.getWarnings()) {
      diagnostic.add(new BasicDiagnostic(Diagnostic.WARNING,null,0,resourceDiagnostic.getMessage(),new Object[]{resource}));
    }
    for (    Resource.Diagnostic resourceDiagnostic : resource.getErrors()) {
      diagnostic.add(new BasicDiagnostic(Diagnostic.ERROR,null,0,resourceDiagnostic.getMessage(),new Object[]{resource}));
    }
    return diagnostic;
  }
 else {
    return super.getMarkerDiagnostics(object,file);
  }
}

Fixed version (ground truth):
/** 
 * @since 2.9
 */
@Override public Diagnostic getMarkerDiagnostics(Object object,IFile file){
  if (file == null) {
    file=getFile(object);
  }
  if (object instanceof Resource) {
    Resource resource=(Resource)object;
    EditingDomain editingDomain=AdapterFactoryEditingDomain.getEditingDomainFor(resource.getResourceSet());
    BasicDiagnostic diagnostic=new BasicDiagnostic(getDiagnosticSource(),0,null,new Object[]{resource});
    if (file != null && file.isAccessible()) {
      try {
        for (        IMarker marker : file.findMarkers(null,true,IResource.DEPTH_ZERO)) {
          String message=marker.getAttribute(IMarker.MESSAGE,"String_Node_Str");
          int severity=marker.getAttribute(IMarker.SEVERITY,IMarker.SEVERITY_INFO);
          String sourceID=marker.getAttribute(IMarker.SOURCE_ID,"String_Node_Str");
          List<?> data=getTargetObjects(editingDomain,marker);
          diagnostic.add(new BasicDiagnostic(severity == IMarker.SEVERITY_ERROR ? Diagnostic.ERROR : severity == IMarker.SEVERITY_WARNING ? Diagnostic.WARNING : Diagnostic.INFO,sourceID,0,message,data.toArray(new Object[data.size()])));
        }
      }
 catch (      CoreException exception) {
        CommonUIPlugin.INSTANCE.log(exception);
      }
    }
    for (    Resource.Diagnostic resourceDiagnostic : resource.getWarnings()) {
      diagnostic.add(new BasicDiagnostic(Diagnostic.WARNING,null,0,resourceDiagnostic.getMessage(),new Object[]{resource}));
    }
    for (    Resource.Diagnostic resourceDiagnostic : resource.getErrors()) {
      diagnostic.add(new BasicDiagnostic(Diagnostic.ERROR,null,0,resourceDiagnostic.getMessage(),new Object[]{resource}));
    }
    return diagnostic;
  }
 else {
    return super.getMarkerDiagnostics(object,file);
  }
}