Showing 700 of 700 total issues
Function add
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
Function done
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Ignore repeat invocations
Similar blocks of code found in 2 locations. Consider refactoring. Open
$tableWrapper
.on(
"mouseenter",
"." +
fcn.bottomRight +
- 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 92.
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 diffCleanupSemantic
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {
var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
changes = false;
equalities = []; // Stack of indices where equalities are found.
Function nodeRender
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
nodeRender: function (ctx, force, deep, collapsed, _recursive) {
var children,
i,
l,
outsideViewport,
Function setMatcher
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
Function treeInit
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeInit: function (ctx) {
var $temp,
tree = ctx.tree,
opts = ctx.options,
glyph = opts.glyph || null,
Function _create
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function () {
this.tree = new Fancytree(this);
this.$source =
this.source || this.element.data("type") === "json"
Function resolve
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
args = arguments,
mightThrow = function() {
Function FancytreeNode
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FancytreeNode(parent, obj) {
var i, l, name, cl;
this.parent = parent;
this.tree = parent.tree;
Function algorithmNoTypo
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
algorithmNoTypo: function algorithmNoTypo(searchLowerCodes, prepared, searchLowerCode) {
var targetLowerCodes = prepared._targetLowerCodes;
var searchLen = searchLowerCodes.length;
var targetLen = targetLowerCodes.length;
var searchI = 0; // where we at
Similar blocks of code found in 2 locations. Consider refactoring. Open
function _getResolvedPromise(context, argArray) {
if (context === undefined) {
return $.Deferred(function () {
this.resolve();
}).promise();
- 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 89.
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
function _getRejectedPromise(context, argArray) {
if (context === undefined) {
return $.Deferred(function () {
this.reject();
}).promise();
- 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 89.
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 findRelatedNode
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
findRelatedNode: function (node, where, includeHidden) {
var res = null,
KC = $.ui.keyCode;
switch (where) {
Function treeSetOption
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeSetOption: function (ctx, key, value) {
var tree = ctx.tree,
callDefault = true,
callCreate = false,
callRender = false;
Function nodeRenderStatus
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
nodeRenderStatus: function (ctx) {
var checkbox,
icon,
res,
span,
Function treeRegisterNode
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeRegisterNode: function (ctx, add, node) {
var refList,
len,
tree = ctx.tree,
keyMap = tree.keyMap,
Function hashMurmur3
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function hashMurmur3(key, asString, seed) {
/*eslint-disable no-bitwise */
var h1b,
k1,
remainder = key.length & 3,
Consider simplifying this complex logical expression. Open
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
// ...in a gzip-friendly way
Function superMatcher
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],