KarrLab/datanator_frontend

View on GitHub

Showing 403 of 403 total issues

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

        <div className="content-block-content">
          {results == null && <div className="loader"></div>}

          {results != null && (
            <div>
Severity: Major
Found in src/scenes/SearchResults/SearchResultsList.js and 1 other location - About 7 hrs to fix
src/scenes/BiochemicalEntityDetails/Metabolite/SearchResultsList.js on lines 141..170

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

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

      <div
        className="content-container-search-results-scene content-block section"
        id={this.props["html-anchor-id"]}
      >
        {results == null && <div className="loader"></div>}
src/scenes/SearchResults/SearchResultsList.js on lines 149..175

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

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

            <div className="section-columns section-2-columns">
              <div className="section section-column" id="data-type">
                <h2 className="content-block-heading">
                  Distribution of the types of the measurements
                </h2>
Severity: Major
Found in src/scenes/Stats/Stats.js and 1 other location - About 7 hrs to fix
src/scenes/Stats/Stats.js on lines 393..417

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

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

            <div className="section-columns section-2-columns">
              <div className="section section-column" id="immediate-source">
                <h2 className="content-block-heading">
                  Immediate sources of the measurements
                </h2>
Severity: Major
Found in src/scenes/Stats/Stats.js and 1 other location - About 7 hrs to fix
src/scenes/Stats/Stats.js on lines 333..357

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

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

Function render has 181 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    return (
      <div className="content-container content-container-help-scene">
        <h1 className="page-title">Help</h1>
        <div className="content-container-columns">
Severity: Major
Found in src/scenes/Help/Help.js - About 7 hrs to fix

    Function getColDefs has 169 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static getColDefs(query, organism, formattedData, taxonomicRanks) {
        const colDefs = [
          {
            headerName: "Concentration",
            field: "value",

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

                    <div className="vertical-workflow-el">
                      <div className="vertical-workflow-el-line"></div>
                      <div className="vertical-workflow-el-icon-container">
                        <LazyLoad>
                          <object
      Severity: Major
      Found in src/scenes/Home/Home.js and 2 other locations - About 6 hrs to fix
      src/scenes/Home/Home.js on lines 658..680
      src/scenes/Home/Home.js on lines 682..705

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

      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

                    <div className="vertical-workflow-el vertical-workflow-el-analyze">
                      <div className="vertical-workflow-el-line"></div>
                      <div className="vertical-workflow-el-icon-container">
                        <LazyLoad>
                          <object
      Severity: Major
      Found in src/scenes/Home/Home.js and 2 other locations - About 6 hrs to fix
      src/scenes/Home/Home.js on lines 632..656
      src/scenes/Home/Home.js on lines 682..705

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

      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

                    <div className="vertical-workflow-el">
                      <div className="vertical-workflow-el-line"></div>
                      <div className="vertical-workflow-el-icon-container">
                        <LazyLoad>
                          <object
      Severity: Major
      Found in src/scenes/Home/Home.js and 2 other locations - About 6 hrs to fix
      src/scenes/Home/Home.js on lines 632..656
      src/scenes/Home/Home.js on lines 658..680

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

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

            {
              headerName: "Taxonomic similarity",
              headerComponentFramework: HtmlColumnHeader,
              headerComponentParams: {
                name: (
      src/scenes/BiochemicalEntityDetails/Gene/ProteinModificationDataTable.js on lines 240..269
      src/scenes/BiochemicalEntityDetails/Gene/RnaHalfLifeDataTable.js on lines 277..306
      src/scenes/BiochemicalEntityDetails/Gene/RnaModificationDataTable.js on lines 149..178
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 488..517

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

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

            {
              headerName: "Taxonomic similarity",
              headerComponentFramework: HtmlColumnHeader,
              headerComponentParams: {
                name: (
      src/scenes/BiochemicalEntityDetails/Gene/ProteinAbundanceDataTable.js on lines 225..254
      src/scenes/BiochemicalEntityDetails/Gene/RnaHalfLifeDataTable.js on lines 277..306
      src/scenes/BiochemicalEntityDetails/Gene/RnaModificationDataTable.js on lines 149..178
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 488..517

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

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

          colDefs.push({
            headerName: "Taxonomic similarity",
            headerComponentFramework: HtmlColumnHeader,
            headerComponentParams: {
              name: (
      src/scenes/BiochemicalEntityDetails/Gene/ProteinAbundanceDataTable.js on lines 225..254
      src/scenes/BiochemicalEntityDetails/Gene/ProteinModificationDataTable.js on lines 240..269
      src/scenes/BiochemicalEntityDetails/Gene/RnaHalfLifeDataTable.js on lines 277..306
      src/scenes/BiochemicalEntityDetails/Gene/RnaModificationDataTable.js on lines 149..178

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

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

            {
              headerName: "Taxonomic similarity",
              headerComponentFramework: HtmlColumnHeader,
              headerComponentParams: {
                name: (
      src/scenes/BiochemicalEntityDetails/Gene/ProteinAbundanceDataTable.js on lines 225..254
      src/scenes/BiochemicalEntityDetails/Gene/ProteinModificationDataTable.js on lines 240..269
      src/scenes/BiochemicalEntityDetails/Gene/RnaModificationDataTable.js on lines 149..178
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 488..517

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

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

            {
              headerName: "Taxonomic similarity",
              headerComponentFramework: HtmlColumnHeader,
              headerComponentParams: {
                name: (
      src/scenes/BiochemicalEntityDetails/Gene/ProteinAbundanceDataTable.js on lines 225..254
      src/scenes/BiochemicalEntityDetails/Gene/ProteinModificationDataTable.js on lines 240..269
      src/scenes/BiochemicalEntityDetails/Gene/RnaHalfLifeDataTable.js on lines 277..306
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 488..517

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

      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

        static getKmValues(parameters) {
          const kms = {};
          for (const parameter of parameters) {
            if (parameter.type === 27 || parameter.sbo_type === 27) {
              if (parameter.value != null) {
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 138..156

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

      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

        static getKiValues(parameters) {
          const kis = {};
          for (const parameter of parameters) {
            if (parameter.type === 261 || parameter.sbo_type === 261) {
              if (parameter.value != null) {
      src/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable.js on lines 118..136

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

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

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

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

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

      Refactorings

      Further Reading

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

          if (this.props.api !== prevProps.api) {
            prevProps.api.removeEventListener("firstDataRendered", this.updateVals);
            prevProps.api.removeEventListener("rowDataChanged", this.updateVals);
            prevProps.api.removeEventListener("rowDataUpdated", this.updateVals);
      
      
      Severity: Major
      Found in src/scenes/BiochemicalEntityDetails/TextFilter.js and 1 other location - About 6 hrs to fix
      src/scenes/BiochemicalEntityDetails/NumberFilter.js on lines 65..74

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

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

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

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

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

      Refactorings

      Further Reading

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

          if (this.props.api !== prevProps.api) {
            prevProps.api.removeEventListener("firstDataRendered", this.updateBounds);
            prevProps.api.removeEventListener("rowDataChanged", this.updateBounds);
            prevProps.api.removeEventListener("rowDataUpdated", this.updateBounds);
      
      
      Severity: Major
      Found in src/scenes/BiochemicalEntityDetails/NumberFilter.js and 1 other location - About 6 hrs to fix
      src/scenes/BiochemicalEntityDetails/TextFilter.js on lines 44..53

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

      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

                <h1 className="page-title">
                  Reaction:{" "}
                  <span className="highlight-accent">
                    {this.state.metadata ? this.state.metadata.title : ""}
                  </span>
      Severity: Major
      Found in src/scenes/BiochemicalEntityDetails/Reaction/Reaction.js and 2 other locations - About 6 hrs to fix
      src/scenes/BiochemicalEntityDetails/Gene/Gene.js on lines 58..71
      src/scenes/BiochemicalEntityDetails/Metabolite/Metabolite.js on lines 42..55

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

      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

                <h1 className="page-title">
                  Gene:{" "}
                  <span className="highlight-accent">
                    {this.state.metadata ? this.state.metadata.title : ""}
                  </span>
      Severity: Major
      Found in src/scenes/BiochemicalEntityDetails/Gene/Gene.js and 2 other locations - About 6 hrs to fix
      src/scenes/BiochemicalEntityDetails/Metabolite/Metabolite.js on lines 42..55
      src/scenes/BiochemicalEntityDetails/Reaction/Reaction.js on lines 42..55

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

      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