Showing 684 of 684 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (e.detail && e.detail.id) targetid = e.detail.id;
else if (e.target.id.length > 0) targetid = e.target.id;
else targetid = e.target.parentElement.parentElement.id;
- 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (e.detail && e.detail.id) targetid = e.detail.id;
else if (e.target.id.length > 0) targetid = e.target.id;
else targetid = e.target.parentElement.parentElement.id;
- 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 start_
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.start_ = function() {
var data = this.file_;
// Functions can return references of all other types.
if (typeof data == 'function') {
Function resize
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.resize = function(width, height) {
if (this.resize_lock) {
return;
}
this.resize_lock = true;
Function mouseMove_
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.mouseMove_ = function(event) {
// This prevents JS errors when mousing over the canvas before data loads.
var points = this.layout_.points;
if (points === undefined) return;
Function bind
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.divstyle = `width:${this.width};height:${this.height}; position:relative`;
console.log('bind() moleculeId,hidecontrols,hidepolymer,moleculeidref', this.moleculeId, this.hideControls, this.hidePolymer, this.parentref);
this.pdbref = document.createElement('pdbe-molstar');
if (this.moleculeId) this.pdbref.setAttribute('molecule-id', this.moleculeId);
Function footnoteInline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function footnoteInline(state, silent) {
let labelStart;
let labelEnd;
let footnoteId;
let token;
Function bind
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
//console.log('bdlmarkdownnav src:', this.src);
if (this.notinitread && this.src && this.src.length > 0 && this.mdtoc) this.fetchMDSrc();
//bind navigation first - get src before content - to solve navigation hide open issue at the beginning
//console.log('bdlmakrdownnav src:', this.src);
Function abbr_def
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function abbr_def(state, startLine, endLine, silent) {
var label, title, ch, labelStart, labelEnd,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
Function valueChanged
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
valueChanged(newValue, oldValue) {
//if (oldValue !== newValue)
if (this.ids) {
//semaphore only one change in time is allowed
if (!window.rangebinding) {
Function bind
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
//register throttled update function
if (typeof this.throttle === 'string') this.throttle = parseInt(this.throttle, 10);
if (typeof this.tofixed === 'string') this.tofixed = parseInt(this.tofixed, 10);
if (typeof this.dataevent === 'string') this.dataevent = this.dataevent === 'true';
Function DygraphCanvasRenderer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) {
this.dygraph_ = dygraph;
this.layout = layout;
this.element = element;
Function extremeValues_
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.extremeValues_ = function(series) {
var minY = null, maxY = null, j, y;
var bars = this.attr_("errorBars") || this.attr_("customBars");
if (bars) {
Function bind
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.refindex = parseInt(this.refindex, 10);
this.refvalues = parseInt(this.refvalues, 10);
this.refendindex = this.refindex + this.refvalues;
Function constructor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
this.handleTick = e => {
this.currenttick++;
if (this.currenttick >= this.ticks2reset) {
//do reset values
Function bind
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.isOneshot = this.mode === 'oneshot';
this.isOnestep = this.mode === 'onestep';
if (this.isOnestep) {
this.showcontrols = false;
Similar blocks of code found in 2 locations. Consider refactoring. Open
this.subscription1 = this.ea.subscribe('quizshow', quizid => {
if (this.check(quizid,this.id)) this.show();//quizid);
});
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
this.subscription2 = this.ea.subscribe('quizhide', quizid => {
if (this.check(quizid,this.id)) this.hide();//quizid);
});
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
mousemove: function(event, g, context) {
if (context.isZooming) {
Dygraph.moveZoom(event, g, context);
} else if (context.isPanning) {
Dygraph.movePan(event, g, context);
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
let datasetb = {
data: datab,
label: "",
backgroundColor: this.currentcolorb,
borderColor: this.currentcolorb,
- 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