rahulkapoor90/VITacademics-Enhancement-Suite

View on GitHub
Extension for chrome/scripts/home/assignMsg.js

Summary

Maintainability
F
4 days
Test Coverage

Function eachAssignment has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function eachAssignment(data, callback) {
    var arr = new Array();
    var l = data.length;
    for (j = 0; j < data.length; j++) {
        var url = 'https://vtop.vit.ac.in/student/marks_da_process.asp?sem=WS&classnbr=' + data[j].classnbr + '&crscd=' + data[j].crscd + '&crstp=' + data[j].crstp + '&daprocmd=Process';
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 2 hrs to fix

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 dateAlert has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function dateAlert(data) {
    var arr = new Array();
    var curDate = new Date();
    var curSec = curDate.getTime() * 1000;
    for (i = 0; i < data.length; i++) {
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

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 eachAssignment has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function eachAssignment(data, callback) {
    var arr = new Array();
    var l = data.length;
    for (j = 0; j < data.length; j++) {
        var url = 'https://vtop.vit.ac.in/student/marks_da_process.asp?sem=WS&classnbr=' + data[j].classnbr + '&crscd=' + data[j].crscd + '&crstp=' + data[j].crstp + '&daprocmd=Process';
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

Function newAssignment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function newAssignment(data) {
    var arr = new Array();
    chrome.storage.local.get(function (stored) {
        if (stored.assignments == undefined) {
            chrome.storage.local.set({ assignments: data });
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

Function scrapeData1 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function scrapeData1(data, callback) {
    var arr = new Array();
    var body = $(data);
    var table = body.find('table');
    for (i = 1; i < table.find('tr').length; i++) {
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

Function scrapeData1 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function scrapeData1(data, callback) {
    var arr = new Array();
    var body = $(data);
    var table = body.find('table');
    for (i = 1; i < table.find('tr').length; i++) {
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

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 newScore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function newScore(data) {
    var arr = new Array();
    chrome.storage.local.get(function (stored) {
        if (stored.assignments == undefined) {
            chrome.storage.local.set({ assignments: data });
Severity: Minor
Found in Extension for chrome/scripts/home/assignMsg.js - About 1 hr to fix

Avoid deeply nested control flow statements.
Open

                        if (title != storArr[j]['title']) {
                            count++;

                        }
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if (count == storArr.length) {
                            if (data[i]['isUploaded'] == 'Upload') {
                                arr.push(data[i]);
                                break;
                             }
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if (arr.length > 0) {
                            chrome.storage.local.set({ assignments: data });
                        }
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if (score != storArr[j]['score']) {
                            arr.push(data[i]);
                        }
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js - About 45 mins to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if (i == data.length - 1) {
                    if (arr.length > 0) {
                        chrome.storage.local.set({ assignments: data });
                    }
                    var obj1 = { "msg": "score", "data": arr };
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 2 hrs to fix
Extension for chrome/scripts/home/assignMsg.js on lines 82..89

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 93.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    if (i == data.length - 1) {
                        if (arr.length > 0) {
                            chrome.storage.local.set({ assignments: data });
                        }
                        var obj1 = { "msg": "new", "data": arr };
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 2 hrs to fix
Extension for chrome/scripts/home/assignMsg.js on lines 44..51

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 93.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        obj['isUploaded'] = table.find('tr').eq(i).find('td').eq(4).find('input').eq(0).val().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 141..141

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        obj['isUploaded'] = table.find('tr').eq(i).find('td').eq(5).find('input').eq(0).val().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 148..148

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['title'] = table.find('tr').eq(i).find('td').eq(1).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['status'] = table.find('tr').eq(i).find('td').eq(6).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

        obj['classnbr'] = table.find('tr').eq(i).find('td').eq(1).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

        obj['crscd'] = table.find('tr').eq(i).find('td').eq(2).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['status'] = table.find('tr').eq(i).find('td').eq(5).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['title'] = table.find('tr').eq(i).find('td').eq(1).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

        obj['crsnm'] = table.find('tr').eq(i).find('td').eq(3).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['duedate'] = table.find('tr').eq(i).find('td').eq(2).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['score'] = table.find('tr').eq(i).find('td').eq(7).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

                        obj['score'] = table.find('tr').eq(i).find('td').eq(6).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179
Extension for chrome/scripts/home/assignMsg.js on lines 180..180

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 57.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

        obj['crstp'] = table.find('tr').eq(i).find('td').eq(4).text().trim();
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 10 other locations - About 1 hr to fix
Extension for chrome/scripts/home/assignMsg.js on lines 137..137
Extension for chrome/scripts/home/assignMsg.js on lines 138..138
Extension for chrome/scripts/home/assignMsg.js on lines 139..139
Extension for chrome/scripts/home/assignMsg.js on lines 140..140
Extension for chrome/scripts/home/assignMsg.js on lines 144..144
Extension for chrome/scripts/home/assignMsg.js on lines 146..146
Extension for chrome/scripts/home/assignMsg.js on lines 147..147
Extension for chrome/scripts/home/assignMsg.js on lines 177..177
Extension for chrome/scripts/home/assignMsg.js on lines 178..178
Extension for chrome/scripts/home/assignMsg.js on lines 179..179

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 57.

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

Further Reading

There are no issues that match your filters.

Category
Status