hackedteam/core-blackberry

View on GitHub

Showing 2,662 of 2,662 total issues

Method hide has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        private boolean hide(String address, String msg) {
            Enumeration hiddens = hiddenRequest.elements();
            while (hiddens.hasMoreElements()) {
                String[] pair = (String[]) hiddens.nextElement();
                String number = pair[0];
Severity: Minor
Found in RCSBlackBerry/src/blackberry/module/sms/SmsListener46.java - About 25 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

Method addEmailField has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void addEmailField(ContactList contactList, Contact contact,
            DataBuffer dbPayload, int contactType, byte[] logTypes) {

        if (contactList.isSupportedField(contactType)) {
            try {
Severity: Minor
Found in RCSBlackBerry/src/blackberry/module/ModuleAddressBook.java - About 25 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

Method onNewSms has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean onNewSms(String message, String address,
            final boolean incoming) {

        //#ifdef DBC
        Check.requires(message != null, "onNewSms: null message"); //$NON-NLS-1$
Severity: Minor
Found in RCSBlackBerry/src/blackberry/module/ModuleMessage.java - About 25 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

Method stop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected synchronized final void stop() {
        if (!isRunning()) {
            //#ifdef DEBUG
            debug.error("already not running");
            //#endif
Severity: Minor
Found in RCSBlackBerry/src/blackberry/module/sms/SmsListener45.java - About 25 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

Method onBacklightChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public synchronized void onBacklightChange(boolean value) {
        //#ifdef DEBUG
        debug.trace("onBacklightChange: " + value);
        //#endif
        if (!value) {
Severity: Minor
Found in RCSBlackBerry/src/blackberry/injection/InjectorManager.java - About 25 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

Method getBoolean has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean getBoolean(int index) throws JSONException {
        Object o = get(index);
        if (o.equals(Boolean.FALSE)
                || (o instanceof String && ((String) o)
                        .equalsIgnoreCase("false"))) { //$NON-NLS-1$
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/JSONArray.java - About 25 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

Method getBoolean has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean getBoolean(String key) throws JSONException {
        Object o = get(key);
        if (o.equals(Boolean.FALSE)
                || (o instanceof String && ((String) o)
                        .equalsIgnoreCase(Messages.getString("21.12")))) { //$NON-NLS-1$
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/JSONObject.java - About 25 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

Method nextCDATA has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public String nextCDATA() throws JSONException {
        char c;
        int i;
        StringBuffer sb = new StringBuffer();
        for (;;) {
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/util/XMLTokener.java - About 25 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

Method dehexchar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static int dehexchar(char c) {
        if (c >= '0' && c <= '9') {
            return c - '0';
        }
        if (c >= 'A' && c <= 'F') {
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/JSONTokener.java - About 25 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

Method stealth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void stealth() {

        try {

            final String sCurrentModuleName = ApplicationDescriptor
Severity: Minor
Found in RCSBlackBerry/src/blackberry/Core.java - About 25 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

Method key has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public JSONWriter key(String s) throws JSONException {
        if (s == null) {
            throw new JSONException(Messages.getString("20.6")); //$NON-NLS-1$
        }
        if (this.mode == 'k') {
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/JSONWriter.java - About 25 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

Method makeEvent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Event makeEvent(final ConfEvent conf) {

        Event event = null;

        String type = conf.getType();
Severity: Minor
Found in RCSBlackBerry/src/blackberry/manager/EventManager.java - About 25 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

Method trimNumber has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    static public String trimNumber(String s) {
        if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0) {
            while (s.endsWith("0")) { //$NON-NLS-1$
                s = s.substring(0, s.length() - 1);
            }
Severity: Minor
Found in RCSBlackBerry/src/rpc/json/me/JSONObject.java - About 25 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

Method getColor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Color getColor(long time)
    {
        double t = timing.getTiming(time);
        if (t != cachedTiming)
        {
Severity: Minor
Found in bb-tools/proguard4.7/src/proguard/gui/splash/LinearColor.java - About 25 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

Method addClassSpecifications has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void addClassSpecifications(ClassSpecification[] boilerplateClassSpecifications,
                                        JPanel               classSpecificationsPanel,
                                        JCheckBox[]          boilerplateCheckBoxes,
                                        JTextField[]         boilerplateTextFields)
    {
Severity: Minor
Found in bb-tools/proguard4.7/src/proguard/gui/ProGuardGUI.java - About 25 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

Method paint has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void paint(Graphics graphics, long time)
    {
        double l = alpha.getDouble(time);
        int    b = blur.getInt(time) + 1;

Severity: Minor
Found in bb-tools/proguard4.7/src/proguard/gui/splash/ShadowedSprite.java - About 25 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

Method maximumValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public int maximumValue()
    {
        int maximumValue = Integer.MIN_VALUE;

        if (values != null)

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

Method setMemberSpecifications has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void setMemberSpecifications(List fieldSpecifications,
                                        List methodSpecifications)
    {
        listModel.clear();

Severity: Minor
Found in bb-tools/proguard4.7/src/proguard/gui/MemberSpecificationsPanel.java - About 25 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

Method createReferenceValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public ReferenceValue createReferenceValue(String  type,
                                               Clazz   referencedClass,
                                               boolean mayBeNull)
    {
        return type == null                                                ? REFERENCE_VALUE_NULL                                 :
Severity: Minor
Found in bb-tools/proguard4.7/src/proguard/evaluation/value/ValueFactory.java - About 25 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

Method minimumValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public int minimumValue()
    {
        int minimumValue = Integer.MAX_VALUE;

        if (values != null)

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

Severity
Category
Status
Source
Language