<commit_before>package xml

import models.domain._
import XMLHelper._
import controllers.Mappings.yes
import controllers.Mappings.no

object OtherBenefits {

  def xml(claim: Claim) = {
    val moneyPaidToSomeoneElseOption = claim.questionGroup[MoneyPaidToSomeoneElseForYou]
    val personDetailsOption = claim.questionGroup[PersonWhoGetsThisMoney]
    val contactDetailsOption = claim.questionGroup[PersonContactDetails]
    val statutorySickPayOption = claim.questionGroup[StatutorySickPay]
    val otherStatutoryPayOption = claim.questionGroup[OtherStatutoryPay]

    <OtherBenefits>
      <ClaimantBenefits>
        <JobseekersAllowance>no</JobseekersAllowance>
        <IncomeSupport>no</IncomeSupport>
        <PensionCredit>no</PensionCredit>
        <StatePension>no</StatePension>
        <IncapacityBenefit>no</IncapacityBenefit>
        <SevereDisablementAllowance>no</SevereDisablementAllowance>
        <MaternityAllowance>no</MaternityAllowance>
        <UnemployabilitySupplement>no</UnemployabilitySupplement>
        <WindowsBenefit>no</WindowsBenefit>
        <WarWidowsPension>no</WarWidowsPension>
        <IndustrialDeathBenefit>no</IndustrialDeathBenefit>
        <GovernmentTrainingAllowance>no</GovernmentTrainingAllowance>
        <LoneParentChildBenefit>no</LoneParentChildBenefit>
        <OtherSocialSecurityBenefit>no</OtherSocialSecurityBenefit>
        <NonSocialSecurityBenefit>no</NonSocialSecurityBenefit>
        <NoBenefits>yes</NoBenefits>
      </ClaimantBenefits>
      <PartnerBenefits>
        <JobseekersAllowance>no</JobseekersAllowance>
        <IncomeSupport>no</IncomeSupport>
        <PensionCredit>no</PensionCredit>
        <StatePension>no</StatePension>
        <IncapacityBenefit>no</IncapacityBenefit>
        <SevereDisablementAllowance>no</SevereDisablementAllowance>
        <MaternityAllowance>no</MaternityAllowance>
        <UnemployabilitySupplement>no</UnemployabilitySupplement>
        <WindowsBenefit>no</WindowsBenefit>
        <WarWidowsPension>no</WarWidowsPension>
        <IndustrialDeathBenefit>no</IndustrialDeathBenefit>
        <GovernmentTrainingAllowance>no</GovernmentTrainingAllowance>
        <OtherSocialSecurityBenefit>no</OtherSocialSecurityBenefit>
        <NonSocialSecurityBenefit>no</NonSocialSecurityBenefit>
        <NoBenefits>yes</NoBenefits>
      </PartnerBenefits>
      {extraMoneyXml(moneyPaidToSomeoneElseOption, personDetailsOption, contactDetailsOption)}
      {otherMoneySPPXml(statutorySickPayOption)}
      {otherMoneySMPXml(otherStatutoryPayOption)}
    </OtherBenefits>
  }

