cs-util-com/cscore

View on GitHub

Showing 1,140 of 1,140 total issues

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

                case 6:
                    // signed byte
                    if (numberOfComponents == 1)
                        result = (T)(object)ToSByte(tagData);
                    else
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 677..683
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 684..690
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 719..725
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 726..732
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 747..753
CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 754..760

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

                var a_r = AddArrays(AddArrays(MultArrays(invrr, cov_Ip_R), MultArrays(invrg, cov_Ip_G)), MultArrays(invrb, cov_Ip_B));
CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 192..194
CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 216..216
CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 217..217

Duplicated Code

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

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

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

Tuning

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

Avoid too many return statements within this method.
Open

            if (Nullable.GetUnderlyingType(typeof(S)) != null) { return !Equals(oldState, newState); }

    Avoid too many return statements within this method.
    Open

                        return false;

      Avoid too many return statements within this method.
      Open

                      return Task.FromResult(true);

        Avoid too many return statements within this method.
        Open

                            return await AddAndInit(parentView, field, fieldName, await NewStringFieldView(field));

          Avoid too many return statements within this method.
          Open

                      if (elemType.IsCastableTo<IDictionary>()) { return JTokenType.Object; }

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

                            case 9:
                                // Signed long
                                if (numberOfComponents == 1)
                                    result = (T)(object)ToInt(tagData);
                                else
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 677..683
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 684..690
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 705..711
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 719..725
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 747..753
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 754..760

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

                            var a_g = AddArrays(AddArrays(MultArrays(invrg, cov_Ip_R), MultArrays(invgg, cov_Ip_G)), MultArrays(invgb, cov_Ip_B));
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 192..194
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 215..215
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 217..217

            Duplicated Code

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

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

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

            Tuning

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

                            var a_b = AddArrays(AddArrays(MultArrays(invrb, cov_Ip_R), MultArrays(invgb, cov_Ip_G)), MultArrays(invbb, cov_Ip_B));
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 192..194
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 215..215
            CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 216..216

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

                            case 4:
                                // unsigned long
                                if (numberOfComponents == 1)
                                    result = (T)(object)ToUint(tagData);
                                else
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 677..683
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 705..711
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 719..725
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 726..732
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 747..753
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 754..760

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

                            case 8:
                                // Signed short
                                if (numberOfComponents == 1)
                                    result = (T)(object)ToShort(tagData);
                                else
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 677..683
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 684..690
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 705..711
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 726..732
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 747..753
            CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 754..760

            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

            Avoid too many return statements within this method.
            Open

                            return !oldEnum.Cast<object>().SequenceEqual(newEnum.Cast<object>());

              Avoid too many return statements within this method.
              Open

                              return Line.Substring(0, numberOfChars);

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

                                var covDet = AddArrays(AddArrays(MultArrays(invrr, var_I_rr),
                                        MultArrays(invrg, var_I_rg)),
                                    MultArrays(invrb, var_I_rb));
                CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 215..215
                CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 216..216
                CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/algorithms/images/GuidedFilter.cs on lines 217..217

                Duplicated Code

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

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

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

                Tuning

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

                Avoid too many return statements within this method.
                Open

                                    return true;

                  Avoid too many return statements within this method.
                  Open

                              return false;

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

                                    case 12:
                                        // double float
                                        if (numberOfComponents == 1)
                                            result = (T)(object)ToDouble(tagData);
                                        else
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 677..683
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 684..690
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 705..711
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 719..725
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 726..732
                    CsCore/PlainNetClassLib/src/Plugins/CsCore/libs/StbImageSharp/ExifLib/ExifReader.cs on lines 747..753

                    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

                    Avoid too many return statements within this method.
                    Open

                                return false;

                      Avoid too many return statements within this method.
                      Open

                                              return await AddAndInit(parentView, field, fieldName, await NewListFieldView(field));
                        Severity
                        Category
                        Status
                        Source
                        Language