Showing 738 of 1,051 total issues
File ScriptEditor.java
has 2770 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.editor;
import abbot.AssertionFailedError;
import abbot.BugReport;
import abbot.ExitException;
File Robot.java
has 1645 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.tester;
import abbot.Log;
import abbot.Platform;
import abbot.WaitTimedOutError;
File ComponentReference.java
has 1142 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.script;
import abbot.Log;
import abbot.finder.ComponentNotFoundException;
import abbot.finder.ComponentSearchException;
ScriptEditor
has 143 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class ScriptEditor implements ActionListener, Resolver, EditorConstants {
private static final int selectKey;
private static final int captureKey;
private static final int captureImageKey;
Robot
has 135 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class Robot implements AWTConstants {
/**
* Use java.awt.Robot to generate events.
*/
public static int EM_ROBOT = 0;
File ComponentRecorder.java
has 803 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.editor.recorder;
import abbot.BugReport;
import abbot.Log;
import abbot.Platform;
File AWT.java
has 777 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.util;
import abbot.Log;
import abbot.Platform;
import abbot.finder.AWTHierarchy;
Method createPanel
has 303 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void createPanel(boolean newContact) {
setBorder(new BevelBorder(BevelBorder.LOWERED));
setLayout(new GridBagLayout());
ComponentTester
has 76 methods (exceeds 20 allowed). Consider refactoring. Open
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
File ScriptTable.java
has 628 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.editor;
import abbot.Log;
import abbot.script.Script;
import abbot.script.Sequence;
File Script.java
has 617 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.script;
import abbot.Log;
import abbot.Platform;
import abbot.finder.AWTHierarchy;
Method getMatchWeight
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
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;
- Read upRead up
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
Open
package abbot.editor;
import abbot.Log;
import abbot.editor.editors.XMLEditor;
import abbot.editor.widgets.TextFormat;
File ComponentTester.java
has 556 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.tester;
import abbot.BugReport;
import abbot.Log;
import abbot.WaitTimedOutError;
ComponentReference
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class ComponentReference implements XMLConstants, XMLifiable, Comparable {
public static final String SHARED_FRAME_ID = "shared frame";
// Matching weights for various attributes
Script
has 62 methods (exceeds 20 allowed). Consider refactoring. Open
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";
File ScriptEditorFrame.java
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.editor;
import abbot.Log;
import abbot.editor.actions.EditorAction;
import abbot.editor.actions.EditorToggleAction;
AWT
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class AWT {
public static int POPUP_TIMEOUT = 5000;
private static final Hierarchy hierarchy = new AWTHierarchy();
File EventRecorder.java
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.editor.recorder;
import abbot.BugReport;
import abbot.Log;
import abbot.Platform;
File ForkedStepRunner.java
has 453 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package abbot.script;
import abbot.AssertionFailedError;
import abbot.Log;
import abbot.finder.AWTHierarchy;