Program: 87373
Project: 87373
Buggy source:
@Override public void addOverlayWidget(final OverlayWidget child,int index,boolean skipValidation){
  if (child == null)   throw new NullPointerException("String_Node_Str");
  boolean vetoed=false;
  if (listener != null)   vetoed=listener.beforeOverlayWidgetAdded(this,child);
  if (!vetoed) {
    if (!skipValidation) {
      OverlayWidget wildCard=null;
      if (!getAllowedChildTypes().contains(wildCard)) {
        boolean canAdd=false;
        for (        OverlayWidget allowed : getAllowedChildTypes()) {
          if (allowed.getType().equalsIgnoreCase(child.getType()) && allowed.getNamespaceURI().equalsIgnoreCase(child.getNamespaceURI())) {
            canAdd=true;
          }
        }
        if (!canAdd) {
          LOG.warning(getType() + "String_Node_Str" + child);
        }
      }
      if (child.getParentOverlayWidget() != null) {
        if (child.getParentOverlayWidget().getChildOverlayWidgets().contains(child)) {
          child.getParentOverlayWidget().removeOverlayWidget(child);
        }
      }
    }
    if (index == -1) {
      if (!childOverlayWidgets.add(child)) {
        throw new RuntimeException("String_Node_Str" + child.getType());
      }
    }
 else {
      if (index > childOverlayWidgets.size()) {
        throw new RuntimeException("String_Node_Str" + index + "String_Node_Str"+ childOverlayWidgets.size());
      }
      childOverlayWidgets.add(index,child);
    }
    child.setParentOverlayWidget(this);
    if (listener != null)     listener.afterOverlayWidgetAdded(this,child);
  }
 else {
    LOG.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void addOverlayWidget(final OverlayWidget child,int index,boolean skipValidation){
  if (child == null)   throw new NullPointerException("String_Node_Str");
  boolean vetoed=false;
  if (listener != null)   vetoed=listener.beforeOverlayWidgetAdded(this,child);
  if (!vetoed) {
    if (!skipValidation) {
      OverlayWidget wildCard=null;
      if (!getAllowedChildTypes().contains(wildCard)) {
        boolean canAdd=false;
        for (        OverlayWidget allowed : getAllowedChildTypes()) {
          if (allowed.getType().equalsIgnoreCase(child.getType()) && allowed.getNamespaceURI().equalsIgnoreCase(child.getNamespaceURI())) {
            canAdd=true;
          }
        }
        if (!canAdd) {
          LOG.warning(getType() + "String_Node_Str" + child);
        }
      }
      if (child.getParentOverlayWidget() != null) {
        if (child.getParentOverlayWidget().getChildOverlayWidgets().contains(child)) {
          child.getParentOverlayWidget().removeOverlayWidget(child);
        }
      }
    }
    if (index == -1 || index == childOverlayWidgets.size()) {
      if (!childOverlayWidgets.add(child)) {
        throw new RuntimeException("String_Node_Str" + child.getType());
      }
    }
 else {
      if (index >= childOverlayWidgets.size()) {
        throw new RuntimeException("String_Node_Str" + index + "String_Node_Str"+ childOverlayWidgets.size());
      }
      childOverlayWidgets.add(index,child);
    }
    child.setParentOverlayWidget(this);
    if (listener != null)     listener.afterOverlayWidgetAdded(this,child);
  }
 else {
    LOG.info("String_Node_Str");
  }
}