cBioPortal/iViz

View on GitHub

Showing 156 of 1,095 total issues

Function barChart has 211 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  iViz.util.barChart = (function() {
    var content = {};

    /**
     * Customize the bar chart configuration options according to
Severity: Major
Found in app/scripts/views/components/barChart/barChart.js - About 1 day to fix

    Function getDcConfig has 207 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        content.getDcConfig = function(data, logScale) {
          var config = {
            xDomain: [],
            xFakeDomain: [], // Design for noGrouping Data
            divider: 1,
    Severity: Major
    Found in app/scripts/views/components/barChart/barChart.js - About 1 day to fix

      Function ScatterPlot has 199 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        iViz.view.component.ScatterPlot = function() {
          var content = this;
          var chartId_;
          var data_;
          var groups_ = [];
      Severity: Major
      Found in app/scripts/views/components/scatterPlot/scatterPlot.js - About 7 hrs to fix

        Function rangeFilter has 190 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            content.rangeFilter = function(logScaleChecked, _filter) {
              var tempFilters_ = [];
              var minNumBarPoint = '';
              var maxNumBarPoint = '';
              var selectedNumBar = [];
        Severity: Major
        Found in app/scripts/views/components/barChart/barChart.js - About 7 hrs to fix

          File pieChart.js has 461 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * @author Hongxin Zhang on 3/10/16.
           */
          
          'use strict';
          Severity: Minor
          Found in app/scripts/views/components/pieChart/pieChart.js - About 7 hrs to fix

            Function addCurve has 162 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              iViz.view.component.SurvivalCurve.prototype.addCurve = function(data,
                _curveIndex,
                _lineColor) {
                var _self = this;
                
            Severity: Major
            Found in app/scripts/views/components/survivalChart/components/curve.js - About 6 hrs to fix

              Function tableView has 155 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                iViz.util.tableView = (function() {
                  var content = {};
                  content.compare = function(arr1, arr2) {
                    if (arr1.length !== arr2.length) {
                      return false;
              Severity: Major
              Found in app/scripts/views/components/dataTable/tableView.js - About 6 hrs to fix

                File vueCore.js has 411 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                (function(Vue, iViz, dc, _) {
                  iViz.vue = {};
                
                  iViz.vue.manage = (function() {
                Severity: Minor
                Found in app/scripts/vueCore.js - About 5 hrs to fix

                  File virtualStudy.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  'use strict';
                  (function(Vue, $, vcSession, iViz, _) {
                    Vue.component('virtualStudy', {
                      template:
                      '<div class="virtual-study">' +
                  Severity: Minor
                  Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 5 hrs to fix

                    File Gruntfile.js has 404 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    // Generated on 2016-01-02 using
                    // generator-webapp 1.1.0
                    'use strict';
                    
                    // # Globbing
                    Severity: Minor
                    Found in Gruntfile.js - About 5 hrs to fix

                      Function getAttributes has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          content.getAttributes = function(type) {
                            var _attr = [];
                            switch (type) {
                              case 'mutatedGene':
                                _attr = [
                      Severity: Major
                      Found in app/scripts/views/components/dataTable/tableView.js - About 5 hrs to fix

                        Function initDc_ has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var initDc_ = function(logScale) {
                              var tickVal = [];
                              var i = 0;
                              var barSet = {};
                        
                        
                        Severity: Major
                        Found in app/scripts/views/components/barChart/barChart.js - About 5 hrs to fix

                          Function getStudyToSampleToPatientMap has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function(self, fetch_promise) {
                                    var study_to_sample_to_patient = {};
                                    var _sample_uid = 0;
                                    var _patient_uid = 0
                                    var getSamplesCall = function() {
                          Severity: Major
                          Found in app/scripts/model/dataProxy.js - About 5 hrs to fix

                            File mainTemplate.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /**
                             * Created by Karthik Kalletla on 4/13/16.
                             */
                            'use strict';
                            (function(Vue, dc, iViz, Packery, Draggabilly, _) {
                            Severity: Minor
                            Found in app/scripts/views/mainTemplate.js - About 5 hrs to fix

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

                                          render: function(event, api) {
                                            var tooltip = $('.iviz-virtual-study-btn-qtip .qtip-content');
                                            tooltip.find('.save-cohort').click(function() {
                                              self_.hideDialog(tooltip);
                                              self_.showLoading(tooltip);
                              Severity: Major
                              Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 5 hrs to fix

                                Function LogRankTest has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                                Open

                                window.LogRankTest = (function(jStat) {
                                  var datum = {
                                    time: '',  // num of months
                                    num_of_failure_1: 0,
                                    num_of_failure_2: 0,
                                Severity: Minor
                                Found in app/scripts/views/components/survivalChart/components/logRankTest.js - About 5 hrs to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                File template.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * @author Yichao Sun on 5/18/16.
                                 */
                                'use strict';
                                (function(Vue, dc, iViz, _) {
                                Severity: Minor
                                Found in app/scripts/views/components/survivalChart/template.js - About 4 hrs to fix

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

                                  window.LogRankTest = (function(jStat) {
                                    var datum = {
                                      time: '',  // num of months
                                      num_of_failure_1: 0,
                                      num_of_failure_2: 0,
                                  Severity: Major
                                  Found in app/scripts/views/components/survivalChart/components/logRankTest.js - About 4 hrs to fix

                                    Function updatePlotGroups has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          updatePlotGroups: function(hasFilters) {
                                            var _type = this.attributes.group_type;
                                            var attrId = _type === 'patient' ? 'patient_uid' : 'sample_uid';
                                            var groupId = this.attributes.group_id;
                                            var _selectedCases = [];
                                    Severity: Major
                                    Found in app/scripts/views/components/survivalChart/template.js - About 4 hrs to fix

                                      Function ready has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          ready: function() {
                                            $('#' + this.chartId + '-download').qtip('destroy', true);
                                            $('#' + this.chartId + '-download-icon-wrapper').qtip('destroy', true);
                                            $('#' + this.chartId + '-title').qtip('destroy', true);
                                            var chartId = this.chartId;
                                      Severity: Major
                                      Found in app/scripts/views/components/chartOperationsHeader.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language