acsone/alfodoo

View on GitHub
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js

Summary

Maintainability
F
1 yr
Test Coverage

File viewer.js has 9421 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Copyright 2017 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 wks to fix

    Function webL10n has 724 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    document.webL10n = function (window, document, undefined) {
      var gL10nData = {};
      var gTextData = '';
      var gTextProp = 'textContent';
      var gLanguage = '';
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 days to fix

      Function PDFViewer has 724 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var PDFViewer = function () {
        function PDFViewer(options) {
          _classCallCheck(this, PDFViewer);
      
          this.container = options.container;
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 days to fix

        Function PDFPageView has 488 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var PDFPageView = function () {
          function PDFPageView(options) {
            _classCallCheck(this, PDFPageView);
        
            var container = options.container;
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 days to fix

          Function PDFFindController has 367 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var PDFFindController = function () {
            function PDFFindController(_ref) {
              var pdfViewer = _ref.pdfViewer;
          
              _classCallCheck(this, PDFFindController);
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

            Function PDFPresentationMode has 352 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var PDFPresentationMode = function () {
              function PDFPresentationMode(_ref) {
                var _this = this;
            
                var container = _ref.container,
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

              Function getPluralRules has 321 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function getPluralRules(lang) {
                  var locales2rules = {
                    'af': 3,
                    'ak': 4,
                    'am': 4,
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                Function PDFSidebar has 307 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var PDFSidebar = function () {
                  function PDFSidebar(options) {
                    var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
                
                    _classCallCheck(this, PDFSidebar);
                Severity: Major
                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                  Function PDFThumbnailView has 295 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var PDFThumbnailView = function () {
                    function PDFThumbnailView(_ref) {
                      var container = _ref.container,
                          id = _ref.id,
                          defaultViewport = _ref.defaultViewport,
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                    Function TextLayerBuilder has 287 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var TextLayerBuilder = function () {
                      function TextLayerBuilder(_ref) {
                        var textLayerDiv = _ref.textLayerDiv,
                            eventBus = _ref.eventBus,
                            pageIndex = _ref.pageIndex,
                    Severity: Major
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                      Function PDFLinkService has 273 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var PDFLinkService = function () {
                        function PDFLinkService() {
                          var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
                              eventBus = _ref.eventBus;
                      
                      
                      Severity: Major
                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                        Function webViewerKeyDown has 221 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function webViewerKeyDown(evt) {
                          if (PDFViewerApplication.overlayManager.active) {
                            return;
                          }
                          var handled = false,
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

                          Function SecondaryToolbar has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var SecondaryToolbar = function () {
                            function SecondaryToolbar(options, mainContainer, eventBus) {
                              _classCallCheck(this, SecondaryToolbar);
                          
                              this.toolbar = options.toolbar;
                          Severity: Major
                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 7 hrs to fix

                            Function Toolbar has 192 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var Toolbar = function () {
                              function Toolbar(options, mainContainer, eventBus) {
                                var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n;
                            
                                _classCallCheck(this, Toolbar);
                            Severity: Major
                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 7 hrs to fix

                              Function PDFDocumentProperties has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var PDFDocumentProperties = function () {
                                function PDFDocumentProperties(_ref, overlayManager) {
                                  var overlayName = _ref.overlayName,
                                      fields = _ref.fields,
                                      container = _ref.container,
                              Severity: Major
                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 7 hrs to fix

                                Function PDFThumbnailViewer has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                var PDFThumbnailViewer = function () {
                                  function PDFThumbnailViewer(_ref) {
                                    var container = _ref.container,
                                        linkService = _ref.linkService,
                                        renderingQueue = _ref.renderingQueue,
                                Severity: Major
                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 7 hrs to fix

                                  Function load has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    load: function load(pdfDocument, scale) {
                                      var _this6 = this;
                                  
                                      scale = scale || _ui_utils.UNKNOWN_SCALE;
                                      this.pdfDocument = pdfDocument;
                                  Severity: Major
                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 6 hrs to fix

                                    Function PDFFindBar has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var PDFFindBar = function () {
                                      function PDFFindBar(options) {
                                        var _this = this;
                                    
                                        var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
                                    Severity: Major
                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 6 hrs to fix

                                      Function PDFOutlineViewer has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      var PDFOutlineViewer = function () {
                                        function PDFOutlineViewer(_ref) {
                                          var container = _ref.container,
                                              linkService = _ref.linkService,
                                              eventBus = _ref.eventBus;
                                      Severity: Major
                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 5 hrs to fix

                                        Function PDFAttachmentViewer has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        var PDFAttachmentViewer = function () {
                                          function PDFAttachmentViewer(_ref) {
                                            var container = _ref.container,
                                                eventBus = _ref.eventBus,
                                                downloadManager = _ref.downloadManager;
                                        Severity: Major
                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                          Function getViewerConfiguration has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          function getViewerConfiguration() {
                                            return {
                                              appContainer: document.body,
                                              mainContainer: document.getElementById('viewerContainer'),
                                              viewerContainer: document.getElementById('viewer'),
                                          Severity: Major
                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                            Function OverlayManager has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            var OverlayManager = function () {
                                              function OverlayManager() {
                                                _classCallCheck(this, OverlayManager);
                                            
                                                this._overlays = {};
                                            Severity: Major
                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                              Function PDFRenderingQueue has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              var PDFRenderingQueue = function () {
                                                function PDFRenderingQueue() {
                                                  _classCallCheck(this, PDFRenderingQueue);
                                              
                                                  this.pdfViewer = null;
                                              Severity: Major
                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                                Function ViewHistory has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                var ViewHistory = function () {
                                                  function ViewHistory(fingerprint) {
                                                    var _this = this;
                                                
                                                    var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE;
                                                Severity: Major
                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                                  Function draw has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      value: function draw() {
                                                        var _this = this;
                                                  
                                                        if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                                                          console.error('Must be in new state before drawing');
                                                  Severity: Major
                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                                    Function _initializeViewerComponents has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                      _initializeViewerComponents: function _initializeViewerComponents() {
                                                        var _this2 = this;
                                                    
                                                        var appConfig = this.appConfig;
                                                        return new Promise(function (resolve, reject) {
                                                    Severity: Major
                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                                      Function PDFCursorTools has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      var PDFCursorTools = function () {
                                                        function PDFCursorTools(_ref) {
                                                          var _this = this;
                                                      
                                                          var container = _ref.container,
                                                      Severity: Major
                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                                        Function BasePreferences has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        var BasePreferences = function () {
                                                          function BasePreferences() {
                                                            var _this = this;
                                                        
                                                            _classCallCheck(this, BasePreferences);
                                                        Severity: Major
                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                          Function scrollPageIntoView has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              value: function scrollPageIntoView(params) {
                                                                if (!this.pdfDocument) {
                                                                  return;
                                                                }
                                                                if (arguments.length > 1 || typeof params === 'number') {
                                                          Severity: Major
                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                            Function webViewerInitialized has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function webViewerInitialized() {
                                                              var appConfig = PDFViewerApplication.appConfig;
                                                              var file = void 0;
                                                              var queryString = document.location.search.substring(1);
                                                              var params = (0, _ui_utils.parseQueryString)(queryString);
                                                            Severity: Major
                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                              Function setDocument has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  value: function setDocument(pdfDocument) {
                                                                    var _this = this;
                                                              
                                                                    if (this.pdfDocument) {
                                                                      this._cancelRendering();
                                                              Severity: Major
                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                Function attachDOMEventsToEventBus has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                function attachDOMEventsToEventBus(eventBus) {
                                                                  eventBus.on('documentload', function () {
                                                                    var event = document.createEvent('CustomEvent');
                                                                    event.initCustomEvent('documentload', true, true, {});
                                                                    window.dispatchEvent(event);
                                                                Severity: Major
                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                  Function pdfHistoryInitialize has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                    initialize: function pdfHistoryInitialize(fingerprint) {
                                                                      this.initialized = true;
                                                                      this.reInitialized = false;
                                                                      this.allowHashChange = true;
                                                                      this.historyUnlocked = true;
                                                                  Severity: Major
                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                    Function parseResource has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                      function parseResource(href, lang, successCallback, failureCallback) {
                                                                        var baseURL = href.replace(/[^\/]*$/, '') || './';
                                                                        function evalString(text) {
                                                                          if (text.lastIndexOf('\\') < 0) return text;
                                                                          return text.replace(/\\\\/g, '\\').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\b/g, '\b').replace(/\\f/g, '\f').replace(/\\{/g, '{').replace(/\\}/g, '}').replace(/\\"/g, '"').replace(/\\'/g, "'");
                                                                    Severity: Major
                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                      Function setHash has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          value: function setHash(hash) {
                                                                            var pageNumber = void 0,
                                                                                dest = void 0;
                                                                            if (hash.indexOf('=') >= 0) {
                                                                              var params = (0, _ui_utils.parseQueryString)(hash);
                                                                      Severity: Major
                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                        Function paintOnCanvas has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            value: function paintOnCanvas(canvasWrapper) {
                                                                              var renderCapability = (0, _pdfjsLib.createPromiseCapability)();
                                                                              var result = {
                                                                                promise: renderCapability.promise,
                                                                                onRenderContinue: function onRenderContinue(cont) {
                                                                        Severity: Major
                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                                                          Function ProgressBar has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                          var ProgressBar = function () {
                                                                            function ProgressBar(id) {
                                                                              var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
                                                                                  height = _ref.height,
                                                                                  width = _ref.width,
                                                                          Severity: Major
                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                            Function renderMatches has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                value: function renderMatches(matches) {
                                                                                  if (matches.length === 0) {
                                                                                    return;
                                                                                  }
                                                                                  var textContentItemsStr = this.textContentItemsStr;
                                                                            Severity: Major
                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                              Function SecondaryToolbar has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                function SecondaryToolbar(options, mainContainer, eventBus) {
                                                                                  _classCallCheck(this, SecondaryToolbar);
                                                                              
                                                                                  this.toolbar = options.toolbar;
                                                                                  this.toggleButton = options.toggleButton;
                                                                              Severity: Major
                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                Function PasswordPrompt has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                var PasswordPrompt = function () {
                                                                                  function PasswordPrompt(options, overlayManager) {
                                                                                    var _this = this;
                                                                                
                                                                                    var l10n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ui_utils.NullL10n;
                                                                                Severity: Major
                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                  Function navigateTo has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      value: function navigateTo(dest) {
                                                                                        var _this = this;
                                                                                  
                                                                                        var goToDestination = function goToDestination(_ref2) {
                                                                                          var namedDest = _ref2.namedDest,
                                                                                  Severity: Major
                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                    Function open has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                      open: function open(file, args) {
                                                                                        var _this3 = this;
                                                                                    
                                                                                        if (arguments.length > 2 || typeof args === 'number') {
                                                                                          return Promise.reject(new Error('Call of open() with obsolete signature.'));
                                                                                    Severity: Major
                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                      Function getVisibleElements has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                      function getVisibleElements(scrollEl, views) {
                                                                                        var sortByVisibility = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                      
                                                                                        var top = scrollEl.scrollTop,
                                                                                            bottom = top + scrollEl.clientHeight;
                                                                                      Severity: Major
                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                        Function loadLocale has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                          function loadLocale(lang, callback) {
                                                                                            if (lang) {
                                                                                              lang = lang.toLowerCase();
                                                                                            }
                                                                                            callback = callback || function _callback() {};
                                                                                        Severity: Major
                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                          Function AnnotationLayerBuilder has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                          var AnnotationLayerBuilder = function () {
                                                                                            function AnnotationLayerBuilder(_ref) {
                                                                                              var pageDiv = _ref.pageDiv,
                                                                                                  pdfPage = _ref.pdfPage,
                                                                                                  linkService = _ref.linkService,
                                                                                          Severity: Major
                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                            Function switchView has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                value: function switchView(view) {
                                                                                                  var forceOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                                                                                            
                                                                                                  if (view === SidebarView.NONE) {
                                                                                                    this.close();
                                                                                            Severity: Major
                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                              Function PDFThumbnailView has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                function PDFThumbnailView(_ref) {
                                                                                                  var container = _ref.container,
                                                                                                      id = _ref.id,
                                                                                                      defaultViewport = _ref.defaultViewport,
                                                                                                      linkService = _ref.linkService,
                                                                                              Severity: Major
                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                Function parseProperties has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    function parseProperties(text, parsedPropertiesCallback) {
                                                                                                      var dictionary = {};
                                                                                                      var reBlank = /^\s*|\s*$/;
                                                                                                      var reComment = /^\s*#|^\s*$/;
                                                                                                      var reSection = /^\s*\[(.*)\]\s*$/;
                                                                                                Severity: Major
                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                  Function _readPreferences has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                    _readPreferences: function _readPreferences() {
                                                                                                      var preferences = this.preferences,
                                                                                                          viewerPrefs = this.viewerPrefs;
                                                                                                  
                                                                                                      return Promise.all([preferences.get('enableWebGL').then(function resolved(value) {
                                                                                                  Severity: Major
                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                    Function _updateUIState has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        value: function _updateUIState() {
                                                                                                          var resetNumPages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
                                                                                                    
                                                                                                          if (!this._wasLocalized) {
                                                                                                            return;
                                                                                                    Severity: Major
                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                      Function cssTransform has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          value: function cssTransform(target) {
                                                                                                            var redrawAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                                                                                                      
                                                                                                            var width = this.viewport.width;
                                                                                                            var height = this.viewport.height;
                                                                                                      Severity: Major
                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                        Function PDFFindBar has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                          function PDFFindBar(options) {
                                                                                                            var _this = this;
                                                                                                        
                                                                                                            var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
                                                                                                        
                                                                                                        
                                                                                                        Severity: Major
                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                          Function open has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              value: function open() {
                                                                                                                var _this = this;
                                                                                                          
                                                                                                                var freezeFieldData = function freezeFieldData(data) {
                                                                                                                  Object.defineProperty(_this, 'fieldData', {
                                                                                                          Severity: Major
                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                            Function _bindListeners has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                value: function _bindListeners() {
                                                                                                                  var _this = this;
                                                                                                            
                                                                                                                  var eventBus = this.eventBus,
                                                                                                                      items = this.items;
                                                                                                            Severity: Minor
                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

                                                                                                              Function isValidExplicitDestination has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                              function isValidExplicitDestination(dest) {
                                                                                                                if (!(dest instanceof Array)) {
                                                                                                                  return false;
                                                                                                                }
                                                                                                                var destLength = dest.length,
                                                                                                              Severity: Minor
                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                Function error has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                  error: function error(message, moreInfo) {
                                                                                                                    var moreInfoText = [this.l10n.get('error_version_info', {
                                                                                                                      version: _pdfjsLib.version || '?',
                                                                                                                      build: _pdfjsLib.build || '?'
                                                                                                                    }, 'PDF.js v{{version}} (build: {{build}})')];
                                                                                                                Severity: Minor
                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                  Function draw has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      value: function draw() {
                                                                                                                        var _this2 = this;
                                                                                                                  
                                                                                                                        if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                                                                                                                          console.error('Must be in new state before drawing');
                                                                                                                  Severity: Minor
                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                    Function render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        value: function render(_ref2) {
                                                                                                                          var outline = _ref2.outline;
                                                                                                                    
                                                                                                                          var outlineCount = 0;
                                                                                                                          if (this.outline) {
                                                                                                                    Severity: Minor
                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                      Function nextMatch has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                          value: function nextMatch() {
                                                                                                                            var _this4 = this;
                                                                                                                      
                                                                                                                            var previous = this.state.findPrevious;
                                                                                                                            var currentPageIndex = this.pdfViewer.currentPageNumber - 1;
                                                                                                                      Severity: Minor
                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                        Function pdfHistoryPush has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                          push: function pdfHistoryPush(params, isInitialBookmark) {
                                                                                                                            if (!(this.initialized && this.historyUnlocked)) {
                                                                                                                              return;
                                                                                                                            }
                                                                                                                            if (params.dest && !params.hash) {
                                                                                                                        Severity: Minor
                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                          Function _touchSwipe has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              value: function _touchSwipe(evt) {
                                                                                                                                if (!this.active) {
                                                                                                                                  return;
                                                                                                                                }
                                                                                                                                if (evt.touches.length > 1) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                            Function update has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                value: function update(scale, rotation) {
                                                                                                                                  this.scale = scale || this.scale;
                                                                                                                                  if (typeof rotation !== 'undefined') {
                                                                                                                                    this.rotation = rotation;
                                                                                                                                  }
                                                                                                                            Severity: Minor
                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                              Function _bindMouse has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                  value: function _bindMouse() {
                                                                                                                                    var _this2 = this;
                                                                                                                              
                                                                                                                                    var div = this.textLayerDiv;
                                                                                                                                    var expandDivsTimer = null;
                                                                                                                              Severity: Minor
                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                Function _addEventListeners has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                    value: function _addEventListeners() {
                                                                                                                                      var _this3 = this;
                                                                                                                                
                                                                                                                                      this.mainContainer.addEventListener('transitionend', function (evt) {
                                                                                                                                        if (evt.target === _this3.mainContainer) {
                                                                                                                                Severity: Minor
                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                  Function SimpleLinkService has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                  var SimpleLinkService = function () {
                                                                                                                                    function SimpleLinkService() {
                                                                                                                                      _classCallCheck(this, SimpleLinkService);
                                                                                                                                    }
                                                                                                                                  
                                                                                                                                  
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                    Function convertMatches has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        value: function convertMatches(matches, matchesLength) {
                                                                                                                                          var i = 0;
                                                                                                                                          var iIndex = 0;
                                                                                                                                          var textContentItemsStr = this.textContentItemsStr;
                                                                                                                                          var end = textContentItemsStr.length - 1;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                      Function goToDestination has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                            var goToDestination = function goToDestination(_ref2) {
                                                                                                                                              var namedDest = _ref2.namedDest,
                                                                                                                                                  explicitDest = _ref2.explicitDest;
                                                                                                                                      
                                                                                                                                              var destRef = explicitDest[0],
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                        Function DownloadManager has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                        var DownloadManager = function () {
                                                                                                                                          function DownloadManager() {
                                                                                                                                            _classCallCheck(this, DownloadManager);
                                                                                                                                          }
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                          Function reset has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                              value: function reset() {
                                                                                                                                                var keepZoomLayer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
                                                                                                                                                var keepAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                                                                                                                                          
                                                                                                                                                this.cancelRendering();
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                            Function EventBus has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                            var EventBus = function () {
                                                                                                                                              function EventBus() {
                                                                                                                                                _classCallCheck(this, EventBus);
                                                                                                                                            
                                                                                                                                                this._listeners = Object.create(null);
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                              Function webViewerWheel has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                              Open

                                                                                                                                              function webViewerWheel(evt) {
                                                                                                                                                var pdfViewer = PDFViewerApplication.pdfViewer;
                                                                                                                                                if (pdfViewer.isInPresentationMode) {
                                                                                                                                                  return;
                                                                                                                                                }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                Function PDFPresentationMode has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                  function PDFPresentationMode(_ref) {
                                                                                                                                                    var _this = this;
                                                                                                                                                
                                                                                                                                                    var container = _ref.container,
                                                                                                                                                        _ref$viewer = _ref.viewer,
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                  Function PDFPageView has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                  Open

                                                                                                                                                    function PDFPageView(options) {
                                                                                                                                                      _classCallCheck(this, PDFPageView);
                                                                                                                                                  
                                                                                                                                                      var container = options.container;
                                                                                                                                                      var defaultViewport = options.defaultViewport;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                    Function _setScale has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        value: function _setScale(value) {
                                                                                                                                                          var noScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                                                                                                                                                    
                                                                                                                                                          var scale = parseFloat(value);
                                                                                                                                                          if (scale > 0) {
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                      Function approximateFraction has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                      function approximateFraction(x) {
                                                                                                                                                        if (Math.floor(x) === x) {
                                                                                                                                                          return [x, 1];
                                                                                                                                                        }
                                                                                                                                                        var xinv = 1 / x;
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                        Function bindEvents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                        Open

                                                                                                                                                          bindEvents: function bindEvents() {
                                                                                                                                                            var eventBus = this.eventBus,
                                                                                                                                                                _boundEvents = this._boundEvents;
                                                                                                                                                        
                                                                                                                                                            _boundEvents.beforePrint = this.beforePrint.bind(this);
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                          Function paintOnSvg has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                              value: function paintOnSvg(wrapper) {
                                                                                                                                                                var _this2 = this;
                                                                                                                                                          
                                                                                                                                                                var cancelled = false;
                                                                                                                                                                var ensureNotCancelled = function ensureNotCancelled() {
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                            Function unbindEvents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                              unbindEvents: function unbindEvents() {
                                                                                                                                                                var eventBus = this.eventBus,
                                                                                                                                                                    _boundEvents = this._boundEvents;
                                                                                                                                                            
                                                                                                                                                                eventBus.off('resize', webViewerResize);
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                              Function parseRawLines has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                                    function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {
                                                                                                                                                                      var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
                                                                                                                                                                      var currentLang = '*';
                                                                                                                                                                      var genericLang = lang.split('-', 1)[0];
                                                                                                                                                                      var skipLang = false;
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                Function setImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                Open

                                                                                                                                                                    value: function setImage(pageView) {
                                                                                                                                                                      if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                                                                                                                                                                        return;
                                                                                                                                                                      }
                                                                                                                                                                      var img = pageView.canvas;
                                                                                                                                                                Severity: Minor
                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                  Function _convertCanvasToImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                  Open

                                                                                                                                                                      value: function _convertCanvasToImage() {
                                                                                                                                                                        var _this = this;
                                                                                                                                                                  
                                                                                                                                                                        if (!this.canvas) {
                                                                                                                                                                          return;
                                                                                                                                                                  Severity: Minor
                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                    Function executeNamedAction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                    Open

                                                                                                                                                                        value: function executeNamedAction(action) {
                                                                                                                                                                          switch (action) {
                                                                                                                                                                            case 'GoBack':
                                                                                                                                                                              if (this.pdfHistory) {
                                                                                                                                                                                this.pdfHistory.back();
                                                                                                                                                                    Severity: Minor
                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                      Open

                                                                                                                                                                        if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && typeof page.num === 'number' && (page.num | 0) === page.num && typeof page.gen === 'number' && (page.gen | 0) === page.gen) && !(typeof page === 'number' && (page | 0) === page && page >= 0)) {
                                                                                                                                                                          return false;
                                                                                                                                                                        }
                                                                                                                                                                      Severity: Critical
                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                        Function updateUIState has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                        Open

                                                                                                                                                                            value: function updateUIState(state, previous, matchCount) {
                                                                                                                                                                              var _this2 = this;
                                                                                                                                                                        
                                                                                                                                                                              var notFound = false;
                                                                                                                                                                              var findMsg = '';
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                          Function translateElement has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                          Open

                                                                                                                                                                            function translateElement(element) {
                                                                                                                                                                              var l10n = getL10nAttributes(element);
                                                                                                                                                                              if (!l10n.id) return;
                                                                                                                                                                              var data = getL10nData(l10n.id, l10n.args);
                                                                                                                                                                              if (!data) {
                                                                                                                                                                          Severity: Minor
                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                            Function _prepareMatches has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                value: function _prepareMatches(matchesWithLength, matches, matchesLength) {
                                                                                                                                                                                  function isSubTerm(matchesWithLength, currentIndex) {
                                                                                                                                                                                    var currentElem = matchesWithLength[currentIndex];
                                                                                                                                                                                    var nextElem = matchesWithLength[currentIndex + 1];
                                                                                                                                                                                    if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) {
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                              Function switchTool has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                  value: function switchTool(tool) {
                                                                                                                                                                                    var _this2 = this;
                                                                                                                                                                              
                                                                                                                                                                                    if (this.activeBeforePresentationMode !== null) {
                                                                                                                                                                                      return;
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                Function update has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                    value: function update() {
                                                                                                                                                                                      var visible = this._getVisiblePages();
                                                                                                                                                                                      var visiblePages = visible.views;
                                                                                                                                                                                      if (visiblePages.length === 0) {
                                                                                                                                                                                        return;
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                  Function render has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      value: function render(_ref2) {
                                                                                                                                                                                        var attachments = _ref2.attachments,
                                                                                                                                                                                            _ref2$keepRenderedCap = _ref2.keepRenderedCapability,
                                                                                                                                                                                            keepRenderedCapability = _ref2$keepRenderedCap === undefined ? false : _ref2$keepRenderedCap;
                                                                                                                                                                                  
                                                                                                                                                                                  
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                    Function GenericL10n has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                    var GenericL10n = function () {
                                                                                                                                                                                      function GenericL10n(lang) {
                                                                                                                                                                                        _classCallCheck(this, GenericL10n);
                                                                                                                                                                                    
                                                                                                                                                                                        this._lang = lang;
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                      Function pdfHistory_goTo has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                      Open

                                                                                                                                                                                        _goTo: function pdfHistory_goTo(state) {
                                                                                                                                                                                          if (!(this.initialized && this.historyUnlocked && this._isStateObjectDefined(state))) {
                                                                                                                                                                                            return;
                                                                                                                                                                                          }
                                                                                                                                                                                          if (!this.reInitialized && state.uid < this.currentUid) {
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                        Function print has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                        window.print = function print() {
                                                                                                                                                                                          if (activeService) {
                                                                                                                                                                                            console.warn('Ignored window.print() because of a pending print job.');
                                                                                                                                                                                            return;
                                                                                                                                                                                          }
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                          Function _setScaleUpdatePages has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                              value: function _setScaleUpdatePages(newScale, newValue) {
                                                                                                                                                                                                var noScroll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                                                                                                                                var preset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
                                                                                                                                                                                          
                                                                                                                                                                                                this._currentScaleValue = newValue.toString();
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                            Function _parseDate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                            Open

                                                                                                                                                                                                value: function _parseDate(inputDate) {
                                                                                                                                                                                                  if (!inputDate) {
                                                                                                                                                                                                    return;
                                                                                                                                                                                                  }
                                                                                                                                                                                                  var dateToParse = inputDate;
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                              Function scrollIntoView has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                              function scrollIntoView(element, spot) {
                                                                                                                                                                                                var skipOverflowHiddenElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                                                                                                                              
                                                                                                                                                                                                var parent = element.offsetParent;
                                                                                                                                                                                                if (!parent) {
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                Function extractText has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                Open

                                                                                                                                                                                                    value: function extractText() {
                                                                                                                                                                                                      var _this2 = this;
                                                                                                                                                                                                
                                                                                                                                                                                                      if (this.startedTextExtraction) {
                                                                                                                                                                                                        return;
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                  Function bindWindowEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                    bindWindowEvents: function bindWindowEvents() {
                                                                                                                                                                                                      var eventBus = this.eventBus,
                                                                                                                                                                                                          _boundEvents = this._boundEvents;
                                                                                                                                                                                                  
                                                                                                                                                                                                      _boundEvents.windowResize = function () {
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                    Function updateMatches has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                        value: function updateMatches() {
                                                                                                                                                                                                          if (!this.renderingDone) {
                                                                                                                                                                                                            return;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          var matches = this.matches;
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                      Function close has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                        close: function close() {
                                                                                                                                                                                                          var errorWrapper = this.appConfig.errorWrapper.container;
                                                                                                                                                                                                          errorWrapper.setAttribute('hidden', 'true');
                                                                                                                                                                                                          if (!this.pdfLoadingTask) {
                                                                                                                                                                                                            return Promise.resolve();
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                        Function _hideUINotification has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                            value: function _hideUINotification(view) {
                                                                                                                                                                                                              var _this2 = this;
                                                                                                                                                                                                        
                                                                                                                                                                                                              if (this.disableNotification) {
                                                                                                                                                                                                                return;
                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                          Function pdfHistory_getPreviousParams has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                            _getPreviousParams: function pdfHistory_getPreviousParams(onlyCheckPage, beforeUnload) {
                                                                                                                                                                                                              if (!(this.currentBookmark && this.currentPage)) {
                                                                                                                                                                                                                return null;
                                                                                                                                                                                                              } else if (this.updatePreviousBookmark) {
                                                                                                                                                                                                                this.updatePreviousBookmark = false;
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                            Function ViewHistory has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                              function ViewHistory(fingerprint) {
                                                                                                                                                                                                                var _this = this;
                                                                                                                                                                                                            
                                                                                                                                                                                                                var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE;
                                                                                                                                                                                                            
                                                                                                                                                                                                            
                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                              Function nextEntry has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                      function nextEntry() {
                                                                                                                                                                                                                        while (true) {
                                                                                                                                                                                                                          if (!entries.length) {
                                                                                                                                                                                                                            parsedRawLinesCallback();
                                                                                                                                                                                                                            return;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                Function setDocument has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                    value: function setDocument(pdfDocument) {
                                                                                                                                                                                                                      var _this = this;
                                                                                                                                                                                                                
                                                                                                                                                                                                                      if (this.pdfDocument) {
                                                                                                                                                                                                                        this._cancelRendering();
                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                  Function finishPaintTask has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                        var finishPaintTask = function finishPaintTask(error) {
                                                                                                                                                                                                                          if (paintTask === _this.paintTask) {
                                                                                                                                                                                                                            _this.paintTask = null;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                                          if (error === 'cancelled' || error instanceof _pdfjsLib.RenderingCancelledException) {
                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                    Function TempImageFactoryClosure has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                    var TempImageFactory = function TempImageFactoryClosure() {
                                                                                                                                                                                                                      var tempCanvasCache = null;
                                                                                                                                                                                                                      return {
                                                                                                                                                                                                                        getCanvas: function getCanvas(width, height) {
                                                                                                                                                                                                                          var tempCanvas = tempCanvasCache;
                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                      Function renderPage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                      function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) {
                                                                                                                                                                                                                        var scratchCanvas = activeService.scratchCanvas;
                                                                                                                                                                                                                        var PRINT_RESOLUTION = 150;
                                                                                                                                                                                                                        var PRINT_UNITS = PRINT_RESOLUTION / 72.0;
                                                                                                                                                                                                                        scratchCanvas.width = Math.floor(size.width * PRINT_UNITS);
                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                        Function calcFindMatch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                            value: function calcFindMatch(pageIndex) {
                                                                                                                                                                                                                              var pageContent = this.normalize(this.pageContents[pageIndex]);
                                                                                                                                                                                                                              var query = this.normalize(this.state.query);
                                                                                                                                                                                                                              var caseSensitive = this.state.caseSensitive;
                                                                                                                                                                                                                              var phraseSearch = this.state.phraseSearch;
                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                          Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                              value: function render(viewport) {
                                                                                                                                                                                                                                var _this = this;
                                                                                                                                                                                                                          
                                                                                                                                                                                                                                var intent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'display';
                                                                                                                                                                                                                          
                                                                                                                                                                                                                          
                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                              if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
                                                                                                                                                                                                                                window.print();
                                                                                                                                                                                                                                if (hasAttachEvent) {
                                                                                                                                                                                                                                  return;
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                                                                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                          if (found) {
                                                                                                                                                                                                                                            children[i].nodeValue = '';
                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                            children[i].nodeValue = data[gTextProp];
                                                                                                                                                                                                                                            found = true;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 45 mins to fix

                                                                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                              if (zoomArgs.length !== 5) {
                                                                                                                                                                                                                                                console.error('PDFLinkService.setHash: Not enough parameters for "FitR".');
                                                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                                                dest = [null, { name: zoomArg }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0];
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 45 mins to fix

                                                                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                              if (anyCaseLang === lang) {
                                                                                                                                                                                                                                                gL10nData = dict.locales[lang];
                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                              } else if (anyCaseLang === defaultLocale) {
                                                                                                                                                                                                                                                gL10nData = dict.locales[defaultLocale];
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 45 mins to fix

                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                              if (n == 1) return 'one';
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                  return 'other';
                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                      return;
                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                        return false;
                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                        return false;
                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                            return 'other';
                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                              if (n == 1) return 'one';
                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                return 'other';
                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                  return 'other';
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                  return null;
                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                  return params;
                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                  return true;
                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                          return;
                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var PDFViewerApplication = {
                                                                                                                                                                                                                                                                      initialBookmark: document.location.hash.substring(1),
                                                                                                                                                                                                                                                                      initialDestination: null,
                                                                                                                                                                                                                                                                      initialized: false,
                                                                                                                                                                                                                                                                      fellback: false,
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 mos to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 925..1849

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 10251.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 8147..8960

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 7684.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 3874..4606

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 6184.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 6304..6827

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 5891.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 3103..3528

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 4084.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 7572..7933

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3958.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 6829..7220

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3770.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2558..2961

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3559.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9349..9691

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3332.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 7222..7570

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3284.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5818..6123

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 3152.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 3606..3872

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 2526.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 wks to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5398..5615

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 2465.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9693..9919

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 2239.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 7935..8145

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1969.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5617..5816

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1911.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9124..9347

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1870.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerKeyDown(evt) {
                                                                                                                                                                                                                                                                      if (PDFViewerApplication.overlayManager.active) {
                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                      var handled = false,
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2307..2529

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1587.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 6125..6302

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1585.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4868..5007

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1459.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5243..5396

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1422.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2963..3101

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1419.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 579..699

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1357.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 10057..10198

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1335.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5009..5144

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1280.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9921..10055

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1238.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerInitialized() {
                                                                                                                                                                                                                                                                      var appConfig = PDFViewerApplication.appConfig;
                                                                                                                                                                                                                                                                      var file = void 0;
                                                                                                                                                                                                                                                                      var queryString = document.location.search.substring(1);
                                                                                                                                                                                                                                                                      var params = (0, _ui_utils.parseQueryString)(queryString);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 1891..1990

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1175.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 701..837

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1114.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4608..4722

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1073.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5146..5241

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 1017.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var BasePreferences = function () {
                                                                                                                                                                                                                                                                      function BasePreferences() {
                                                                                                                                                                                                                                                                        var _this = this;
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                        _classCallCheck(this, BasePreferences);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 5 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9010..9118

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 890.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 5 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 3530..3604

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 836.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 4 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4724..4806

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 820.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var ProgressBar = function () {
                                                                                                                                                                                                                                                                      function ProgressBar(id) {
                                                                                                                                                                                                                                                                        var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
                                                                                                                                                                                                                                                                            height = _ref.height,
                                                                                                                                                                                                                                                                            width = _ref.width,
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 4 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 455..531

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 737.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function getVisibleElements(scrollEl, views) {
                                                                                                                                                                                                                                                                      var sortByVisibility = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                      var top = scrollEl.scrollTop,
                                                                                                                                                                                                                                                                          bottom = top + scrollEl.clientHeight;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 281..342

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 630.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /******/ (function(modules) { // webpackBootstrap
                                                                                                                                                                                                                                                                    /******/     // The module cache
                                                                                                                                                                                                                                                                    /******/     var installedModules = {};
                                                                                                                                                                                                                                                                    /******/
                                                                                                                                                                                                                                                                    /******/     // The require function
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 16..10199

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 561.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4808..4866

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 532.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerWheel(evt) {
                                                                                                                                                                                                                                                                      var pdfViewer = PDFViewerApplication.pdfViewer;
                                                                                                                                                                                                                                                                      if (pdfViewer.isInPresentationMode) {
                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 days to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2258..2297

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 379.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var EventBus = function () {
                                                                                                                                                                                                                                                                      function EventBus() {
                                                                                                                                                                                                                                                                        _classCallCheck(this, EventBus);
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                        this._listeners = Object.create(null);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 407..449

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 346.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function scrollIntoView(element, spot) {
                                                                                                                                                                                                                                                                      var skipOverflowHiddenElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                      var parent = element.offsetParent;
                                                                                                                                                                                                                                                                      if (!parent) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 150..182

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 325.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function approximateFraction(x) {
                                                                                                                                                                                                                                                                      if (Math.floor(x) === x) {
                                                                                                                                                                                                                                                                        return [x, 1];
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                      var xinv = 1 / x;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 239..276

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 309.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerUpdateViewarea(evt) {
                                                                                                                                                                                                                                                                      var location = evt.location,
                                                                                                                                                                                                                                                                          store = PDFViewerApplication.store;
                                                                                                                                                                                                                                                                      if (store && PDFViewerApplication.isInitialViewSet) {
                                                                                                                                                                                                                                                                        store.setMultiple({
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2098..2117

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 268.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                      webViewerFileInputChange = function webViewerFileInputChange(evt) {
                                                                                                                                                                                                                                                                        var file = evt.fileInput.files[0];
                                                                                                                                                                                                                                                                        if (!_pdfjsLib.PDFJS.disableCreateObjectURL && URL.createObjectURL) {
                                                                                                                                                                                                                                                                          PDFViewerApplication.open(URL.createObjectURL(file));
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2145..2165

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 261.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerPageRendered(evt) {
                                                                                                                                                                                                                                                                      var pageNumber = evt.pageNumber;
                                                                                                                                                                                                                                                                      var pageIndex = pageNumber - 1;
                                                                                                                                                                                                                                                                      var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex);
                                                                                                                                                                                                                                                                      if (pageNumber === PDFViewerApplication.page) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2025..2047

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 240.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function getPDFFileNameFromURL(url) {
                                                                                                                                                                                                                                                                      var defaultFilename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'document.pdf';
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                      if (isDataSchema(url)) {
                                                                                                                                                                                                                                                                        console.warn('getPDFFileNameFromURL: ' + 'ignoring "data:" URL for performance reasons.');
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 354..374

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 238.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.cloneObj = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 94..94

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 227.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function normalizeWheelEventDelta(evt) {
                                                                                                                                                                                                                                                                      var delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY);
                                                                                                                                                                                                                                                                      var angle = Math.atan2(evt.deltaY, evt.deltaX);
                                                                                                                                                                                                                                                                      if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) {
                                                                                                                                                                                                                                                                        delta = -delta;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 375..391

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 202.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function loadAndEnablePDFBug(enabledTabs) {
                                                                                                                                                                                                                                                                      return new Promise(function (resolve, reject) {
                                                                                                                                                                                                                                                                        var appConfig = PDFViewerApplication.appConfig;
                                                                                                                                                                                                                                                                        var script = document.createElement('script');
                                                                                                                                                                                                                                                                        script.src = appConfig.debuggerScriptPath;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 1872..1890

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 198.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function watchScroll(viewAreaElement, callback) {
                                                                                                                                                                                                                                                                      var debounceScroll = function debounceScroll(evt) {
                                                                                                                                                                                                                                                                        if (rAF) {
                                                                                                                                                                                                                                                                          return;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 183..207

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 178.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (file && file.lastIndexOf('file:', 0) === 0) {
                                                                                                                                                                                                                                                                          PDFViewerApplication.setTitleUsingUrl(file);
                                                                                                                                                                                                                                                                          var xhr = new XMLHttpRequest();
                                                                                                                                                                                                                                                                          xhr.onload = function () {
                                                                                                                                                                                                                                                                            PDFViewerApplication.open(new Uint8Array(xhr.response));
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 1994..2010

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 171.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerPageChanging(evt) {
                                                                                                                                                                                                                                                                      var page = evt.pageNumber;
                                                                                                                                                                                                                                                                      PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null);
                                                                                                                                                                                                                                                                      PDFViewerApplication.secondaryToolbar.setPageNumber(page);
                                                                                                                                                                                                                                                                      if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2242..2255

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 162.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function binarySearchFirstItem(items, condition) {
                                                                                                                                                                                                                                                                      var minIndex = 0;
                                                                                                                                                                                                                                                                      var maxIndex = items.length - 1;
                                                                                                                                                                                                                                                                      if (items.length === 0 || !condition(items[maxIndex])) {
                                                                                                                                                                                                                                                                        return items.length;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 219..238

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 159.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerPageMode(evt) {
                                                                                                                                                                                                                                                                      var mode = evt.mode,
                                                                                                                                                                                                                                                                          view = void 0;
                                                                                                                                                                                                                                                                      switch (mode) {
                                                                                                                                                                                                                                                                        case 'thumbs':
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2049..2071

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 149.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var DefaultExternalServices = {
                                                                                                                                                                                                                                                                      updateFindControlState: function updateFindControlState(data) {},
                                                                                                                                                                                                                                                                      initPassiveLoading: function initPassiveLoading(callbacks) {},
                                                                                                                                                                                                                                                                      fallback: function fallback(data, callback) {},
                                                                                                                                                                                                                                                                      reportTelemetry: function reportTelemetry(data) {},
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 902..924

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 149.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerClick(evt) {
                                                                                                                                                                                                                                                                      if (!PDFViewerApplication.secondaryToolbar.isOpen) {
                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                      var appConfig = PDFViewerApplication.appConfig;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2298..2306

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 119.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function getOutputScale(ctx) {
                                                                                                                                                                                                                                                                      var devicePixelRatio = window.devicePixelRatio || 1;
                                                                                                                                                                                                                                                                      var backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
                                                                                                                                                                                                                                                                      var pixelRatio = devicePixelRatio / backingStoreRatio;
                                                                                                                                                                                                                                                                      return {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 140..149

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 105.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerPageNumberChanged(evt) {
                                                                                                                                                                                                                                                                      var pdfViewer = PDFViewerApplication.pdfViewer;
                                                                                                                                                                                                                                                                      pdfViewer.currentPageLabel = evt.value;
                                                                                                                                                                                                                                                                      if (evt.value !== pdfViewer.currentPageNumber.toString() && evt.value !== pdfViewer.currentPageLabel) {
                                                                                                                                                                                                                                                                        PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2201..2207

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 101.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerResize() {
                                                                                                                                                                                                                                                                      var pdfDocument = PDFViewerApplication.pdfDocument,
                                                                                                                                                                                                                                                                          pdfViewer = PDFViewerApplication.pdfViewer;
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                      if (!pdfDocument) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2118..2130

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 97.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function apiPageModeToSidebarView(mode) {
                                                                                                                                                                                                                                                                      switch (mode) {
                                                                                                                                                                                                                                                                        case 'UseNone':
                                                                                                                                                                                                                                                                          return _pdf_sidebar.SidebarView.NONE;
                                                                                                                                                                                                                                                                        case 'UseThumbs':
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2530..2543

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 88.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerHashchange(evt) {
                                                                                                                                                                                                                                                                      if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) {
                                                                                                                                                                                                                                                                        var hash = evt.hash;
                                                                                                                                                                                                                                                                        if (!hash) {
                                                                                                                                                                                                                                                                          return;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2131..2143

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 88.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerSidebarViewChanged(evt) {
                                                                                                                                                                                                                                                                      PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;
                                                                                                                                                                                                                                                                      var store = PDFViewerApplication.store;
                                                                                                                                                                                                                                                                      if (store && PDFViewerApplication.isInitialViewSet) {
                                                                                                                                                                                                                                                                        store.set('sidebarView', evt.view).catch(function () {});
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2091..2097

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 87.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function isDataSchema(url) {
                                                                                                                                                                                                                                                                      var i = 0,
                                                                                                                                                                                                                                                                          ii = url.length;
                                                                                                                                                                                                                                                                      while (i < ii && url[i].trim() === '') {
                                                                                                                                                                                                                                                                        i++;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 346..353

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 83.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerNamedAction(evt) {
                                                                                                                                                                                                                                                                      var action = evt.action;
                                                                                                                                                                                                                                                                      switch (action) {
                                                                                                                                                                                                                                                                        case 'GoToPage':
                                                                                                                                                                                                                                                                          PDFViewerApplication.appConfig.toolbar.pageNumber.select();
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2072..2084

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 83.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerPresentationModeChanged(evt) {
                                                                                                                                                                                                                                                                      var active = evt.active,
                                                                                                                                                                                                                                                                          switchInProgress = evt.switchInProgress;
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                      PDFViewerApplication.pdfViewer.presentationModeState = switchInProgress ? _pdf_viewer.PresentationModeState.CHANGING : active ? _pdf_viewer.PresentationModeState.FULLSCREEN : _pdf_viewer.PresentationModeState.NORMAL;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2085..2090

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 80.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function cloneObj(obj) {
                                                                                                                                                                                                                                                                      var result = Object.create(null);
                                                                                                                                                                                                                                                                      for (var i in obj) {
                                                                                                                                                                                                                                                                        if (Object.prototype.hasOwnProperty.call(obj, i)) {
                                                                                                                                                                                                                                                                          result[i] = obj[i];
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 392..400

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 79.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerFind(evt) {
                                                                                                                                                                                                                                                                      PDFViewerApplication.findController.executeCommand('find' + evt.type, {
                                                                                                                                                                                                                                                                        query: evt.query,
                                                                                                                                                                                                                                                                        phraseSearch: evt.phraseSearch,
                                                                                                                                                                                                                                                                        caseSensitive: evt.caseSensitive,
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2220..2228

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 79.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    /***/ (function(module, exports, __webpack_require__) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    "use strict";
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 564..577

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 76.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        try {
                                                                                                                                                                                                                                                                          var viewerOrigin = new URL(window.location.href).origin || 'null';
                                                                                                                                                                                                                                                                          if (HOSTED_VIEWER_ORIGINS.indexOf(viewerOrigin) >= 0) {
                                                                                                                                                                                                                                                                            return;
                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 1857..1869

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 75.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function formatL10nValue(text, args) {
                                                                                                                                                                                                                                                                      if (!args) {
                                                                                                                                                                                                                                                                        return text;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                      return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function (all, name) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 115..122

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    var NullL10n = {
                                                                                                                                                                                                                                                                      get: function get(property, args, fallback) {
                                                                                                                                                                                                                                                                        return Promise.resolve(formatL10nValue(fallback, args));
                                                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                                                      translate: function translate(element) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 123..130

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 62.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerFindFromUrlHash(evt) {
                                                                                                                                                                                                                                                                      PDFViewerApplication.findController.executeCommand('find', {
                                                                                                                                                                                                                                                                        query: evt.query,
                                                                                                                                                                                                                                                                        phraseSearch: evt.phraseSearch,
                                                                                                                                                                                                                                                                        caseSensitive: false,
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2229..2237

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 59.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                      _pdfjsLib.PDFJS.locale = _pdfjsLib.PDFJS.locale === undefined && typeof navigator !== 'undefined' ? navigator.language : _pdfjsLib.PDFJS.locale;
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 137..139

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 58.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function roundToDivide(x, div) {
                                                                                                                                                                                                                                                                      var r = x % div;
                                                                                                                                                                                                                                                                      return r === 0 ? x : Math.round(x - r + div);
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 277..280

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 50.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    function webViewerScaleChanging(evt) {
                                                                                                                                                                                                                                                                      PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);
                                                                                                                                                                                                                                                                      PDFViewerApplication.pdfViewer.update();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2238..2241

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 47.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    There are no issues that match your filters.

                                                                                                                                                                                                                                                                    Category
                                                                                                                                                                                                                                                                    Status