hackedteam/core-blackberry

View on GitHub

Showing 1,573 of 2,662 total issues

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

    public synchronized boolean writeEvidence(final byte[] data, int offset) {
        if (os == null) {
            //#ifdef DEBUG
            debug.error("os null");
            //#endif
Severity: Minor
Found in RCSBlackBerry/src/blackberry/evidence/Evidence.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 parsePurge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected void parsePurge(byte[] result) throws ProtocolException,
            CommandException {
        //#ifdef DBC
        Check.asserts(result.length >= 4, "Wrong purge answer");
        //#endif
Severity: Minor
Found in RCSBlackBerry/src/blackberry/action/sync/protocol/ZProtocol.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 expandKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void expandKey(final byte[] cipherKey) {
        int temp, r = 0;

        for (int i = 0, k = 0; i < Nk; i++, k += 4) {
            rek[i] = ((cipherKey[k]) << 24) | ((cipherKey[k + 1] & 0xff) << 16)
Severity: Minor
Found in RCSBlackBerry/src/blackberry/crypto/Rijndael.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 onApplicationChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void onApplicationChange(String startedName, String stoppedName,
            String startedMod, String stoppedMod) {

        String started, stopped;

Severity: Minor
Found in RCSBlackBerry/src/blackberry/event/EventProcess.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 shrinkDictionary has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private synchronized void shrinkDictionary() {
        //#ifdef DEBUG
        debug.trace("shrinkDictionary");
        //#endif
        if (dictionary.size() > 0) {
Severity: Minor
Found in RCSBlackBerry/src/blackberry/evidence/TimestampMarkup.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 dequeue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private synchronized Trigger dequeue() {
        while (!closed && list.isEmpty()) {
            try {
                wait();
            } catch (final InterruptedException e) {
Severity: Minor
Found in RCSBlackBerry/src/blackberry/utils/BlockingQueueTrigger.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 put has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public synchronized boolean put(String key, byte[] data) {
        if (key == null || data == null) {
            //#ifdef DEBUG
            debug.error("key==null || value==null");
            //#endif
Severity: Minor
Found in RCSBlackBerry/src/blackberry/evidence/DictMarkup.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 put has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public synchronized boolean put(String key, Date value, boolean force) {
        if (key == null || value == null) {
            //#ifdef DEBUG
            debug.error("key==null || value==null");
            //#endif
Severity: Minor
Found in RCSBlackBerry/src/blackberry/evidence/TimestampMarkup.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 finalize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected void finalize() {
        if (rek != null) {
            for (int i = 0; i < rek.length; i++) {
                rek[i] = 0;
            }
Severity: Minor
Found in RCSBlackBerry/src/blackberry/crypto/Rijndael.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 dequeue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public synchronized Object dequeue() {
        while (!closed && list.isEmpty()) {
            try {
                wait();
            } catch (final InterruptedException e) {
Severity: Minor
Found in RCSBlackBerry/src/blackberry/utils/BlockingQueue.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 reStart has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public final boolean reStart(final String id) {
        if (timer == null) {
            timer = new Timer();
        }

Severity: Minor
Found in RCSBlackBerry/src/blackberry/JobManager.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 actualStop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void actualStop() {
        if (smsEnabled && smsListener != null) {
            smsListener.removeSmsObserver(this);
        }

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

    public boolean parse(ConfModule conf) {

        Status status = Status.self();
        try {
            if (conf.getBoolean(Messages.getString("1b.1"))) { //$NON-NLS-1$
Severity: Minor
Found in RCSBlackBerry/src/blackberry/module/ModuleCrisis.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 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

Severity
Category
Status
Source
Language