Showing 1,095 of 1,095 total issues
Function mutatedGenesData
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mutatedGenesData(_selectedGenesMap, _selectedSampleUids) {
genePanelMap = window.iviz.datamanager.updateGenePanelMap(genePanelMap, _selectedSampleUids);
selectedGeneData.length = 0;
var numOfCases_ = content.getCases().length;
Function Survival
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
iViz.view.component.Survival = function() {
var content_ = this;
var opts_ = {
downloadIsEnabled: true
};
Function init
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
content.init = function(_data, opts) {
opts_ = $.extend(true, {}, opts);
chartId_ = opts_.chartId;
data_ = _.filter(_data, function(datum) {
return !isNaN(datum.FRACTION_GENOME_ALTERED) && !isNaN(datum.MUTATION_COUNT);
Similar blocks of code found in 2 locations. Consider refactoring. Open
groups.push({
type: 'patient',
id: vm_.groupCount.toString(),
selectedcases: [],
hasfilters: false,
- 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 89.
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
groups.push({
type: 'sample',
id: vm_.groupCount.toString(),
selectedcases: [],
hasfilters: false,
- 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 89.
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 extractCnaData
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
extractCnaData: function(_cnaData, _allSamples) {
var _cnaMeta = {};
var _allCNAGenes = {};
var _cnaMetaIndex = 0;
var self = this;
Function updateDataObject
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateDataObject: function(type, attrIds) {
var def = new $.Deferred();
var self_ = this;
var isPatientAttributes = (type === 'patient');
var _data = isPatientAttributes ? data_.groups.patient.data : data_.groups.sample.data;
Similar blocks of code found in 2 locations. Consider refactoring. Open
function initCanvasDownloadData() {
content.setDownloadData('svg', {
title: opts_.title,
chartDivId: opts_.chartId,
fileName: opts_.title
- 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 88.
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
function initCanvasDownloadData() {
content_.setDownloadData('svg', {
title: opts_.title,
chartDivId: opts_.chartId,
fileName: opts_.title
- 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 88.
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 barChartCanvasDownload
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function barChartCanvasDownload(data, downloadOpts) {
var _svgElement = '';
var _svg = $('#' + data.chartId + '>svg').clone();
var _svgWidth = Number(_svg.attr('width'));
var _svgHeight = Number(_svg.attr('height')) + 20;
Function update
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
content.update = function(_selectedSampleUIDs, _selectedRows) {
var selectedMap_ = {};
var includeMutationCount = false;
if (_selectedRows !== undefined) {
selectedRows = _selectedRows;
Function stat
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
stat: function() {
var _result = {};
_result.origin = window.cohortIdsList;
_result.filters = {};
var self = this;
File barChartTemplate.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by Karthik Kalletla on 4/6/16.
*/
'use strict';
(function(Vue, d3, dc, iViz, _, $, cbio) {
Function getPatientClinicalData
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getPatientClinicalData = function(self, attr_ids) {
var def = new $.Deferred();
var fetch_promises = [];
var clinical_data = {};
if (_.isArray(attr_ids)) {
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (_metaObj.datatype === 'NUMBER') {
_metaObj.view_type = 'bar_chart';
_metaObj.layout = [-1, 2, 'h'];
} else if (_metaObj.datatype === 'STRING') {
_metaObj.view_type = 'pie_chart';
- 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 86.
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
if (_metaObj.datatype === 'NUMBER') {
_metaObj.view_type = 'bar_chart';
_metaObj.layout = [-1, 2, 'h'];
} else if (_metaObj.datatype === 'STRING') {
_metaObj.view_type = 'pie_chart';
- 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 86.
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 getLayoutMatrix
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLayoutMatrix: function(layoutMatrix, chart) {
var self_ = this;
var neighborIndex;
var foundSpace = false;
var layout = chart.layout;
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (typeof genePanelMap[item.gene] !== 'undefined') {
freq = iViz.util.calcFreq(datum.cases, genePanelMap[item.gene].sampleNum);
} else {
freq = iViz.util.calcFreq(datum.cases, numOfCases_);
}
- 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 85.
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
if (typeof genePanelMap[item.gene] !== 'undefined') {
freq = iViz.util.calcFreq(datum.cases, genePanelMap[item.gene].sampleNum);
} else {
freq = iViz.util.calcFreq(datum.cases, numOfCases_);
}
- 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 85.
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 addChart
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
addChart: function(attrId) {
var self_ = this;
var attrData = self_.charts[attrId];
var _attrAdded = false;
var _group = {};