<commit_before>(function(App) {

  'use strict';

  App.View = App.View || {};

  App.View.DescriptionView = Backbone.View.extend({

    events: {
      'click .read-more' : '_onClickShowAllDescription'
    },

    options: {
      descriptionClass: ".description",
      descriptionNeedMoreClass: "-need-more",
      descriptionShowMoreClass: "-show-more",
      sidebarClass: ".sidebar",
      sidebarContentClass: ".sidebar-content",
      sidebarContentFixedClass: "-fixed",
      sidebarContentFixolutedClass: "-fixoluted",
    },

    initialize: function() {
      this._cache();
      this._checkReadMore();
      this._loadStickySidebarEvent();
    },

    _cache: function() {
      this.$description = this.$el.find(this.options.descriptionClass);
      this.descriptionHeight = this.$description.height();
      this.descriptionRealHeight = this.$description[0].scrollHeight;
      this.$sidebar = this.$el.find(this.options.sidebarClass);
      this.sidebarHeight = this.$sidebar[0].scrollHeight;
      this.sidebarOffsetTop = this.$sidebar.offset().top;
      this.$sidebarContent = this.$el.find(this.options.sidebarContentClass);
      this.sidebarContentHeight = this.$sidebarContent[0].scrollHeight;
    },

    _checkReadMore: function() {
      if(this.descriptionRealHeight > this.descriptionHeight) {
        this.$description.addClass(this.options.descriptionNeedMoreClass);
      }
    },

    _onClickShowAllDescription: function () {
      this.$description
        .removeClass(this.options.descriptionNeedMoreClass)
        .addClass(this.options.descriptionShowMoreClass);
    },

    _loadStickySidebarEvent: function () {
      $(window).scroll(function () {
        var scrollTop = $(window).scrollTop();<commit_msg>Fix the bug with the sidebar behaviour when expanded the description (Read more)<commit_after>(function(App) {

  'use strict';

  App.View = App.View || {};

  App.View.DescriptionView = Backbone.View.extend({

    events: {
      'click .read-more' : '_onClickShowAllDescription'
    },

    options: {
      descriptionClass: ".description",
      descriptionNeedMoreClass: "-need-more",
      descriptionShowMoreClass: "-show-more",
      sidebarClass: ".sidebar",
      sidebarContentClass: ".sidebar-content",
      sidebarContentFixedClass: "-fixed",
      sidebarContentFixolutedClass: "-fixoluted",
    },

    initialize: function() {
      this._cache();
      this._checkReadMore();
      this._loadStickySidebarEvent();
    },

    _cache: function() {
      this.$description = this.$el.find(this.options.descriptionClass);
      this.descriptionHeight = this.$description.height();
      this.descriptionRealHeight = this.$description[0].scrollHeight;
      this.$sidebar = this.$el.find(this.options.sidebarClass);
      this.$sidebarContent = this.$el.find(this.options.sidebarContentClass);
      this._cacheSidebarSizes();
    },

    _cacheSidebarSizes: function () {
      this.sidebarHeight = this.$sidebar[0].scrollHeight;
      this.sidebarOffsetTop = this.$sidebar.offset().top;
      this.sidebarContentHeight = this.$sidebarContent[0].scrollHeight;
    },

    _checkReadMore: function() {
      if(this.descriptionRealHeight > this.descriptionHeight) {
        this.$description.addClass(this.options.descriptionNeedMoreClass);
      }
    },

    _onClickShowAllDescription: function () {
      this.$description
        .removeClass(this.options.descriptionNeedMoreClass)
        .addClass(this.options.descriptionShowMoreClass);
      this._cacheSidebarSizes();
    },

    _loadStickySidebarEvent: function () {
      $(window).scroll(function () {
        var scrollTop = $(window).scrollTop();
{'fraction_non_alphanumeric': 0.1327891156462585, 'fraction_numerical': 0.0016326530612244899, 'mean_word_length': 3.319623971797885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4035538', 'n_tokens_mistral': 1019, 'n_tokens_neox': 992, 'n_words': 145}