Program: 79040
Project: 79040
Buggy source:
public String getLocalizedMessage(){
  if (sResourceKey == DESIGN_EXCEPTION_SLOT_NOT_FOUND) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element),String.valueOf(slot)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_WRONG_TYPE || sResourceKey == DESIGN_EXCEPTION_DROP_FORBIDDEN) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element),element.getDefn().getSlot(slot).getName()});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_NOT_CONTAINER || sResourceKey == DESIGN_EXCEPTION_HAS_NO_CONTAINER || sResourceKey == DESIGN_EXCEPTION_MOVE_FORBIDDEN || sResourceKey == DESIGN_EXCEPTION_HAS_DESCENDENTS) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_CONTENT_NOT_FOUND) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),element.getDefn().getSlot(slot).getName(),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_RECURSIVE) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_SLOT_IS_FULL) {
    return ModelMessages.getMessage(sResourceKey,new String[]{element.getDefn().getSlot(slot).getName(),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),element.getElementName(),element.getDefn().getSlot(slot).getName()});
  }
  return ModelMessages.getMessage(sResourceKey);
}

Fixed version (ground truth):
public String getLocalizedMessage(){
  if (sResourceKey == DESIGN_EXCEPTION_SLOT_NOT_FOUND) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element),String.valueOf(slot)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_WRONG_TYPE || sResourceKey == DESIGN_EXCEPTION_DROP_FORBIDDEN) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element),element.getDefn().getSlot(slot).getName()});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_NOT_CONTAINER || sResourceKey == DESIGN_EXCEPTION_HAS_NO_CONTAINER || sResourceKey == DESIGN_EXCEPTION_MOVE_FORBIDDEN || sResourceKey == DESIGN_EXCEPTION_HAS_DESCENDENTS) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_CONTENT_NOT_FOUND) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),element.getDefn().getSlot(slot).getName(),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_RECURSIVE) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_SLOT_IS_FULL) {
    return ModelMessages.getMessage(sResourceKey,new String[]{element.getDefn().getSlot(slot).getName(),getElementName(element)});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),element.getElementName(),element.getDefn().getSlot(slot).getName()});
  }
 else   if (sResourceKey == DESIGN_EXCEPTION_CONTENT_NAME_REQUIRED) {
    return ModelMessages.getMessage(sResourceKey,new String[]{getElementName(content),element.getElementName(),element.getDefn().getSlot(slot).getName()});
  }
  return ModelMessages.getMessage(sResourceKey);
}