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:
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'},
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;
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',
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
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',
Function getNavCaseIdsStr
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getNavCaseIdsStr(selectedCasesMap, selectedCaseIds, underURLLimit) {
var result = {
str: '',
limit: -1
};
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,
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) {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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) {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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':
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() {
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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();
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,
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
Function init
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function(_attributes, _opts, _selectedSamples, _selectedGenes,
_data, _callbacks, _geneData, _dimension, _genePanelMap) {
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)) {
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) {