UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 270 of 270 total issues

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

function generateLegend(data) {
  var result = [];
  data.map((datum, index) => result.push(<span key={index} style={{color:D3.schemeCategory10[index]}}>&emsp;{datum.name}&emsp;</span>));
  return result;
}
Severity: Major
Found in src/components/BarDiagram/index.js and 2 other locations - About 3 hrs to fix
src/components/DashboardDiagram/index.js on lines 97..101
src/components/LineDiagram/index.js on lines 129..139

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

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

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

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

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

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

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

      import React, { Component } from "react";
      import { AppFooter, AppHeader } from "../App";
      import "./index.scss";
      
      import Spinner from "react-spinner";
      Severity: Minor
      Found in src/containers/DJ/index.js - About 2 hrs to fix

        Function checkDay has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          checkDay() {
            var mstart;
            var mend;
            const stories = _.sortBy(this.state.stories, "met_start");
            let tempUrl = this.props.location.pathname;
        Severity: Major
        Found in src/containers/Apollo11Explorer/index.js - About 2 hrs to fix

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

            render() {
              const {data, containerWidth} = this.props;
          
              //Don't render diagram without data
              if(data.series.every(datum => {return datum.value.size < 1;})) {
          Severity: Major
          Found in src/components/BarDiagram/index.js - About 2 hrs to fix

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

                targetcards = _.filter(cards, function (card) {
                  return (
                    card == null ||
                    (card.met_start != null &&
                      ((card.met_start >= mstart && card.met_start <= mend) ||
            Severity: Major
            Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 2 hrs to fix
            src/containers/Apollo11Explorer/index.js on lines 70..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 88.

            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

                targetstories = _.filter(stories, function (story) {
                  return (
                    day == null ||
                    (story.met_start != null &&
                      ((story.met_start >= mstart && story.met_start <= mend) ||
            Severity: Major
            Found in src/containers/Apollo11Explorer/index.js and 1 other location - About 2 hrs to fix
            src/components/Apollo11StoryTimeline/index.js on lines 143..150

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

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

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

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

                render() {
                  const { autoplay } = this.props;
                  var timelineEnable = this.state.timelineEnable;
                  var focusOnTranscript = this.state.focusOnActiveTranscript;
              
              
              Severity: Major
              Found in src/components/ChannelPlayer/index.js - About 2 hrs to fix

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

                  render() {
                    const renderSearchResults = () => {
                      const { loading, searching, moments } = this.state;
                
                      if (loading && searching) {
                Severity: Major
                Found in src/containers/Search/index.js - About 2 hrs to fix

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/6")}>
                                <div className="day-btn-label">Day 6</div>
                                <div className="day-btn-text">Jul 21st</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/1")}>
                                <div className="day-btn-label">Day 1</div>
                                <div className="day-btn-text">Jul 16th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/8")}>
                                <div className="day-btn-label">Day 8</div>
                                <div className="day-btn-text">Jul 23rd</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/2")}>
                                <div className="day-btn-label">Day 2</div>
                                <div className="day-btn-text">Jul 17th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/9")}>
                                <div className="day-btn-label">Day 9</div>
                                <div className="day-btn-text">Jul 24th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/7")}>
                                <div className="day-btn-label">Day 7</div>
                                <div className="day-btn-text">Jul 22nd</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/5")}>
                                <div className="day-btn-label">Day 5</div>
                                <div className="day-btn-text">Jul 20th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/4")}>
                                <div className="day-btn-label">Day 4</div>
                                <div className="day-btn-text">Jul 19th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 106..111
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

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

                            <div className="col-lg-1 day-btn-col">
                              <Link className="btn day-btn" to={url.concat("day/3")}>
                                <div className="day-btn-label">Day 3</div>
                                <div className="day-btn-text">Jul 18th</div>
                              </Link>
                  Severity: Major
                  Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
                  src/components/DayDisplay/index.js on lines 94..99
                  src/components/DayDisplay/index.js on lines 100..105
                  src/components/DayDisplay/index.js on lines 112..117
                  src/components/DayDisplay/index.js on lines 118..123
                  src/components/DayDisplay/index.js on lines 124..129
                  src/components/DayDisplay/index.js on lines 130..135
                  src/components/DayDisplay/index.js on lines 136..141
                  src/components/DayDisplay/index.js on lines 142..147

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language