Program: 102324
Project: 102324
Buggy source:
void runFinish(IProgressMonitor monitor) throws InvocationTargetException {
  Stopwatch totalWatch=new Stopwatch();
  totalWatch.start();
  Stopwatch sWatch=new Stopwatch();
  try {
    sWatch.start();
    if (ppProcessorPack == null) {
      final JdbcSource src=getSource();
      final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(src,srcPg.getMetadataProcessor());
      final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
      processor.setIncludeIncompleteFKs(includeIncompleteFKs);
      processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
      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);
      }
      ModelUtilities.initializeModelContainers(resrc,"String_Node_Str",this);
      if (this.connectionProfile != null) {
        IConnectionInfoProvider provider=new JDBCConnectionInfoProvider();
        provider.setConnectionInfo(resrc,this.connectionProfile);
      }
      JdbcImportWizard.this.status=processor.execute(resrc,getDatabase(),src.getImportSettings(),monitor);
      ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
    }
 else {
      JdbcImportWizard.this.status=ppProcessorPack.getProcessor().execute(ppProcessorPack.getModelResource(),getDatabase(),ppProcessorPack.getJdbcSource().getImportSettings(),monitor);
    }
    sWatch.stop();
    if (!monitor.isCanceled() && JdbcImportWizard.this.status.getSeverity() != IStatus.ERROR) {
      IJdbcImportPostProcessor[] processors=getPostProcessors();
      for (int i=0; i < processors.length; ++i) {
        try {
          processors[i].postProcess(getImportInfoProvider());
        }
 catch (        Exception theException) {
          Util.log(IStatus.ERROR,theException,Util.getString(I18N_PREFIX + "String_Node_Str",processors[i].getClass()));
        }
      }
    }
    if (JdbcImportWizard.this.status.getSeverity() != IStatus.ERROR) {
      sWatch.start(true);
      final List objs=ppProcessorPack.getModelResource().getAllRootEObjects();
      for (final Iterator iter=objs.iterator(); iter.hasNext(); ) {
        if (iter.next() instanceof JdbcSource) {
          iter.remove();
          break;
        }
      }
      ppProcessorPack.getJdbcSource().setJdbcDriver(null);
      objs.add(ppProcessorPack.getJdbcSource());
      sWatch.stop();
      sWatch.start(true);
      ppProcessorPack.getModelResource().save(monitor,true);
      sWatch.stop();
      sWatch.start(true);
      final IResource resrc=this.folder.findMember(getModelName());
      if (resrc != null) {
        resrc.refreshLocal(IResource.DEPTH_INFINITE,monitor);
      }
      sWatch.stop();
      sWatch.start(true);
      ModelEditorManager.activate(ppProcessorPack.getModelFile(),true);
      sWatch.stop();
    }
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
    ppProcessorPack=null;
    totalWatch.stop();
  }
}

Fixed version (ground truth):
void runFinish(IProgressMonitor monitor) throws InvocationTargetException {
  Stopwatch totalWatch=new Stopwatch();
  totalWatch.start();
  Stopwatch sWatch=new Stopwatch();
  try {
    sWatch.start();
    if (ppProcessorPack == null) {
      final JdbcSource src=getSource();
      final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(srcPg.getMetadataProcessor());
      final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
      processor.setIncludeIncompleteFKs(includeIncompleteFKs);
      processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
      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);
      }
      ModelUtilities.initializeModelContainers(resrc,"String_Node_Str",this);
      if (this.connectionProfile != null) {
        IConnectionInfoProvider provider=new JDBCConnectionInfoProvider();
        provider.setConnectionInfo(resrc,this.connectionProfile);
      }
      JdbcImportWizard.this.status=processor.execute(resrc,getDatabase(),src.getImportSettings(),monitor);
      ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
    }
 else {
      JdbcImportWizard.this.status=ppProcessorPack.getProcessor().execute(ppProcessorPack.getModelResource(),getDatabase(),ppProcessorPack.getJdbcSource().getImportSettings(),monitor);
    }
    sWatch.stop();
    if (!monitor.isCanceled() && JdbcImportWizard.this.status.getSeverity() != IStatus.ERROR) {
      IJdbcImportPostProcessor[] processors=getPostProcessors();
      for (int i=0; i < processors.length; ++i) {
        try {
          processors[i].postProcess(getImportInfoProvider());
        }
 catch (        Exception theException) {
          Util.log(IStatus.ERROR,theException,Util.getString(I18N_PREFIX + "String_Node_Str",processors[i].getClass()));
        }
      }
    }
    if (JdbcImportWizard.this.status.getSeverity() != IStatus.ERROR) {
      sWatch.start(true);
      final List objs=ppProcessorPack.getModelResource().getAllRootEObjects();
      for (final Iterator iter=objs.iterator(); iter.hasNext(); ) {
        if (iter.next() instanceof JdbcSource) {
          iter.remove();
          break;
        }
      }
      ppProcessorPack.getJdbcSource().setJdbcDriver(null);
      objs.add(ppProcessorPack.getJdbcSource());
      sWatch.stop();
      sWatch.start(true);
      ppProcessorPack.getModelResource().save(monitor,true);
      sWatch.stop();
      sWatch.start(true);
      final IResource resrc=this.folder.findMember(getModelName());
      if (resrc != null) {
        resrc.refreshLocal(IResource.DEPTH_INFINITE,monitor);
      }
      sWatch.stop();
      sWatch.start(true);
      ModelEditorManager.activate(ppProcessorPack.getModelFile(),true);
      sWatch.stop();
    }
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
    ppProcessorPack=null;
    totalWatch.stop();
  }
}