AppStateESS/InternshipInventory

View on GitHub
javascript/specialHost/ApproveHost.jsx

Summary

Maintainability
F
1 mo
Test Coverage

File ApproveHost.jsx has 993 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import {Button, Modal} from 'react-bootstrap';
import Message from '../emergencyContact/Message.jsx';
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx - About 2 days to fix

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

    render() {
        var ApproveData = null;
        if (this.state.approveData != null && this.state.hostData != null && this.state.conditionData != null) {
            ApproveData = this.state.approveData.map(function (host) {
                return (
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx - About 1 day to fix

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

    render() {
        var conData = null;
        if (this.props.conditionData != null) {
            conData = this.props.conditionData.map(function (condition) {
            return (
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx - About 3 hrs to fix

AllHostList has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class AllHostList extends React.Component {
    constructor(props) {
        super(props);

        this.state = {
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 2 hrs to fix

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

    render() {
        var conData = null;
        if (this.props.conditionData != null) {
            conData = this.props.conditionData.map(function (condition) {
            return (
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 2 hrs to fix

Function viewShowFilter has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    viewShowFilter(data, filter) {
        var filtered = [];
        for (var i = 0; i < data.length; i++) {
            var item = data[i];
            if (filter === 'condition') {
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr 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 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        // Create red asterisk for a required field
        var require = <span style={{color: '#FB0000'}}> *</span>;
        return (
            <Modal show={this.props.show} onHide={this.handleExit} backdrop='static'>
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr to fix

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

    render(){
        var availHost = null;
        if (this.state.availableHost != null) {
            availHost = this.state.availableHost.map(function (available) {
            return (
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr to fix

Function getData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getData() {
        $.ajax({
            url: 'index.php?module=intern&action=HostRest',
            type: 'GET',
            dataType: 'json',
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr to fix

Function sortBy has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    sortBy(unsorted, typeOfSort) {
      var sorted = [];
      switch(typeOfSort) {
          case 'subA':
              sorted = unsorted.sort(function (a, b) {
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr to fix

Function constructor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor(props) {
        super(props);

        this.state = {
            mainData: null,
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 1 hr to fix

Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    render() {
        var ApproveData = null;
        if (this.state.approveData != null && this.state.hostData != null && this.state.conditionData != null) {
            ApproveData = this.state.approveData.map(function (host) {
                return (
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 45 mins 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

Avoid deeply nested control flow statements.
Open

                if (item.host_approve_flag === 1) {
                    filtered.push(item);
                }
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx - About 45 mins to fix

Function updateDisplayData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    updateDisplayData(typedName, sort, showFilter, data, display) {
        var filtered = [];

        // First filters data.
        if (showFilter !== null) {
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 35 mins 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 searchListByName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    searchListByName(data, nameToSearch, display) {
      var filtered = [];
      // Looks for the name by filtering the mainData
      for (var i = 0; i < data.length; i++) {
          var item = data[i];
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx - About 25 mins 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

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

                    <div className="col-md-4">
                        <label className="control-label">Sort By</label> <br />
                        <div className="btn-group" data-toggle="buttons" onClick={this.onSortByChange} value={this.state.value}>
                            <button className="btn btn-default" value="subA">
                                <input  type="radio"/>Sub A-Z
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 1 day to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 436..452

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

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="col-md-3">
                        <label className="control-label">Filter</label> <br />
                        <div className="btn-group" data-toggle="buttons" onClick={this.onShow} value={this.state.value}>
                            <button className="btn btn-default" value="all">
                                <input  type="radio"/>All
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 6 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 949..959

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

                        <div className="col-md-2">
                            <label className="control-label">Sort By</label> <br />
                            <div className="btn-group" data-toggle="buttons" onClick={this.onSortByHostChange} value={this.state.value}>
                                <button className="btn btn-default" value="hostA">
                                    <input  type="radio"/>Host A-Z
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 6 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 1023..1033

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Approve {require}</label>
                                <select className="form-control col-lg-7 select-sub-host" id="host-flag" ref="host_flag" defaultValue={this.props.flag}>
                                    <option value="0">Not Approved</option>
                                    <option value="1">Approved</option>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 5 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 289..296

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

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="form-group">
                            <label className="col-lg-3 control-label">Approve {require}</label>
                                <select className="form-control col-lg-7 select-sub-host" id="host-flag" ref="flag" defaultValue={this.props.flag}>
                                    <option value="0">Not Approved</option>
                                    <option value="1">Approved</option>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 5 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 120..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 135.

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

    getHostConData(){
        $.ajax({
            url: 'index.php?module=intern&action=HostRest&Condition=true',
            type: 'GET',
            dataType: 'json',
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 4 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 125..139
javascript/specialHost/ApproveHost.jsx on lines 599..612

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

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

    getMainData(){
        $.ajax({
            url: 'index.php?module=intern&action=SubRest',
            type: 'GET',
            dataType: 'json',
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 4 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 125..139
javascript/specialHost/ApproveHost.jsx on lines 613..626

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

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.conditionData != null) {
            conData = this.props.conditionData.map(function (condition) {
            return (
                    <option key={condition.id} value={condition.id}>{condition.admin_message}</option>
                );
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 58..66

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

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.conditionData != null) {
            conData = this.props.conditionData.map(function (condition) {
            return (
                    <option key={condition.id} value={condition.id}>{condition.admin_message}</option>
                );
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 259..267

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

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

    constructor(props){
        super(props);
        this.state = {showModal: false};

        this.closeModal = this.closeModal.bind(this);
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/manager/Manager.jsx on lines 49..58
javascript/specialHost/ApproveHost.jsx on lines 386..393
javascript/specialHost/ApproveHost.jsx on lines 432..439

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

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

    constructor(props){
        super(props);
        this.state = {showModal: false};

        this.closeModal = this.closeModal.bind(this);
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/manager/Manager.jsx on lines 49..58
javascript/specialHost/ApproveHost.jsx on lines 432..439
javascript/specialHost/ApproveHost.jsx on lines 471..478

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

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

    constructor(props){
        super(props);
        this.state = {showModal: false};

        this.closeModal = this.closeModal.bind(this);
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/manager/Manager.jsx on lines 49..58
javascript/specialHost/ApproveHost.jsx on lines 386..393
javascript/specialHost/ApproveHost.jsx on lines 471..478

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

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

        if (this.state.availableHost != null) {
            availHost = this.state.availableHost.map(function (available) {
            return (
                    <option key={available.id} value={available.id}>{available.host_name}</option>
                );
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/createInterface/HostBlock.jsx on lines 196..204
javascript/createInterface/HostBlock.jsx on lines 359..367
javascript/specialHost/ApproveHost.jsx on lines 355..363

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

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

        if (this.state.conditionData != null) {
            conData = this.state.conditionData.map(function (condition) {
            return (
                    <option key={condition.id} value={condition.id}>{condition.admin_message}</option>
                );
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/createInterface/HostBlock.jsx on lines 196..204
javascript/createInterface/HostBlock.jsx on lines 359..367
javascript/specialHost/ApproveHost.jsx on lines 345..353

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

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="form-group">
                            <label className="col-lg-3 control-label">Condition</label>
                            <select className="form-control col-lg-7 select-sub-host" id="host-condition" ref="host_condition" defaultValue={this.props.conId}>
                                <option value="-1">Select a Condition</option>
                                {conData}
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 113..119

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

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="form-group">
                            <label className="col-lg-3 control-label">Sub Condition</label>
                            <select className="form-control col-lg-7 select-sub-host" id="host-condition" ref="host_condition" defaultValue={this.props.conId}>
                                <option value="-1">Select a Condition</option>
                                {conData}
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 282..288

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

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

          case 'subA':
              sorted = unsorted.sort(function (a, b) {
                  if (a.sub_name.toLowerCase() < b.sub_name.toLowerCase()) return -1;
                  if (a.sub_name.toLowerCase() > b.sub_name.toLowerCase()) return 1;
                  return 0;
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 757..763
javascript/specialHost/ApproveHost.jsx on lines 764..770
javascript/specialHost/ApproveHost.jsx on lines 771..777

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

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

          case 'hostA':
              sorted = unsorted.sort(function (a,b) {
                  if (a.host_name.toLowerCase() < b.host_name.toLowerCase()) return -1;
                  if (a.host_name.toLowerCase() > b.host_name.toLowerCase()) return 1;
                  return 0;
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 750..756
javascript/specialHost/ApproveHost.jsx on lines 757..763
javascript/specialHost/ApproveHost.jsx on lines 771..777

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

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

          case 'subZ':
              sorted = unsorted.sort(function (a, b) {
                  if (a.sub_name.toLowerCase() > b.sub_name.toLowerCase()) return -1;
                  if (a.sub_name.toLowerCase() < b.sub_name.toLowerCase()) return 1;
                  return 0;
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 750..756
javascript/specialHost/ApproveHost.jsx on lines 764..770
javascript/specialHost/ApproveHost.jsx on lines 771..777

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

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

          case 'hostZ':
              sorted = unsorted.sort(function (a,b) {
                  if (a.host_name.toLowerCase() > b.host_name.toLowerCase()) return -1;
                  if (a.host_name.toLowerCase() < b.host_name.toLowerCase()) return 1;
                  return 0;
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 750..756
javascript/specialHost/ApproveHost.jsx on lines 757..763
javascript/specialHost/ApproveHost.jsx on lines 764..770

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Stop Level {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="stop" ref="stop_level" defaultValue={this.props.stop}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 81..84
javascript/specialHost/ApproveHost.jsx on lines 188..191
javascript/specialHost/ApproveHost.jsx on lines 196..199
javascript/specialHost/ApproveHost.jsx on lines 200..203
javascript/specialHost/ApproveHost.jsx on lines 278..281

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">User Message {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="user" ref="user_message" defaultValue={this.props.user}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 81..84
javascript/specialHost/ApproveHost.jsx on lines 188..191
javascript/specialHost/ApproveHost.jsx on lines 192..195
javascript/specialHost/ApproveHost.jsx on lines 200..203
javascript/specialHost/ApproveHost.jsx on lines 278..281

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Host Name {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="name" ref="name" defaultValue={this.props.name}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 81..84
javascript/specialHost/ApproveHost.jsx on lines 188..191
javascript/specialHost/ApproveHost.jsx on lines 192..195
javascript/specialHost/ApproveHost.jsx on lines 196..199
javascript/specialHost/ApproveHost.jsx on lines 200..203

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

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

        $.ajax({
            url: 'index.php?module=intern&action=HostRest',
            type: 'PUT',
            dataType: 'json',
            data: JSON.stringify(data),
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 678..690

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Sub Name {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-name" ref="host_name" defaultValue={this.props.name}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 188..191
javascript/specialHost/ApproveHost.jsx on lines 192..195
javascript/specialHost/ApproveHost.jsx on lines 196..199
javascript/specialHost/ApproveHost.jsx on lines 200..203
javascript/specialHost/ApproveHost.jsx on lines 278..281

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Admin Name {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="admin" ref="admin_message" defaultValue={this.props.admin}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 81..84
javascript/specialHost/ApproveHost.jsx on lines 192..195
javascript/specialHost/ApproveHost.jsx on lines 196..199
javascript/specialHost/ApproveHost.jsx on lines 200..203
javascript/specialHost/ApproveHost.jsx on lines 278..281

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Email Listed {require}</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="email" ref="email" defaultValue={this.props.email}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 3 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 129..132
javascript/emergencyContact/EmgContactList.jsx on lines 133..136
javascript/specialHost/ApproveHost.jsx on lines 81..84
javascript/specialHost/ApproveHost.jsx on lines 188..191
javascript/specialHost/ApproveHost.jsx on lines 192..195
javascript/specialHost/ApproveHost.jsx on lines 196..199
javascript/specialHost/ApproveHost.jsx on lines 278..281

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

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

        $.ajax({
            url: 'index.php?module=intern&action=HostRest',
            type: 'PUT',
            dataType: 'json',
            data: JSON.stringify(data),
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 3 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 662..674

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Zip/Postal</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-zip" ref="host_zip" defaultValue={this.props.zip}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Other Name</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-other" ref="host_other" defaultValue={this.props.other}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Address</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-address" ref="host_address" defaultValue={this.props.address}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Country</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-country" ref="host_country" defaultValue={this.props.country}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">City</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-city" ref="host_city" defaultValue={this.props.city}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Supervisor</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="sup" ref="sup_check" defaultValue={this.props.sup}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

    onSearchHostListChange(e) {
        var name = null;
        name = e.target.value.toLowerCase();
        this.setState({searchHostName: name});
        this.updateDisplayData(name, this.state.sortHostBy, this.state.showHostFilter, this.state.hostConData, 'hostDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 708..713

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Notes</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="notes" ref="notes" defaultValue={this.props.notes}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Province</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-province" ref="host_province" defaultValue={this.props.province}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">State</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="host-state" ref="host_state" defaultValue={this.props.state}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211
javascript/specialHost/ApproveHost.jsx on lines 297..300

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

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

                        <div className="form-group">
                            <label className="col-lg-3 control-label">Notes</label>
                            <div className="col-lg-9"><input  type="text" className="form-control" id="notes" ref="notes" defaultValue={this.props.notes}/></div>
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 10 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 150..153
javascript/specialHost/ApproveHost.jsx on lines 85..88
javascript/specialHost/ApproveHost.jsx on lines 89..92
javascript/specialHost/ApproveHost.jsx on lines 93..96
javascript/specialHost/ApproveHost.jsx on lines 97..100
javascript/specialHost/ApproveHost.jsx on lines 101..104
javascript/specialHost/ApproveHost.jsx on lines 105..108
javascript/specialHost/ApproveHost.jsx on lines 109..112
javascript/specialHost/ApproveHost.jsx on lines 204..207
javascript/specialHost/ApproveHost.jsx on lines 208..211

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

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

    onSearchListChange(e) {
        var name = null;
        name = e.target.value.toLowerCase();
        this.setState({searchName: name});
        this.updateDisplayData(name, this.state.sortBy, this.state.showFilter, this.state.mainData, 'mainDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 714..719

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

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

                <Modal.Header closeButton>
                  <Modal.Title>Edit Sub Host</Modal.Title>
                  {this.state.showError ? <Message type="warning" children={this.state.warningMsg}></Message> : null}
                </Modal.Header>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 2 hrs to fix
javascript/createInterface/HostBlock.jsx on lines 90..93
javascript/createInterface/HostBlock.jsx on lines 207..210
javascript/emergencyContact/EmgContactList.jsx on lines 122..126
javascript/specialHost/ApproveHost.jsx on lines 182..185
javascript/specialHost/ApproveHost.jsx on lines 272..275

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

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

                <Modal.Header closeButton>
                  <Modal.Title>Edit Condition</Modal.Title>
                  {this.state.showError ? <Message type="warning" children={this.state.warningMsg}></Message> : null}
                </Modal.Header>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 2 hrs to fix
javascript/createInterface/HostBlock.jsx on lines 90..93
javascript/createInterface/HostBlock.jsx on lines 207..210
javascript/emergencyContact/EmgContactList.jsx on lines 122..126
javascript/specialHost/ApproveHost.jsx on lines 71..74
javascript/specialHost/ApproveHost.jsx on lines 272..275

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

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

                                    <tr>
                                        <th className="col-lg-3">Name</th>
                                        <th className="col-lg-2">Condition</th>
                                        <th className="col-lg-1">Condition Changed</th>
                                        <th className="col-lg-2">Approval</th>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 427..433

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

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

                <Modal.Header closeButton>
                  <Modal.Title>Edit Host</Modal.Title>
                  {this.state.showError ? <Message type="warning" children={this.state.warningMsg}></Message> : null}
                </Modal.Header>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 2 hrs to fix
javascript/createInterface/HostBlock.jsx on lines 90..93
javascript/createInterface/HostBlock.jsx on lines 207..210
javascript/emergencyContact/EmgContactList.jsx on lines 122..126
javascript/specialHost/ApproveHost.jsx on lines 71..74
javascript/specialHost/ApproveHost.jsx on lines 182..185

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

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

                <div onClick={e => e.stopPropagation()}>
                <ModalFormHost show={this.state.showModal} hide={this.closeModal} edit={true} handleSaveHost={this.handleSaveHost}{...this.props} />
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 208..210
javascript/specialHost/ApproveHost.jsx on lines 415..417
javascript/specialHost/ApproveHost.jsx on lines 453..455

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

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

                <div onClick={e => e.stopPropagation()}>
                <ModalFormCondition show={this.state.showModal} hide={this.closeModal} edit={true} handleSaveHost={this.handleSaveHost}{...this.props} />
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 208..210
javascript/specialHost/ApproveHost.jsx on lines 415..417
javascript/specialHost/ApproveHost.jsx on lines 492..494

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

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

                <div onClick={e => e.stopPropagation()}>
                <ModalFormHostCondition show={this.state.showModal} hide={this.closeModal} edit={true} handleSaveHost={this.handleSaveHost}{...this.props} />
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 3 other locations - About 2 hrs to fix
javascript/emergencyContact/EmgContactList.jsx on lines 208..210
javascript/specialHost/ApproveHost.jsx on lines 453..455
javascript/specialHost/ApproveHost.jsx on lines 492..494

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

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

    onHostShow(e) {
        var option = null;
        option = e.target.value;
        this.setState({showHostFilter: option});
        this.updateDisplayData(this.state.searchHostName, this.state.sortHostBy, option, this.state.hostConData, 'hostDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 784..790

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

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

    onSortByChange(e) {
        var sort = null;
        sort = e.target.value;
        this.setState({sortBy: sort});
        this.updateDisplayData(this.state.searchName, sort, this.state.showFilter, this.state.mainData, 'mainDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 741..746

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

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

    onSortByHostChange(e) {
        var sort = null;
        sort = e.target.value;
        this.setState({sortHostBy: sort});
        this.updateDisplayData(this.state.searchHostName, sort, this.state.showHostFilter, this.state.hostConData, 'hostDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 735..740

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

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

    onShow(e) {
        var option = null;
        option = e.target.value;
        this.setState({showFilter: option});
        this.updateDisplayData(this.state.searchName, this.state.sortBy, option, this.state.mainData, 'mainDisplayData');
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 791..797

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

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

    constructor(props) {
        super(props);

        this.state = {
            showError: false,
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 139..149
javascript/specialHost/ApproveHost.jsx on lines 224..234

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

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

    constructor(props) {
        super(props);

        this.state = {
            showError: false,
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 9..19
javascript/specialHost/ApproveHost.jsx on lines 139..149

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

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

    constructor(props) {
        super(props);

        this.state = {
            showError: false,
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 2 hrs to fix
javascript/specialHost/ApproveHost.jsx on lines 9..19
javascript/specialHost/ApproveHost.jsx on lines 224..234

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

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="col-md-3">
                        <div className="input-group">
                            <label>Search by Name</label>
                            <input type="text" className="form-control" placeholder="Search for..." onChange={this.onSearchListChange} />
                        </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 2 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 410..415
javascript/specialHost/ApproveHost.jsx on lines 943..948

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

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="col-md-3">
                            <div className="input-group">
                                <label>Search by Name</label>
                                <input type="text" className="form-control" placeholder="Search for..." onChange={this.onSearchHostListChange} />
                            </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 2 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 410..415
javascript/specialHost/ApproveHost.jsx on lines 1000..1005

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

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

                <Modal.Footer>
                    <Button onClick={this.handleSave}>Save</Button>
                    <Button onClick={this.handleExit}>Close</Button>
                </Modal.Footer>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 1 hr to fix
javascript/createInterface/HostBlock.jsx on lines 109..112
javascript/createInterface/HostBlock.jsx on lines 236..239
javascript/emergencyContact/EmgContactList.jsx on lines 156..159
javascript/specialHost/ApproveHost.jsx on lines 130..133
javascript/specialHost/ApproveHost.jsx on lines 303..306

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

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

                <Modal.Footer>
                    <Button onClick={this.handleSave}>Save</Button>
                    <Button onClick={this.handleExit}>Close</Button>
                </Modal.Footer>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 1 hr to fix
javascript/createInterface/HostBlock.jsx on lines 109..112
javascript/createInterface/HostBlock.jsx on lines 236..239
javascript/emergencyContact/EmgContactList.jsx on lines 156..159
javascript/specialHost/ApproveHost.jsx on lines 130..133
javascript/specialHost/ApproveHost.jsx on lines 214..217

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

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

                <Modal.Footer>
                    <Button onClick={this.handleSave}>Save</Button>
                    <Button onClick={this.handleExit}>Close</Button>
                </Modal.Footer>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 5 other locations - About 1 hr to fix
javascript/createInterface/HostBlock.jsx on lines 109..112
javascript/createInterface/HostBlock.jsx on lines 236..239
javascript/emergencyContact/EmgContactList.jsx on lines 156..159
javascript/specialHost/ApproveHost.jsx on lines 214..217
javascript/specialHost/ApproveHost.jsx on lines 303..306

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

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

                    <select className="col-lg-3 align-right" id="new-host" ref="new_host">
                        <option value="-1">Select a Host</option>
                        {availHost}
                    </select>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 40 mins to fix
javascript/createInterface/HostBlock.jsx on lines 215..218
javascript/specialHost/ApproveHost.jsx on lines 368..371

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

                    <select className="col-lg-2" id="con-data" ref="con_data">
                        <option value="-1">Select a Condition</option>
                        {conData}
                    </select>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 2 other locations - About 40 mins to fix
javascript/createInterface/HostBlock.jsx on lines 215..218
javascript/specialHost/ApproveHost.jsx on lines 373..376

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        if (sort !== null) {
            filtered = this.sortBy(filtered, sort);
        } else {
            filtered = this.sortBy(filtered, 'hostA');
        }
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 40 mins to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 343..347

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

                <div className="row">
                    <div className="col-md-4">
                        <h3>Sub Host</h3>
                    </div>
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 40 mins to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 398..402
javascript/editLevel/editLevel.jsx on lines 22..26
javascript/editLevel/editLevel.jsx on lines 34..38
javascript/editLevel/editLevel.jsx on lines 46..50
javascript/specialHost/ApproveHost.jsx on lines 905..909
javascript/specialHost/ApproveHost.jsx on lines 914..918
javascript/specialHost/ApproveHost.jsx on lines 937..941

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

                    <div className="row">
                        <div className="col-md-4">
                            <h3>Hosts</h3>
                        </div>
                    </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 40 mins to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 398..402
javascript/editLevel/editLevel.jsx on lines 22..26
javascript/editLevel/editLevel.jsx on lines 34..38
javascript/editLevel/editLevel.jsx on lines 46..50
javascript/specialHost/ApproveHost.jsx on lines 905..909
javascript/specialHost/ApproveHost.jsx on lines 914..918
javascript/specialHost/ApproveHost.jsx on lines 994..998

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

                <div className="row">
                    <div className="col-md-4">
                        <h3>Hosts To Approve</h3>
                    </div>
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 40 mins to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 398..402
javascript/editLevel/editLevel.jsx on lines 22..26
javascript/editLevel/editLevel.jsx on lines 34..38
javascript/editLevel/editLevel.jsx on lines 46..50
javascript/specialHost/ApproveHost.jsx on lines 914..918
javascript/specialHost/ApproveHost.jsx on lines 937..941
javascript/specialHost/ApproveHost.jsx on lines 994..998

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

                <div className="row">
                    <div className="col-md-4">
                        <h3>Conditions</h3>
                    </div>
                </div>
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 7 other locations - About 40 mins to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 398..402
javascript/editLevel/editLevel.jsx on lines 22..26
javascript/editLevel/editLevel.jsx on lines 34..38
javascript/editLevel/editLevel.jsx on lines 46..50
javascript/specialHost/ApproveHost.jsx on lines 905..909
javascript/specialHost/ApproveHost.jsx on lines 937..941
javascript/specialHost/ApproveHost.jsx on lines 994..998

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

    handleExit(){
        //resets state so any warnings previously are reset.
        this.setState({
            showError: false,
            warningMsg: '',
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 4 other locations - About 35 mins to fix
javascript/createInterface/HostBlock.jsx on lines 166..173
javascript/emergencyContact/EmgContactList.jsx on lines 104..111
javascript/specialHost/ApproveHost.jsx on lines 169..176
javascript/specialHost/ApproveHost.jsx on lines 249..256

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

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

    handleExit(){
        //resets state so any warnings previously are reset.
        this.setState({
            showError: false,
            warningMsg: '',
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 4 other locations - About 35 mins to fix
javascript/createInterface/HostBlock.jsx on lines 166..173
javascript/emergencyContact/EmgContactList.jsx on lines 104..111
javascript/specialHost/ApproveHost.jsx on lines 48..55
javascript/specialHost/ApproveHost.jsx on lines 249..256

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

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

    handleExit(){
        //resets state so any warnings previously are reset.
        this.setState({
            showError: false,
            warningMsg: '',
Severity: Major
Found in javascript/specialHost/ApproveHost.jsx and 4 other locations - About 35 mins to fix
javascript/createInterface/HostBlock.jsx on lines 166..173
javascript/emergencyContact/EmgContactList.jsx on lines 104..111
javascript/specialHost/ApproveHost.jsx on lines 48..55
javascript/specialHost/ApproveHost.jsx on lines 169..176

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

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.refs.host_name.value === '') {
            this.setState({showError: true, warningMsg: "Please enter a name of host."});
            return;
        }
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 35 mins to fix
javascript/specialHost/ApproveHost.jsx on lines 151..154

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

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.refs.admin_message.value === '') {
            this.setState({showError: true, warningMsg: "Please enter a name for the condition."});
            return;
        }
Severity: Minor
Found in javascript/specialHost/ApproveHost.jsx and 1 other location - About 35 mins to fix
javascript/specialHost/ApproveHost.jsx on lines 21..24

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

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

There are no issues that match your filters.

Category
Status