Program: 17448
Project: 17448
Buggy source:
protected IDocument createDocument(Object element) throws CoreException {
  ICFDocument document=null;
  document=new ICFDocument();
  if (setDocumentContent(document,(IEditorInput)element,getEncoding(element))) {
    setupDocument(element,document);
  }
  if (document != null) {
    IDocumentPartitioner partitioner=new CFEDefaultPartitioner(new CFPartitionScanner(),new String[]{CFPartitionScanner.HTM_END_TAG,CFPartitionScanner.HTM_TAG_ATTRIBS,CFPartitionScanner.HTM_START_TAG_BEGIN,CFPartitionScanner.HTM_START_TAG_END,CFPartitionScanner.CF_COMMENT,CFPartitionScanner.HTM_COMMENT,CFPartitionScanner.DOCTYPE,CFPartitionScanner.CF_START_TAG_BEGIN,CFPartitionScanner.CF_START_TAG_END,CFPartitionScanner.CF_TAG_ATTRIBS,CFPartitionScanner.CF_END_TAG,CFPartitionScanner.CF_SCRIPT,CFPartitionScanner.J_SCRIPT,CFPartitionScanner.CSS,CFPartitionScanner.SQL,CFPartitionScanner.UNK_TAG,CFPartitionScanner.FORM_END_TAG,CFPartitionScanner.FORM_START_TAG_BEGIN,CFPartitionScanner.FORM_START_TAG_END,CFPartitionScanner.TABLE_END_TAG,CFPartitionScanner.TABLE_START_TAG_BEGIN,CFPartitionScanner.TABLE_START_TAG_END});
    partitioner.connect(document);
    try {
      if (element instanceof FileEditorInput) {
        document.setParserResource(((FileEditorInput)element).getFile());
        document.clearAllMarkers();
        document.parseDocument();
      }
 else       if (element instanceof JavaFileEditorInput) {
        String filepath=((JavaFileEditorInput)element).getPath(element).toString();
        Path path=new Path(filepath);
        Workspace workspace=(Workspace)CFMLPlugin.getWorkspace();
        ExternalFile file=new ExternalFile(path,workspace);
        model=file.getAnnotationModel();
        document.setParserResource(file);
        document.clearAllMarkers();
        document.parseDocument();
      }
 else       if (element instanceof RemoteFileEditorInput) {
        String filepath=((RemoteFileEditorInput)element).getPath(element).toString();
        Path path=new Path(filepath);
        Workspace workspace=(Workspace)CFMLPlugin.getWorkspace();
        ExternalFile file=new ExternalFile(path,workspace);
        model=file.getAnnotationModel();
        document.setParserResource(file);
        document.clearAllMarkers();
        document.parseDocument();
      }
    }
 catch (    Exception e) {
      e.printStackTrace(System.err);
    }
    document.setDocumentPartitioner(partitioner);
  }
  return document;
}

Fixed version (ground truth):
protected IDocument createDocument(Object element) throws CoreException {
  ICFDocument document=null;
  document=new ICFDocument();
  if (setDocumentContent(document,(IEditorInput)element,getEncoding(element))) {
    setupDocument(element,document);
  }
  if (document != null) {
    IDocumentPartitioner partitioner=new CFEDefaultPartitioner(new CFPartitionScanner(),new String[]{CFPartitionScanner.HTM_END_TAG,CFPartitionScanner.HTM_TAG_ATTRIBS,CFPartitionScanner.HTM_START_TAG_BEGIN,CFPartitionScanner.HTM_START_TAG_END,CFPartitionScanner.CF_COMMENT,CFPartitionScanner.HTM_COMMENT,CFPartitionScanner.DOCTYPE,CFPartitionScanner.CF_START_TAG_BEGIN,CFPartitionScanner.CF_START_TAG_END,CFPartitionScanner.CF_TAG_ATTRIBS,CFPartitionScanner.CF_END_TAG,CFPartitionScanner.CF_SCRIPT,CFPartitionScanner.J_SCRIPT,CFPartitionScanner.CSS,CFPartitionScanner.SQL,CFPartitionScanner.UNK_TAG,CFPartitionScanner.FORM_END_TAG,CFPartitionScanner.FORM_START_TAG_BEGIN,CFPartitionScanner.FORM_TAG_ATTRIBS,CFPartitionScanner.FORM_START_TAG_END,CFPartitionScanner.TABLE_END_TAG,CFPartitionScanner.TABLE_START_TAG_BEGIN,CFPartitionScanner.TABLE_TAG_ATTRIBS,CFPartitionScanner.TABLE_START_TAG_END});
    partitioner.connect(document);
    try {
      if (element instanceof FileEditorInput) {
        document.setParserResource(((FileEditorInput)element).getFile());
        document.clearAllMarkers();
        document.parseDocument();
      }
 else       if (element instanceof JavaFileEditorInput) {
        String filepath=((JavaFileEditorInput)element).getPath(element).toString();
        Path path=new Path(filepath);
        Workspace workspace=(Workspace)CFMLPlugin.getWorkspace();
        ExternalFile file=new ExternalFile(path,workspace);
        model=file.getAnnotationModel();
        document.setParserResource(file);
        document.clearAllMarkers();
        document.parseDocument();
      }
 else       if (element instanceof RemoteFileEditorInput) {
        String filepath=((RemoteFileEditorInput)element).getPath(element).toString();
        Path path=new Path(filepath);
        Workspace workspace=(Workspace)CFMLPlugin.getWorkspace();
        ExternalFile file=new ExternalFile(path,workspace);
        model=file.getAnnotationModel();
        document.setParserResource(file);
        document.clearAllMarkers();
        document.parseDocument();
      }
    }
 catch (    Exception e) {
      e.printStackTrace(System.err);
    }
    document.setDocumentPartitioner(partitioner);
  }
  return document;
}