Program: 171053
Project: 171053
Buggy source:
private boolean validateRelationshipAttributes(Object obj,String objName,List<String> messages){
  boolean ret=true;
  if (obj != null && MapUtils.isNotEmpty(relationshipAttributes)) {
    if (obj instanceof AtlasEntity) {
      AtlasEntity entityObj=(AtlasEntity)obj;
      for (      AtlasAttribute attribute : relationshipAttributes.values()) {
        String attributeName=attribute.getName();
        if (attribute != null) {
          AtlasType dataType=attribute.getAttributeType();
          Object value=entityObj.getAttribute(attributeName);
          String fieldName=objName + "String_Node_Str" + attributeName;
          if (isValidRelationshipType(dataType) && value != null) {
            ret=dataType.validateValue(value,fieldName,messages) && ret;
          }
        }
      }
    }
 else     if (obj instanceof Map) {
      Map attributes=AtlasTypeUtil.toStructAttributes((Map)obj);
      for (      AtlasAttribute attribute : relationshipAttributes.values()) {
        String attributeName=attribute.getName();
        if (attribute != null) {
          AtlasType dataType=attribute.getAttributeType();
          Object value=attributes.get(attributeName);
          String fieldName=objName + "String_Node_Str" + attributeName;
          if (isValidRelationshipType(dataType) && value != null) {
            ret=dataType.validateValue(value,fieldName,messages) && ret;
          }
        }
      }
    }
 else {
      ret=false;
      messages.add(objName + "String_Node_Str" + obj+ "String_Node_Str"+ getTypeName());
    }
  }
  return ret;
}

Fixed version (ground truth):
private boolean validateRelationshipAttributes(Object obj,String objName,List<String> messages){
  boolean ret=true;
  if (obj != null && MapUtils.isNotEmpty(relationshipAttributes)) {
    if (obj instanceof AtlasEntity) {
      AtlasEntity entityObj=(AtlasEntity)obj;
      for (      AtlasAttribute attribute : relationshipAttributes.values()) {
        if (attribute != null) {
          String attributeName=attribute.getName();
          AtlasType dataType=attribute.getAttributeType();
          Object value=entityObj.getAttribute(attributeName);
          String fieldName=objName + "String_Node_Str" + attributeName;
          if (isValidRelationshipType(dataType) && value != null) {
            ret=dataType.validateValue(value,fieldName,messages) && ret;
          }
        }
      }
    }
 else     if (obj instanceof Map) {
      Map attributes=AtlasTypeUtil.toStructAttributes((Map)obj);
      for (      AtlasAttribute attribute : relationshipAttributes.values()) {
        if (attribute != null) {
          String attributeName=attribute.getName();
          AtlasType dataType=attribute.getAttributeType();
          Object value=attributes.get(attributeName);
          String fieldName=objName + "String_Node_Str" + attributeName;
          if (isValidRelationshipType(dataType) && value != null) {
            ret=dataType.validateValue(value,fieldName,messages) && ret;
          }
        }
      }
    }
 else {
      ret=false;
      messages.add(objName + "String_Node_Str" + obj+ "String_Node_Str"+ getTypeName());
    }
  }
  return ret;
}