<commit_before>(function() {
    function SongPlayer($rootScope, Fixtures) {
          /**
          * @desc Allows users to play and pause songs
          * @type function
          */
         var SongPlayer = {};

         /**
         * @desc currentAlbum finds the index of the song object within the songs array
         * @type function
         */
         var currentAlbum = Fixtures.getAlbum();

         /**
         * @desc Buzz object audio file
         * @type {Object}
         */
         var currentBuzzObject = null;

         /**
         * @function setSong
         * @desc Stops currently playing song and loads new audio file as currentBuzzObject
         * @param {Object} song
         */

        var setSong = function(song) {
           if (currentBuzzObject) {
             stopSong();
           }


          currentBuzzObject = new buzz.sound(song.audioUrl, {
             formats: ['mp3'],
             preload: true
           });

          currentBuzzObject.bind('timeupdate', function() {
            $rootScope.$apply(function() {
              SongPlayer.currentTime = currentBuzzObject.getTime();
            });
          });

          SongPlayer.currentSong = song;

         };

        /**
        * @desc Finds the index of a song in the songs array
        * @type function
        */
        var getSongIndex = function(song) {
          return currentAlbum.songs.indexOf(song);
        };

        SongPlayer.currentSong = null;
        /**
        * @desc Current playback time (in seconds) of currently playing song
        * @type {Number}
        */
        SongPlayer.currentTime = null;
        /**
        * @function setCurrentTime
        * @desc Set current time (in seconds) of currently playing song
        * @param {Number} time*/

        SongPlayer.setCurrentTime = function(time) {
          if (currentBuzzObject) {
            currentBuzzObject.setTime(time);
          }
        };

        SongPlayer.volume = null;
        /**
        * @function
        * @desc Set current volume of currently playing song
        * @param {Number}*/

        SongPlayer.setVolume = function(newValue) {
          currentBuzzObject.setVolume(newValue);
        };

        var playSong = function() {
          currentBuzzObject.play();
          song.playing = true;<commit_msg>SongPlayer.js Mod<commit_after>(function() {
    function SongPlayer($rootScope, Fixtures) {
          /**
          * @desc Allows users to play and pause songs
          * @type function
          */
         var SongPlayer = {};

         /**
         * @desc currentAlbum finds the index of the song object within the songs array
         * @type function
         */
         var currentAlbum = Fixtures.getAlbum();

         /**
         * @desc Buzz object audio file
         * @type {Object}
         */
         var currentBuzzObject = null;

         /**
         * @function setSong
         * @desc Stops currently playing song and loads new audio file as currentBuzzObject
         * @param {Object} song
         */

        var setSong = function(song) {
           if (currentBuzzObject) {
             stopSong();
           }


          currentBuzzObject = new buzz.sound(song.audioUrl, {
             formats: ['mp3'],
             preload: true
           });

          currentBuzzObject.bind('timeupdate', function() {
            $rootScope.$apply(function() {
              SongPlayer.currentTime = currentBuzzObject.getTime();
            });
          });

          SongPlayer.currentSong = song;

         };

        /**
        * @desc Finds the index of a song in the songs array
        * @type function
        */
        var getSongIndex = function(song) {
          return currentAlbum.songs.indexOf(song);
        };

        SongPlayer.currentSong = null;
        /**
        * @desc Current playback time (in seconds) of currently playing song
        * @type {Number}
        */
        SongPlayer.currentTime = null;
        /**
        * @function setCurrentTime
        * @desc Set current time (in seconds) of currently playing song
        * @param {Number} time*/

        SongPlayer.setCurrentTime = function(time) {
          if (currentBuzzObject) {
            currentBuzzObject.setTime(time);
          }
        };

        SongPlayer.volume = null;
        /**
        * @function
        * @desc Set current volume of currently playing song
        * @param {Number}*/

        SongPlayer.setVolume = function(value) {
          currentBuzzObject.setVolume(value);
        };

        var playSong = function() {
          currentBuzzObject.play();
          song.playing = true;
{'fraction_non_alphanumeric': 0.09914346895074946, 'fraction_numerical': 0.00042826552462526765, 'mean_word_length': 1.5594520547945205, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6626367', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1157, 'n_words': 314}