Showing 1,675 of 1,675 total issues
Function toJSON
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
toJSON: function(type) {
type = type || "tree";
if(type == 'tree') {
var ans = {};
var rootNode = this.graph.getNode(this.root);
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
'render': function(node, canvas, animating){
var leaf = this.viz.leaf(node),
config = this.config,
offst = config.offset,
titleHeight = config.titleHeight,
Function normalizeDims
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
normalizeDims: function() {
//number of elements
var root = this.delegate.graph.getNode(this.delegate.root), l=0;
root.eachAdjacency(function() {
l++;
Function calculateOrientation
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateOrientation = function(sourceId, targetId, sd, td, sourceAnchor, targetAnchor) {
if (sourceId === targetId) return {
orientation:Orientation.IDENTITY,
a:["top", "top"]
Function Datepicker
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Datepicker = function(element, options) {
var that = this;
this._process_options(options);
Method generate_wbs_project_elt_tree
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_wbs_project_elt_tree(element, tree, show_hidden=false, is_project_show_view=false)
#Root is always display
gap = 2.5
tree ||= String.new
unless element.nil?
Method display_effort_balancing_output
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def display_effort_balancing_output(module_project)
pbs_project_element = @pbs_project_element || current_component
res = String.new
if module_project.compatible_with(current_component.work_element_type.alias) || current_component
pemodule = Pemodule.find(module_project.pemodule.id)
Function animationLoop
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
function animationLoop(config, drawScale, drawData, ctx, clrx, clry, clrwidth, clrheight, midPosX, midPosY, borderX, borderY, data) {
Function AbstractSvgArrowOverlay
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var AbstractSvgArrowOverlay = function(superclass, originalArgs) {
superclass.apply(this, originalArgs);
jsPlumb.jsPlumbUIComponent.apply(this, originalArgs);
this.isAppendedAtTopLevel = false;
var self = this, path = null;
Function inputToRGB
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inputToRGB(color) {
var rgb = { r: 0, g: 0, b: 0 };
var a = 1;
var ok = false;
Function drawScale
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawScale() {
//X axis line
ctx.lineWidth = config.scaleLineWidth;
Function saveCanvas
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function saveCanvas(ctx,data,config,tpgraph) {
cvSave = ctx.getImageData(0,0,ctx.canvas.width, ctx.canvas.height);
var saveCanvasConfig = {
savePng : false,
Function drawScale
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawScale() {
//X axis line
ctx.lineWidth = config.scaleLineWidth;
Method import_user
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def import_user
sep = "#{params[:separator].blank? ? I18n.t(:general_csv_separator) : params[:separator]}"
error_count = 0
file = params[:file]
encoding = params[:encoding]
Similar blocks of code found in 6 locations. Consider refactoring. Open
if (animPc >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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 6 locations. Consider refactoring. Open
if (animPc >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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 6 locations. Consider refactoring. Open
if (animationDecimal >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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 6 locations. Consider refactoring. Open
if (animPc >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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 6 locations. Consider refactoring. Open
if (animPc >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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 6 locations. Consider refactoring. Open
if (animPc >= 1) {
if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
else lgtxt = "";
}
- 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 67.
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