<commit_before>﻿Namespace AW.Types

    Public Class SpecialOffers

        Public Shared Function ActionRandomSpecialOffer() As SpecialOffer
            Return GenericMenuFunctions.Random(Of SpecialOffer)()
        End Function

        Public Shared Function ActionAllSpecialOffers() As IQueryable(Of SpecialOffer)
            Return GenericMenuFunctions.ListAll(Of SpecialOffer)()
        End Function

        Public Shared Function ActionRecentlyUpdatedSpecialOffers() As IQueryable(Of SpecialOffer)
            Return From s In ActionAllSpecialOffers()
                   Order By s.mappedModifiedDate Descending
        End Function

        Public Shared Function ActionCreateNewSpecialOffer() As SpecialOffer
            Return CType(ThreadLocals.Container.CreateTransientInstance(GetType(SpecialOffer)), SpecialOffer)
        End Function

        Public Shared Function ActionAllSpecialOfferProducts() As IQueryable(Of SpecialOfferProduct)
            Return From sop In GenericMenuFunctions.ListAll(Of SpecialOfferProduct)()
                   Order By sop.mappedModifiedDate Descending
        End Function

        Public Shared Function SharedMenuOrder() As Menu
            Dim main = New Menu("Special Offers")
            main.AddAction(NameOf(ActionRandomSpecialOffer)) _
            .AddAction(NameOf(ActionAllSpecialOffers)) _
            .AddAction(NameOf(ActionRecentlyUpdatedSpecialOffers)) _
            .AddAction(NameOf(ActionCreateNewSpecialOffer)) _
            .AddAction(NameOf(ActionAllSpecialOfferProducts))
            Return main
        End Function

    End Class
End Namespace
<commit_msg>#376 Add method to test bug<commit_after>﻿Namespace AW.Types

    Public Class SpecialOffers

        Public Shared Function ActionRandomSpecialOffer() As SpecialOffer
            Return GenericMenuFunctions.Random(Of SpecialOffer)()
        End Function

        Public Shared Function ActionAllSpecialOffers() As IQueryable(Of SpecialOffer)
            Return GenericMenuFunctions.ListAll(Of SpecialOffer)()
        End Function

        Public Shared Function ActionRecentlyUpdatedSpecialOffers() As IQueryable(Of SpecialOffer)
            Return From s In ActionAllSpecialOffers()
                   Order By s.mappedModifiedDate Descending
        End Function

        Public Shared Function ActionCreateNewSpecialOffer() As SpecialOffer
            Return CType(ThreadLocals.Container.CreateTransientInstance(GetType(SpecialOffer)), SpecialOffer)
        End Function

        Public Shared Function ActionDemoSpecialOfferProductBug(specialOfferId As WholeNumber, productId As WholeNumber, container As IContainer) As SpecialOfferProduct
            Dim sop = container.CreateTransientInstance(Of SpecialOfferProduct)
            sop.SpecialOfferID = specialOfferId.Value()
            sop.ProductID = productId.Value()
            sop.RowGuid = Guid.NewGuid()
            sop.mappedModifiedDate = DateTime.Now()
            container.MakePersistent(sop)
            Return sop
        End Function

        Public Shared Function ActionAllSpecialOfferProducts() As IQueryable(Of SpecialOfferProduct)
            Return From sop In GenericMenuFunctions.ListAll(Of SpecialOfferProduct)()
                   Order By sop.mappedModifiedDate Descending
        End Function


        Public Shared Function SharedMenuOrder() As Menu
            Dim main = New Menu("Special Offers")
            main.AddAction(NameOf(ActionRandomSpecialOffer)) _
            .AddAction(NameOf(ActionAllSpecialOffers)) _
            .AddAction(NameOf(ActionRecentlyUpdatedSpecialOffers)) _
            .AddAction(NameOf(ActionCreateNewSpecialOffer)) _
            .AddAction(NameOf(ActionAllSpecialOfferProducts)) _
            .AddAction(NameOf(ActionDemoSpecialOfferProductBug))
            Return main
        End Function

    End Class
End Namespace

{'fraction_non_alphanumeric': 0.051461080941298164, 'fraction_numerical': 0.0007757951900698216, 'mean_word_length': 2.895266868076536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2475752', 'n_tokens_mistral': 958, 'n_tokens_neox': 909, 'n_words': 237}