Program: 172183
Project: 172183
Buggy source:
/** 
 * At this level, the properties have the same qname and list index. They can only be separated by locale. Typically, MLText will fall into this category as only. <p> If there are multiple values then they can only be separated by locale. If they are separated by locale, then they have to be text-based. This means that the only way to store them is via MLText. Any other multi-locale properties cannot be deserialized.
 */
private Serializable collapsePropertiesWithSameQNameAndListIndex(PropertyDefinition propertyDef,Map<NodePropertyKey,NodePropertyValue> propertyValues){
  int propertyValuesSize=propertyValues.size();
  Serializable value=null;
  if (propertyValuesSize == 0) {
    return value;
  }
  boolean isMLText=(propertyDef != null && propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT));
  Pair<Long,Locale> defaultLocalePair=localeDAO.getDefaultLocalePair();
  Long defaultLocaleId=(defaultLocalePair == null) ? null : defaultLocalePair.getFirst();
  Integer listIndex=null;
  for (  Map.Entry<NodePropertyKey,NodePropertyValue> entry : propertyValues.entrySet()) {
    NodePropertyKey propertyKey=entry.getKey();
    NodePropertyValue propertyValue=entry.getValue();
    if (listIndex == null) {
      listIndex=propertyKey.getListIndex();
    }
 else     if (!listIndex.equals(propertyKey.getListIndex())) {
      throw new IllegalStateException("String_Node_Str" + propertyValues);
    }
    Long localeId=propertyKey.getLocaleId();
    boolean isDefaultLocale=EqualsHelper.nullSafeEquals(defaultLocaleId,localeId);
    Serializable entryValue=makeSerializableValue(propertyDef,propertyValue);
    if (isDefaultLocale) {
      if (propertyValuesSize > 1) {
        logger.warn("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + defaultLocaleId + "String_Node_Str"+ "String_Node_Str"+ propertyDef+ "String_Node_Str"+ "String_Node_Str"+ propertyValues);
      }
      value=entryValue;
      break;
    }
 else {
      Locale locale=localeDAO.getLocalePair(localeId).getSecond();
      if (value == null) {
        value=new MLText();
      }
      if (entryValue == null || entryValue instanceof String) {
        ((MLText)value).put(locale,(String)entryValue);
      }
 else {
        logger.warn("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + defaultLocaleId + "String_Node_Str"+ "String_Node_Str"+ propertyDef+ "String_Node_Str"+ "String_Node_Str"+ propertyValues);
      }
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * At this level, the properties have the same qname and list index. They can only be separated by locale. Typically, MLText will fall into this category as only. <p> If there are multiple values then they can only be separated by locale. If they are separated by locale, then they have to be text-based. This means that the only way to store them is via MLText. Any other multi-locale properties cannot be deserialized.
 */
private Serializable collapsePropertiesWithSameQNameAndListIndex(PropertyDefinition propertyDef,Map<NodePropertyKey,NodePropertyValue> propertyValues){
  int propertyValuesSize=propertyValues.size();
  Serializable value=null;
  if (propertyValuesSize == 0) {
    return value;
  }
  boolean isMLText=(propertyDef != null && propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT));
  Pair<Long,Locale> defaultLocalePair=localeDAO.getDefaultLocalePair();
  Long defaultLocaleId=(defaultLocalePair == null) ? null : defaultLocalePair.getFirst();
  Integer listIndex=null;
  for (  Map.Entry<NodePropertyKey,NodePropertyValue> entry : propertyValues.entrySet()) {
    NodePropertyKey propertyKey=entry.getKey();
    NodePropertyValue propertyValue=entry.getValue();
    if (listIndex == null) {
      listIndex=propertyKey.getListIndex();
    }
 else     if (!listIndex.equals(propertyKey.getListIndex())) {
      throw new IllegalStateException("String_Node_Str" + propertyValues);
    }
    Long localeId=propertyKey.getLocaleId();
    boolean isDefaultLocale=EqualsHelper.nullSafeEquals(defaultLocaleId,localeId);
    Serializable entryValue=makeSerializableValue(propertyDef,propertyValue);
    if (isDefaultLocale && !isMLText) {
      if (propertyValuesSize > 1) {
        logger.warn("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + defaultLocaleId + "String_Node_Str"+ "String_Node_Str"+ propertyDef+ "String_Node_Str"+ "String_Node_Str"+ propertyValues);
      }
      value=entryValue;
      break;
    }
 else {
      Locale locale=localeDAO.getLocalePair(localeId).getSecond();
      if (value == null) {
        value=new MLText();
      }
      if (entryValue == null || entryValue instanceof String) {
        ((MLText)value).put(locale,(String)entryValue);
      }
 else {
        logger.warn("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + defaultLocaleId + "String_Node_Str"+ "String_Node_Str"+ propertyDef+ "String_Node_Str"+ "String_Node_Str"+ propertyValues);
      }
    }
  }
  return value;
}