Program: 118722
Project: 118722
Buggy source:
public boolean isGenericRepositoryValue(GenericConnection connection,String paramName){
  if (connection == null) {
    return false;
  }
  ComponentProperties componentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(connection.getCompProperties());
  List<Property> propertyValues=ComponentsUtils.getAllValuedProperties(componentProperties);
  for (  Property property : propertyValues) {
    paramName=ComponentsUtils.getPropertyName(paramName);
    if (property.getName().equals(paramName)) {
      return property.getTaggedValue(IGenericConstants.REPOSITORY_VALUE) != null;
    }
  }
  for (  ModelElement modelElement : connection.getOwnedElement()) {
    if (modelElement instanceof SubContainer) {
      SubContainer subContainer=(SubContainer)modelElement;
      ComponentProperties subComponentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(subContainer.getCompProperties());
      List<Property> subPropertyValues=ComponentsUtils.getAllValuedProperties(subComponentProperties);
      for (      Property subProperty : subPropertyValues) {
        paramName=ComponentsUtils.getPropertyName(paramName);
        if (subProperty.getName().equals(paramName)) {
          return subProperty.getTaggedValue(IGenericConstants.REPOSITORY_VALUE) != null;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isGenericRepositoryValue(GenericConnection connection,String paramName){
  if (connection == null) {
    return false;
  }
  ComponentProperties componentProperties=ComponentsUtils.getComponentPropertiesFromSerialized(connection.getCompProperties());
  List<Property> propertyValues=ComponentsUtils.getAllValuedProperties(componentProperties);
  for (  Property property : propertyValues) {
    paramName=ComponentsUtils.getPropertyName(paramName);
    if (property.getName().equals(paramName)) {
      return property.getTaggedValue(IGenericConstants.REPOSITORY_VALUE) != null;
    }
  }
  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());
          break;
        }
      }
    }
    if (subComponentProperties != null) {
      List<Property> subPropertyValues=ComponentsUtils.getAllValuedProperties(subComponentProperties);
      for (      Property subProperty : subPropertyValues) {
        paramName=ComponentsUtils.getPropertyName(paramName);
        if (subProperty.getName().equals(paramName)) {
          return subProperty.getTaggedValue(IGenericConstants.REPOSITORY_VALUE) != null;
        }
      }
    }
  }
  return false;
}