r4fterman/windowtester

View on GitHub

Showing 1,051 of 1,051 total issues

File ScriptEditor.java has 2770 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package abbot.editor;

import abbot.AssertionFailedError;
import abbot.BugReport;
import abbot.ExitException;
Severity: Major
Found in abbot/src/main/java/abbot/editor/ScriptEditor.java - About 1 wk to fix

    File Robot.java has 1645 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package abbot.tester;
    
    import abbot.Log;
    import abbot.Platform;
    import abbot.WaitTimedOutError;
    Severity: Major
    Found in abbot/src/main/java/abbot/tester/Robot.java - About 4 days to fix

      File ComponentReference.java has 1142 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package abbot.script;
      
      import abbot.Log;
      import abbot.finder.ComponentNotFoundException;
      import abbot.finder.ComponentSearchException;
      Severity: Major
      Found in abbot/src/main/java/abbot/script/ComponentReference.java - About 2 days to fix

        ScriptEditor has 143 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class ScriptEditor implements ActionListener, Resolver, EditorConstants {
        
          private static final int selectKey;
          private static final int captureKey;
          private static final int captureImageKey;
        Severity: Major
        Found in abbot/src/main/java/abbot/editor/ScriptEditor.java - About 2 days to fix

          Robot has 135 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class Robot implements AWTConstants {
            /**
             * Use java.awt.Robot to generate events.
             */
            public static int EM_ROBOT = 0;
          Severity: Major
          Found in abbot/src/main/java/abbot/tester/Robot.java - About 2 days to fix

            File ComponentRecorder.java has 803 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            package abbot.editor.recorder;
            
            import abbot.BugReport;
            import abbot.Log;
            import abbot.Platform;
            Severity: Major
            Found in abbot/src/main/java/abbot/editor/recorder/ComponentRecorder.java - About 1 day to fix

              File AWT.java has 777 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              package abbot.util;
              
              import abbot.Log;
              import abbot.Platform;
              import abbot.finder.AWTHierarchy;
              Severity: Major
              Found in abbot/src/main/java/abbot/util/AWT.java - About 1 day to fix

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

                /*******************************************************************************
                 *  Copyright (c) 2012 Google, Inc.
                 *  All rights reserved. This program and the accompanying materials
                 *  are made available under the terms of the Eclipse Public License v1.0
                 *  which accompanies this distribution, and is available at
                abbot/src/main/java/abbot/editor/recorder/JInternalFrameRecorder.java on lines 1..179

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

                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

                package abbot.editor.recorder;
                
                import abbot.Log;
                import abbot.script.Action;
                import abbot.script.Assert;
                com.windowtester.swing.recorder/src/main/java/com/windowtester/swing/recorder/JInternalFrameRecorder.java on lines 1..191

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

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

                    private void createPanel(boolean newContact) {
                
                        setBorder(new BevelBorder(BevelBorder.LOWERED));
                        setLayout(new GridBagLayout());
                
                

                  ComponentTester has 76 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public class ComponentTester extends Robot {
                  
                    /**
                     * Add any method names here which should <em>not</em> show up in a dynamically generated list of property methods.
                     * Omit from method lookup deprecated methods or others we want to ignore
                  Severity: Major
                  Found in abbot/src/main/java/abbot/tester/ComponentTester.java - About 1 day to fix

                    File ScriptTable.java has 628 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    package abbot.editor;
                    
                    import abbot.Log;
                    import abbot.script.Script;
                    import abbot.script.Sequence;
                    Severity: Major
                    Found in abbot/src/main/java/abbot/editor/ScriptTable.java - About 1 day to fix

                      File Script.java has 617 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      package abbot.script;
                      
                      import abbot.Log;
                      import abbot.Platform;
                      import abbot.finder.AWTHierarchy;
                      Severity: Major
                      Found in abbot/src/main/java/abbot/script/Script.java - About 1 day to fix

                        Method getMatchWeight has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                        Open

                          private int getMatchWeight(Component comp, Map newReferences) {
                            // Match weights may be positive or negative.  They should only be
                            // negative if the attribute is highly unlikely to change.
                        
                            int weight = MW_FAILURE;
                        Severity: Minor
                        Found in abbot/src/main/java/abbot/script/ComponentReference.java - About 1 day 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

                        File ComponentBrowser.java has 575 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        package abbot.editor;
                        
                        import abbot.Log;
                        import abbot.editor.editors.XMLEditor;
                        import abbot.editor.widgets.TextFormat;
                        Severity: Major
                        Found in abbot/src/main/java/abbot/editor/ComponentBrowser.java - About 1 day to fix

                          File ComponentTester.java has 556 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          package abbot.tester;
                          
                          import abbot.BugReport;
                          import abbot.Log;
                          import abbot.WaitTimedOutError;
                          Severity: Major
                          Found in abbot/src/main/java/abbot/tester/ComponentTester.java - About 1 day to fix

                            ComponentReference has 64 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public class ComponentReference implements XMLConstants, XMLifiable, Comparable {
                            
                              public static final String SHARED_FRAME_ID = "shared frame";
                            
                              // Matching weights for various attributes
                            Severity: Major
                            Found in abbot/src/main/java/abbot/script/ComponentReference.java - About 1 day to fix

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

                              /*******************************************************************************
                               *  Copyright (c) 2012 Google, Inc.
                               *  All rights reserved. This program and the accompanying materials
                               *  are made available under the terms of the Eclipse Public License v1.0
                               *  which accompanies this distribution, and is available at
                              abbot/src/main/java/abbot/editor/recorder/FileDialogRecorder.java on lines 1..136

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

                              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

                              package abbot.editor.recorder;
                              
                              import abbot.script.Action;
                              import abbot.script.ComponentReference;
                              import abbot.script.Resolver;
                              com.windowtester.swing.recorder/src/main/java/com/windowtester/swing/recorder/FileDialogRecorder.java on lines 1..146

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

                              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

                              Script has 62 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              public class Script extends Sequence implements Resolver {
                                public static final String INTERPRETER = "bsh";
                                private static final String USAGE =
                                    "<AWTTestScript [desc=\"\"] [forked=\"true\"] [slow=\"true\"]"
                                        + " [awt=\"true\"] [vmargs=\"...\"]>...</AWTTestScript>\n";
                              Severity: Major
                              Found in abbot/src/main/java/abbot/script/Script.java - About 1 day to fix
                                Severity
                                Category
                                Status
                                Source
                                Language