Showing 700 of 700 total issues
Function name
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
Function name
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
Function treeCreate
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeCreate: function (ctx) {
var tree = ctx.tree,
opts = ctx.options;
if (
Function updateBreadcrumb
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateBreadcrumb(tsn, loadTreeNodes) {
// var $ol = $("ol.breadcrumb").text("...");
var $ol = $("ol.breadcrumb").addClass("busy");
_callItis("getFullHierarchyFromTSN", {
tsn: tsn,
Consider simplifying this complex logical expression. Open
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
Function name
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
Function internalStop
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
internalStop: function internalStop() {
var requiredCalls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
config.blocking = true;
var test = this;
var pauseId = this.nextPauseId++;
Function toolbarChanged
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toolbarChanged() {
var field = this;
var params = {}; // Detect if field is a select menu or a checkbox
var value;
Consider simplifying this complex logical expression. Open
if(jQuery)( function() {
/* Check browser version, since $.browser was removed in jQuery 1.9 */
function _checkBrowser(){
var matched, browser;
Identical blocks of code found in 2 locations. Consider refactoring. Open
for(var i=0; i<hrefs.length; i++){
if(this.href.toLowerCase().indexOf(hrefs[i]) >= 0){
$link = $(this);
$link.addClass(PLUGIN_NAME);
initialChoice = opts.choices[i];
- 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 75.
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
for (i = 0; i < hrefs.length; i++) {
if (this.href.toLowerCase().indexOf(hrefs[i]) >= 0) {
$link = $(this);
$link.addClass(PLUGIN_NAME);
initialChoice = opts.choices[i];
- 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 75.
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 addChildren
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
addChildren: function (children, insertBefore) {
var i,
l,
pos,
origFirstChild = this.getFirstChild(),
Function diffCleanupEfficiency
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {
var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;
changes = false;
equalities = []; // Stack of indices where equalities are found.
Function _createForOfIteratorHelper
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _createForOfIteratorHelper(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (!it) {
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
Function clearFilter
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.ui.fancytree._FancytreeClass.prototype.clearFilter = function () {
var $title,
statusNode = this.getRootNode()._findDirectChild(KeyNoData),
escapeTitles = this.options.escapeTitles,
enhanceTitle = this.options.enhanceTitle,
Function select
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
Function matcherFromTokens
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[ 0 ].type ],
implicitRelative = leadingRelative || Expr.relative[ " " ],
Similar blocks of code found in 2 locations. Consider refactoring. Open
$(window).on("hashchange", function (e) {
var tsn = $.bbq.getState("tsn");
console.log("bbq tsn", tsn);
if (tsn) {
updateBreadcrumb(tsn, true);
- 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 73.
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
$(window).on("hashchange", function (e) {
var key = $.bbq.getState("key");
console.log("bbq key", key);
if (key) {
updateBreadcrumb(key, true);
- 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 73.
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 _classes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
_classes: function( options ) {
var full = [];
var that = this;
options = $.extend( {