<commit_before>angular
  .module('teamform')
  .factory("User", ["firebase", "$firebaseArray", "$firebaseObject", "Auth", "Upload", function (firebase, $firebaseArray, $firebaseObject, Auth, Upload) {
    var ref = firebase.database().ref("users");
    var currentProfileRef = null;

    var User = {
      ref: ref,
      childObj: function($uid) {
          return $firebaseObject(User.ref.child($uid));
      },
      setCurrentProfile: function () {
        currentProfileRef = ref.child(Auth.$getAuth().uid);
      },
      updateProfile: function () {
        $profile = {};
        $profile.name = Auth.$getAuth().displayName;
        $profile.email = Auth.$getAuth().email;
        currentProfileRef.set($profile);
      },
      updatePicture: function(pictureField) {
        Upload.base64DataUrl(pictureField).then(function(base64){
          $profile = {};
          $profile.name = Auth.$getAuth().displayName;
          $profile.email = Auth.$getAuth().email;
          $profile.picture = base64[0];
          ref.child(Auth.$getAuth().uid).set($profile);
        });
      },
    };

    return User;
  }
  ]);<commit_msg>try to add get_profilePic func<commit_after>angular
  .module('teamform')
  .factory("User", ["firebase", "$firebaseArray", "$firebaseObject", "Auth", "Upload", function (firebase, $firebaseArray, $firebaseObject, Auth, Upload) {
    var ref = firebase.database().ref("users");
    var currentProfileRef = null;

    var User = {
      ref: ref,
      childObj: function($uid) {
          return $firebaseObject(User.ref.child($uid));
      },
      currentProfile: function(field) {
        if (!currentProfileRef) {
          User.setCurrentProfile();
        }
        $profile = [];
        currentProfileRef.on("child_added", function(snapshot, field) {console.log(snapshot.key);
          // $profile[snapshot.key] = snapshot.val();console.log($profile);
          if (snapshot.key == 'picture')
          field = snapshot.val();
        });
        return $profile;
      },
      setCurrentProfile: function () {
        currentProfileRef = ref.child(Auth.$getAuth().uid);
      },
      updateProfile: function () {
        $profile = {};
        $profile.name = Auth.$getAuth().displayName;
        $profile.email = Auth.$getAuth().email;
        currentProfileRef.set($profile);
      },
      updatePicture: function(pictureField) {
        Upload.base64DataUrl(pictureField).then(function(base64){
          $profile = {};
          $profile.name = Auth.$getAuth().displayName;
          $profile.email = Auth.$getAuth().email;
          $profile.picture = base64[0];
          ref.child(Auth.$getAuth().uid).set($profile);
        });
      },
    };

    return User;
  }
  ]);
{'fraction_non_alphanumeric': 0.16233052400146575, 'fraction_numerical': 0.005130084279956028, 'mean_word_length': 2.563968668407311, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5915714', 'n_tokens_mistral': 794, 'n_tokens_neox': 782, 'n_words': 129}