<commit_before>import Ember from 'ember';
import { assertType } from './lib/assert';

class MyComponent extends Ember.Component {
    foo = 'bar';

    init() {
        this._super.apply(this, arguments);
        this.addObserver('foo', this, 'fooDidChange');
        this.addObserver('foo', this, this.fooDidChange);
        Ember.addObserver(this, 'foo', this, 'fooDidChange');
        Ember.addObserver(this, 'foo', this, this.fooDidChange);
        this.removeObserver('foo', this, 'fooDidChange');
        this.removeObserver('foo', this, this.fooDidChange);
        Ember.removeObserver(this, 'foo', this, 'fooDidChange');
        Ember.removeObserver(this, 'foo', this, this.fooDidChange);
    }<commit_msg>tests for addObserver and removeObserver with optional 3rd parameter<commit_after>import Ember from 'ember';
import { assertType } from './lib/assert';

class MyComponent extends Ember.Component {
    foo = 'bar';

    init() {
        this._super.apply(this, arguments);
        this.addObserver('foo', this, 'fooDidChange');
        this.addObserver('foo', this, this.fooDidChange);
        Ember.addObserver(this, 'foo', this, 'fooDidChange');
        Ember.addObserver(this, 'foo', this, this.fooDidChange);
        this.removeObserver('foo', this, 'fooDidChange');
        this.removeObserver('foo', this, this.fooDidChange);
        Ember.removeObserver(this, 'foo', this, 'fooDidChange');
        Ember.removeObserver(this, 'foo', this, this.fooDidChange);
        const lambda = () => {
            this.fooDidChange(this, 'foo');
        };
        this.addObserver('foo', lambda);
        this.removeObserver('foo', lambda);
    }
{'fraction_non_alphanumeric': 0.1505441354292624, 'fraction_numerical': 0.0006045949214026602, 'mean_word_length': 3.389920424403183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1759965', 'n_tokens_mistral': 487, 'n_tokens_neox': 482, 'n_words': 106}