Program: 17469
Project: 17469
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.ALL_TAG,CFPartitionScanner.CF_COMMENT,CFPartitionScanner.HTM_COMMENT,CFPartitionScanner.DOCTYPE,CFPartitionScanner.CF_TAG,CFPartitionScanner.CF_END_TAG,CFPartitionScanner.CF_SCRIPT,CFPartitionScanner.J_SCRIPT,CFPartitionScanner.CSS_TAG,CFPartitionScanner.UNK_TAG,CFPartitionScanner.FORM_TAG,CFPartitionScanner.TABLE_TAG});
    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 FtpFileEditorInput) {
        String filepath=((FtpFileEditorInput)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.ALL_TAG,CFPartitionScanner.CF_COMMENT,CFPartitionScanner.HTM_COMMENT,CFPartitionScanner.DOCTYPE,CFPartitionScanner.CF_TAG,CFPartitionScanner.CF_END_TAG,CFPartitionScanner.CF_SCRIPT,CFPartitionScanner.J_SCRIPT,CFPartitionScanner.CSS_TAG,CFPartitionScanner.UNK_TAG,CFPartitionScanner.FORM_TAG,CFPartitionScanner.TABLE_TAG});
    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;
}