Program Repair Shop 36

Double notifications?

        my $g = Guard->new("Fred");
        my $a1 = Alarm->new;
        $a1->add_observer($g1);
        $a1->add_observer($g1);
        $a1->notify_observers("I like pie!");
        my $g = Guard->new("Fred");
        my $a1 = Alarm->new;
        $a1->add_observer($g1);
        Alarm->add_observer($g1);
        $a1->notify_observers("I like pie!");

copy_observers( $copy_to_observable )

We make no effort to ensure we don't copy an observer that's already watching the object we're copying to. If this happens you will appear to get duplicate observations. (But it shouldn't happen often, if ever.)