<commit_before>@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>


@implementation AppController : CPObject
{
    @outlet CPWindow    theWindow;
    @outlet CPView      view;
    @outlet CPButton    buttonStart;
    @outlet CPButton    buttonStop;

    CPAnimation _animation;
    CGPoint     _firstPoint;
}

- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
    // This is called when the application is done loading.
    _firstPoint = CGPointMakeCopy([view frameOrigin]);
}

- (void)awakeFromCib
{
    // This is called when the cib is done loading.
    // You can implement this method on any object instantiated from a Cib.
    // It's a useful hook for setting up current UI values, and other things.

    // In this case, we want the window from Cib to become our full browser window
    [theWindow setFullPlatformWindow:YES];
}

- (IBAction)clickButtonStart:(id)sender
{
    [view setFrameOrigin:_firstPoint];

    _animation = [[CPViewAnimation alloc] initWithViewAnimations:[
        [CPDictionary dictionaryWithJSObject:{
            CPViewAnimationTargetKey:view,
            CPViewAnimationStartFrameKey:[view frame],
            CPViewAnimationEndFrameKey:CGRectMake([view frameOrigin].x, [view frameOrigin].y + 200, [view frameSize].width, [view frameSize].height)
        }]]];

    [_animation setAnimationCurve:CPAnimationLinear];
    [_animation setDuration:2];
    [_animation setDelegate:self];
    [_animation startAnimation];
}

- (IBAction)clickButtonStop:(id)sender
{
    [_animation stopAnimation];
}

- (void)animationDidEnd:(CPAnimation)anAnimation
{
    console.error(@"animationDidEnd");
}

- (void)animationDidStop:(CPAnimation)anAnimation
{
    console.error(@"animationDidStop");
}

- (BOOL)animationShouldStart:(CPAnimation)anAnimation
{
    console.error(@"animationShouldStart");
    return YES;
}

- (float)animation:(CPAnimation)animation valueForProgress:(float)progress
{
    console.error(@"animation:valueForProgress: " + progress);
    return progress;
}

@end
<commit_msg>Fixed: AppController of CPAnimationTest does not implement protocol CPAnimationDelegate<commit_after>@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>


@implementation AppController : CPObject <CPAnimationDelegate>
{
    @outlet CPWindow    theWindow;
    @outlet CPView      view;
    @outlet CPButton    buttonStart;
    @outlet CPButton    buttonStop;

    CPAnimation _animation;
    CGPoint     _firstPoint;
}

- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
    // This is called when the application is done loading.
    _firstPoint = CGPointMakeCopy([view frameOrigin]);
}

- (void)awakeFromCib
{
    // This is called when the cib is done loading.
    // You can implement this method on any object instantiated from a Cib.
    // It's a useful hook for setting up current UI values, and other things.

    // In this case, we want the window from Cib to become our full browser window
    [theWindow setFullPlatformWindow:YES];
}

- (IBAction)clickButtonStart:(id)sender
{
    [view setFrameOrigin:_firstPoint];

    _animation = [[CPViewAnimation alloc] initWithViewAnimations:[
        [CPDictionary dictionaryWithJSObject:{
            CPViewAnimationTargetKey:view,
            CPViewAnimationStartFrameKey:[view frame],
            CPViewAnimationEndFrameKey:CGRectMake([view frameOrigin].x, [view frameOrigin].y + 200, [view frameSize].width, [view frameSize].height)
        }]]];

    [_animation setAnimationCurve:CPAnimationLinear];
    [_animation setDuration:2];
    [_animation setDelegate:self];
    [_animation startAnimation];
}

- (IBAction)clickButtonStop:(id)sender
{
    [_animation stopAnimation];
}

- (void)animationDidEnd:(CPAnimation)anAnimation
{
    console.error(@"animationDidEnd");
}

- (void)animationDidStop:(CPAnimation)anAnimation
{
    console.error(@"animationDidStop");
}

- (BOOL)animationShouldStart:(CPAnimation)anAnimation
{
    console.error(@"animationShouldStart");
    return YES;
}

- (float)animation:(CPAnimation)animation valueForProgress:(float)progress
{
    console.error(@"animation:valueForProgress: " + progress);
    return progress;
}

@end

{'fraction_non_alphanumeric': 0.10248447204968944, 'fraction_numerical': 0.0019111323459149545, 'mean_word_length': 4.220698254364089, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '3822744', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1171, 'n_words': 279}