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

        <div className="row fastfacts">
          <div className="col-sm-6">
            <h3>
              {" "}
              <br></br>
Severity: Major
Found in src/containers/Apollo11Explorer/index.js and 1 other location - About 2 days to fix
src/containers/Apollo8Explorer/index.js on lines 21..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 453.

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="row fastfacts">
          <div className="col-sm-6">
            <h3>
              {" "}
              <br></br>
Severity: Major
Found in src/containers/Apollo8Explorer/index.js and 1 other location - About 2 days to fix
src/containers/Apollo11Explorer/index.js on lines 115..173

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

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

export class Apollo6Explorer extends Component {
  render() {
    return (
      <div className="app-container">
        <AppHeader />
Severity: Major
Found in src/containers/Apollo6Explorer/index.js and 1 other location - About 2 days to fix
src/containers/Apollo5Explorer/index.js on lines 5..62

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

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

export class Apollo5Explorer extends Component {
  render() {
    return (
      <div className="app-container">
        <AppHeader />
Severity: Major
Found in src/containers/Apollo5Explorer/index.js and 1 other location - About 2 days to fix
src/containers/Apollo6Explorer/index.js on lines 5..64

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

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

  render() {
    return (
      <div className="newsLinks">
        <font></font>

Severity: Major
Found in src/components/InTheNewsComponent/index.js - About 1 day to fix

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

    import React, { Component } from "react";
    import { AppFooter, AppHeader } from "../App";
    import config from "../../../config";
    import "./index.scss";
    import { Link } from "react-router-dom";
    Severity: Major
    Found in src/containers/Channels/index.js - About 1 day to fix

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

          return cards.map((card) => {
            if (_.has(card, "description")) {
              return (
                <MomentCard
                  key={card.id}
      Severity: Major
      Found in src/components/StoryTimeline/index.js and 1 other location - About 1 day to fix
      src/components/Apollo11StoryTimeline/index.js on lines 163..187

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

      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 targetcards.map((card) => {
            if (_.has(card, "description")) {
              return (
                <MomentCard
                  key={card.id}
      Severity: Major
      Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 1 day to fix
      src/components/StoryTimeline/index.js on lines 103..127

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

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

          switch (day) {
            case "1":
              mstart = 0;
              mend = 55680000;
              break;
      Severity: Major
      Found in src/containers/Apollo11Explorer/index.js and 1 other location - About 7 hrs to fix
      src/components/Apollo11StoryTimeline/index.js on lines 100..140

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

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

          switch (day) {
            case "1":
              mstart = 0;
              mend = 55680000;
              break;
      Severity: Major
      Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 7 hrs to fix
      src/containers/Apollo11Explorer/index.js on lines 28..68

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 190.

      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

      export function StoryCard({
        showPlayAll = false,
        storyId,
        firstMomentId,
        title,
      Severity: Major
      Found in src/components/StoryTimeline/index.js and 1 other location - About 6 hrs to fix
      src/components/Apollo11StoryTimeline/index.js on lines 27..47

      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

      export function StoryCard({
        showPlayAll = false,
        storyId,
        firstMomentId,
        title,
      Severity: Major
      Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 6 hrs to fix
      src/components/StoryTimeline/index.js on lines 29..49

      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

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

        render() {
          const { onEnd, autoplay } = this.props;
      
          let loading = this.state.loading;
          let transcripts = this.state.transcript;
      Severity: Major
      Found in src/containers/MomentViewer/index.js - About 6 hrs to fix

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

        function form(data) {
          return data.toArray().map((datum => {return {
            name: String(datum.get("met_start")),
            data: [Number(datum.getIn(["data", "count"]))]
          };})).sort(function(a, b) { //sort by met_start
        Severity: Major
        Found in src/components/DashboardDiagram/index.js and 1 other location - About 6 hrs to fix
        src/components/BarDiagram/index.js on lines 95..104

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 163.

        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

        function form(data) {
          return data.toArray().map((datum => {return {
            name: String(datum.get("met_start")),
            data: [Number(datum.getIn(["data", "count"]))]
          };})).sort(function(a, b) { //sort by met_start
        Severity: Major
        Found in src/components/BarDiagram/index.js and 1 other location - About 6 hrs to fix
        src/components/DashboardDiagram/index.js on lines 104..113

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

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

          render() {
            const mission = this.props.match.params.mission;
            const {tapesLoaded, channelsLoaded, selectedChannels, filteredChannels, blockIndex,
            nuggetIndex, tapes, selectedTape, channels, allChannelsLoaded} = this.state;
            const disabled = selectedChannels.length > 0 ? false : true;
        Severity: Major
        Found in src/containers/Channels/index.js - About 6 hrs to fix

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

          export function LandmarkCard({ id, title, metStart }) {
            return (
              <div key={title + id} className="story-timeline-item landmark-item">
                <div className="story-timeline-item-node"></div>
                <div className="story-timeline-item-content">
          Severity: Major
          Found in src/components/StoryTimeline/index.js and 1 other location - About 6 hrs to fix
          src/components/Apollo11StoryTimeline/index.js on lines 72..86

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

          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

          export function LandmarkCard({ id, title, metStart }) {
            return (
              <div key={title + id} className="story-timeline-item landmark-item">
                <div className="story-timeline-item-node"></div>
                <div className="story-timeline-item-content">
          Severity: Major
          Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 6 hrs to fix
          src/components/StoryTimeline/index.js on lines 81..95

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

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

            render() {
              let imgUrl;
              let label;
              let text;
              const url = this.props.url;
          Severity: Major
          Found in src/components/DayDisplay/index.js - About 5 hrs to fix

            Function LessonList has 142 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function LessonList() {
              return (
                <div className="app-container">
                  <nav className="navbar navbar-inverse bg-black">
                    <a className="lessonlinks " href="/lessons#k-2">
            Severity: Major
            Found in src/components/LessonList/index.js - About 5 hrs to fix
              Severity
              Category
              Status
              Source
              Language