Showing 6,062 of 6,062 total issues
Function _hideDatepicker
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_hideDatepicker: function(input) {
var showAnim, duration, postProcess, onClose,
inst = this._curInst;
if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
- Create a ticketCreate a ticket
Function cancel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
cancel: function() {
if(this.dragging) {
this._mouseUp({ target: null });
- Create a ticketCreate a ticket
Function _toggle
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_toggle: function( data ) {
var toShow = data.newPanel,
toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
// handle activating a panel during the animation for another activation
- Create a ticketCreate a ticket
Function _resetButton
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_resetButton: function() {
if ( this.type === "input" ) {
if ( this.options.label ) {
this.element.val( this.options.label );
}
- Create a ticketCreate a ticket
Function _mouseCapture
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseCapture: function(event, overrideHandle) {
var currentItem = null,
validHandle = false,
that = this;
- Create a ticketCreate a ticket
Function drag
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
drag: function( event ) {
var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
- Create a ticketCreate a ticket
Function _createTitlebar
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createTitlebar: function() {
var uiDialogTitle;
this.uiDialogTitlebar = $("<div>")
.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
- Create a ticketCreate a ticket
Function pulsate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.effect.pulsate = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "show" ),
show = mode === "show",
hide = mode === "hide",
- Create a ticketCreate a ticket
Function effect
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
effect: function( /* effect, options, speed, callback */ ) {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
queue = args.queue,
effectMethod = $.effects.effect[ args.effect ];
- Create a ticketCreate a ticket
Function slide
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.effect.slide = function( o, done ) {
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- Create a ticketCreate a ticket
Function initUploadSuccess
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
initUploadSuccess: function (out, $thumb, allFiles) {
var self = this, append, data, index, $newThumb, content, config, tags, i;
if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {
return;
}
- Create a ticketCreate a ticket
Method noderepocheck
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def noderepocheck
upgrade_status = ::Crowbar::UpgradeStatus.new
upgrade_status.start_step(:repocheck_nodes)
response = {}
- Create a ticketCreate a ticket
Method lock_nodes
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def lock_nodes(nodes, lock_owner, lock_reason)
locks = []
errors = {}
return [locks, errors] if nodes.empty?
- Create a ticketCreate a ticket
Method get_proposals_from_barclamps
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_proposals_from_barclamps(barclamps)
modules = {}
active = RoleObject.active
barclamps.each do |name, details|
modules[name] = {
- Create a ticketCreate a ticket
Method node_link_list
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def node_link_list(node)
link_list = [].tap do |result|
if node.bmc_configured?
path = node["crowbar_wall"]["ipmi"]["address"] rescue "none"
- Create a ticketCreate a ticket
Method valid_restricted_transition?
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def valid_restricted_transition?(current, target)
return true if current == target
valid_restricted_transitions = {
## first, states related to discovery image / OS install
- Create a ticketCreate a ticket
Method load!
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def load!
# reset other cached values
@admin_ip = nil
@web_port = nil
- Create a ticketCreate a ticket
Similar blocks of code found in 4 locations. Consider refactoring. Open
ne: function(event, dx, dy) {
return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
},
- Read upRead up
- Create a ticketCreate a ticket
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 63.
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 4 locations. Consider refactoring. Open
se: function(event, dx, dy) {
return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
},
- Read upRead up
- Create a ticketCreate a ticket
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 63.
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 4 locations. Consider refactoring. Open
nw: function(event, dx, dy) {
return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
}
- Read upRead up
- Create a ticketCreate a ticket
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 63.
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