Program: 118721
Project: 118721
Buggy source:
private Object getGenericRepositoryValue(GenericConnection connection,String value,IMetadataTable table){
  ComponentProperties componentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(connection.getCompProperties());
  String paramName=ComponentsUtils.getPropertyName(value);
  if (value != null && value.startsWith(componentProperties.getName())) {
    if (value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
      value=value.substring(componentProperties.getName().length() + 1,value.length());
    }
  }
  boolean found=false;
  List<Property> allValuedProperties=ComponentsUtils.getAllValuedProperties(componentProperties);
  for (  Property property : allValuedProperties) {
    if (paramName != null && paramName.equals(property.getName())) {
      found=true;
    }
  }
  Object object=null;
  if (found) {
    object=ComponentsUtils.getGenericPropertyValue(componentProperties,value);
  }
 else {
    for (    ModelElement modelElement : connection.getOwnedElement()) {
      if (modelElement instanceof SubContainer) {
        SubContainer subContainer=(SubContainer)modelElement;
        ComponentProperties subComponentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(subContainer.getCompProperties());
        if (value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
          value=value.substring(value.indexOf(IGenericConstants.EXP_SEPARATOR) + 1,value.length());
        }
        return ComponentsUtils.getGenericPropertyValue(subComponentProperties,value);
      }
    }
  }
  if (object != null) {
    if (object instanceof String && value != null && value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
      return getRepositoryValueOfStringType(connection,StringUtils.trimToNull(object.toString()));
    }
  }
  return ComponentsUtils.getGenericPropertyValue(componentProperties,value);
}

Fixed version (ground truth):
private Object getGenericRepositoryValue(GenericConnection connection,String value,IMetadataTable table){
  ComponentProperties componentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(connection.getCompProperties());
  String paramName=ComponentsUtils.getPropertyName(value);
  if (value != null && value.startsWith(componentProperties.getName())) {
    if (value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
      value=value.substring(componentProperties.getName().length() + 1,value.length());
    }
  }
  boolean found=false;
  List<Property> allValuedProperties=ComponentsUtils.getAllValuedProperties(componentProperties);
  for (  Property property : allValuedProperties) {
    if (paramName != null && paramName.equals(property.getName())) {
      found=true;
    }
  }
  Object object=null;
  if (found) {
    object=ComponentsUtils.getGenericPropertyValue(componentProperties,value);
  }
 else {
    for (    ModelElement modelElement : connection.getOwnedElement()) {
      ComponentProperties subComponentProperties=null;
      if (modelElement instanceof SubContainer) {
        SubContainer subContainer=(SubContainer)modelElement;
        subComponentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(subContainer.getCompProperties());
      }
 else       if (modelElement instanceof MetadataTable) {
        MetadataTable metadataTable=(MetadataTable)modelElement;
        for (        TaggedValue taggedValue : metadataTable.getTaggedValue()) {
          if (IGenericConstants.COMPONENT_PROPERTIES_TAG.equals(taggedValue.getTag())) {
            subComponentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(taggedValue.getValue());
          }
        }
      }
      if (subComponentProperties != null) {
        if (value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
          value=value.substring(value.indexOf(IGenericConstants.EXP_SEPARATOR) + 1,value.length());
        }
        return ComponentsUtils.getGenericPropertyValue(subComponentProperties,value);
      }
    }
  }
  if (object != null) {
    if (object instanceof String && value != null && value.indexOf(IGenericConstants.EXP_SEPARATOR) != -1) {
      return getRepositoryValueOfStringType(connection,StringUtils.trimToNull(object.toString()));
    }
  }
  return ComponentsUtils.getGenericPropertyValue(componentProperties,value);
}