Program: 174801
Project: 174801
Buggy source:
/** 
 * Utility method to convert from a string representation of a property value into the correct object representation.
 * @param dictionaryService     the dictionary service
 * @param propertyName          the qname of the property in question
 * @param propertyValue         the property vlaue as a string
 * @return                      the object value of the property
 */
public static Serializable getValueFromNamedValue(DictionaryService dictionaryService,QName propertyName,NamedValue namedValue){
  Serializable result=null;
  org.alfresco.service.cmr.dictionary.PropertyDefinition propDef=dictionaryService.getProperty(propertyName);
  if (propDef != null) {
    DataTypeDefinition propertyType=propDef.getDataType();
    if (propertyType != null) {
      if (namedValue.getIsMultiValue() == false) {
        if (logger.isDebugEnabled() == true) {
          logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str"+ namedValue.getValue());
        }
        result=(Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType,namedValue.getValue());
      }
 else {
        String[] values=namedValue.getValues();
        if (logger.isDebugEnabled() == true) {
          logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str"+ values.toString());
        }
        if (values != null) {
          Collection<Serializable> collection=new ArrayList<Serializable>(values.length);
          for (          String value : values) {
            collection.add((Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType,value));
          }
          if (logger.isDebugEnabled() == true) {
            logger.debug("String_Node_Str" + collection.toString());
          }
          result=(Serializable)collection;
        }
      }
    }
 else {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str");
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Utility method to convert from a string representation of a property value into the correct object representation.
 * @param dictionaryService     the dictionary service
 * @param propertyName          the qname of the property in question
 * @param propertyValue         the property vlaue as a string
 * @return                      the object value of the property
 */
public static Serializable getValueFromNamedValue(DictionaryService dictionaryService,QName propertyName,NamedValue namedValue){
  Serializable result=null;
  org.alfresco.service.cmr.dictionary.PropertyDefinition propDef=dictionaryService.getProperty(propertyName);
  if (propDef != null) {
    DataTypeDefinition propertyType=propDef.getDataType();
    if (propertyType != null) {
      if (namedValue == null || namedValue.getIsMultiValue() == false) {
        if (logger.isDebugEnabled() == true) {
          logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str"+ namedValue.getValue());
        }
        result=(Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType,namedValue.getValue());
      }
 else {
        String[] values=namedValue.getValues();
        if (logger.isDebugEnabled() == true) {
          logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str"+ values.toString());
        }
        if (values != null) {
          Collection<Serializable> collection=new ArrayList<Serializable>(values.length);
          for (          String value : values) {
            collection.add((Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType,value));
          }
          if (logger.isDebugEnabled() == true) {
            logger.debug("String_Node_Str" + collection.toString());
          }
          result=(Serializable)collection;
        }
      }
    }
 else {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + propertyName.toString() + "String_Node_Str");
      }
    }
  }
  return result;
}