cBioPortal/iViz

View on GitHub

Showing 1,095 of 1,095 total issues

Function data has 33 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/dataTable/tableViewTemplate.js - About 1 hr to fix

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

              }, ready: function() {
                $('#iviz-header-left-patient-select').qtip({
                  content: {text: 'View the selected patients.'},
                  style: {classes: 'qtip-light qtip-rounded qtip-shadow'},
                  show: {event: 'mouseover'},
    Severity: Minor
    Found in app/scripts/vueCore.js - About 1 hr to fix

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

            submitClick: function(_selectedRowData) {
              var selectedSamplesUnion = [];
              var selectedRowsUids = _.pluck(_selectedRowData, 'uniqueid');
      
              this.madeSelection = true;
      Severity: Minor
      Found in app/scripts/views/components/dataTable/tableViewTemplate.js - About 1 hr to fix

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

              updateGrid: function(ChartsIds) {
                var self_ = this;
                if (this.grid_ === '') {
                  self_.grid_ = new Packery(document.querySelector('.grid'), {
                    itemSelector: '.grid-item',
        Severity: Minor
        Found in app/scripts/views/mainTemplate.js - About 1 hr to fix

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

              ready: function() {
                var _self = this;
                _self.showLoad = true;
          
                // make scatterplot can be closed even if ajax fails
          Severity: Minor
          Found in app/scripts/views/components/scatterPlot/scatterPlotTemplate.js - About 1 hr to fix

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

                  attachPlotlySelectedEvent: function() {
                    var _self = this;
                    var data = iViz.getGroupNdx(_self.attributes.group_id);
            
                    document.getElementById(this.chartId).on('plotly_selected',
            Severity: Minor
            Found in app/scripts/views/components/scatterPlot/scatterPlotTemplate.js - About 1 hr to fix

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

                function getNavCaseIdsStr(selectedCasesMap, selectedCaseIds, underURLLimit) {
                  var result = {
                    str: '',
                    limit: -1
                  };
              Severity: Minor
              Found in app/scripts/main.js - About 1 hr to fix

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

                    function initReactTable(targetId, inputData, opts) {
                      var selectedRows = v.chart.filters();
                
                      var opts_ = $.extend({
                        input: inputData,
                Severity: Minor
                Found in app/scripts/views/components/pieChart/pieChart.js - About 1 hr to fix

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

                      _self.elem_.curves[_curveIndex].invisibleDots.selectAll('path')
                        .data(_data)
                        .enter()
                        .append('svg:path')
                        .on('mouseover', function(d) {
                  app/scripts/views/components/survivalChart/components/curve.js on lines 203..213

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

                  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.selectAll('path')
                        .data(_data)
                        .enter()
                        .append('path')
                        .filter(function(d) {
                  app/scripts/views/components/survivalChart/components/curve.js on lines 223..289

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

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

                      function getCombinationPriority(id) {
                        var priority = _.clone(defaultPriority);
                        if (id) {
                          switch (id) {
                          case 'DFS_SURVIVAL':
                  Severity: Minor
                  Found in app/scripts/controller/priorityManager.js - About 1 hr to fix

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

                      iViz.view.component.GeneralChart = function(chartType) {
                        'use strict';
                        this.chartType = chartType || 'generalChart';
                        this.dataForDownload = {};
                        this.getCurrentCategories = function() {
                    Severity: Minor
                    Found in app/scripts/views/components/generalChart.js - About 1 hr to fix

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

                                      var cohortName = tooltip.find('.cohort-name').val() ?
                                        tooltip.find('.cohort-name').val() : tooltip.find('.cohort-name').attr('placeholder');
                      Severity: Major
                      Found in app/scripts/views/components/virtualStudy/virtualStudy.js and 1 other location - About 1 hr to fix
                      app/scripts/views/components/virtualStudy/virtualStudy.js on lines 273..274

                      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

                                      var cohortName = tooltip.find('.cohort-name').val() ?
                                        tooltip.find('.cohort-name').val() : tooltip.find('.cohort-name').attr('placeholder');
                      Severity: Major
                      Found in app/scripts/views/components/virtualStudy/virtualStudy.js and 1 other location - About 1 hr to fix
                      app/scripts/views/components/virtualStudy/virtualStudy.js on lines 205..206

                      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

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

                            updateQtipContent: function() {
                              if (this.mainDivQtip) {
                                var self_ = this;
                                var qtipContent = ['<div>'];
                                var groups = this.chartInst.getGroups();
                      Severity: Minor
                      Found in app/scripts/views/components/survivalChart/template.js - About 1 hr to fix

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

                              processTableData: function(_data) {
                                var data = iViz.getGroupNdx(this.attributes.group_id);
                                var opts = {
                                  width: window.iViz.styles.vars.specialTables.width,
                                  height: window.iViz.styles.vars.specialTables.height,
                        Severity: Minor
                        Found in app/scripts/views/components/dataTable/tableViewTemplate.js - About 1 hr to fix

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

                                getFilteredOriginStudies: function() {
                                  var selectedStudiesDisplayName = window.iviz.datamanager.getCancerStudyDisplayName(this.stats.origin);
                                  var filteredOriginStudies = {
                                    studies: [],
                                    count: 0
                          Severity: Minor
                          Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 1 hr to fix

                            Function init has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                  function(_attributes, _opts, _selectedSamples, _selectedGenes,
                                           _data, _callbacks, _geneData, _dimension, _genePanelMap) {
                            Severity: Major
                            Found in app/scripts/views/components/dataTable/tableView.js - About 1 hr to fix

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

                                    getSampleListsData: function(sampleLists) {
                                      var def = new $.Deferred();
                                      var self = this;
                                      var data = [];
                                      if (_.isArray(sampleLists)) {
                              Severity: Minor
                              Found in app/scripts/model/dataProxy.js - About 1 hr to fix

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

                                        function(self, fetch_promise) {
                                          $.get(window.cbioURL + 'api/molecular-profiles?projection=SUMMARY&pageSize=100000&pageNumber=0&sortBy=molecularProfileId&direction=ASC')
                                            .done(function(data) {
                                              var profiles = {};
                                              _.each(data, function(profile) {
                                Severity: Minor
                                Found in app/scripts/model/dataProxy.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language