Program: 119838
Project: 119838
Buggy source:
/** 
 * Create the child node of the input node
 * @param node
 */
private boolean createChildNode(HL7TreeNode node){
  if (node.getColumn() != null) {
    if (!MessageDialog.openConfirm(xmlViewer.getControl().getShell(),"String_Node_Str","String_Node_Str" + node.getLabel() + "String_Node_Str")) {
      return false;
    }
    node.setColumn(null);
  }
  String label="String_Node_Str";
  final String nodeLabel=node.getLabel() + "String_Node_Str";
  while (!StringUtil.validateLabelForXML(label)) {
    InputDialog dialog=new InputDialog(null,"String_Node_Str","String_Node_Str",nodeLabel,null){
      @Override protected void okPressed(){
        String eleName=this.getValue();
        super.okPressed();
      }
    }
;
    dialog.setErrorMessage("String_Node_Str");
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return false;
    }
  }
  HL7TreeNode child=new Element(label);
  if (node.getRow() == null || node.getRow().equals("String_Node_Str")) {
    if (hl7ui != null && hl7ui.gethl7Manager() instanceof HL7OutputManager) {
      child.setRow(((HL7OutputManager)hl7ui.gethl7Manager()).getCurrentSchema(false));
    }
  }
 else {
    child.setRow(node.getRow());
  }
  node.addChild(child);
  this.xmlViewer.refresh();
  this.xmlViewer.expandAll();
  return true;
}

Fixed version (ground truth):
/** 
 * Create the child node of the input node
 * @param node
 */
private boolean createChildNode(final HL7TreeNode node){
  if (node.getColumn() != null) {
    if (!MessageDialog.openConfirm(xmlViewer.getControl().getShell(),"String_Node_Str","String_Node_Str" + node.getLabel() + "String_Node_Str")) {
      return false;
    }
    node.setColumn(null);
  }
  String label="String_Node_Str";
  final String nodeLabel=node.getLabel() + "String_Node_Str";
  while (!StringUtil.validateLabelForXML(label)) {
    IInputValidator validator=new IInputValidator(){
      public String isValid(      String newText){
        if (newText != null) {
          String text=newText.trim();
          for (          HL7TreeNode children : node.getChildren()) {
            if (text.equals(children.getLabel())) {
              return "String_Node_Str";
            }
          }
        }
        return null;
      }
    }
;
    InputDialog dialog=new InputDialog(null,"String_Node_Str","String_Node_Str",nodeLabel,validator){
      @Override protected void okPressed(){
        super.okPressed();
      }
    }
;
    dialog.setErrorMessage("String_Node_Str");
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return false;
    }
  }
  HL7TreeNode child=new Element(label);
  if (node.getRow() == null || node.getRow().equals("String_Node_Str")) {
    if (hl7ui != null && hl7ui.gethl7Manager() instanceof HL7OutputManager) {
      child.setRow(((HL7OutputManager)hl7ui.gethl7Manager()).getCurrentSchema(false));
    }
  }
 else {
    child.setRow(node.getRow());
  }
  node.addChild(child);
  this.xmlViewer.refresh();
  this.xmlViewer.expandAll();
  return true;
}