Program: 102325
Project: 102325
Buggy source:
/** 
 * @see com.metamatrix.modeler.jdbc.ui.wizards.IJdbcImportInfoProvider#getDifferenceReport()
 * @since 5.0
 */
public List getDifferenceReports(){
  final List reports=new ArrayList();
  if (drDifferenceReport == null || diffTargetChanged(drDifferenceReport)) {
    final IRunnableWithProgress op=new IRunnableWithProgress(){
      public void run(      final IProgressMonitor monitor) throws InvocationTargetException {
        try {
          final JdbcSource src=getSource();
          final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(src,srcPg.getMetadataProcessor());
          processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
          final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
          processor.setIncludeIncompleteFKs(includeIncompleteFKs);
          final IFile modelFile=getFolder().getFile(new Path(getModelName()));
          final ModelResource resrc=ModelerCore.create(modelFile);
          final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
          modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
          modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
          if (resrc instanceof ModelResourceImpl) {
            ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
          }
          if (processor instanceof RelationalModelProcessorImpl) {
            JdbcImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
          }
          ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
        }
 catch (        final OperationCanceledException err) {
        }
catch (        final Exception err) {
          throw new InvocationTargetException(err);
        }
 finally {
          monitor.done();
        }
      }
    }
;
    try {
      new ProgressMonitorDialog(getShell()).run(true,true,op);
    }
 catch (    Throwable err) {
      if (err instanceof InvocationTargetException) {
        err=((InvocationTargetException)err).getTargetException();
      }
      JdbcUiUtil.showError(err,IMPORT_ERROR_MESSAGE);
    }
  }
  if (drDifferenceReport != null) {
    reports.add(drDifferenceReport);
  }
  return reports;
}

Fixed version (ground truth):
/** 
 * @see com.metamatrix.modeler.jdbc.ui.wizards.IJdbcImportInfoProvider#getDifferenceReport()
 * @since 5.0
 */
public List getDifferenceReports(){
  final List reports=new ArrayList();
  if (drDifferenceReport == null || diffTargetChanged(drDifferenceReport)) {
    final IRunnableWithProgress op=new IRunnableWithProgress(){
      public void run(      final IProgressMonitor monitor) throws InvocationTargetException {
        try {
          final JdbcSource src=getSource();
          final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(srcPg.getMetadataProcessor());
          processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
          final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
          processor.setIncludeIncompleteFKs(includeIncompleteFKs);
          final IFile modelFile=getFolder().getFile(new Path(getModelName()));
          final ModelResource resrc=ModelerCore.create(modelFile);
          final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
          modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
          modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
          if (resrc instanceof ModelResourceImpl) {
            ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
          }
          if (processor instanceof RelationalModelProcessorImpl) {
            JdbcImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
          }
          ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
        }
 catch (        final OperationCanceledException err) {
        }
catch (        final Exception err) {
          throw new InvocationTargetException(err);
        }
 finally {
          monitor.done();
        }
      }
    }
;
    try {
      new ProgressMonitorDialog(getShell()).run(true,true,op);
    }
 catch (    Throwable err) {
      if (err instanceof InvocationTargetException) {
        err=((InvocationTargetException)err).getTargetException();
      }
      JdbcUiUtil.showError(err,IMPORT_ERROR_MESSAGE);
    }
  }
  if (drDifferenceReport != null) {
    reports.add(drDifferenceReport);
  }
  return reports;
}