cBioPortal/iViz

View on GitHub

Showing 1,095 of 1,095 total issues

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

    function initReactData(_selectedMap, _selectedSampleUids) {
      attr_ = iViz.util.tableView.getAttributes(type_);
      var result = {
        data: [],
        attributes: attr_
Severity: Minor
Found in app/scripts/views/components/dataTable/tableView.js - About 1 hr to fix

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

        content_.update = function(groups, _chartId, _attrId) {
          // remove previous curves
          var _chartInst_ = this.chartInst_;
          var _newGroups = [];
          _chartInst_.removeCurves();
    Severity: Minor
    Found in app/scripts/views/components/survivalChart/main.js - About 1 hr to fix

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

          content.getCurrentCategories = function(sortBy) {
            var groups = dcDimension.group().top(Infinity);
            var groupTypeId =
              data_.groupType === 'patient' ? 'patient_uid' : 'sample_uid';
            var selectedCases = _.pluck(dcDimension.top(Infinity), groupTypeId).sort();
      Severity: Minor
      Found in app/scripts/views/components/barChart/barChart.js - About 1 hr to fix

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

            data: function() {
              return {
                chartDivId:
                  iViz.util.getDefaultDomId('chartDivId', this.attributes.attr_id),
                resetBtnId:
        Severity: Minor
        Found in app/scripts/views/components/scatterPlot/scatterPlotTemplate.js - About 1 hr to fix

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

              function survivalChartCanvasDownload(data, downloadOpts) {
                var _svgElement;
                var _svgTitle;
                var _labelTextMaxLength = 0;
                var _numOfLabels = 0;
          Severity: Minor
          Found in app/scripts/controller/util.js - About 1 hr to fix

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

                  _self.elem_.curves[_curveIndex].line = _self.elem_
                    .curves[_curveIndex].curve.append('g')
                    .attr('class', 'line');
            app/scripts/views/components/survivalChart/components/curve.js on lines 170..172

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

            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

                  _self.elem_.curves[_curveIndex].dots = _self.elem_
                    .curves[_curveIndex].curve.append('g')
                    .attr('class', 'dots');
            app/scripts/views/components/survivalChart/components/curve.js on lines 167..169

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

            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 initLine has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  initLine: function() {
                    var _self = this;
                    var opts = _.extend({
                      strokeWidth: 4,
                      easing: 'easeInOut',
            Severity: Minor
            Found in app/scripts/views/components/progressBar/progressBar.js - About 1 hr to fix

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

                  data: function() {
                    return {
                      chartDivId:
                        iViz.util.getDefaultDomId('chartDivId', this.attributes.attr_id),
                      resetBtnId:
              Severity: Minor
              Found in app/scripts/views/components/barChart/barChartTemplate.js - About 1 hr to fix

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

                              success: function(panels) {
                                _.each(panels, function(panel) {
                                  _.each(panel.genes, function(gene) {
                                    if (!geneSampleMap[gene.hugoGeneSymbol]) {
                                      geneSampleMap[gene.hugoGeneSymbol] = {
                Severity: Minor
                Found in app/scripts/model/dataProxy.js - About 1 hr to fix

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

                      data: function() {
                        return {
                          chartDivId: iViz.util.getDefaultDomId('chartDivId', this.attributes.attr_id),
                          resetBtnId: iViz.util.getDefaultDomId('resetBtnId', this.attributes.attr_id),
                          chartId: iViz.util.getDefaultDomId('chartId', this.attributes.attr_id),
                  Severity: Minor
                  Found in app/scripts/views/components/survivalChart/template.js - About 1 hr to fix

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

                            loadingBar: {
                              status: 0,
                              type: 'percentage',
                              divId: iViz.util.getDefaultDomId('progressBarId', this.attributes.attr_id),
                              opts: {},
                    Severity: Major
                    Found in app/scripts/views/components/survivalChart/template.js and 2 other locations - About 55 mins to fix
                    app/scripts/views/components/dataTable/tableViewTemplate.js on lines 55..61
                    app/scripts/views/components/scatterPlot/scatterPlotTemplate.js on lines 47..53

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

                    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 3 locations. Consider refactoring.
                    Open

                            loadingBar :{
                              status: 0,
                              type: 'percentage',
                              divId: iViz.util.getDefaultDomId('progressBarId', this.attributes.attr_id),
                              opts: {},
                    Severity: Major
                    Found in app/scripts/views/components/dataTable/tableViewTemplate.js and 2 other locations - About 55 mins to fix
                    app/scripts/views/components/scatterPlot/scatterPlotTemplate.js on lines 47..53
                    app/scripts/views/components/survivalChart/template.js on lines 46..52

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

                    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 3 locations. Consider refactoring.
                    Open

                            loadingBar :{
                              status: 0,
                              type: 'percentage',
                              divId: iViz.util.getDefaultDomId('progressBarId', this.attributes.attr_id),
                              opts: {},
                    app/scripts/views/components/dataTable/tableViewTemplate.js on lines 55..61
                    app/scripts/views/components/survivalChart/template.js on lines 46..52

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

                    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 (updateType_ === 'patient') {
                              self_.selectedPatientsByFilters = _selectedCasesByFilters;
                              // _selectedCasesByFilters = _selectedCasesByFilters.length === 0 ?
                              //   self_.completePatientsList : _selectedCasesByFilters;
                              _counterSelectedCasesByFilters =
                    Severity: Minor
                    Found in app/scripts/views/mainTemplate.js and 1 other location - About 55 mins to fix
                    app/scripts/views/mainTemplate.js on lines 360..367

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

                    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

                            } else {
                              self_.selectedSamplesByFilters = _selectedCasesByFilters;
                              // _selectedCasesByFilters = _selectedCasesByFilters.length === 0 ?
                              //   self_.completeSamplesList : _selectedCasesByFilters;
                              _counterSelectedCasesByFilters =
                    Severity: Minor
                    Found in app/scripts/views/mainTemplate.js and 1 other location - About 55 mins to fix
                    app/scripts/views/mainTemplate.js on lines 353..360

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

                    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

                                        self.data.sampleLists[studyId].hasOwnProperty(studyId + '_all') ?
                                          self.data.sampleLists[studyId][studyId + '_all'] : [];
                    Severity: Minor
                    Found in app/scripts/model/dataProxy.js and 1 other location - About 50 mins to fix
                    app/scripts/model/dataProxy.js on lines 1108..1109

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

                    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 studySamples = self.data.sampleLists[studyId].hasOwnProperty(studyId + '_all') ?
                                        self.data.sampleLists[studyId][studyId + '_all'] : [];
                    Severity: Minor
                    Found in app/scripts/model/dataProxy.js and 1 other location - About 50 mins to fix
                    app/scripts/model/dataProxy.js on lines 1105..1106

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

                    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

                                      Number(cbio.util.toPrecision(
                                        Number(config.xDomain[config.xDomain.length - 1] +
                                          config.gutter), 3, 0.1));
                    Severity: Minor
                    Found in app/scripts/views/components/barChart/barChart.js and 1 other location - About 50 mins to fix
                    app/scripts/views/components/barChart/barChart.js on lines 766..768

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

                    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

                                    Number(cbio.util.toPrecision(
                                      Number(config.xDomain[config.xDomain.length - 1] +
                                        config.gutter), 3, 0.1)));
                    Severity: Minor
                    Found in app/scripts/views/components/barChart/barChart.js and 1 other location - About 50 mins to fix
                    app/scripts/views/components/barChart/barChart.js on lines 772..774

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language