Program: 138172
Project: 138172
Buggy source:
@Override public void mouseDown(MouseEvent e){
  DataManager dm=analysis.getContext().getConnection();
  if (dm == null) {
    masterPage.doSave(null);
  }
  IRepositoryNode patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERN_REGEX);
  CheckedTreeSelectionDialog dialog=PatternUtilities.createPatternCheckedTreeSelectionDialog(patternFolderNode);
  if (null != filters) {
    for (    ViewerFilter filter : filters) {
      dialog.addFilter(filter);
    }
  }
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  if (AnalysisType.COLUMN_SET.equals(analysisType)) {
    if (ExecutionLanguage.SQL.equals(executionLanguage)) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
      return;
    }
  }
  if (dialog.open() == Window.OK) {
    for (    Object obj : dialog.getResult()) {
      if (obj instanceof PatternRepNode) {
        PatternRepNode patternNode=(PatternRepNode)obj;
        TypedReturnCode<IndicatorUnit> trc=PatternUtilities.createIndicatorUnit(patternNode.getPattern(),meIndicator,analysis);
        if (trc.isOk()) {
          columnDropTree.createOneUnit(treeItem,trc.getObject());
          columnDropTree.setDirty(true);
        }
 else         if (trc.getMessage() != null && !trc.getMessage().trim().equals("String_Node_Str")) {
          MessageUI.openError(trc.getMessage());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  DataManager dm=analysis.getContext().getConnection();
  if (dm == null) {
    masterPage.doSave(null);
  }
  IRepositoryNode patternFolderNode=null;
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  if (AnalysisType.COLUMN_SET.equals(analysisType)) {
    if (ExecutionLanguage.SQL.equals(executionLanguage)) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
      return;
    }
 else     if (ExecutionLanguage.JAVA.equals(executionLanguage)) {
      patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERN_REGEX);
    }
  }
 else   if (AnalysisType.MULTIPLE_COLUMN.equals(analysisType)) {
    if (ExecutionLanguage.JAVA.equals(executionLanguage)) {
      patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERN_REGEX);
    }
  }
  if (null == patternFolderNode) {
    patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERNS);
  }
  CheckedTreeSelectionDialog dialog=PatternUtilities.createPatternCheckedTreeSelectionDialog(patternFolderNode);
  if (null != filters) {
    for (    ViewerFilter filter : filters) {
      dialog.addFilter(filter);
    }
  }
  if (dialog.open() == Window.OK) {
    for (    Object obj : dialog.getResult()) {
      if (obj instanceof PatternRepNode) {
        PatternRepNode patternNode=(PatternRepNode)obj;
        TypedReturnCode<IndicatorUnit> trc=PatternUtilities.createIndicatorUnit(patternNode.getPattern(),meIndicator,analysis);
        if (trc.isOk()) {
          columnDropTree.createOneUnit(treeItem,trc.getObject());
          columnDropTree.setDirty(true);
        }
 else         if (trc.getMessage() != null && !trc.getMessage().trim().equals("String_Node_Str")) {
          MessageUI.openError(trc.getMessage());
        }
      }
    }
  }
}