Showing 226 of 354 total issues
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return 0x186a0;
Avoid too many return
statements within this method. Open
return 10;
Avoid too many return
statements within this method. Open
return 0xf4240;
Avoid too many return
statements within this method. Open
return 10000;
Avoid too many return
statements within this method. Open
return 100;
Avoid too many return
statements within this method. Open
return insertWheel(ChronoUnit.SECONDS, this.currentSecond.get() + seconds, node);
Method sort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public int[] sort(int[] data) {
int[] result = Arrays.copyOf(data, data.length);
for (int i = 0; i < result.length - 1; i++) {
//这个循环就是把较小数堆叠在数组头,依次与后面比较再交换
- 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
Method transferAllKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
void transferAllKey() throws InterruptedException {
boolean init = initRedisPool();
if (!init) {
return;
}
- 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
Method sort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public int[] sort(int[] data) {
int[] result = Arrays.copyOf(data, data.length);
for (int i = 1; i < result.length; i++) {
//用来冒泡的语句,0到已排序的部分
- 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
Method willInfected
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void willInfected() {
if (this.isInfected()) {
return;
}
- 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
Method run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void run() {
File soundFile = new File(filename);
AudioInputStream audioInputStream;
try {
- 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
Method setSeed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final synchronized void setSeed(long seed) {
if (compact) {
setSeed((int) seed);
} else {
// Annoying runtime check for initialisation of internal data
- 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
Method run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run() {
int maxFPS = 60;
long fpsTime = (long) ((1000.0 / maxFPS) * 1_000_000);
- 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
Method mouseClicked
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void mouseClicked(MouseEvent e) {
if (playerPlay) {
int x = getGridXY(e.getX());
int y = getGridXY(e.getY());
if (hasChess(x, y))
- 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
Method initBigInteger
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean initBigInteger(String target, MythBaseStack<Integer> stack) {
String regex = "^[0-9]+$";
boolean oneResult = Pattern.matches(regex, target);
if (!oneResult) {
log.error("there are not integer: one={}", target);
- 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
Method E1
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void E1() {
if (sym == 1) {
next();
T();
E1();
- 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
Method T1
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void T1() {
if (sym == 3) {
next();
F();
T1();
- 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
Method testMap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void testMap(Map<Key, String> m) {
while (true) {
for (int i = 0; i < 10000; i++) {
// 因此这个判断就失效了
if (!m.containsKey(new Key(i))) {
- 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
Method isNeedContinue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean isNeedContinue(List<Fraction> list) {
boolean flag = false;
for (Fraction b : list) {
if (b.isPositive()) {
flag = true;
- 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"