JeffDeCola/control-fpga-via-raspi-and-webserver

View on GitHub

Showing 219 of 219 total issues

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

function data_in_a_zero_7_onmouseover() {
    switch(data_in_a_7_state) {
        case "low":
            document.getElementById("data_in_a_zero_7").style.backgroundColor=lightgreen;
            break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_zero_6_onmouseout() {
    switch(data_in_a_6_state) {
        case "low":
            document.getElementById("data_in_a_zero_6").style.backgroundColor=lightgreen;
            break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_one_2_onmouseover() {
  switch(data_in_a_2_state) {
      case "low":
          document.getElementById("data_in_a_one_2").style.backgroundColor=grey;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_one_1_onmouseover() {
  switch(data_in_a_1_state) {
      case "low":
          document.getElementById("data_in_a_one_1").style.backgroundColor=grey;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_6_onmouseover() {
  switch(data_in_b_6_state) {
      case "low":
          document.getElementById("data_in_b_zero_6").style.backgroundColor=lightgreen;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_6_onmouseout() {
  switch(data_in_b_6_state) {
      case "low":
          document.getElementById("data_in_b_zero_6").style.backgroundColor=lightgreen;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_5_onmouseout() {
  switch(data_in_b_5_state) {
      case "low":
          document.getElementById("data_in_b_zero_5").style.backgroundColor=lightgreen;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_one_4_onmouseover() {
switch(data_in_b_4_state) {
    case "low":
        document.getElementById("data_in_b_one_4").style.backgroundColor=grey;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_one_2_onmouseout() {
switch(data_in_b_2_state) {
    case "low":
        document.getElementById("data_in_b_one_2").style.backgroundColor=white;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_1_onmouseover() {
switch(data_in_b_1_state) {
    case "low":
        document.getElementById("data_in_b_zero_1").style.backgroundColor=lightgreen;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_0_onmouseover() {
switch(data_in_b_0_state) {
    case "low":
        document.getElementById("data_in_b_zero_0").style.backgroundColor=lightgreen;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_zero_0_onmouseout() {
switch(data_in_b_0_state) {
    case "low":
        document.getElementById("data_in_b_zero_0").style.backgroundColor=lightgreen;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266

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

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 77 locations. Consider refactoring.
Open

function opcode_zero_2_onmouseover() {
    switch(opcode_2_state) {
        case "low":
            document.getElementById("opcode_zero_2").style.backgroundColor=lightgreen;
            break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_one_5_onmouseover() {
  switch(data_in_b_5_state) {
      case "low":
          document.getElementById("data_in_b_one_5").style.backgroundColor=grey;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_one_6_onmouseout() {
    switch(data_in_a_6_state) {
        case "low":
            document.getElementById("data_in_a_one_6").style.backgroundColor=white;
            break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_zero_1_onmouseover() {
  switch(data_in_a_1_state) {
      case "low":
          document.getElementById("data_in_a_zero_1").style.backgroundColor=lightgreen;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_one_2_onmouseover() {
switch(data_in_b_2_state) {
    case "low":
        document.getElementById("data_in_b_one_2").style.backgroundColor=grey;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_b_one_1_onmouseover() {
switch(data_in_b_1_state) {
    case "low":
        document.getElementById("data_in_b_one_1").style.backgroundColor=grey;
        break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function opcode_one_2_onmouseover() {
    switch(opcode_2_state) {
        case "low":
            document.getElementById("opcode_one_2").style.backgroundColor=grey;
            break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 541..550
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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 77 locations. Consider refactoring.
Open

function data_in_a_one_3_onmouseover() {
  switch(data_in_a_3_state) {
      case "low":
          document.getElementById("data_in_a_one_3").style.backgroundColor=grey;
          break;
Severity: Major
Found in section-4-web-server/control-an-fpga/js/opcode.js and 76 other locations - About 1 hr to fix
section-4-web-server/control-an-fpga/js/opcode.js on lines 52..61
section-4-web-server/control-an-fpga/js/opcode.js on lines 73..82
section-4-web-server/control-an-fpga/js/opcode.js on lines 83..92
section-4-web-server/control-an-fpga/js/opcode.js on lines 104..113
section-4-web-server/control-an-fpga/js/opcode.js on lines 114..123
section-4-web-server/control-an-fpga/js/opcode.js on lines 135..144
section-4-web-server/control-an-fpga/js/opcode.js on lines 145..154
section-4-web-server/control-an-fpga/js/opcode.js on lines 166..175
section-4-web-server/control-an-fpga/js/opcode.js on lines 176..185
section-4-web-server/control-an-fpga/js/opcode.js on lines 197..206
section-4-web-server/control-an-fpga/js/opcode.js on lines 207..216
section-4-web-server/control-an-fpga/js/opcode.js on lines 228..237
section-4-web-server/control-an-fpga/js/opcode.js on lines 238..247
section-4-web-server/control-an-fpga/js/opcode.js on lines 259..268
section-4-web-server/control-an-fpga/js/opcode.js on lines 269..278
section-4-web-server/control-an-fpga/js/opcode.js on lines 303..312
section-4-web-server/control-an-fpga/js/opcode.js on lines 324..333
section-4-web-server/control-an-fpga/js/opcode.js on lines 334..343
section-4-web-server/control-an-fpga/js/opcode.js on lines 355..364
section-4-web-server/control-an-fpga/js/opcode.js on lines 365..374
section-4-web-server/control-an-fpga/js/opcode.js on lines 386..395
section-4-web-server/control-an-fpga/js/opcode.js on lines 396..405
section-4-web-server/control-an-fpga/js/opcode.js on lines 417..426
section-4-web-server/control-an-fpga/js/opcode.js on lines 427..436
section-4-web-server/control-an-fpga/js/opcode.js on lines 448..457
section-4-web-server/control-an-fpga/js/opcode.js on lines 458..467
section-4-web-server/control-an-fpga/js/opcode.js on lines 479..488
section-4-web-server/control-an-fpga/js/opcode.js on lines 489..498
section-4-web-server/control-an-fpga/js/opcode.js on lines 510..519
section-4-web-server/control-an-fpga/js/opcode.js on lines 520..529
section-4-web-server/control-an-fpga/js/opcode.js on lines 551..560
section-4-web-server/control-an-fpga/js/opcode.js on lines 572..581
section-4-web-server/control-an-fpga/js/opcode.js on lines 582..591
section-4-web-server/control-an-fpga/js/opcode.js on lines 603..612
section-4-web-server/control-an-fpga/js/opcode.js on lines 613..622
section-4-web-server/control-an-fpga/js/opcode.js on lines 634..643
section-4-web-server/control-an-fpga/js/opcode.js on lines 644..653
section-4-web-server/control-an-fpga/js/opcode.js on lines 665..674
section-4-web-server/control-an-fpga/js/opcode.js on lines 675..684
section-4-web-server/control-an-fpga/js/opcode.js on lines 696..705
section-4-web-server/control-an-fpga/js/opcode.js on lines 706..715
section-4-web-server/control-an-fpga/js/opcode.js on lines 727..736
section-4-web-server/control-an-fpga/js/opcode.js on lines 737..746
section-4-web-server/control-an-fpga/js/opcode.js on lines 758..767
section-4-web-server/control-an-fpga/js/opcode.js on lines 768..777
section-4-web-server/control-an-fpga/js/opcode.js on lines 802..811
section-4-web-server/control-an-fpga/js/opcode.js on lines 823..832
section-4-web-server/control-an-fpga/js/opcode.js on lines 833..842
section-4-web-server/control-an-fpga/js/opcode.js on lines 854..863
section-4-web-server/control-an-fpga/js/opcode.js on lines 864..873
section-4-web-server/control-an-fpga/js/opcode.js on lines 885..894
section-4-web-server/control-an-fpga/js/opcode.js on lines 895..904
section-4-web-server/control-an-fpga/js/opcode.js on lines 916..925
section-4-web-server/control-an-fpga/js/opcode.js on lines 926..935
section-4-web-server/control-an-fpga/js/opcode.js on lines 947..956
section-4-web-server/control-an-fpga/js/opcode.js on lines 957..966
section-4-web-server/control-an-fpga/js/opcode.js on lines 978..987
section-4-web-server/control-an-fpga/js/opcode.js on lines 988..997
section-4-web-server/control-an-fpga/js/opcode.js on lines 1009..1018
section-4-web-server/control-an-fpga/js/opcode.js on lines 1019..1028
section-4-web-server/control-an-fpga/js/opcode.js on lines 1040..1049
section-4-web-server/control-an-fpga/js/opcode.js on lines 1050..1059
section-4-web-server/control-an-fpga/js/opcode.js on lines 1071..1080
section-4-web-server/control-an-fpga/js/opcode.js on lines 1081..1090
section-4-web-server/control-an-fpga/js/opcode.js on lines 1102..1111
section-4-web-server/control-an-fpga/js/opcode.js on lines 1112..1121
section-4-web-server/control-an-fpga/js/opcode.js on lines 1133..1142
section-4-web-server/control-an-fpga/js/opcode.js on lines 1143..1152
section-4-web-server/control-an-fpga/js/opcode.js on lines 1164..1173
section-4-web-server/control-an-fpga/js/opcode.js on lines 1174..1183
section-4-web-server/control-an-fpga/js/opcode.js on lines 1195..1204
section-4-web-server/control-an-fpga/js/opcode.js on lines 1205..1214
section-4-web-server/control-an-fpga/js/opcode.js on lines 1226..1235
section-4-web-server/control-an-fpga/js/opcode.js on lines 1236..1245
section-4-web-server/control-an-fpga/js/opcode.js on lines 1257..1266
section-4-web-server/control-an-fpga/js/opcode.js on lines 1267..1276

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

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

Severity
Category
Status
Source
Language