Program: 148174
Project: 148174
Buggy source:
public void modifyText(ModifyEvent e){
  if (e != null && e.widget == typeNameText) {
    conceptPanel.setText(typeNameText.getText() + "String_Node_Str");
  }
  if (typeNameText.getText().trim().equals("String_Node_Str")) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (typeNameText.getText().replaceAll("String_Node_Str","String_Node_Str").length() != typeNameText.getText().length()) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (simpleTypeBtn.getSelection() && (elemPanel.getText().trim().equals("String_Node_Str") || elemPanel.getText().replaceAll("String_Node_Str","String_Node_Str").length() != elemPanel.getText().length())) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (complexTypeBtn.getSelection() && !conceptPanel.getText().trim().equals("String_Node_Str") && conceptPanel.getText().replaceAll("String_Node_Str","String_Node_Str").length() != conceptPanel.getText().length()) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else {
    EList list=schema.getElementDeclarations();
    for (Iterator iter=list.iterator(); iter.hasNext(); ) {
      XSDElementDeclaration decl=(XSDElementDeclaration)iter.next();
      if (decl.getName().equals(typeNameText.getText())) {
        infoLabel.setText("String_Node_Str");
        getButton(IDialogConstants.OK_ID).setEnabled(false);
        return;
      }
    }
    if ((e != null && e.widget == conceptPanel.getTypeCombo()) || (e == null && conceptPanel.getTypeCombo().isEnabled())) {
      validateType(conceptPanel.getText(),false);
      return;
    }
 else     if ((e != null && e.widget == elemPanel.getTypeCombo()) || (e == null && elemPanel.getTypeCombo().isEnabled())) {
      validateType(elemPanel.getText(),true);
      return;
    }
  }
  getButton(IDialogConstants.OK_ID).setEnabled(true);
  infoLabel.setText("String_Node_Str");
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (typeNameText.getText().trim().equals("String_Node_Str")) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (typeNameText.getText().replaceAll("String_Node_Str","String_Node_Str").length() != typeNameText.getText().length()) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (simpleTypeBtn.getSelection() && (elemPanel.getText().trim().equals("String_Node_Str") || elemPanel.getText().replaceAll("String_Node_Str","String_Node_Str").length() != elemPanel.getText().length())) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else   if (complexTypeBtn.getSelection() && !conceptPanel.getText().trim().equals("String_Node_Str") && conceptPanel.getText().replaceAll("String_Node_Str","String_Node_Str").length() != conceptPanel.getText().length()) {
    infoLabel.setText("String_Node_Str");
    getButton(IDialogConstants.OK_ID).setEnabled(false);
    return;
  }
 else {
    EList list=schema.getElementDeclarations();
    for (Iterator iter=list.iterator(); iter.hasNext(); ) {
      XSDElementDeclaration decl=(XSDElementDeclaration)iter.next();
      if (decl.getName().equals(typeNameText.getText())) {
        infoLabel.setText("String_Node_Str");
        getButton(IDialogConstants.OK_ID).setEnabled(false);
        return;
      }
    }
    if ((e != null && e.widget == conceptPanel.getTypeCombo()) || (e == null && conceptPanel.getTypeCombo().isEnabled())) {
      validateType(conceptPanel.getText(),false);
      return;
    }
 else     if ((e != null && e.widget == elemPanel.getTypeCombo()) || (e == null && elemPanel.getTypeCombo().isEnabled())) {
      validateType(elemPanel.getText(),true);
      return;
    }
  }
  getButton(IDialogConstants.OK_ID).setEnabled(true);
  infoLabel.setText("String_Node_Str");
}