  def extraMoneyXml(moneyPaidToSomeoneElseOption: Option[MoneyPaidToSomeoneElseForYou], personDetailsOption: Option[PersonWhoGetsThisMoney], contactDetailsOption: Option[PersonContactDetails]) = {

    val moneyPaidToSomeoneElseForYou = moneyPaidToSomeoneElseOption.getOrElse(MoneyPaidToSomeoneElseForYou(moneyAddedToBenefitSinceClaimDate = no))
    val personDetails = personDetailsOption.getOrElse(PersonWhoGetsThisMoney())
    val contactDetails = contactDetailsOption.getOrElse(PersonContactDetails())

    if(moneyPaidToSomeoneElseForYou.moneyAddedToBenefitSinceClaimDate == yes) {
        <ExtraMoney>{moneyPaidToSomeoneElseForYou.moneyAddedToBenefitSinceClaimDate}</ExtraMoney>
        <ExtraMoneyDetails>
          <BenefitName>{personDetails.nameOfBenefit}</BenefitName>
          <RecipientName>{personDetails.fullName}</RecipientName>
          <RecipientAddress>{postalAddressStructure(contactDetails.address, contactDetails.postcode)}</RecipientAddress>
          <ConfirmAddress>yes</ConfirmAddress><commit_msg>DE150 - 'You' and 'Your Partner' should be marked as 'Not Asked'<commit_after>package xml

import app.XMLValues
import models.domain._
import XMLHelper._
import controllers.Mappings.yes
import controllers.Mappings.no

object OtherBenefits {

  def xml(claim: Claim) = {
    val moneyPaidToSomeoneElseOption = claim.questionGroup[MoneyPaidToSomeoneElseForYou]
    val personDetailsOption = claim.questionGroup[PersonWhoGetsThisMoney]
    val contactDetailsOption = claim.questionGroup[PersonContactDetails]
    val statutorySickPayOption = claim.questionGroup[StatutorySickPay]
    val otherStatutoryPayOption = claim.questionGroup[OtherStatutoryPay]

    <OtherBenefits>
      <ClaimantBenefits>
        <JobseekersAllowance>no</JobseekersAllowance>
        <IncomeSupport>no</IncomeSupport>
        <PensionCredit>no</PensionCredit>
        <StatePension>no</StatePension>
        <IncapacityBenefit>no</IncapacityBenefit>
        <SevereDisablementAllowance>no</SevereDisablementAllowance>
        <MaternityAllowance>no</MaternityAllowance>
        <UnemployabilitySupplement>no</UnemployabilitySupplement>
        <WindowsBenefit>no</WindowsBenefit>
        <WarWidowsPension>no</WarWidowsPension>
        <IndustrialDeathBenefit>no</IndustrialDeathBenefit>
        <GovernmentTrainingAllowance>no</GovernmentTrainingAllowance>
        <LoneParentChildBenefit>no</LoneParentChildBenefit>
        <OtherSocialSecurityBenefit>{XMLValues.NotAsked}</OtherSocialSecurityBenefit>
        <NonSocialSecurityBenefit>{XMLValues.NotAsked}</NonSocialSecurityBenefit>
        <NoBenefits>{XMLValues.NotAsked}</NoBenefits>
      </ClaimantBenefits>
      <PartnerBenefits>
        <JobseekersAllowance>no</JobseekersAllowance>
        <IncomeSupport>no</IncomeSupport>
        <PensionCredit>no</PensionCredit>
        <StatePension>no</StatePension>
        <IncapacityBenefit>no</IncapacityBenefit>
        <SevereDisablementAllowance>no</SevereDisablementAllowance>
        <MaternityAllowance>no</MaternityAllowance>
        <UnemployabilitySupplement>no</UnemployabilitySupplement>
        <WindowsBenefit>no</WindowsBenefit>
        <WarWidowsPension>no</WarWidowsPension>
        <IndustrialDeathBenefit>no</IndustrialDeathBenefit>
        <GovernmentTrainingAllowance>no</GovernmentTrainingAllowance>
        <OtherSocialSecurityBenefit>{XMLValues.NotAsked}</OtherSocialSecurityBenefit>
        <NonSocialSecurityBenefit>{XMLValues.NotAsked}</NonSocialSecurityBenefit>
        <NoBenefits>{XMLValues.NotAsked}</NoBenefits>
      </PartnerBenefits>
      {extraMoneyXml(moneyPaidToSomeoneElseOption, personDetailsOption, contactDetailsOption)}
      {otherMoneySPPXml(statutorySickPayOption)}
      {otherMoneySMPXml(otherStatutoryPayOption)}
    </OtherBenefits>
  }

  def extraMoneyXml(moneyPaidToSomeoneElseOption: Option[MoneyPaidToSomeoneElseForYou], personDetailsOption: Option[PersonWhoGetsThisMoney], contactDetailsOption: Option[PersonContactDetails]) = {

    val moneyPaidToSomeoneElseForYou = moneyPaidToSomeoneElseOption.getOrElse(MoneyPaidToSomeoneElseForYou(moneyAddedToBenefitSinceClaimDate = no))
    val personDetails = personDetailsOption.getOrElse(PersonWhoGetsThisMoney())
    val contactDetails = contactDetailsOption.getOrElse(PersonContactDetails())

    if(moneyPaidToSomeoneElseForYou.moneyAddedToBenefitSinceClaimDate == yes) {
        <ExtraMoney>{moneyPaidToSomeoneElseForYou.moneyAddedToBenefitSinceClaimDate}</ExtraMoney>
        <ExtraMoneyDetails>
          <BenefitName>{personDetails.nameOfBenefit}</BenefitName>
          <RecipientName>{personDetails.fullName}</RecipientName>
          <RecipientAddress>{postalAddressStructure(contactDetails.address, contactDetails.postcode)}</RecipientAddress>
          <ConfirmAddress>yes</ConfirmAddress>
{'fraction_non_alphanumeric': 0.08588458412354376, 'fraction_numerical': 0.000406393931183961, 'mean_word_length': 5.278061224489796, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '901588', 'n_tokens_mistral': 2375, 'n_tokens_neox': 2148, 'n_words': 207}