AppStateESS/InternshipInventory

View on GitHub

Showing 6,675 of 6,675 total issues

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

        if (this.state.deptData != null) {
            dData = this.state.deptData.map(function (dept) {
            return (
                    <DepartmentList key={dept.id}
                        name={dept.name}
Severity: Major
Found in javascript/affiliationAgreement/AffiliateList.jsx and 1 other location - About 3 hrs to fix
javascript/editAdmin/editAdmin.jsx on lines 264..274

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

Method display has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Major
Found in class/UI/ResultsUI.php - About 3 hrs to fix

Function display has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function select has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function select($type = null, $sql = null)
    {
        if (empty($sql)) {
            if (!empty($this->sql)) {
                $sql = & $this->sql;
Severity: Minor
Found in class/SubselectDatabase.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function _indexBy has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function _indexBy($sql, $indexby, $colMode = false)
    {
        $rows = array();

        if (!is_array($sql) || empty($sql)) {
Severity: Minor
Found in class/SubselectDatabase.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

Function moveRow has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function moveRow($order_column, $id_column, $id, $direction = 1)
    {
        if (!($direction == 1 || $direction == -1)) {
            if (strtolower($direction) == 'down') {
                $direction = 1;
Severity: Minor
Found in class/SubselectDatabase.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

Function pullTables has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public static function pullTables($sql)
    {
        $sql = preg_replace('/ {2,}/', ' ', trim($sql));
        $sql = preg_replace('/[\n\r]/', ' ', $sql);
        $command = substr($sql, 0, strpos($sql, ' '));
Severity: Minor
Found in class/SubselectDatabase.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

            AdminsData = this.state.displayData.map(function (admin) {
            return (
                <DeleteAdmin key={admin.id}
                        fullname={admin.display_name}
                        username={admin.username}
Severity: Major
Found in javascript/editAdmin/editAdmin.jsx and 1 other location - About 3 hrs to fix
javascript/editCourses/courseEditor.jsx on lines 61..70

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

            cRow = this.props.subjectData.map(function(sub) {
                return (
                    <CourseRow key={sub.id}
                               id={sub.id}
                               abbr={sub.abbreviation}
Severity: Major
Found in javascript/editCourses/courseEditor.jsx and 1 other location - About 3 hrs to fix
javascript/editAdmin/editAdmin.jsx on lines 249..258

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

Severity
Category
Status
Source
Language