Showing 1,095 of 1,095 total issues
File virtualStudy.js
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
(function(Vue, $, vcSession, iViz, _) {
Vue.component('virtualStudy', {
template:
'<div class="virtual-study">' +
File Gruntfile.js
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Generated on 2016-01-02 using
// generator-webapp 1.1.0
'use strict';
// # Globbing
Function getAttributes
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
content.getAttributes = function(type) {
var _attr = [];
switch (type) {
case 'mutatedGene':
_attr = [
Function initDc_
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
var initDc_ = function(logScale) {
var tickVal = [];
var i = 0;
var barSet = {};
Function getStudyToSampleToPatientMap
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
function(self, fetch_promise) {
var study_to_sample_to_patient = {};
var _sample_uid = 0;
var _patient_uid = 0
var getSamplesCall = function() {
File mainTemplate.js
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by Karthik Kalletla on 4/13/16.
*/
'use strict';
(function(Vue, dc, iViz, Packery, Draggabilly, _) {
Function render
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function(event, api) {
var tooltip = $('.iviz-virtual-study-btn-qtip .qtip-content');
tooltip.find('.save-cohort').click(function() {
self_.hideDialog(tooltip);
self_.showLoading(tooltip);
Function LogRankTest
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
window.LogRankTest = (function(jStat) {
var datum = {
time: '', // num of months
num_of_failure_1: 0,
num_of_failure_2: 0,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File template.js
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Yichao Sun on 5/18/16.
*/
'use strict';
(function(Vue, dc, iViz, _) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (inputGrp1[_ptr_1].time < inputGrp2[_ptr_2].time) {
_datum = jQuery.extend(true, {}, datum);
_datum.time = inputGrp1[_ptr_1].time;
if (inputGrp1[_ptr_1].status === 1) {
_datum.num_of_failure_1 = 1;
- 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 128.
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
} else if (inputGrp1[_ptr_1].time > inputGrp2[_ptr_2].time) {
_datum = jQuery.extend(true, {}, datum);
_datum.time = inputGrp2[_ptr_2].time;
if (inputGrp2[_ptr_2].status === 1) {
_datum.num_of_failure_2 = 1;
- 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 128.
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
if (_.isArray(self.data.sampleLists[studyId][studyId + '_all'])) {
_responseStudyCaseList[studyId].allSampleIds = iViz.util.intersection(self.data.sampleLists[studyId][studyId + '_all'], self.studyCasesMap[studyId].samples);
self.data.sampleLists.all[studyId] = _responseStudyCaseList[studyId].allSampleIds;
}
- 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 126.
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
if (_.isArray(self.data.sampleLists[studyId][studyId + '_cna'])) {
_responseStudyCaseList[studyId].cnaSampleIds = iViz.util.intersection(self.data.sampleLists[studyId][studyId + '_cna'], self.studyCasesMap[studyId].samples);
self.data.sampleLists.cna[studyId] = _responseStudyCaseList[studyId].cnaSampleIds;
}
- 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 126.
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 LogRankTest
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.LogRankTest = (function(jStat) {
var datum = {
time: '', // num of months
num_of_failure_1: 0,
num_of_failure_2: 0,
Function updatePlotGroups
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
updatePlotGroups: function(hasFilters) {
var _type = this.attributes.group_type;
var attrId = _type === 'patient' ? 'patient_uid' : 'sample_uid';
var groupId = this.attributes.group_id;
var _selectedCases = [];
Function ready
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
ready: function() {
$('#' + this.chartId + '-download').qtip('destroy', true);
$('#' + this.chartId + '-download-icon-wrapper').qtip('destroy', true);
$('#' + this.chartId + '-title').qtip('destroy', true);
var chartId = this.chartId;
File tableViewTemplate.js
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by Karthik Kalletla on 6/20/16.
*/
'use strict';
(function(Vue, dc, iViz, $, QueryByGeneTextArea, _) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
data.push({
x: _.pluck(_unselectedData, 'FRACTION_GENOME_ALTERED'),
y: _.pluck(_unselectedData, 'MUTATION_COUNT'),
text: _unselectedDataQtips,
mode: 'markers',
- 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 115.
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
data.push({
x: _.pluck(_selectedData, 'FRACTION_GENOME_ALTERED'),
y: _.pluck(_selectedData, 'MUTATION_COUNT'),
text: _selectedDataQtips,
mode: 'markers',
- 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 115.
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 init
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(_rawDataJSON, configs,_selectableIds) {
vm_ = iViz.vue.manage.getInstance();
var selectableIdsSet = {}
_.each(_selectableIds, function(id){
selectableIdsSet[id] = true;