<commit_before>// main.swift
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
// -----------------------------------------------------------------------------
protocol PointUtils {
  func sumOfCoordinates () -> Float
}

struct Point2D : PointUtils {
    var x : Float
    var y : Float
    init (_ _x : Float, _ _y : Float) {
        x = _x;
        y = _y;
    }
    
    func sumOfCoordinates () -> Float {
        var sum = x + y
        return sum
    }
    
}

class Point3D : PointUtils {
    var x : Float
    var y : Float
    var z : Float

    init (_ _x : Float, _ _y : Float, _ _z : Float) {
        x = _x;
        y = _y;
        z = _z
    }
    
    func sumOfCoordinates () -> Float {
        var sum = x + y + z
        return sum
    }
    
}

func main() -> Int {
    
    var loc2d : protocol<PointUtils> = Point2D(1.25, 2.5)
    var loc3d : protocol<PointUtils> = Point3D(1.25, 2.5, 1.25)
    var sum2d = loc2d.sumOfCoordinates()
    var sum3d = loc3d.sumOfCoordinates()
    print("hello \(sum2d) \(sum3d)") // Set breakpoint here
    return 0
}

main()

<commit_msg>Fix a test case source file which started failing to compile.<commit_after>// main.swift
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
// -----------------------------------------------------------------------------
protocol PointUtils {
  func sumOfCoordinates () -> Float
}

struct Point2D : PointUtils {
    var x : Float
    var y : Float
    init (_ _x : Float, _ _y : Float) {
        x = _x;
        y = _y;
    }
    
    func sumOfCoordinates () -> Float {
        var sum = x + y
        return sum
    }
    
}

class Point3D : PointUtils {
    var x : Float
    var y : Float
    var z : Float

    init (_ _x : Float, _ _y : Float, _ _z : Float) {
        x = _x;
        y = _y;
        z = _z
    }
    
    func sumOfCoordinates () -> Float {
        var sum = x + y + z
        return sum
    }
    
}

func takes_protocol(_ loc2d : PointUtils,_ loc3d : PointUtils) {
    let sum2d = loc2d.sumOfCoordinates()
    let sum3d = loc3d.sumOfCoordinates()
    print("hello \(sum2d) \(sum3d)") // Set breakpoint here
}

func main() {

    var loc2d = Point2D(1.25, 2.5)
    var loc3d = Point3D(1.25, 2.5, 1.25)

    takes_protocol (loc2d, loc3d)
}

main()


{'fraction_non_alphanumeric': 0.15965217391304348, 'fraction_numerical': 0.02608695652173913, 'mean_word_length': 1.718336483931947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 4, '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': '4442939', 'n_tokens_mistral': 966, 'n_tokens_neox': 918, 'n_words': 300}