AppStateESS/InternshipInventory

View on GitHub
javascript/settings/settings.jsx

Summary

Maintainability
F
6 days
Test Coverage

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

    render() {
        if(this.state.data === null){
            return (<div></div>);
        }

Severity: Major
Found in javascript/settings/settings.jsx - About 3 hrs to fix

Function handleSubmit has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    handleSubmit(e) {
        e.preventDefault();

        var data = {systemName: this.systemNameInput.value,
                    registrarEmail: this.registrarEmailInput.value,
Severity: Minor
Found in javascript/settings/settings.jsx - About 1 hr to fix

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

        if(this.state.submitted) {
            button = <button type="submit" className="btn btn-lg btn-primary pull-right" id="create-btn" disabled ><i className="fa fa-spinner fa-spin"></i> Saving...</button>;
        } else {
            button = <button type="submit" className="btn btn-lg btn-primary pull-right" id="create-btn" onClick={this.handleSubmit} >Save Settings</button>;
        }
Severity: Major
Found in javascript/settings/settings.jsx and 1 other location - About 4 hrs to fix
javascript/createInterface/CreateInternshipInterface.jsx on lines 17..21

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

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

                <div className="form-group col-md-6">
                    <label>Registrar Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.registrarEmail} id="registrarEmail" name="registrarEmail" ref={input => this.registrarEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>International Registrar Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.internationalRegEmail} id="internationalRegistrarEmail" name="internationalRegistrarEmail" ref={input => this.internationalRegistrarEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>API Key:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.wsdlUri} id="wsdlUri" name="wsdlUri" ref={input => this.wsdlUriInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>International Office Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.internationalOfficeEmail} id="internationalOfficeEmail" name="internationalOfficeEmail" ref={input => this.internationalOfficeEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Graduate Registrar Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.graduateRegEmail} id="gradRegistrarEmail" name="gradRegistrarEmail" ref={input => this.gradRegistrarEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Grad School Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.gradSchoolEmail} id="gradSchoolEmail" name="gradSchoolEmail" ref={input => this.gradSchoolEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Distance Education Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.distanceEdEmail} id="distanceEdEmail" name="distanceEdEmail" ref={input => this.distanceEdEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Email Domain:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.emailDomain} id="emailDomain" name="emailDomain" ref={input => this.emailDomainInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Background Check Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.backgroundCheckEmail} id="backgroundCheckEmail" name="backgroundCheckEmail" ref={input => this.backgroundCheckEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Unusual Course Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.unusualCourseEmail} id="unusualCourseEmail" name="unusualCourseEmail" ref={input => this.unusualCourseEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 12 locations. Consider refactoring.
Open

                <div className="form-group col-md-6">
                    <label>Uncaught Exception Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.uncaughtExceptionEmail} id="uncaughtExceptionEmail" name="uncaughtExceptionEmail" ref={input => this.uncaughtExceptionEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 167..170
javascript/settings/settings.jsx on lines 171..174

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

                <div className="form-group col-md-6">
                    <label>From Email:</label>
                    <input className="form-control" type="text" defaultValue={this.state.data.fromEmail} id="fromEmail" name="fromEmail" ref={input => this.fromEmailInput = input}></input>
                </div>
Severity: Major
Found in javascript/settings/settings.jsx and 11 other locations - About 3 hrs to fix
javascript/settings/settings.jsx on lines 128..131
javascript/settings/settings.jsx on lines 135..138
javascript/settings/settings.jsx on lines 139..142
javascript/settings/settings.jsx on lines 143..146
javascript/settings/settings.jsx on lines 147..150
javascript/settings/settings.jsx on lines 151..154
javascript/settings/settings.jsx on lines 155..158
javascript/settings/settings.jsx on lines 159..162
javascript/settings/settings.jsx on lines 163..166
javascript/settings/settings.jsx on lines 171..174
javascript/settings/settings.jsx on lines 175..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

            error: function(xhr, status, err) {
                var message = "Failed to grab settings data.";
                var notifStatus = "danger";
                this.setState({errorMessage: message, notificationStatus: notifStatus});
                console.error(this.props.url, status, err.toString());
Severity: Major
Found in javascript/settings/settings.jsx and 1 other location - About 2 hrs to fix
javascript/settings/settings.jsx on lines 71..76

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

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

                error: function(xhr, status, err) {
                    var message = "Settings did not save.";
                    var notifStatus = "danger";
                    this.setState({notification: message, notificationStatus: notifStatus});
                    console.error(this.props.url, status, err.toString());
Severity: Major
Found in javascript/settings/settings.jsx and 1 other location - About 2 hrs to fix
javascript/settings/settings.jsx on lines 89..94

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

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.notification === null){
            errorSet = '';
        } else {
            errorSet = <ErrorMessagesBlock key="notification" notif={this.state.notification} stat={this.state.notificationStatus}/>
        }
Severity: Major
Found in javascript/settings/settings.jsx and 3 other locations - About 2 hrs to fix
javascript/affiliationAgreement/AffiliateList.jsx on lines 383..387
javascript/editAdmin/editAdmin.jsx on lines 277..281
javascript/editTerms/EditTerms.jsx on lines 561..565

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

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