CodeTheChangeUBC/sasc

View on GitHub

Showing 160 of 160 total issues

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

        {twilioEmail && (
            <div className="twilioEmail">
                <label>
                    Email:
                    <input
Severity: Major
Found in client/src/Components/Form/index.js and 3 other locations - About 1 hr to fix
client/src/Components/Form/index.js on lines 213..225
client/src/Components/Form/index.js on lines 226..238
client/src/Components/Form/index.js on lines 239..251

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

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

        {twilioPhoneNumber && (
            <div className="twilioPhoneNumber">
                <label>
                    Twilio Phone Number:
                    <input
Severity: Major
Found in client/src/Components/Form/index.js and 3 other locations - About 1 hr to fix
client/src/Components/Form/index.js on lines 122..134
client/src/Components/Form/index.js on lines 226..238
client/src/Components/Form/index.js on lines 239..251

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

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

        {authToken && (
            <div className="twilioAuthToken">
                <label>
                    Twilio Auth Token:
                    <input
Severity: Major
Found in client/src/Components/Form/index.js and 3 other locations - About 1 hr to fix
client/src/Components/Form/index.js on lines 122..134
client/src/Components/Form/index.js on lines 213..225
client/src/Components/Form/index.js on lines 226..238

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

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

        {accountSid && (
            <div className="twilioAccountSid">
                <label>
                    Twilio Account SID:
                    <input
Severity: Major
Found in client/src/Components/Form/index.js and 3 other locations - About 1 hr to fix
client/src/Components/Form/index.js on lines 122..134
client/src/Components/Form/index.js on lines 213..225
client/src/Components/Form/index.js on lines 239..251

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

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

exports.changePassword = async function (req, res, model) {
    var id = req.query.ID;
    var oldPassword = req.body.oldPassword;

    let err, oldPasswordHashed, newPasswordHashed, users, isMatch;
Severity: Minor
Found in server/controllers/account.js - About 1 hr to fix

    Function validateForm has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        validateForm(fields, renderError) {
            const { password, passwordConfirm } = this.state;
    
            if (password !== passwordConfirm) {
                renderError("Passwords must match.");
    Severity: Minor
    Found in client/src/Containers/Account/index.js - 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

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

    exports.hashOne = function (password) {
        return new Promise(function(resolve, reject) {
            bcrypt.hash(password, SALT_ROUNDS, function (err, hash) {
                if (err) {
                    reject(err);
    Severity: Major
    Found in server/models/abstract.js and 1 other location - About 1 hr to fix
    server/models/abstract.js on lines 56..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 63.

    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

    exports.comparePassword = function(password, hash) {
         return new Promise(function(resolve, reject) {
             bcrypt.compare(password, hash, function(err, res) {
                 if (err) {
                     reject(err);
    Severity: Major
    Found in server/models/abstract.js and 1 other location - About 1 hr to fix
    server/models/abstract.js on lines 43..53

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

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

    export function getCounsellor(id) {
        return function(dispatch) {
            const token = localStorage.getItem("token");
            const header = {
                headers: {
    Severity: Minor
    Found in client/src/Redux/Actions/counsellorActions.js - About 1 hr to fix

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

      export function getUser(id) {
          return function(dispatch) {
              const token = localStorage.getItem("token");
              const header = {
                  headers: {
      Severity: Minor
      Found in client/src/Redux/Actions/userActions.js - About 1 hr to fix

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

        export default function(state = initialState.sms, action) {
            switch (action.type) {
            case GET_SMS_SETTINGS:
                return {
                    ...state,
        Severity: Minor
        Found in client/src/Redux/Reducers/smsReducer.js - About 1 hr to fix

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

                          this.props.addMessageToRoom({
                              room: this.props.rooms[0],
                              newMessage: {
                                  user: this.props.user.nickname,
                                  message: inboundMessage
          Severity: Major
          Found in client/src/Containers/Chat/index.js and 1 other location - About 1 hr to fix
          client/src/Containers/Chat/index.js on lines 44..50

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

          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

                          this.props.addMessageToRoom({
                              room: this.props.rooms[0],
                              newMessage: {
                                  user: this.props.counsellor.firstName,
                                  message: inboundMessage
          Severity: Major
          Found in client/src/Containers/Chat/index.js and 1 other location - About 1 hr to fix
          client/src/Containers/Chat/index.js on lines 52..58

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

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

              handleOnChange(event) {
                  const target = event.target;
                  const value = target.value;
                  const name = target.name;
          
          
          Severity: Major
          Found in client/src/Containers/Sms/index.js and 7 other locations - About 1 hr to fix
          client/src/Containers/Account/index.js on lines 43..51
          client/src/Containers/Login/index.js on lines 28..36
          client/src/Containers/LoginCounsellor/index.js on lines 27..35
          client/src/Containers/PasswordChange/index.js on lines 33..41
          client/src/Containers/PreChatSurvey/index.js on lines 30..38
          client/src/Containers/Register/index.js on lines 47..55
          client/src/Containers/RegisterCounsellor/index.js on lines 61..69

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

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

              handleOnChange(event) {
                  const target = event.target;
                  const value = target.value;
                  const name = target.name;
          
          
          Severity: Major
          Found in client/src/Containers/Login/index.js and 7 other locations - About 1 hr to fix
          client/src/Containers/Account/index.js on lines 43..51
          client/src/Containers/LoginCounsellor/index.js on lines 27..35
          client/src/Containers/PasswordChange/index.js on lines 33..41
          client/src/Containers/PreChatSurvey/index.js on lines 30..38
          client/src/Containers/Register/index.js on lines 47..55
          client/src/Containers/RegisterCounsellor/index.js on lines 61..69
          client/src/Containers/Sms/index.js on lines 30..38

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

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

              handleOnChange(event) {
                  const target = event.target;
                  const value = target.value;
                  const name = target.name;
          
          
          Severity: Major
          Found in client/src/Containers/Account/index.js and 7 other locations - About 1 hr to fix
          client/src/Containers/Login/index.js on lines 28..36
          client/src/Containers/LoginCounsellor/index.js on lines 27..35
          client/src/Containers/PasswordChange/index.js on lines 33..41
          client/src/Containers/PreChatSurvey/index.js on lines 30..38
          client/src/Containers/Register/index.js on lines 47..55
          client/src/Containers/RegisterCounsellor/index.js on lines 61..69
          client/src/Containers/Sms/index.js on lines 30..38

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

          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

                  {lastName && (
                      <div>
                          <label>
                              Last Name:
                              <input
          Severity: Major
          Found in client/src/Components/Form/index.js and 11 other locations - About 1 hr to fix
          client/src/Components/Form/index.js on lines 27..39
          client/src/Components/Form/index.js on lines 40..52
          client/src/Components/Form/index.js on lines 53..65
          client/src/Components/Form/index.js on lines 79..91
          client/src/Components/Form/index.js on lines 109..121
          client/src/Components/Form/index.js on lines 135..147
          client/src/Components/Form/index.js on lines 148..160
          client/src/Components/Form/index.js on lines 161..173
          client/src/Components/Form/index.js on lines 174..186
          client/src/Components/Form/index.js on lines 187..199
          client/src/Components/Form/index.js on lines 200..212

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

          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

                  {firstName && (
                      <div>
                          <label>
                              First Name:
                              <input
          Severity: Major
          Found in client/src/Components/Form/index.js and 11 other locations - About 1 hr to fix
          client/src/Components/Form/index.js on lines 27..39
          client/src/Components/Form/index.js on lines 40..52
          client/src/Components/Form/index.js on lines 66..78
          client/src/Components/Form/index.js on lines 79..91
          client/src/Components/Form/index.js on lines 109..121
          client/src/Components/Form/index.js on lines 135..147
          client/src/Components/Form/index.js on lines 148..160
          client/src/Components/Form/index.js on lines 161..173
          client/src/Components/Form/index.js on lines 174..186
          client/src/Components/Form/index.js on lines 187..199
          client/src/Components/Form/index.js on lines 200..212

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

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

              handleOnChange(event) {
                  const target = event.target;
                  const value = target.value;
                  const name = target.name;
          
          
          Severity: Major
          Found in client/src/Containers/RegisterCounsellor/index.js and 7 other locations - About 1 hr to fix
          client/src/Containers/Account/index.js on lines 43..51
          client/src/Containers/Login/index.js on lines 28..36
          client/src/Containers/LoginCounsellor/index.js on lines 27..35
          client/src/Containers/PasswordChange/index.js on lines 33..41
          client/src/Containers/PreChatSurvey/index.js on lines 30..38
          client/src/Containers/Register/index.js on lines 47..55
          client/src/Containers/Sms/index.js on lines 30..38

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

          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

                  {email && (
                      <div>
                          <label>
                              Email:
                              <input
          Severity: Major
          Found in client/src/Components/Form/index.js and 11 other locations - About 1 hr to fix
          client/src/Components/Form/index.js on lines 27..39
          client/src/Components/Form/index.js on lines 40..52
          client/src/Components/Form/index.js on lines 53..65
          client/src/Components/Form/index.js on lines 66..78
          client/src/Components/Form/index.js on lines 79..91
          client/src/Components/Form/index.js on lines 135..147
          client/src/Components/Form/index.js on lines 148..160
          client/src/Components/Form/index.js on lines 161..173
          client/src/Components/Form/index.js on lines 174..186
          client/src/Components/Form/index.js on lines 187..199
          client/src/Components/Form/index.js on lines 200..212

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

          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