Program: 139775
Project: 139775
Buggy source:
private ReturnCode changedDatabaseConnection() throws ReloadCompareException {
  Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
  final EList<ModelElement> analyzedElements=synAnalysis.getContext().getAnalysedElements();
  if (analyzedElements == null || analyzedElements.size() == 0) {
    return new ReturnCode(Boolean.FALSE);
  }
  boolean retCode=MessageDialog.openQuestion(shell,"String_Node_Str","String_Node_Str");
  if (retCode) {
    if (analyzedElements.get(0) instanceof Column) {
      anaEleSynDialog=new AnalyzedColumnsSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
 else     if (analyzedElements.get(0) instanceof ColumnSet) {
      anaEleSynDialog=new AnalyzedColumnSetsSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
 else     if (analyzedElements.get(0) instanceof Package) {
      anaEleSynDialog=new AnalyzedPackageSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
    final List<SynTreeModel> treeModelLs=anaEleSynDialog.getSynInputModel();
    if (treeModelLs != null && treeModelLs.size() > 0) {
      boolean isReload=MessageDialog.openQuestion(shell,"String_Node_Str","String_Node_Str");
      if (isReload) {
        ModelElement newDataProviderModel=treeModelLs.get(0).getNewDataProvElement();
        if (newDataProviderModel != null && (newDataProviderModel instanceof ColumnSet || newDataProviderModel instanceof Package)) {
          if (newDataProviderModel instanceof Package) {
            IRunnableWithProgress op=new IRunnableWithProgress(){
              public void run(              IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
                  reloadByColumnSetFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                  if (analyzedElements.get(0) instanceof Column) {
                    reloadByColumnFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                  }
                }
 catch (                ReloadCompareException e) {
                  log.error(e,e);
                }
              }
            }
;
            try {
              ProgressUI.popProgressDialog(op);
            }
 catch (            InvocationTargetException e) {
              log.error(e,e);
            }
catch (            InterruptedException e) {
              log.error(e,e);
            }
          }
 else           if (newDataProviderModel instanceof ColumnSet) {
            IRunnableWithProgress op=new IRunnableWithProgress(){
              public void run(              IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
                  reloadByColumnFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                }
 catch (                ReloadCompareException e) {
                  log.error(e,e);
                }
              }
            }
;
            try {
              ProgressUI.popProgressDialog(op);
            }
 catch (            InvocationTargetException e) {
              log.error(e,e);
            }
catch (            InterruptedException e) {
              log.error(e,e);
            }
          }
        }
      }
    }
    if (treeModelLs != null && treeModelLs.size() > 0) {
      int returnCode=anaEleSynDialog.open();
      if (returnCode != Window.OK) {
        return new ReturnCode(Boolean.FALSE);
      }
    }
    boolean isExistSynedElement=synAnalyzedElements(anaEleSynDialog,synAnalysis,oldDataProvider,newDataProvider);
    if (isExistSynedElement) {
      DependenciesHandler.getInstance().setDependencyOn(synAnalysis,newDataProvider);
      PrvResourceFileHelper.getInstance().save(newDataProvider);
    }
    AnaResourceFileHelper.getInstance().save(synAnalysis);
  }
 else {
    return new ReturnCode(Boolean.FALSE);
  }
  return new ReturnCode(Boolean.TRUE);
}

Fixed version (ground truth):
private ReturnCode changedDatabaseConnection() throws ReloadCompareException {
  Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
  final EList<ModelElement> analyzedElements=synAnalysis.getContext().getAnalysedElements();
  if (analyzedElements == null || analyzedElements.size() == 0) {
    return new ReturnCode(Boolean.TRUE);
  }
  boolean retCode=MessageDialog.openQuestion(shell,"String_Node_Str","String_Node_Str");
  if (retCode) {
    if (analyzedElements.get(0) instanceof Column) {
      anaEleSynDialog=new AnalyzedColumnsSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
 else     if (analyzedElements.get(0) instanceof ColumnSet) {
      anaEleSynDialog=new AnalyzedColumnSetsSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
 else     if (analyzedElements.get(0) instanceof Package) {
      anaEleSynDialog=new AnalyzedPackageSynDialog(shell,synAnalysis,newDataProvider,analyzedElements);
    }
    final List<SynTreeModel> treeModelLs=anaEleSynDialog.getSynInputModel();
    if (treeModelLs != null && treeModelLs.size() > 0) {
      boolean isReload=MessageDialog.openQuestion(shell,"String_Node_Str","String_Node_Str");
      if (isReload) {
        ModelElement newDataProviderModel=treeModelLs.get(0).getNewDataProvElement();
        if (newDataProviderModel != null && (newDataProviderModel instanceof ColumnSet || newDataProviderModel instanceof Package)) {
          if (newDataProviderModel instanceof Package) {
            IRunnableWithProgress op=new IRunnableWithProgress(){
              public void run(              IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
                  reloadByColumnSetFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                  if (analyzedElements.get(0) instanceof Column) {
                    reloadByColumnFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                  }
                }
 catch (                ReloadCompareException e) {
                  log.error(e,e);
                }
              }
            }
;
            try {
              ProgressUI.popProgressDialog(op);
            }
 catch (            InvocationTargetException e) {
              log.error(e,e);
            }
catch (            InterruptedException e) {
              log.error(e,e);
            }
          }
 else           if (newDataProviderModel instanceof ColumnSet) {
            IRunnableWithProgress op=new IRunnableWithProgress(){
              public void run(              IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
                  reloadByColumnFolderLevel(treeModelLs,anaEleSynDialog,newDataProvider);
                }
 catch (                ReloadCompareException e) {
                  log.error(e,e);
                }
              }
            }
;
            try {
              ProgressUI.popProgressDialog(op);
            }
 catch (            InvocationTargetException e) {
              log.error(e,e);
            }
catch (            InterruptedException e) {
              log.error(e,e);
            }
          }
        }
      }
    }
    if (treeModelLs != null && treeModelLs.size() > 0) {
      int returnCode=anaEleSynDialog.open();
      if (returnCode != Window.OK) {
        return new ReturnCode(Boolean.FALSE);
      }
    }
    boolean isExistSynedElement=synAnalyzedElements(anaEleSynDialog,synAnalysis,oldDataProvider,newDataProvider);
    if (isExistSynedElement) {
      DependenciesHandler.getInstance().setDependencyOn(synAnalysis,newDataProvider);
      PrvResourceFileHelper.getInstance().save(newDataProvider);
    }
    AnaResourceFileHelper.getInstance().save(synAnalysis);
  }
 else {
    return new ReturnCode(Boolean.FALSE);
  }
  return new ReturnCode(Boolean.TRUE);
}