TiagoMSSantos/MobileRT

View on GitHub

Showing 666 of 666 total issues

Consider simplifying this complex logical expression.
Open

        if (externalStorage1 || externalStorage2 || externalStorage3 || externalStorage4 || externalStorage5 || internalStorage1) {
            return;
        }
Severity: Major
Found in app/src/main/java/puscas/mobilertapp/MainActivity.java - About 40 mins to fix

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

        @Test
        public void testFilesNotExistSdCard() {
            final String sdCardPath = UtilsContext.getSdCardPath(InstrumentationRegistry.getInstrumentation().getTargetContext());
    
            final List<String> paths = Collections.singletonList(sdCardPath + ConstantsUI.FILE_SEPARATOR + Constants.OBJ_FILE_NOT_EXISTS_SD_CARD);
    app/src/androidTest/java/puscas/mobilertapp/system/FileSystemTest.java on lines 76..82

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

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

    Refactorings

    Further Reading

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

        @Test
        public void testFilesExistAndReadableSdCard() {
            final String sdCardPath = UtilsContext.getSdCardPath(InstrumentationRegistry.getInstrumentation().getTargetContext());
    
            final List<String> paths = Collections.singletonList(sdCardPath + ConstantsUI.FILE_SEPARATOR + Constants.OBJ_FILE_TEAPOT);
    app/src/androidTest/java/puscas/mobilertapp/system/FileSystemTest.java on lines 102..108

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

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

    Refactorings

    Further Reading

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

            Espresso.onView(ViewMatchers.withId(R.id.preview))
                .inRoot(RootMatchers.isTouchable())
                .check((view, exception) -> {
                    UtilsT.rethrowException(exception);
                    UiTest.assertPreviewCheckBox(view, true);
    Severity: Minor
    Found in app/src/androidTest/java/puscas/mobilertapp/PreviewTest.java and 1 other location - About 35 mins to fix
    app/src/androidTest/java/puscas/mobilertapp/PreviewTest.java on lines 45..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 46.

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

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

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

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

    Refactorings

    Further Reading

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

                lastJob = GlobalScope.async(context = Dispatchers.IO, start = CoroutineStart.DEFAULT, block = {
                    doInBackground()
                })
    app/src/main/java/puscas/mobilertapp/utils/AsyncTaskCoroutine.kt on lines 97..99

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

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

            Espresso.onView(ViewMatchers.withId(R.id.preview))
                .inRoot(RootMatchers.isTouchable())
                .check((view, exception) -> {
                    UtilsT.rethrowException(exception);
                    UiTest.assertPreviewCheckBox(view, true);
    Severity: Minor
    Found in app/src/androidTest/java/puscas/mobilertapp/PreviewTest.java and 1 other location - About 35 mins to fix
    app/src/androidTest/java/puscas/mobilertapp/PreviewTest.java on lines 80..85

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

            GlobalScope.async(context = Dispatchers.Main, start = CoroutineStart.DEFAULT, block = {
                onProgressUpdate()
            })
    app/src/main/java/puscas/mobilertapp/utils/AsyncTaskCoroutine.kt on lines 116..118

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

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

        @Test
        public void testRenderSceneWithBVH() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithNaive() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithWhitted() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

    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 getTestRules has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        protected List<TestRule> getTestRules(final Object testTarget) {
            final List<TestRule> testRules = super.getTestRules(testTarget);
            if (this.hasFlakyTestAnnotation) {
                final String testClassName = testTarget.getClass().getSimpleName();
    Severity: Minor
    Found in app/src/androidTest/java/puscas/mobilertapp/OrderRunner.java - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        @Test
        public void testRenderSceneFromInternalStorageOBJ() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithRegularGrid() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithDepthMap() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithNoShadows() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithPathTracing() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 88..97

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

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

        @Test
        public void testRenderSceneWithDiffuse() throws TimeoutException {
            mockFileManagerReply(false,
                ConstantsAndroidTests.CORNELL_BOX_WATER_OBJ,
                ConstantsAndroidTests.CORNELL_BOX_WATER_MTL,
    app/src/androidTest/java/puscas/mobilertapp/RayTracingTest.java on lines 78..87
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 35..44
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 51..60
    app/src/androidTest/java/puscas/mobilertapp/engine/AcceleratorTest.java on lines 67..76
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 24..33
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 40..49
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 56..65
    app/src/androidTest/java/puscas/mobilertapp/engine/ShaderTest.java on lines 72..81

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

    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 perform has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        public void perform(@NonNull final UiController uiController, @NonNull final View view) {
            final String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
            logger.info(methodName);
    
    
    Severity: Minor
    Found in app/src/androidTest/java/puscas/mobilertapp/ViewActionButton.java - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

            boolean externalStorage3 = path.matches("^" + escapedFileSeparator + "storage" + escapedFileSeparator + "emulated" + escapedFileSeparator + "0" + escapedFileSeparator +".+$");
    Severity: Minor
    Found in app/src/main/java/puscas/mobilertapp/MainActivity.java and 1 other location - About 35 mins to fix
    app/src/main/java/puscas/mobilertapp/MainActivity.java on lines 685..685

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

    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

            boolean internalStorage1 = path.matches("^" + escapedFileSeparator + "data" + escapedFileSeparator + "local" + escapedFileSeparator + "tmp" + escapedFileSeparator + ".+$");
    Severity: Minor
    Found in app/src/main/java/puscas/mobilertapp/MainActivity.java and 1 other location - About 35 mins to fix
    app/src/main/java/puscas/mobilertapp/MainActivity.java on lines 682..682

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

    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