netdata/netdata

View on GitHub
src/go/collectors/go.d.plugin/modules/windows/charts.go

Summary

Maintainability
F
3 wks
Test Coverage

File charts.go has 4582 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// SPDX-License-Identifier: GPL-3.0-or-later

package windows

import (
Severity: Major
Found in src/go/collectors/go.d.plugin/modules/windows/charts.go - About 1 wk to fix

    Windows has 64 methods (exceeds 20 allowed). Consider refactoring.
    Open

    func (w *Windows) addCPUCharts() {
        charts := cpuCharts.Copy()
    
        if err := w.Charts().Add(*charts...); err != nil {
            w.Warning(err)
    Severity: Major
    Found in src/go/collectors/go.d.plugin/modules/windows/charts.go - About 1 day to fix

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

          mssqlDeadLocksChart = module.Chart{
              OverModule: "mssql",
              ID:         "mssql_instance_%s_locks_deadlocks",
              Title:      "Lock requests that resulted in deadlock",
              Units:      "locks/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 4 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1193..1217

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          mssqlLocksWaitChart = module.Chart{
              OverModule: "mssql",
              ID:         "mssql_instance_%s_locks_lock_wait",
              Title:      "Lock requests that required the caller to wait",
              Units:      "locks/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 4 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1218..1242

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          serviceStatusChartTmpl = module.Chart{
              ID:       "service_%s_status",
              Title:    "Service status",
              Units:    "status",
              Fam:      "services",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/elasticsearch/charts.go on lines 679..700

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

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

      func (w *Windows) addHypervVMDeviceCharts(device string) {
          charts := hypervVMDeviceChartsTemplate.Copy()
          n := hypervCleanName(device)
      
          for _, chart := range *charts {
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 3 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4825..4842
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4873..4890
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4897..4914

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

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

      func (w *Windows) addHypervVMCharts(vm string) {
          charts := hypervVMChartsTemplate.Copy()
          n := hypervCleanName(vm)
      
          for _, chart := range *charts {
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 3 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4849..4866
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4873..4890
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4897..4914

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

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

      func (w *Windows) addHypervVSwitchCharts(vswitch string) {
          charts := hypervVswitchChartsTemplate.Copy()
          n := hypervCleanName(vswitch)
      
          for _, chart := range *charts {
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 3 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4825..4842
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4849..4866
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4873..4890

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

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

      func (w *Windows) addHypervVMInterfaceCharts(iface string) {
          charts := hypervVMInterfaceChartsTemplate.Copy()
          n := hypervCleanName(iface)
      
          for _, chart := range *charts {
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 3 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4825..4842
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4849..4866
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4897..4914

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

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

      func (w *Windows) addProcessNetFrameworkExceptionsCharts(procName string) {
          charts := netFrameworkCLRExceptionsChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkLoadingCharts(procName string) {
          charts := netFrameworkCLRLoadingChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkSecurityCharts(procName string) {
          charts := netFrameworkCLRSecurityChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746

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

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

      func (w *Windows) addProcessNetFrameworkInteropCharts(procName string) {
          charts := netFrameworkCLRInteropChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkLocksAndThreadsCharts(procName string) {
          charts := netFrameworkCLRLocksAndThreadsChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkJITCharts(procName string) {
          charts := netFrameworkCLRJITChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkMemoryCharts(procName string) {
          charts := netFrameworkCLRMemoryChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4730..4746
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addProcessNetFrameworkRemotingCharts(procName string) {
          charts := netFrameworkCLRRemotingChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, strings.ToLower(procName))
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 8 other locations - About 2 hrs to fix
      src/go/collectors/go.d.plugin/modules/rabbitmq/charts.go on lines 303..319
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4592..4608
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4615..4631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4638..4654
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4661..4677
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4684..4700
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4707..4723
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4753..4769

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

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

      func (w *Windows) addExchangeLDAPCharts(name string) {
          charts := exchangeLDAPChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, name)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addThermalZoneCharts(zone string) {
          charts := thermalzoneChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, zone)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addNICCharts(nic string) {
          charts := nicChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, nic)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addMSSQLInstanceCharts(instance string) {
          charts := mssqlInstanceChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, instance)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addExchangeWorkloadCharts(name string) {
          charts := exchangeWorkloadChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, name)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addCollectorCharts(name string) {
          charts := collectorChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, name)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addCPUCoreCharts(core string) {
          charts := cpuCoreChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, core)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addServiceCharts(svc string) {
          charts := serviceChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, svc)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addIISWebsiteCharts(website string) {
          charts := iisWebsiteChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, website)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addDiskCharts(disk string) {
          charts := diskChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, disk)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addExchangeHTTPProxyCharts(name string) {
          charts := exchangeHTTPProxyChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, name)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4494..4510
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

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

      func (w *Windows) addCertificateTemplateCharts(template string) {
          charts := adcsCertTemplateChartsTmpl.Copy()
      
          for _, chart := range *charts {
              chart.ID = fmt.Sprintf(chart.ID, template)
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 22 other locations - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/fail2ban/charts.go on lines 49..65
      src/go/collectors/go.d.plugin/modules/logstash/charts.go on lines 211..227
      src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go on lines 73..89
      src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go on lines 66..83
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 759..775
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 782..798
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 805..821
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 878..894
      src/go/collectors/go.d.plugin/modules/nginxplus/charts.go on lines 951..967
      src/go/collectors/go.d.plugin/modules/nvme/charts.go on lines 240..256
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4191..4207
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4222..4238
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4245..4261
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4316..4332
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4339..4355
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4362..4378
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4385..4401
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4408..4424
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4455..4471
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4776..4792
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4799..4815
      src/go/collectors/go.d.plugin/modules/zfspool/charts.go on lines 88..104

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      var (
          systemCharts = module.Charts{
              systemThreadsChart.Copy(),
              systemUptimeChart.Copy(),
          }
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/proxysql/charts.go on lines 544..572

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          exchangeCharts = module.Charts{
              exchangeActiveSyncPingCMDsPendingChart.Copy(),
              exchangeActiveSyncRequestsChart.Copy(),
              exchangeActiveSyncCMDsChart.Copy(),
              exchangeAutoDiscoverRequestsChart.Copy(),
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/redis/charts.go on lines 43..73

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

              Dims: module.Dims{
                  {ID: "logon_type_system_sessions", Name: "system"},
                  {ID: "logon_type_proxy_sessions", Name: "proxy"},
                  {ID: "logon_type_network_sessions", Name: "network"},
                  {ID: "logon_type_interactive_sessions", Name: "interactive"},
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/lighttpd/charts.go on lines 54..68

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          mssqlInstanceChartsTmpl = module.Charts{
              mssqlAccessMethodPageSplitsChart.Copy(),
              mssqlCacheHitRatioChart.Copy(),
              mssqlBufferCheckpointPageChart.Copy(),
              mssqlBufferPageLifeExpectancyChart.Copy(),
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/postgres/charts.go on lines 99..120

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          adDatabaseOperationsChart = module.Chart{
              OverModule: "ad",
              ID:         "ad_database_operations",
              Title:      "AD database operations",
              Units:      "operations/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1297..1311

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          mssqlSQLErrorsTotalChart = module.Chart{
              OverModule: "mssql",
              ID:         "mssql_instance_%s_sql_errors_total",
              Title:      "Errors",
              Units:      "errors/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 1 hr to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1486..1500

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          nicBandwidthChartTmpl = module.Chart{
              ID:       "nic_%s_bandwidth",
              Title:    "Bandwidth",
              Units:    "kilobits/s",
              Fam:      "net",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 50 mins to fix
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 713..725

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          adDRAReplicationIntrasiteCompressedTrafficChart = module.Chart{
              OverModule: "ad",
              ID:         "ad_dra_replication_intrasite_compressed_traffic",
              Title:      "DRA replication compressed traffic between sites",
              Units:      "bytes/s",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 45 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1539..1552

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          adDRAReplicationIntersiteCompressedTrafficChart = module.Chart{
              OverModule: "ad",
              ID:         "ad_dra_replication_intersite_compressed_traffic",
              Title:      "DRA replication compressed traffic withing site",
              Units:      "bytes/s",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 1 other location - About 45 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 1553..1566

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

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

          hypervVswitchTrafficChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_traffic",
              Title:      "Virtual switch traffic",
              Units:      "bytes/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 40 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3915..3928
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3964..3977

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

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

          hypervVMInterfaceTrafficChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vm_interface_%s_bytes",
              Title:      "VM interface traffic",
              Units:      "bytes/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 40 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3915..3928
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4021..4034

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

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

          hypervVMDeviceIOChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vm_device_%s_bytes_read",
              Title:      "VM storage device IO",
              Units:      "bytes/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 40 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3964..3977
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4021..4034

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

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

          exchangeTransportQueuesExternalLargestDelivery = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_external_largest_delivery",
              Title:      "External Largest Delivery Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          exchangeTransportQueuesUnreachable = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_unreachable",
              Title:      "Unreachable Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          exchangeTransportQueuesInternalActiveRemoteDelivery = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_internal_active_remote_delivery",
              Title:      "Internal Active Remote Delivery Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          exchangeTransportQueuesRetryMailboxDelivery = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_retry_mailbox_delivery",
              Title:      "Internal Active Remote Delivery Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          exchangeTransportQueuesExternalActiveRemoteDelivery = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_external_active_remote_delivery",
              Title:      "External Active Remote Delivery Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          exchangeTransportQueuesPoison = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_poison",
              Title:      "Poison Queue Length",
              Units:      "messages/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2571..2585
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615

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

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

          exchangeTransportQueuesInternalLargestDelivery = module.Chart{
              OverModule: "exchange",
              ID:         "exchange_transport_queues_internal_largest_delivery",
              Title:      "Internal Largest Delivery Queue length",
              Units:      "messages",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 6 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2526..2540
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2541..2555
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2556..2570
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2586..2600
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2601..2615
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2616..2630

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

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

          osMemoryUsage = module.Chart{
              ID:       "os_visible_memory_usage",
              Title:    "Visible Memory Usage",
              Units:    "bytes",
              Fam:      "os",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 507..522
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 864..879

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

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

          osPagingFilesUsageChart = module.Chart{
              ID:       "os_paging_files_usage",
              Title:    "Paging Files Usage",
              Units:    "bytes",
              Fam:      "os",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 507..522
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 848..863

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

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

          memSwapUtilChart = module.Chart{
              ID:       "memory_swap_utilization",
              Title:    "Swap Utilization",
              Units:    "bytes",
              Fam:      "mem",
      Severity: Minor
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 2 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 848..863
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 864..879

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          nicPacketsChartTmpl = module.Chart{
              ID:       "nic_%s_packets",
              Title:    "Packets",
              Units:    "packets/s",
              Fam:      "net",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 10 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 83..94
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 396..407
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 408..419
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 420..431
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 201..212
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 701..712
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 536..547
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 620..631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 679..690
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 691..702

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          nicErrorsChartTmpl = module.Chart{
              ID:       "nic_%s_errors",
              Title:    "Errors",
              Units:    "errors/s",
              Fam:      "net",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 10 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 83..94
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 396..407
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 408..419
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 420..431
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 201..212
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 701..712
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 536..547
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 620..631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 667..678
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 691..702

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          diskOperationsChartTmpl = module.Chart{
              ID:       "logical_disk_%s_operations",
              Title:    "Operations",
              Units:    "operations/s",
              Fam:      "disk",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 10 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 83..94
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 396..407
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 408..419
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 420..431
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 201..212
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 701..712
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 536..547
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 667..678
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 679..690
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 691..702

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          nicDiscardsChartTmpl = module.Chart{
              ID:       "nic_%s_discarded",
              Title:    "Discards",
              Units:    "discards/s",
              Fam:      "net",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 10 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 83..94
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 396..407
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 408..419
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 420..431
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 201..212
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 701..712
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 536..547
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 620..631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 667..678
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 679..690

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          memSwapPagesChart = module.Chart{
              ID:       "memory_swap_pages",
              Title:    "Swap Pages",
              Units:    "pages/s",
              Fam:      "mem",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 10 other locations - About 35 mins to fix
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 83..94
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 396..407
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 408..419
      src/go/collectors/go.d.plugin/modules/cassandra/charts.go on lines 420..431
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 201..212
      src/go/collectors/go.d.plugin/modules/mysql/charts.go on lines 701..712
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 620..631
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 667..678
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 679..690
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 691..702

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

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

          hypervVMDeviceIOPSChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vm_device_%s_operation_read",
              Title:      "VM storage device IOPS",
              Units:      "operations/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVswitchDroppedPacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_dropped_packets",
              Title:      "Virtual switch dropped packets",
              Units:      "drops/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthClientWindowsAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_windows_authentications",
              Title:      "OAuth client windows integrated authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthPasswordGrantRequestsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_password_grant_requests",
              Title:      "OAuth password grant requests",
              Units:      "requests/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthClientPrivKeyJwtAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_privkey_jwt_authentications",
              Title:      "OAuth client private key JWT authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthClientCredentialRequestsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_credentials_requests",
              Title:      "OAuth client credentials requests",
              Units:      "requests/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsSSOAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_sso_authentications",
              Title:      "SSO authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVswitchDirectedPacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_directed_packets",
              Title:      "Virtual switch directed packets",
              Units:      "packets/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthClientAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_authentications",
              Title:      "OAuth client authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsPasswordChangeChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_password_change_requests",
              Title:      "Password change requests",
              Units:      "requests/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVswitchMulticastPacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_multicast_packets",
              Title:      "Virtual switch multicast packets",
              Units:      "packets/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          iisWebsiteFTPFileTransferRateChartTempl = module.Chart{
              OverModule: "iis",
              ID:         "iis_website_%s_ftp_file_transfer_rate",
              Title:      "Website FTP file transfer rate",
              Units:      "files/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthClientSecretPostAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_secret_post_authentications",
              Title:      "OAuth client secret post authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVMInterfacePacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vm_interface_%s_packets",
              Title:      "VM interface packets",
              Units:      "packets/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsUserPasswordAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_userpassword_authentications",
              Title:      "AD U/P authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsExternalAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_external_authentications",
              Title:      "Authentications from external MFA providers",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVswitchExtensionDroppedPacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_extensions_dropped_packets_incoming",
              Title:      "Virtual switch extensions dropped packets",
              Units:      "drops/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100

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

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

          adfsOAuthClientSecretBasicAuthenticationsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_client_secret_basic_authentications",
              Title:      "OAuth client secret basic authentications",
              Units:      "authentications/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          adfsOAuthLogonCertificateRequestsChart = module.Chart{
              OverModule: "adfs",
              ID:         "adfs_oauth_logon_certificate_requests",
              Title:      "OAuth logon certificate requests",
              Units:      "requests/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVMInterfacePacketsDroppedChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vm_interface_%s_packets_dropped",
              Title:      "VM interface packets dropped",
              Units:      "drops/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4062..4074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

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

          hypervVswitchBroadcastPacketsChartTmpl = module.Chart{
              OverModule: "hyperv",
              ID:         "vswitch_%s_broadcast_packets",
              Title:      "Virtual switch broadcast packets",
              Units:      "packets/s",
      Severity: Major
      Found in src/go/collectors/go.d.plugin/modules/windows/charts.go and 20 other locations - About 30 mins to fix
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 941..953
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2012..2024
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2062..2074
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2075..2087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2088..2100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2101..2113
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2114..2126
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2127..2139
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2140..2152
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2153..2165
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2203..2215
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2240..2252
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 2265..2277
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3929..3941
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3978..3990
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 3991..4003
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4049..4061
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4075..4087
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4088..4100
      src/go/collectors/go.d.plugin/modules/windows/charts.go on lines 4101..4113

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status