guess-It-SDP/guessIt

View on GitHub

Showing 181 of 201 total issues

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

@Composable
fun PlayButton() {
    val context = LocalContext.current
    MainMenuButton(
        testTag = "playButton",
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 155..164
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 173..182

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

@Composable
fun SettingsButton() {
    val context = LocalContext.current
    MainMenuButton(
        testTag = "settingsButton",
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 129..138
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 173..182

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    fun editButtonLaunchesEditProfileActivity() {
        Intents.init()

        composeRule.onNodeWithTag("editProfileButton").performClick()
app/src/androidTest/java/com/github/freeman/bootcamp/CreatePublicPrivateActivityTest.kt on lines 77..85
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 52..60
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 77..83
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 85..91
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 83..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    fun clickingRecapsSendsIntent() {
        Intents.init()
        composeRule.onNodeWithTag("displayRecapsButton").performClick()
        Intents.intended(IntentMatchers.hasComponent(DisplayRecapsActivity::class.java.name))
app/src/androidTest/java/com/github/freeman/bootcamp/CreatePublicPrivateActivityTest.kt on lines 77..85
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 52..60
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 77..83
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 72..81
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 83..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    fun playIntentIsSent() {
        Intents.init()

        composeRule.onNodeWithTag("playButton").performClick()
app/src/androidTest/java/com/github/freeman/bootcamp/CreatePublicPrivateActivityTest.kt on lines 77..85
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 77..83
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 85..91
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 72..81
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 83..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

@Composable
fun ChatButton() {
    val context = LocalContext.current
    MainMenuButton(
        testTag = "chatButton",
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 129..138
app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt on lines 155..164

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    fun publicButtonSendsIntent() {
        Intents.init()

        composeRule.onNodeWithTag("publicLobbyButton").performClick()
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 52..60
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 77..83
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 85..91
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 72..81
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt on lines 83..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 115.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    fun accountLaunchesSignInActivity() {
        Intents.init()

        composeRule.onNodeWithText("Manage Account").performClick()
app/src/androidTest/java/com/github/freeman/bootcamp/CreatePublicPrivateActivityTest.kt on lines 77..85
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 52..60
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 77..83
app/src/androidTest/java/com/github/freeman/bootcamp/MainMenuTest.kt on lines 85..91
app/src/androidTest/java/com/github/freeman/bootcamp/SettingsProfileActivityTest.kt 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 115.

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

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

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

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

Refactorings

Further Reading

Method GuessItRulesDisplay has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

@Composable
fun GuessItRulesDisplay() {
    Column(
        modifier = Modifier
            .testTag("guessItRulesScreen")

    Method MainMenuScreen has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    @Composable
    fun MainMenuScreen() {
    
        Surface {
            Box(
    Severity: Minor
    Found in app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt - About 1 hr to fix

      Method onCreate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          override fun onCreate(savedInstanceState: Bundle?) {
              super.onCreate(savedInstanceState)
      
              setContent {
                  val dbRef = Firebase.database.reference

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

                /**
                 * Returns a function that draws a moustache on the provided canvas using the specified overlay picture and paint.
                 * The returned function has the signature (Face, Canvas, Bitmap, Paint) -> Unit.
                 *
                 * @return The function that draws a moustache on the canvas.
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 159..166
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 177..184

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

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

                /**
                 * Returns a function that draws a hat on the provided canvas using the specified overlay picture and paint.
                 * The returned function has the signature (Face, Canvas, Bitmap, Paint) -> Unit.
                 *
                 * @return The function that draws a hat on the canvas.
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 168..175
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 177..184

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

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

                /**
                 * Returns a function that draws hair on the provided canvas using the specified overlay picture and paint.
                 * The returned function has the signature (Face, Canvas, Bitmap, Paint) -> Unit.
                 *
                 * @return The function that draws a hat on the canvas.
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 159..166
        app/src/main/java/com/github/freeman/bootcamp/facedetection/FaceDetectionActivity.kt on lines 168..175

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

        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

                Text(
                    modifier = Modifier.testTag("how_to_play"),
                    text = GUESSIT_RULES_TITLE,
                    textAlign = TextAlign.Center,
                    style = TextStyle(
        app/src/main/java/com/github/freeman/bootcamp/games/help/WordleRulesActivity.kt on lines 97..105

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

        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

                Text(
                    modifier = Modifier.testTag("how_to_play"),
                    text = WORDLE_RULES_TITLE,
                    textAlign = TextAlign.Center,
                    style = TextStyle(
        app/src/main/java/com/github/freeman/bootcamp/games/help/GuessItRulesActivity.kt on lines 81..89

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

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

        /**
         * This is the skeleton of any pop up
         * @param text: The text that will be displayed inside the pop-up
         */
        @Composable

          Method drawObjectsOnFacesOnBitmapImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  /**
                   * Draws objects on the detected faces in the provided bitmap image using the specified overlay pictures and draw function.
                   *
                   * @param bitmap The bitmap image on which to draw the objects.
                   * @param overlayPic The overlay picture to use for drawing on the faces.

            Method TopAppbarAccount has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            @Composable
            fun TopAppbarAccount(context: Context = LocalContext.current) {
            
                TopAppBar(
                    modifier = Modifier.testTag("topAppbarAccount"),

              Method TopAppbarEditProfile has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              @Composable
              fun TopAppbarEditProfile(context: Context = LocalContext.current) {
              
                  TopAppBar(
                      modifier = Modifier.testTag("topAppbarEditProfile"),
                Severity
                Category
                Status
                Source
                Language