UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 270 of 270 total issues

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

    return (
      <div className="app-container">
        <AppHeader />
        <div className="moments-container">
          <h1 className="titleBanner-smaller">Moments</h1>
Severity: Major
Found in src/containers/Moments/index.js and 1 other location - About 2 hrs to fix
src/containers/Stories/index.js on lines 34..43

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

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 (
      <div className="app-container">
        <AppHeader />
        <div className="container">
          <h1 className="titleBanner-smaller">Stories</h1>
Severity: Major
Found in src/containers/Stories/index.js and 1 other location - About 2 hrs to fix
src/containers/Moments/index.js on lines 21..30

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

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

  render() {
    return (
      <div className="app-container">
        <AppHeader />

Severity: Major
Found in src/containers/Apollo4Explorer/index.js - About 2 hrs to fix

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

      render() {
        const {
          url,
          time,
          autoplay,
    Severity: Major
    Found in src/components/AudioPlayer/index.js - About 2 hrs to fix

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

        render() {
          return (
            <div className="app-container">
              <AppHeader />
      
      
      Severity: Major
      Found in src/containers/Apollo6Explorer/index.js - About 2 hrs to fix

        Function ChannelPlayerNavigatingInstruction has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function ChannelPlayerNavigatingInstruction(props) {
          var handleClosePopup = props.handleClosePopup;
          var showInstruction = props.showInstruction;
          return (
            <>
        Severity: Major
        Found in src/components/ChannelPlayerNavigatingInstruction/index.js - About 2 hrs to fix

          File index.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React, { Component } from "react";
          import { AppFooter, AppHeader } from "../App";
          import { ChannelPlayer } from "../../components/ChannelPlayer";
          import { Link, Redirect } from "react-router-dom";
          import { ChannelPlayerNavigatingInstruction } from "../../components/ChannelPlayerNavigatingInstruction";
          Severity: Minor
          Found in src/containers/ChannelViewer/index.js - About 2 hrs to fix

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

                const rawAll = data.series.map((datum => {return {name: datum.name, value: form(datum.value)};})).filter(datum => datum.value.length > 0);
            Severity: Major
            Found in src/components/BarDiagram/index.js and 2 other locations - About 2 hrs to fix
            src/components/DashboardDiagram/index.js on lines 19..19
            src/components/LineDiagram/index.js on lines 23..27

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

            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

              it("should display text", function() {
                const item = shallow(
                  <MomentNoteItem id={1} title="gary oak" text="text" />
                );
                expect(item.find("p").text()).toBe("text");
            Severity: Major
            Found in src/components/MomentNote/index.test.js and 1 other location - About 2 hrs to fix
            src/components/MomentNote/index.test.js on lines 36..41

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

            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

                const rawAll = data.series
                  .map((datum) => {
                    return { name: datum.name, value: form(datum.value) };
                  })
                  .filter((datum) => datum.value.length > 0);
            Severity: Major
            Found in src/components/LineDiagram/index.js and 2 other locations - About 2 hrs to fix
            src/components/BarDiagram/index.js on lines 19..19
            src/components/DashboardDiagram/index.js on lines 19..19

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

            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

              render() {
                return (
                  <div className="app-container">
                    <AppHeader />
                    <div className="text-center lead">
            Severity: Major
            Found in src/containers/RandomMoment/index.js and 1 other location - About 2 hrs to fix
            src/containers/Stories/index.js on lines 21..32

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

            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

                const rawAll = data.series.map((datum => {return {name: datum.name, value: form(datum.value)};})).filter(datum => datum.value.length > 0);
            Severity: Major
            Found in src/components/DashboardDiagram/index.js and 2 other locations - About 2 hrs to fix
            src/components/BarDiagram/index.js on lines 19..19
            src/components/LineDiagram/index.js on lines 23..27

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

            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.state.loading) {
                  return (
                    <div className="app-container">
                      <AppHeader />
                      <div className="text-center lead">
            Severity: Major
            Found in src/containers/Stories/index.js and 1 other location - About 2 hrs to fix
            src/containers/RandomMoment/index.js on lines 19..30

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

            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

              it("should display a title", function() {
                const item = shallow(
                  <MomentNoteItem id={1} title="gary oak" text="text" />
                );
                expect(item.find("h1").text()).toBe("gary oak");
            Severity: Major
            Found in src/components/MomentNote/index.test.js and 1 other location - About 2 hrs to fix
            src/components/MomentNote/index.test.js on lines 43..48

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

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

              componentDidUpdate() {
                const transcripts = this.state.transcripts;
                // DOM for timeline
                // only need this when transcripts are displayed
                if (
            Severity: Minor
            Found in src/components/ChannelPlayer/index.js - About 2 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

              render() {
                return (
                  <div className="app-container">
                    <AppHeader />
            
            
            Severity: Major
            Found in src/containers/Apollo5Explorer/index.js - About 2 hrs to fix

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

                      <Chart
                        width={containerWidth}
                        height={containerWidth/4}
                        series={diagramData}
                        minX={0}
              Severity: Major
              Found in src/components/DashboardDiagram/index.js and 2 other locations - About 2 hrs to fix
              src/components/BarDiagram/index.js on lines 27..78
              src/components/LineDiagram/index.js on lines 49..117

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

              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

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

                      <Chart
                        width={containerWidth}
                        height={containerWidth/4}
                        series={diagramData}
                        minX={0}
              Severity: Major
              Found in src/components/BarDiagram/index.js and 2 other locations - About 2 hrs to fix
              src/components/DashboardDiagram/index.js on lines 27..88
              src/components/LineDiagram/index.js on lines 49..117

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

              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

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

                      <Chart
                        width={containerWidth}
                        height={containerWidth / 4}
                        series={diagramData}
                        minX={0}
              Severity: Major
              Found in src/components/LineDiagram/index.js and 2 other locations - About 2 hrs to fix
              src/components/BarDiagram/index.js on lines 27..78
              src/components/DashboardDiagram/index.js on lines 27..88

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

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

                render() {
                  return (
                    <footer>
                      <div className="background" />
                      <div
              Severity: Minor
              Found in src/containers/App/index.js - About 2 hrs to fix
                Severity
                Category
                Status
                Source
                Language