Program: 91817
Project: 91817
Buggy source:
/** 
 * Validates the UST composite input data.
 * @return true if configured data is valid and can be retrieved.
 */
public boolean isValid(){
  fIsTracepoints=fTracepointsActivateButton.getSelection();
  fIsWildcard=fWildcardActivateButton.getSelection();
  fIsLogLevel=fLogLevelActivateButton.getSelection();
  fIsAllTracepoints=false;
  fSelectedEvents=new ArrayList<>();
  if (fIsTracepoints) {
    fIsAllTracepoints=fTracepointsViewer.getChecked(fProviderGroup);
    Set<String> set=new HashSet<>();
    Object[] checkedElements=fTracepointsViewer.getCheckedElements();
    for (int i=0; i < checkedElements.length; i++) {
      ITraceControlComponent component=(ITraceControlComponent)checkedElements[i];
      if (!set.contains(component.getName()) && (component instanceof BaseEventComponent)) {
        set.add(component.getName());
        fSelectedEvents.add(component.getName());
      }
    }
  }
  fLogLevelType=LogLevelType.LOGLEVEL_NONE;
  fLogLevelEventName=null;
  if (fIsLogLevel) {
    if (fLogLevelButton.getSelection()) {
      fLogLevelType=LogLevelType.LOGLEVEL;
    }
 else     if (fLogLevelOnlyButton.getSelection()) {
      fLogLevelType=LogLevelType.LOGLEVEL_ONLY;
    }
    String temp=fLogLevelEventNameText.getText();
    if (temp.isEmpty() || temp.matches("String_Node_Str") || (!temp.matches("String_Node_Str") && !temp.matches("String_Node_Str"))) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidLogLevelEventNameError + "String_Node_Str" + temp+ "String_Node_Str");
      return false;
    }
    fLogLevelEventName=temp;
    TraceLogLevel[] levels=TraceLogLevel.values();
    int id=fLogLevelCombo.getSelectionIndex();
    if (id < 0) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidLogLevel + "String_Node_Str" + temp+ "String_Node_Str");
      return false;
    }
    fLogLevel=levels[id];
  }
  fWildcard=null;
  if (fIsWildcard) {
    String tempWildcard=fWildcardText.getText();
    if (tempWildcard.isEmpty() || tempWildcard.matches("String_Node_Str") || (!tempWildcard.matches("String_Node_Str") && !tempWildcard.matches("String_Node_Str"))) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidWildcardError + "String_Node_Str" + tempWildcard+ "String_Node_Str");
      return false;
    }
    fWildcard=tempWildcard;
  }
  fFilterExpression=null;
  if (fProviderGroup.isEventFilteringSupported()) {
    String tempFilter=fFilterText.getText();
    if (!tempFilter.isEmpty() && !tempFilter.matches("String_Node_Str")) {
      fFilterExpression=tempFilter;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Validates the UST composite input data.
 * @return true if configured data is valid and can be retrieved.
 */
public boolean isValid(){
  fIsTracepoints=fTracepointsActivateButton.getSelection();
  fIsWildcard=fWildcardActivateButton.getSelection();
  fIsLogLevel=fLogLevelActivateButton.getSelection();
  fIsAllTracepoints=false;
  fSelectedEvents=new ArrayList<>();
  if (fIsTracepoints) {
    Set<String> set=new HashSet<>();
    Object[] checkedElements=fTracepointsViewer.getCheckedElements();
    int totalNbEvents=0;
    for (int i=0; i < checkedElements.length; i++) {
      ITraceControlComponent component=(ITraceControlComponent)checkedElements[i];
      if (component instanceof BaseEventComponent) {
        totalNbEvents++;
        if (!set.contains(component.getName())) {
          set.add(component.getName());
          fSelectedEvents.add(component.getName());
        }
      }
    }
    int nbUstEvents=0;
    List<ITraceControlComponent> comps=fProviderGroup.getChildren(UstProviderComponent.class);
    for (    ITraceControlComponent comp : comps) {
      nbUstEvents+=comp.getChildren().length;
    }
    fIsAllTracepoints=(nbUstEvents == totalNbEvents);
  }
  fLogLevelType=LogLevelType.LOGLEVEL_NONE;
  fLogLevelEventName=null;
  if (fIsLogLevel) {
    if (fLogLevelButton.getSelection()) {
      fLogLevelType=LogLevelType.LOGLEVEL;
    }
 else     if (fLogLevelOnlyButton.getSelection()) {
      fLogLevelType=LogLevelType.LOGLEVEL_ONLY;
    }
    String temp=fLogLevelEventNameText.getText();
    if (temp.isEmpty() || temp.matches("String_Node_Str") || (!temp.matches("String_Node_Str") && !temp.matches("String_Node_Str"))) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidLogLevelEventNameError + "String_Node_Str" + temp+ "String_Node_Str");
      return false;
    }
    fLogLevelEventName=temp;
    TraceLogLevel[] levels=TraceLogLevel.values();
    int id=fLogLevelCombo.getSelectionIndex();
    if (id < 0) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidLogLevel + "String_Node_Str" + temp+ "String_Node_Str");
      return false;
    }
    fLogLevel=levels[id];
  }
  fWildcard=null;
  if (fIsWildcard) {
    String tempWildcard=fWildcardText.getText();
    if (tempWildcard.isEmpty() || tempWildcard.matches("String_Node_Str") || (!tempWildcard.matches("String_Node_Str") && !tempWildcard.matches("String_Node_Str"))) {
      MessageDialog.openError(getShell(),Messages.TraceControl_EnableEventsDialogTitle,Messages.TraceControl_InvalidWildcardError + "String_Node_Str" + tempWildcard+ "String_Node_Str");
      return false;
    }
    fWildcard=tempWildcard;
  }
  fFilterExpression=null;
  if (fProviderGroup.isEventFilteringSupported()) {
    String tempFilter=fFilterText.getText();
    if (!tempFilter.isEmpty() && !tempFilter.matches("String_Node_Str")) {
      fFilterExpression=tempFilter;
    }
  }
  return true;
}