Program: 152917
Project: 152917
Buggy source:
/** 
 * Creates the equivalent Spring metadata for the given value.
 * @param value
 * @return
 */
static BeanMetadataElement buildBeanMetadata(Value value){
  if (value instanceof ReferenceValue) {
    ReferenceValue reference=(ReferenceValue)value;
    return new RuntimeBeanReference(reference.getComponentName());
  }
  if (value instanceof ReferenceNameValue) {
    ReferenceNameValue reference=(ReferenceNameValue)value;
    return new RuntimeBeanNameReference(reference.getReferenceName());
  }
  if (value instanceof TypedStringValue) {
    TypedStringValue typedString=(TypedStringValue)value;
    return new org.springframework.beans.factory.config.TypedStringValue(typedString.getStringValue(),typedString.getTypeName());
  }
  if (value instanceof NullValue) {
    return new org.springframework.beans.factory.config.TypedStringValue(null);
  }
  if (value instanceof ComponentValue) {
    ComponentValue component=(ComponentValue)value;
    return MetadataFactory.buildBeanDefinitionFor(component.getComponentMetadata());
  }
  if (value instanceof ListValue) {
    ListValue listValue=(ListValue)value;
    List<Value> list=(List<Value>)listValue.getList();
    ManagedList managedList=new ManagedList();
    for (    Value val : list) {
      managedList.add(BeanMetadataElementFactory.buildBeanMetadata(val));
    }
    return managedList;
  }
  if (value instanceof SetValue) {
    SetValue setValue=(SetValue)value;
    Set<Value> set=(Set<Value>)setValue.getSet();
    ManagedSet managedSet=new ManagedSet();
    for (Iterator<Value> iterator=set.iterator(); iterator.hasNext(); ) {
      Value val=iterator.next();
      managedSet.add(BeanMetadataElementFactory.buildBeanMetadata(val));
    }
    return managedSet;
  }
  if (value instanceof MapValue) {
    MapValue mapValue=(MapValue)value;
    Map<Value,Value> map=(Map<Value,Value>)mapValue.getMap();
    ManagedMap managedMap=new ManagedMap();
    Set<Entry<Value,Value>> entrySet=map.entrySet();
    for (Iterator<Entry<Value,Value>> iterator=entrySet.iterator(); iterator.hasNext(); ) {
      Entry<Value,Value> entry=iterator.next();
      managedMap.put(BeanMetadataElementFactory.buildBeanMetadata(entry.getKey()),BeanMetadataElementFactory.buildBeanMetadata(entry.getValue()));
    }
  }
  if (value instanceof PropertiesValue) {
    PropertiesValue propertiesValue=(PropertiesValue)value;
    Properties properties=propertiesValue.getPropertiesValue();
    ManagedProperties managedProperties=new ManagedProperties();
    Set entrySet=managedProperties.entrySet();
    for (Iterator<Entry<Value,Value>> iterator=entrySet.iterator(); iterator.hasNext(); ) {
      Entry<Value,Value> entry=iterator.next();
      managedProperties.put(BeanMetadataElementFactory.buildBeanMetadata(entry.getKey()),BeanMetadataElementFactory.buildBeanMetadata(entry.getValue()));
    }
  }
  throw new IllegalArgumentException("String_Node_Str" + value.getClass());
}

Fixed version (ground truth):
/** 
 * Creates the equivalent Spring metadata for the given value.
 * @param value
 * @param defaultTypeName
 * @return
 */
static BeanMetadataElement buildBeanMetadata(Value value,String defaultTypeName){
  if (value instanceof ReferenceValue) {
    ReferenceValue reference=(ReferenceValue)value;
    return new RuntimeBeanReference(reference.getComponentName());
  }
  if (value instanceof ReferenceNameValue) {
    ReferenceNameValue reference=(ReferenceNameValue)value;
    return new RuntimeBeanNameReference(reference.getReferenceName());
  }
  if (value instanceof TypedStringValue) {
    TypedStringValue typedString=(TypedStringValue)value;
    String specifiedType=typedString.getTypeName();
    if (specifiedType == null) {
      specifiedType=defaultTypeName;
    }
    return new org.springframework.beans.factory.config.TypedStringValue(typedString.getStringValue(),specifiedType);
  }
  if (value instanceof NullValue) {
    return new org.springframework.beans.factory.config.TypedStringValue(null);
  }
  if (value instanceof ComponentValue) {
    ComponentValue component=(ComponentValue)value;
    return MetadataFactory.buildBeanDefinitionFor(component.getComponentMetadata());
  }
  if (value instanceof ListValue) {
    ListValue listValue=(ListValue)value;
    List<Value> list=(List<Value>)listValue.getList();
    String defaultType=listValue.getValueType();
    ManagedList managedList=new TempManagedList(list.size(),defaultType);
    for (    Value val : list) {
      managedList.add(BeanMetadataElementFactory.buildBeanMetadata(val,defaultType));
    }
    return managedList;
  }
  if (value instanceof SetValue) {
    SetValue setValue=(SetValue)value;
    Set<Value> set=(Set<Value>)setValue.getSet();
    String defaultType=setValue.getValueType();
    ManagedSet managedSet=new TempManagedSet(set.size(),defaultType);
    for (Iterator<Value> iterator=set.iterator(); iterator.hasNext(); ) {
      Value val=iterator.next();
      managedSet.add(BeanMetadataElementFactory.buildBeanMetadata(val,defaultType));
    }
    return managedSet;
  }
  if (value instanceof MapValue) {
    MapValue mapValue=(MapValue)value;
    Map<Value,Value> map=(Map<Value,Value>)mapValue.getMap();
    String defaultKeyType=mapValue.getKeyType();
    String defaultValueType=mapValue.getValueType();
    ManagedMap managedMap=new TempManagedMap(map.size(),defaultKeyType,defaultValueType);
    Set<Entry<Value,Value>> entrySet=map.entrySet();
    for (Iterator<Entry<Value,Value>> iterator=entrySet.iterator(); iterator.hasNext(); ) {
      Entry<Value,Value> entry=iterator.next();
      managedMap.put(BeanMetadataElementFactory.buildBeanMetadata(entry.getKey(),defaultKeyType),BeanMetadataElementFactory.buildBeanMetadata(entry.getValue(),defaultValueType));
    }
  }
  if (value instanceof PropertiesValue) {
    PropertiesValue propertiesValue=(PropertiesValue)value;
    Properties properties=propertiesValue.getPropertiesValue();
    ManagedProperties managedProperties=new ManagedProperties();
    Set entrySet=managedProperties.entrySet();
    for (Iterator<Entry<Value,Value>> iterator=entrySet.iterator(); iterator.hasNext(); ) {
      Entry<Value,Value> entry=iterator.next();
      managedProperties.put(BeanMetadataElementFactory.buildBeanMetadata(entry.getKey()),BeanMetadataElementFactory.buildBeanMetadata(entry.getValue()));
    }
  }
  throw new IllegalArgumentException("String_Node_Str" + value.getClass());
}