MiniDigger/Hangar

View on GitHub

Showing 518 of 518 total issues

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

    def projectRoles[V[_, _]: QueryView](
        view: V[ProjectRoleTable, Model[ProjectUserRole]]
    ): V[ProjectRoleTable, Model[ProjectUserRole]] =
      view.filterView(_.userId === self.id.value)
Severity: Major
Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
models/src/main/scala/ore/models/project/Project.scala on lines 303..306
models/src/main/scala/ore/models/project/Project.scala on lines 327..328
models/src/main/scala/ore/models/project/Project.scala on lines 349..350
models/src/main/scala/ore/models/project/Project.scala on lines 357..358
models/src/main/scala/ore/models/project/Project.scala on lines 365..366
models/src/main/scala/ore/models/project/Project.scala on lines 376..379
models/src/main/scala/ore/models/project/Version.scala on lines 179..182
models/src/main/scala/ore/models/project/Version.scala on lines 210..211
models/src/main/scala/ore/models/user/User.scala on lines 167..170
models/src/main/scala/ore/models/user/User.scala on lines 187..190
models/src/main/scala/ore/models/user/User.scala on lines 197..200
models/src/main/scala/ore/models/user/User.scala on lines 216..217
models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

    title = $e.attr('data-original-title')
      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
Severity: Minor
Found in ore/public/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
ore/public/bootstrap/js/bootstrap.js on lines 1579..1582

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

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

    return $e.attr('data-content')
      || (typeof o.content == 'function' ?
            o.content.call($e[0]) :
            o.content)
Severity: Minor
Found in ore/public/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
ore/public/bootstrap/js/bootstrap.js on lines 1409..1410

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

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

  def logCallback[A](msg: => String, logger: LoggerTakingImplicit[A])(
      implicit imp: A
  ): Either[Throwable, _] => IO[Unit] = {
    case Right(_) => IO(())
    case Left(e)  => IO(logger.error(msg, e))
Severity: Minor
Found in orePlayCommon/app/util/IOUtils.scala and 1 other location - About 40 mins to fix
orePlayCommon/app/util/IOUtils.scala on lines 23..26

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

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

  def logCallbackNoMDC[A](msg: => String, logger: Logger): Either[Throwable, _] => IO[Unit] = {
    case Right(_) => IO(())
    case Left(e)  => IO(logger.error(msg, e))
  }
Severity: Minor
Found in orePlayCommon/app/util/IOUtils.scala and 1 other location - About 40 mins to fix
orePlayCommon/app/util/IOUtils.scala on lines 16..21

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

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

    def addView[F[_]](implicit service: ModelService[F]): F[Model[Project]] =
      service.update(self)(_.copy(viewCount = self.viewCount + 1))
Severity: Major
Found in models/src/main/scala/ore/models/project/Project.scala and 2 other locations - About 40 mins to fix
models/src/main/scala/ore/models/project/Project.scala on lines 319..320
models/src/main/scala/ore/models/project/Version.scala on lines 197..198

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

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

    def addDownload[F[_]](implicit service: ModelService[F]): F[Model[Project]] =
      service.update(self)(_.copy(downloadCount = self.downloadCount + 1))
Severity: Major
Found in models/src/main/scala/ore/models/project/Project.scala and 2 other locations - About 40 mins to fix
models/src/main/scala/ore/models/project/Project.scala on lines 311..312
models/src/main/scala/ore/models/project/Version.scala on lines 197..198

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

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

    def addDownload[F[_]](implicit service: ModelService[F]): F[Model[Version]] =
      service.update(self)(_.copy(downloadCount = self.downloadCount + 1))
Severity: Major
Found in models/src/main/scala/ore/models/project/Version.scala and 2 other locations - About 40 mins to fix
models/src/main/scala/ore/models/project/Project.scala on lines 311..312
models/src/main/scala/ore/models/project/Project.scala on lines 319..320

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

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

Consider simplifying this complex logical expression.
Open

  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
  }
Severity: Major
Found in ore/public/bootstrap/js/bootstrap.js - About 40 mins to fix

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

      $.fn.tab.noConflict = function () {
        $.fn.tab = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.affix.noConflict = function () {
        $.fn.affix = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.dropdown.noConflict = function () {
        $.fn.dropdown = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.button.noConflict = function () {
        $.fn.button = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.scrollspy.noConflict = function () {
        $.fn.scrollspy = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132

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

    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

      $.fn.alert.noConflict = function () {
        $.fn.alert = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.carousel.noConflict = function () {
        $.fn.carousel = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.modal.noConflict = function () {
        $.fn.modal = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2129..2132
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

      $.fn.collapse.noConflict = function () {
        $.fn.collapse = old
        return this
      }
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 110..113
    ore/public/bootstrap/js/bootstrap.js on lines 222..225
    ore/public/bootstrap/js/bootstrap.js on lines 442..445
    ore/public/bootstrap/js/bootstrap.js on lines 637..640
    ore/public/bootstrap/js/bootstrap.js on lines 965..968
    ore/public/bootstrap/js/bootstrap.js on lines 1757..1760
    ore/public/bootstrap/js/bootstrap.js on lines 1915..1918
    ore/public/bootstrap/js/bootstrap.js on lines 2307..2310

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

    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

        val roleObjUpsF = roleUps.traverse { role =>
          Role.organizationRoles
            .find(_.value == role)
            .fold(F.raiseError[Role](new Exception(s"Supplied invalid role type: $role")))(F.pure)
        }
    Severity: Minor
    Found in ore/app/form/organization/OrganizationMembersUpdate.scala and 1 other location - About 40 mins to fix
    ore/app/form/project/ProjectSettingsForm.scala on lines 144..148

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 69.

    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

                  val roles = this.roleUps.traverse { role =>
                    Role.projectRoles
                      .find(_.value == role)
                      .fold(F.raiseError[Role](new RuntimeException("supplied invalid role type")))(F.pure)
                  }
    Severity: Minor
    Found in ore/app/form/project/ProjectSettingsForm.scala and 1 other location - About 40 mins to fix
    ore/app/form/organization/OrganizationMembersUpdate.scala on lines 73..77

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

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

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

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

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

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language