cBioPortal/iViz

View on GitHub

Showing 1,095 of 1,095 total issues

File tableView.js has 579 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Created by Karthik Kalletla on 6/20/16.
 */
'use strict';
(function(iViz, dc, _, React, ReactDOM, EnhancedFixedDataTableSpecial) {
Severity: Major
Found in app/scripts/views/components/dataTable/tableView.js - About 1 day to fix

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

            if (self_.grid_ === '') {
              self_.grid_ = new Packery(document.querySelector('.grid'), {
                itemSelector: '.grid-item',
                columnWidth: window.iViz.styles.vars.width.one + 5,
                rowHeight: window.iViz.styles.vars.height.one + 5,
    Severity: Major
    Found in app/scripts/views/mainTemplate.js and 1 other location - About 1 day to fix
    app/scripts/views/mainTemplate.js on lines 73..104

    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 229.

    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 (this.grid_ === '') {
              self_.grid_ = new Packery(document.querySelector('.grid'), {
                itemSelector: '.grid-item',
                columnWidth: window.iViz.styles.vars.width.one + 5,
                rowHeight: window.iViz.styles.vars.height.one + 5,
    Severity: Major
    Found in app/scripts/views/mainTemplate.js and 1 other location - About 1 day to fix
    app/scripts/views/mainTemplate.js on lines 256..275

    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 229.

    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

    Function createQtip has 224 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          createQtip: function() {
            var self_ = this;
            var previousSelection = {};
            $('.virtual-study').qtip(iViz.util.defaultQtipConfig(
              (self_.showSaveButton ? 'Save/' : '') + 'Share Virtual Study'));
    Severity: Major
    Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 1 day to fix

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

                    if (_hasDFS) {
                      var _dfsSurvivalAttrMeta = {};
                      _dfsSurvivalAttrMeta.attr_id = 'DFS_SURVIVAL';
                      _dfsSurvivalAttrMeta.datatype = 'SURVIVAL';
                      _dfsSurvivalAttrMeta.view_type = 'survival';
      Severity: Major
      Found in app/scripts/model/dataProxy.js and 1 other location - About 1 day to fix
      app/scripts/model/dataProxy.js on lines 453..472

      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 212.

      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

                    if (_hasOS) {
                      var _osSurvivalAttrMeta = {};
                      _osSurvivalAttrMeta.attr_id = 'OS_SURVIVAL';
                      _osSurvivalAttrMeta.datatype = 'SURVIVAL';
                      _osSurvivalAttrMeta.view_type = 'survival';
      Severity: Major
      Found in app/scripts/model/dataProxy.js and 1 other location - About 1 day to fix
      app/scripts/model/dataProxy.js on lines 432..451

      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 212.

      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

      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

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

                                } else {
                                  if (_patientAttributes[attr.attr_id]) {
                                    _patientAttributes.study_ids.push.apply(_patientAttributes.study_ids, attr.study_ids);
                                    if (attr.priority !== 1) {
                                      if (_patientAttributes[attr.attr_id].priority > 1) {
                Severity: Major
                Found in app/scripts/model/dataProxy.js and 1 other location - About 6 hrs to fix
                app/scripts/model/dataProxy.js on lines 138..151

                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 173.

                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

                                if (attr.is_patient_attribute === '0') {
                                  if (_sampleAttributes[attr.attr_id]) {
                                    _sampleAttributes.study_ids.push.apply(_sampleAttributes.study_ids, attr.study_ids);
                                    if (attr.priority !== 1) {
                                      if (_sampleAttributes[attr.attr_id].priority > 1) {
                Severity: Major
                Found in app/scripts/model/dataProxy.js and 1 other location - About 6 hrs to fix
                app/scripts/model/dataProxy.js on lines 151..164

                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 173.

                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

                      'addingChart': function(groupId, val) {
                        if (this.attributes.group_id === groupId) {
                          if (this.attributes.filter.length > 0) {
                            if (val) {
                              this.invisibleDimension.filterAll();
                Severity: Major
                Found in app/scripts/views/components/survivalChart/template.js and 1 other location - About 6 hrs to fix
                app/scripts/views/components/scatterPlot/scatterPlotTemplate.js on lines 97..115

                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

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

                      'addingChart': function(groupId, val) {
                        if (this.attributes.group_id === groupId) {
                          if (this.attributes.filter.length > 0) {
                            if (val) {
                              this.invisibleDimension.filterAll();
                app/scripts/views/components/survivalChart/template.js on lines 88..106

                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

                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

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

                      content.util.intersection = function(a, b) {
                        var result = [];
                        var i = 0;
                        var j = 0;
                        var aL = a.length;
                    Severity: Major
                    Found in app/scripts/model/dataProxy.js and 1 other location - About 5 hrs to fix
                    app/scripts/controller/util.js on lines 643..662

                    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 153.

                    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

                        content.intersection = function(a, b) {
                          var result = [];
                          var i = 0;
                          var j = 0;
                          var aL = a.length;
                    Severity: Major
                    Found in app/scripts/controller/util.js and 1 other location - About 5 hrs to fix
                    app/scripts/model/dataProxy.js on lines 28..47

                    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 153.

                    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

                    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
                      Severity
                      Category
                      Status
                      Source
                      Language