Showing 132 of 132 total issues
Method assignQualification
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void assignQualification( String[] qualIds, String workerId, String score, Boolean notify ) {
Integer value = null;
if (score != null) {
try {
// Verify that strValue is an integer and not something else
- 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 runCommand
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected void runCommand(CommandLine cmdLine) throws Exception {
if (!cmdLine.hasOption(ARG_QUALTYPE)) {
log.error("Missing: -" + ARG_QUALTYPE + " [QualTypeId]");
System.exit(-1);
} else if (!cmdLine.hasOption(INPUT_FILE)) {
- 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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return current_page
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Method parseInt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Integer parseInt(CommandLine cmdLine, String option) {
Integer ret = null;
if (cmdLine.hasOption(option)) {
try {
int num = Integer.parseInt(cmdLine.getOptionValue(option));
- 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(String[] args) {
try {
BasicParser parser = new BasicParser();
CommandLine cmdLine = parser.parse(opt, args);
- 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 runCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected void runCommand(CommandLine cmdLine) throws Exception {
if (!cmdLine.hasOption(ARG_ASSIGNMENT) && !cmdLine.hasOption(ARG_APPROVEFILE) && !cmdLine.hasOption(ARG_SUCCESSFILE)) {
log.error("Missing: you must supply one of -" + ARG_ASSIGNMENT
+ " or -" + ARG_APPROVEFILE + " or -" + ARG_SUCCESSFILE);
- 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 rewriteHeaders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void rewriteHeaders(String source, String destination) throws IOException {
BufferedReader reader = null;
Writer writer = null;
String newline = System.getProperty("line.separator");
- 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 check_consent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_consent
# Do not require request.xhr? because it blocks JSONP
users = User.where(['name = ?', params[:username]])
if !users.empty?
@user = users.first
- 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 update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update
@activity_schema = ActivitySchema.find(params[:id])
respond_to do |format|
@question=params[:activity_schema][:questions]
- 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"