Function RegExpBenchmark
has 1675 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RegExpBenchmark() {
var re0 = /^ba/;
var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/;
var re2 = /^\s*|\s*$/g;
var re3 = /\bQBZPbageby_cynprubyqre\b/;
File regexp.js
has 1700 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
Function RegExpBenchmark
has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring. Open
function RegExpBenchmark() {
var re0 = /^ba/;
var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/;
var re2 = /^\s*|\s*$/g;
var re3 = /\bQBZPbageby_cynprubyqre\b/;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function runBlock11
has 419 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock11() {
for (var i = 0; i < 2; i++) {
' .pybfr'.replace(re18, '');
' n.svryqOgaPnapry'.replace(re18, '');
' qg'.replace(re18, '');
Function runBlock9
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock9() {
for (var i = 0; i < 5; i++) {
s94[i].split(re32);
s95[i].split(re32);
'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
Function runBlock10
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock10() {
for (var i = 0; i < 3; i++) {
'%3Szxg=ra-HF'.replace(re39, '');
'-8'.replace(re40, '');
'-8'.replace(re10, '');
Function runBlock3
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock3() {
for (var i = 0; i < 27; i++) {
s67[i].replace(/[A-Za-z]/g, '');
}
for (var i = 0; i < 23; i++) {
Function runBlock6
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock6() {
for (var i = 0; i < 11; i++) {
s83[i].replace(/##yv0##/gi, '');
s83[i].replace(re57, '');
s84[i].replace(re58, '');
Function runBlock8
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock8() {
for (var i = 0; i < 7; i++) {
s21[i].match(/\d+/g);
'nsgre'.replace(re64, '');
'orsber'.replace(re64, '');
Function runBlock0
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock0() {
for (var i = 0; i < 6511; i++) {
re0.exec(s0[i]);
}
for (var i = 0; i < 1844; i++) {
Function runBlock7
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock7() {
for (var i = 0; i < 9; i++) {
'0'.replace(re40, '');
'0'.replace(re10, '');
'0'.replace(re51, '');
Function runBlock1
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock1() {
for (var i = 0; i < 81; i++) {
re8.exec(s26[i]);
}
for (var i = 0; i < 78; i++) {
Function runBlock2
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock2() {
for (var i = 0; i < 40; i++) {
s57a[i].replace(re14, '');
s57a[i].replace(re15, '');
}
Function runBlock4
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock4() {
for (var i = 0; i < 16; i++) {
''.replace(/\*/g, '');
/\bnpgvir\b/.exec('npgvir');
/sversbk/i.exec(s15[i]);
Function runBlock5
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock5() {
for (var i = 0; i < 13; i++) {
'purpx'.replace(re14, '');
'purpx'.replace(re15, '');
'pvgl'.replace(re14, '');
Similar blocks of code found in 2 locations. Consider refactoring. Open
for (var i = 0; i < 23; i++) {
s68[i].replace(re27, '');
s69[i].replace(re27, '');
}
- 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 55.
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
for (var i = 0; i < 40; i++) {
s57a[i].replace(re14, '');
s57a[i].replace(re15, '');
}
- 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 55.
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 5 locations. Consider refactoring. Open
for (var i = 0; i < 44; i++) {
s57[i].replace(re12, '');
re13.exec(s57[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 54.
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 5 locations. Consider refactoring. Open
for (var i = 0; i < 170; i++) {
s9[i].replace(re6, '');
re7.exec(s10[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 54.
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 5 locations. Consider refactoring. Open
for (var i = 0; i < 77; i++) {
s44[i].replace(re12, '');
re13.exec(s44[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 54.
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 5 locations. Consider refactoring. Open
for (var i = 0; i < 93; i++) {
s20[i].replace(re12, '');
re13.exec(s20[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 54.
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 5 locations. Consider refactoring. Open
for (var i = 0; i < 21; i++) {
s70[i].replace(re12, '');
re13.exec(s70[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 54.
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