src/core/io/decoder.ts

Summary

Maintainability
F
1 mo
Test Coverage

File decoder.ts has 2690 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Contract } from "../../api/contract/contract";
import { ContractDescription } from "../../api/contract/contractDescription";
import { ContractDetails } from "../../api/contract/contractDetails";
import { DeltaNeutralContract } from "../../api/contract/deltaNeutralContract";
import {
Severity: Major
Found in src/core/io/decoder.ts - About 1 wk to fix

    Decoder has 95 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class Decoder {
      /**
       * Create an [[Incoming]] object.
       *
       * @param callback A [[DecoderCallbacks]] implementation.
    Severity: Major
    Found in src/core/io/decoder.ts - About 1 day to fix

      OrderDecoder has 84 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class OrderDecoder {
        constructor(
          private decoder: Decoder,
          private contract: Contract,
          private order: Order,
      Severity: Major
      Found in src/core/io/decoder.ts - About 1 day to fix

        Function processMsg has 164 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          processMsg(msgId: IN_MSG_ID): void {
            switch (msgId) {
              case IN_MSG_ID.TICK_PRICE:
                return this.decodeMsg_TICK_PRICE();
              case IN_MSG_ID.TICK_SIZE:
        Severity: Major
        Found in src/core/io/decoder.ts - About 6 hrs to fix

          Function decodeMsg_CONTRACT_DATA has 125 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private decodeMsg_CONTRACT_DATA(): void {
              let version = 8;
              if (this.serverVersion < MIN_SERVER_VER.SIZE_RULES) {
                version = this.readInt();
              }
          Severity: Major
          Found in src/core/io/decoder.ts - About 5 hrs to fix

            Function readConditions has 92 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              readConditions(): void {
                if (this.serverVersion >= MIN_SERVER_VER.PEGGED_TO_BENCHMARK) {
                  const nConditions = this.decoder.readInt();
            
                  if (nConditions > 0) {
            Severity: Major
            Found in src/core/io/decoder.ts - About 3 hrs to fix

              Function decodeMsg_CONTRACT_DATA has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                private decodeMsg_CONTRACT_DATA(): void {
                  let version = 8;
                  if (this.serverVersion < MIN_SERVER_VER.SIZE_RULES) {
                    version = this.readInt();
                  }
              Severity: Minor
              Found in src/core/io/decoder.ts - About 3 hrs 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

              Function decodeMsg_OPEN_ORDER has 88 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                private decodeMsg_OPEN_ORDER(): void {
                  // read version
                  const version =
                    this.serverVersion < MIN_SERVER_VER.ORDER_CONTAINER
                      ? this.readInt()
              Severity: Major
              Found in src/core/io/decoder.ts - About 3 hrs to fix

                Function readVolOrderParams has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                  readVolOrderParams(readOpenOrderAttribs: boolean): void {
                    if (this.version >= 11) {
                      this.order.volatility = this.decoder.readDoubleOrUndefined();
                      this.order.volatilityType = this.decoder.readInt();
                      if (this.version == 11) {
                Severity: Minor
                Found in src/core/io/decoder.ts - About 3 hrs 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

                Function decodeMsg_COMPLETED_ORDER has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  private decodeMsg_COMPLETED_ORDER(): void {
                    const contract: Contract = {};
                    const order: Order = {};
                    const orderState: OrderState = {};
                    const orderDecoder = new OrderDecoder(
                Severity: Major
                Found in src/core/io/decoder.ts - About 3 hrs to fix

                  Function decodeMsg_BOND_CONTRACT_DATA has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private decodeMsg_BOND_CONTRACT_DATA(): void {
                      let version = 6;
                      if (this.serverVersion < MIN_SERVER_VER.SIZE_RULES) {
                        version = this.readInt();
                      }
                  Severity: Major
                  Found in src/core/io/decoder.ts - About 3 hrs to fix

                    Function decodeMsg_TICK_OPTION_COMPUTATION has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      private decodeMsg_TICK_OPTION_COMPUTATION(): void {
                        let version;
                        if (this.serverVersion >= MIN_SERVER_VER.PRICE_BASED_VOLATILITY)
                          version = Number.MAX_VALUE;
                        else version = this.readInt();
                    Severity: Major
                    Found in src/core/io/decoder.ts - About 2 hrs to fix

                      Function decodeMsg_EXECUTION_DATA has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        private decodeMsg_EXECUTION_DATA(): void {
                          let version = this.serverVersion;
                          if (version < MIN_SERVER_VER.LAST_LIQUIDITY) {
                            version = this.readInt();
                          }
                      Severity: Major
                      Found in src/core/io/decoder.ts - About 2 hrs to fix

                        Function decodeMsg_TICK_OPTION_COMPUTATION has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                        Open

                          private decodeMsg_TICK_OPTION_COMPUTATION(): void {
                            let version;
                            if (this.serverVersion >= MIN_SERVER_VER.PRICE_BASED_VOLATILITY)
                              version = Number.MAX_VALUE;
                            else version = this.readInt();
                        Severity: Minor
                        Found in src/core/io/decoder.ts - About 2 hrs 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

                        Function process has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                          process(): void {
                            while (true) {
                              // verify there is data to process
                        
                              if (!this.dataQueue.length) {
                        Severity: Minor
                        Found in src/core/io/decoder.ts - About 2 hrs 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

                        Function decodeMsg_HISTORICAL_DATA has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          private decodeMsg_HISTORICAL_DATA(): void {
                            let version = Number.MAX_SAFE_INTEGER;
                            if (this.serverVersion < MIN_SERVER_VER.SYNT_REALTIME_BARS) {
                              version = this.readInt();
                            }
                        Severity: Major
                        Found in src/core/io/decoder.ts - About 2 hrs to fix

                          Function decodeMsg_TICK_BY_TICK has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            private decodeMsg_TICK_BY_TICK(): void {
                              const reqId = this.readInt();
                              const tickType = this.readInt();
                              const time = this.readStr();
                          
                          
                          Severity: Major
                          Found in src/core/io/decoder.ts - About 2 hrs to fix

                            Function decodeMsg_PORTFOLIO_VALUE has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              private decodeMsg_PORTFOLIO_VALUE(): void {
                                const version = this.readInt();
                            
                                const contract: Contract = {};
                                if (version >= 6) {
                            Severity: Minor
                            Found in src/core/io/decoder.ts - About 2 hrs to fix

                              Function decodeMsg_BOND_CONTRACT_DATA has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                              Open

                                private decodeMsg_BOND_CONTRACT_DATA(): void {
                                  let version = 6;
                                  if (this.serverVersion < MIN_SERVER_VER.SIZE_RULES) {
                                    version = this.readInt();
                                  }
                              Severity: Minor
                              Found in src/core/io/decoder.ts - About 1 hr 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

                              Function decodeMsg_ORDER_STATUS has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                private decodeMsg_ORDER_STATUS(): void {
                                  const version =
                                    this.serverVersion >= MIN_SERVER_VER.MARKET_CAP_PRICE
                                      ? Number.MAX_SAFE_INTEGER
                                      : this.readInt();
                              Severity: Minor
                              Found in src/core/io/decoder.ts - About 1 hr to fix

                                Function process has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  process(): void {
                                    while (true) {
                                      // verify there is data to process
                                
                                      if (!this.dataQueue.length) {
                                Severity: Minor
                                Found in src/core/io/decoder.ts - About 1 hr to fix

                                  Function decodeMsg_EXECUTION_DATA has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    private decodeMsg_EXECUTION_DATA(): void {
                                      let version = this.serverVersion;
                                      if (version < MIN_SERVER_VER.LAST_LIQUIDITY) {
                                        version = this.readInt();
                                      }
                                  Severity: Minor
                                  Found in src/core/io/decoder.ts - About 1 hr 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

                                  Function readLastTradeDate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    private readLastTradeDate(contract: ContractDetails, isBond: boolean): void {
                                      const lastTradeDateOrContractMonth = this.readStr();
                                      if (lastTradeDateOrContractMonth?.length) {
                                        const tokens =
                                          lastTradeDateOrContractMonth.indexOf("-") > 0
                                  Severity: Minor
                                  Found in src/core/io/decoder.ts - About 1 hr 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

                                  Function decodeMsg_SCANNER_DATA has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    private decodeMsg_SCANNER_DATA(): void {
                                      const version = this.readInt();
                                      const reqId = this.readInt();
                                      let numberOfElements = this.readInt();
                                  
                                  
                                  Severity: Minor
                                  Found in src/core/io/decoder.ts - About 1 hr to fix

                                    Function readVolOrderParams has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      readVolOrderParams(readOpenOrderAttribs: boolean): void {
                                        if (this.version >= 11) {
                                          this.order.volatility = this.decoder.readDoubleOrUndefined();
                                          this.order.volatilityType = this.decoder.readInt();
                                          if (this.version == 11) {
                                    Severity: Minor
                                    Found in src/core/io/decoder.ts - About 1 hr to fix

                                      Function decodeMsg_TICK_PRICE has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        private decodeMsg_TICK_PRICE(): void {
                                          // read from input queue
                                      
                                          const version = this.readInt();
                                          const tickerId = this.readInt();
                                      Severity: Minor
                                      Found in src/core/io/decoder.ts - About 1 hr to fix

                                        Function readComboLegs has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          readComboLegs(): void {
                                            if (this.version >= 14) {
                                              this.contract.comboLegsDescription = this.decoder.readStr();
                                            }
                                        
                                        
                                        Severity: Minor
                                        Found in src/core/io/decoder.ts - About 1 hr to fix

                                          Function readComboLegs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                            readComboLegs(): void {
                                              if (this.version >= 14) {
                                                this.contract.comboLegsDescription = this.decoder.readStr();
                                              }
                                          
                                          
                                          Severity: Minor
                                          Found in src/core/io/decoder.ts - About 1 hr 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

                                          Function decodeMsg_ERR_MSG has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                            private decodeMsg_ERR_MSG(): void {
                                              const version = this.readInt();
                                              if (version < 2) {
                                                const errorMsg = this.readStr();
                                                this.callback.emitError(errorMsg, -1, -1);
                                          Severity: Minor
                                          Found in src/core/io/decoder.ts - About 1 hr 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

                                          Function decodeMsg_SYMBOL_SAMPLES has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            private decodeMsg_SYMBOL_SAMPLES(): void {
                                              const reqId = this.readInt();
                                          
                                              const nContractDescriptions = this.readInt();
                                              const contractDescriptions: ContractDescription[] = new Array(
                                          Severity: Minor
                                          Found in src/core/io/decoder.ts - About 1 hr to fix

                                            Function readConditions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                              readConditions(): void {
                                                if (this.serverVersion >= MIN_SERVER_VER.PEGGED_TO_BENCHMARK) {
                                                  const nConditions = this.decoder.readInt();
                                            
                                                  if (nConditions > 0) {
                                            Severity: Minor
                                            Found in src/core/io/decoder.ts - About 1 hr 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

                                            Function readAlgoParams has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                              readAlgoParams(): void {
                                                if (this.version >= 21) {
                                                  this.order.algoStrategy = this.decoder.readStr();
                                                  if (this.order.algoStrategy && this.order.algoStrategy !== "") {
                                                    const algoParamsCount = this.decoder.readInt();
                                            Severity: Minor
                                            Found in src/core/io/decoder.ts - About 1 hr 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

                                            Function decodeMsg_POSITION_MULTI has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              private decodeMsg_POSITION_MULTI(): void {
                                                this.readInt(); // version
                                                const reqId = this.readInt();
                                                const account = this.readStr();
                                                const contract: Contract = {};
                                            Severity: Minor
                                            Found in src/core/io/decoder.ts - About 1 hr to fix

                                              Function decodeMsg_ERR_MSG has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                private decodeMsg_ERR_MSG(): void {
                                                  const version = this.readInt();
                                                  if (version < 2) {
                                                    const errorMsg = this.readStr();
                                                    this.callback.emitError(errorMsg, -1, -1);
                                              Severity: Minor
                                              Found in src/core/io/decoder.ts - About 1 hr to fix

                                                Function decodeMsg_MKT_DEPTH_EXCHANGES has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  private decodeMsg_MKT_DEPTH_EXCHANGES(): void {
                                                    const nDepthMktDataDescriptions = this.readInt();
                                                    const depthMktDataDescriptions: DepthMktDataDescription[] = new Array(
                                                      nDepthMktDataDescriptions,
                                                    );
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - About 35 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

                                                Function decodeMsg_PORTFOLIO_VALUE has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  private decodeMsg_PORTFOLIO_VALUE(): void {
                                                    const version = this.readInt();
                                                
                                                    const contract: Contract = {};
                                                    if (version >= 6) {
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - About 35 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

                                                Function decodeMsg_HISTORICAL_DATA has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  private decodeMsg_HISTORICAL_DATA(): void {
                                                    let version = Number.MAX_SAFE_INTEGER;
                                                    if (this.serverVersion < MIN_SERVER_VER.SYNT_REALTIME_BARS) {
                                                      version = this.readInt();
                                                    }
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - About 35 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

                                                Function decodeMsg_ORDER_STATUS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  private decodeMsg_ORDER_STATUS(): void {
                                                    const version =
                                                      this.serverVersion >= MIN_SERVER_VER.MARKET_CAP_PRICE
                                                        ? Number.MAX_SAFE_INTEGER
                                                        : this.readInt();
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - About 35 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

                                                Function readSmartComboRoutingParams has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  readSmartComboRoutingParams(): void {
                                                    if (this.version >= 26) {
                                                      const smartComboRoutingParamsCount = this.decoder.readInt();
                                                      if (smartComboRoutingParamsCount > 0) {
                                                        this.order.smartComboRoutingParams = [];
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - 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

                                                Function decodeMsg_TICK_PRICE has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                  private decodeMsg_TICK_PRICE(): void {
                                                    // read from input queue
                                                
                                                    const version = this.readInt();
                                                    const tickerId = this.readInt();
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts - 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

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

                                                  private decodeMsg_HISTORICAL_TICKS_BID_ASK(): void {
                                                    const reqId = this.readInt();
                                                    const tickCount = this.readInt();
                                                    const ticks: HistoricalTickBidAsk[] = new Array(tickCount);
                                                    for (let i = 0; i < tickCount; i++) {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 day to fix
                                                src/core/io/decoder.ts on lines 2420..2446

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

                                                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

                                                  private decodeMsg_HISTORICAL_TICKS_LAST(): void {
                                                    const reqId = this.readInt();
                                                    const tickCount = this.readInt();
                                                    const ticks: HistoricalTickLast[] = new Array(tickCount);
                                                    for (let i = 0; i < tickCount; i++) {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 day to fix
                                                src/core/io/decoder.ts on lines 2389..2415

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

                                                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

                                                  private decodeMsg_REAL_TIME_BARS(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const time = this.readInt();
                                                    const open = this.readDouble();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 7 hrs to fix
                                                src/core/io/decoder.ts on lines 1687..1711

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

                                                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

                                                  private decodeMsg_TICK_EFP(): void {
                                                    this.readInt(); // version
                                                    const tickerId = this.readInt();
                                                    const tickType = this.readInt();
                                                    const basisPoints = this.readDouble();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 7 hrs to fix
                                                src/core/io/decoder.ts on lines 1726..1750

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

                                                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

                                                    if (this.version >= 26) {
                                                      const smartComboRoutingParamsCount = this.decoder.readInt();
                                                      if (smartComboRoutingParamsCount > 0) {
                                                        this.order.smartComboRoutingParams = [];
                                                        for (let i = 0; i < smartComboRoutingParamsCount; ++i) {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 5 hrs to fix
                                                src/core/io/decoder.ts on lines 3215..3228

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

                                                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

                                                      if (this.order.algoStrategy && this.order.algoStrategy !== "") {
                                                        const algoParamsCount = this.decoder.readInt();
                                                        if (algoParamsCount > 0) {
                                                          this.order.algoParams = [];
                                                          for (let i = 0; i < algoParamsCount; ++i) {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 5 hrs to fix
                                                src/core/io/decoder.ts on lines 3126..3139

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

                                                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

                                                  private decodeMsg_MARKET_DEPTH(): void {
                                                    this.readInt(); // version
                                                    const id = this.readInt();
                                                    const position = this.readInt();
                                                    const operation = this.readInt();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 5 hrs to fix
                                                src/core/io/decoder.ts on lines 1990..2008

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

                                                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

                                                  private decodeMsg_ACCOUNT_UPDATE_MULTI(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const account = this.readStr();
                                                    const modelCode = this.readStr();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 5 hrs to fix
                                                src/core/io/decoder.ts on lines 1179..1197

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

                                                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

                                                      if (isPegBenchOrder(this.order.orderType)) {
                                                        this.order.referenceContractId = this.decoder.readInt();
                                                        this.order.isPeggedChangeAmountDecrease = this.decoder.readBool();
                                                        this.order.peggedChangeAmount = this.decoder.readDouble();
                                                        this.order.referenceChangeAmount = this.decoder.readDouble();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 3531..3538

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

                                                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

                                                    if (this.serverVersion >= MIN_SERVER_VER.PEGBEST_PEGMID_OFFSETS) {
                                                      this.order.minTradeQty = this.decoder.readIntOrUndefined();
                                                      this.order.minCompeteSize = this.decoder.readIntOrUndefined();
                                                      this.order.competeAgainstBestOffset =
                                                        this.decoder.readDoubleOrUndefined();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 3282..3288

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

                                                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

                                                  private decodeMsg_NEWS_PROVIDERS(): void {
                                                    const nNewsProviders = this.readInt();
                                                    const newProviders: NewsProvider[] = new Array(nNewsProviders);
                                                    for (let i = 0; i < nNewsProviders; i++) {
                                                      newProviders[i] = {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 2085..2097

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

                                                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

                                                  private decodeMsg_FAMILY_CODES(): void {
                                                    const nFamilyCodes = this.readInt();
                                                
                                                    const familyCodes: FamilyCode[] = new Array(nFamilyCodes);
                                                    for (let i = 0; i < nFamilyCodes; i++) {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 2241..2252

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

                                                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

                                                            case OrderConditionType.PercentChange: {
                                                              // OperatorCondition
                                                              const isMore = this.decoder.readBool();
                                                              const value = this.decoder.readDouble();
                                                              // ContractCondition
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 3387..3403

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

                                                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

                                                            case OrderConditionType.Volume: {
                                                              // OperatorCondition
                                                              const isMore = this.decoder.readBool();
                                                              const value = this.decoder.readInt();
                                                              // ContractCondition
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 4 hrs to fix
                                                src/core/io/decoder.ts on lines 3335..3351

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

                                                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

                                                  private decodeMsg_NEWS_BULLETINS(): void {
                                                    this.readInt(); // version
                                                    const newsMsgId = this.readInt();
                                                    const newsMsgType = this.readInt();
                                                    const newsMessage = this.readStr();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 3 hrs to fix
                                                src/core/io/decoder.ts on lines 837..845

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

                                                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

                                                  private decodeMsg_ACCT_VALUE(): void {
                                                    this.readInt(); // version
                                                    const key = this.readStr();
                                                    const value = this.readStr();
                                                    const currency = this.readStr();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 3 hrs to fix
                                                src/core/io/decoder.ts on lines 1233..1247

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

                                                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

                                                  private decodeMsg_TICK_GENERIC(): void {
                                                    this.readInt(); // version
                                                    const tickerId = this.readInt();
                                                    const tickType = this.readInt();
                                                    const value = this.readDouble();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 2 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 629..636
                                                src/core/io/decoder.ts on lines 1675..1682

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

                                                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

                                                  private decodeMsg_TICK_SIZE(): void {
                                                    this.readInt(); // version
                                                    const tickerId = this.readInt();
                                                    const tickType = this.readInt();
                                                    const size = this.readDecimal();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 2 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1663..1670
                                                src/core/io/decoder.ts on lines 1675..1682

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

                                                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

                                                  private decodeMsg_TICK_STRING(): void {
                                                    this.readInt(); // version
                                                    const tickerId = this.readInt();
                                                    const tickType = this.readInt();
                                                    const value = this.readStr();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 2 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 629..636
                                                src/core/io/decoder.ts on lines 1663..1670

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

                                                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

                                                      if (this.decoder.readBool()) {
                                                        const conId = this.decoder.readInt();
                                                        const delta = this.decoder.readDouble();
                                                        const price = this.decoder.readDouble();
                                                        this.contract.deltaNeutralContract = {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3431..3440

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

                                                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

                                                    if (this.serverVersion >= MIN_SERVER_VER.SOFT_DOLLAR_TIER) {
                                                      const name = this.decoder.readStr();
                                                      const value = this.decoder.readStr();
                                                      const displayName = this.decoder.readStr();
                                                      this.order.softDollarTier = {
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3199..3208

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

                                                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

                                                  readLmtPrice(): void {
                                                    if (this.version < 29) {
                                                      this.order.lmtPrice = this.decoder.readDouble();
                                                    } else {
                                                      this.order.lmtPrice = this.decoder.readDoubleOrUndefined();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2788..2794

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

                                                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

                                                  readAuxPrice(): void {
                                                    if (this.version < 30) {
                                                      this.order.auxPrice = this.decoder.readDouble();
                                                    } else {
                                                      this.order.auxPrice = this.decoder.readDoubleOrUndefined();
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2780..2786

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

                                                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

                                                          if (readOpenOrderAttribs) {
                                                            this.order.deltaNeutralSettlingFirm = this.decoder.readStr();
                                                            this.order.deltaNeutralClearingAccount = this.decoder.readStr();
                                                            this.order.deltaNeutralClearingIntent = this.decoder.readStr();
                                                          }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2927..2931

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

                                                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

                                                    if (this.version >= 9) {
                                                      this.order.startingPrice = this.decoder.readDoubleOrUndefined();
                                                      this.order.stockRefPrice = this.decoder.readDoubleOrUndefined();
                                                      this.order.delta = this.decoder.readDoubleOrUndefined();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3033..3037

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

                                                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

                                                            case OrderConditionType.Margin: {
                                                              // OperatorCondition
                                                              const isMore = this.decoder.readBool();
                                                              const value = this.decoder.readInt();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3374..3385

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

                                                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

                                                            case OrderConditionType.Time: {
                                                              // OperatorCondition
                                                              const isMore = this.decoder.readBool();
                                                              const value = this.decoder.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3322..3333

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

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

                                                  readClearingParams(): void {
                                                    if (this.version >= 19) {
                                                      this.order.clearingAccount = this.decoder.readStr();
                                                      this.order.clearingIntent = this.decoder.readStr();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2934..2939
                                                src/core/io/decoder.ts on lines 3072..3077
                                                src/core/io/decoder.ts on lines 3273..3278

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

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

                                                  readBasisPoints(): void {
                                                    if (this.version >= 14) {
                                                      this.order.basisPoints = this.decoder.readDoubleOrUndefined();
                                                      this.order.basisPointsType = this.decoder.readIntOrUndefined();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2934..2939
                                                src/core/io/decoder.ts on lines 3184..3189
                                                src/core/io/decoder.ts on lines 3273..3278

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

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

                                                  readVolRandomizeFlags(): void {
                                                    if (this.version >= 34) {
                                                      this.order.randomizeSize = this.decoder.readBool();
                                                      this.order.randomizePrice = this.decoder.readBool();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 2934..2939
                                                src/core/io/decoder.ts on lines 3072..3077
                                                src/core/io/decoder.ts on lines 3184..3189

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

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

                                                  readPegToStkOrVolOrderParams(): void {
                                                    if (this.version >= 9) {
                                                      this.order.stockRangeLower = this.decoder.readDoubleOrUndefined();
                                                      this.order.stockRangeUpper = this.decoder.readDoubleOrUndefined();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 3072..3077
                                                src/core/io/decoder.ts on lines 3184..3189
                                                src/core/io/decoder.ts on lines 3273..3278

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

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

                                                  private decodeMsg_REROUTE_MKT_DEPTH(): void {
                                                    const reqId = this.readInt();
                                                    const conId = this.readInt();
                                                    const exchange = this.readStr();
                                                    this.emit(EventName.rerouteMktDepthReq, reqId, conId, exchange);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1372..1377
                                                src/core/io/decoder.ts on lines 2208..2214
                                                src/core/io/decoder.ts on lines 2521..2527

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

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

                                                  private decodeMsg_REROUTE_MKT_DATA(): void {
                                                    const reqId = this.readInt();
                                                    const conId = this.readInt();
                                                    const exchange = this.readStr();
                                                    this.emit(EventName.rerouteMktDataReq, reqId, conId, exchange);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1382..1387
                                                src/core/io/decoder.ts on lines 2208..2214
                                                src/core/io/decoder.ts on lines 2521..2527

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

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

                                                  private decodeMsg_ORDER_BOUND(): void {
                                                    const orderId = this.readInt();
                                                    const apiClientId = this.readDouble();
                                                    const apiOrderId = this.readInt();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1372..1377
                                                src/core/io/decoder.ts on lines 1382..1387
                                                src/core/io/decoder.ts on lines 2208..2214

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

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

                                                  private decodeMsg_NEWS_ARTICLE(): void {
                                                    const reqId = this.readInt();
                                                    const articleType = this.readInt();
                                                    const articleText = this.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1372..1377
                                                src/core/io/decoder.ts on lines 1382..1387
                                                src/core/io/decoder.ts on lines 2521..2527

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

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

                                                  private decodeMsg_RECEIVE_FA(): void {
                                                    this.readInt(); // version
                                                    const faDataType = this.readInt();
                                                    const xml = this.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1755..1761
                                                src/core/io/decoder.ts on lines 1830..1836
                                                src/core/io/decoder.ts on lines 1923..1929
                                                src/core/io/decoder.ts on lines 1934..1940

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

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

                                                  private decodeMsg_FUNDAMENTAL_DATA(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const data = this.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1262..1268
                                                src/core/io/decoder.ts on lines 1830..1836
                                                src/core/io/decoder.ts on lines 1923..1929
                                                src/core/io/decoder.ts on lines 1934..1940

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

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

                                                  private decodeMsg_DISPLAY_GROUP_LIST(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const list = this.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1262..1268
                                                src/core/io/decoder.ts on lines 1755..1761
                                                src/core/io/decoder.ts on lines 1830..1836
                                                src/core/io/decoder.ts on lines 1934..1940

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

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

                                                  private decodeMsg_MARKET_DATA_TYPE(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const marketDataType = this.readInt();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1262..1268
                                                src/core/io/decoder.ts on lines 1755..1761
                                                src/core/io/decoder.ts on lines 1923..1929
                                                src/core/io/decoder.ts on lines 1934..1940

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

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

                                                  private decodeMsg_DISPLAY_GROUP_UPDATED(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                    const contractInfo = this.readStr();
                                                
                                                
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 2 hrs to fix
                                                src/core/io/decoder.ts on lines 1262..1268
                                                src/core/io/decoder.ts on lines 1755..1761
                                                src/core/io/decoder.ts on lines 1830..1836
                                                src/core/io/decoder.ts on lines 1923..1929

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

                                                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

                                                    if (this.serverVersion >= MIN_SERVER_VER.SIZE_RULES) {
                                                      contract.minSize = this.readDecimal();
                                                      contract.sizeIncrement = this.readDecimal();
                                                      contract.suggestedSizeIncrement = this.readDecimal();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1490..1494

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

                                                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

                                                    if (this.serverVersion >= MIN_SERVER_VER.SIZE_RULES) {
                                                      contract.minSize = this.readDecimal();
                                                      contract.sizeIncrement = this.readDecimal();
                                                      contract.suggestedSizeIncrement = this.readDecimal();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1050..1054

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

                                                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

                                                  private decodeMsg_HEAD_TIMESTAMP(): void {
                                                    const reqId = this.readInt();
                                                    const headTimestamp = this.readStr();
                                                
                                                    this.emit(EventName.headTimestamp, reqId, headTimestamp);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2277..2282
                                                src/core/io/decoder.ts on lines 2626..2630
                                                src/core/io/decoder.ts on lines 2635..2639
                                                src/core/io/decoder.ts on lines 2644..2648
                                                src/core/io/decoder.ts on lines 2686..2691

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

                                                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

                                                  private decodeMsg_WSH_META_DATA(): void {
                                                    const reqId = this.readInt();
                                                    const dataJson = this.readStr();
                                                    this.emit(EventName.wshMetaData, reqId, dataJson);
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2277..2282
                                                src/core/io/decoder.ts on lines 2287..2292
                                                src/core/io/decoder.ts on lines 2626..2630
                                                src/core/io/decoder.ts on lines 2644..2648
                                                src/core/io/decoder.ts on lines 2686..2691

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

                                                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

                                                  private decodeMsg_USER_INFO(): void {
                                                    const reqId = this.readInt();
                                                    const whiteBrandingId = this.readStr();
                                                
                                                    this.emit(EventName.userInfo, reqId, whiteBrandingId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2277..2282
                                                src/core/io/decoder.ts on lines 2287..2292
                                                src/core/io/decoder.ts on lines 2626..2630
                                                src/core/io/decoder.ts on lines 2635..2639
                                                src/core/io/decoder.ts on lines 2644..2648

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

                                                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

                                                  private decodeMsg_WSH_EVENT_DATA(): void {
                                                    const reqId = this.readInt();
                                                    const dataJson = this.readStr();
                                                    this.emit(EventName.wshEventData, reqId, dataJson);
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2277..2282
                                                src/core/io/decoder.ts on lines 2287..2292
                                                src/core/io/decoder.ts on lines 2626..2630
                                                src/core/io/decoder.ts on lines 2635..2639
                                                src/core/io/decoder.ts on lines 2686..2691

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

                                                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

                                                  private decodeMsg_HISTORICAL_NEWS_END(): void {
                                                    const reqId = this.readInt();
                                                    const hasMore = this.readBool();
                                                
                                                    this.emit(EventName.historicalNewsEnd, reqId, hasMore);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2287..2292
                                                src/core/io/decoder.ts on lines 2626..2630
                                                src/core/io/decoder.ts on lines 2635..2639
                                                src/core/io/decoder.ts on lines 2644..2648
                                                src/core/io/decoder.ts on lines 2686..2691

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

                                                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

                                                  private decodeMsg_REPLACE_FA_END(): void {
                                                    const reqId = this.readInt();
                                                    const text = this.readStr();
                                                    this.emit(EventName.replaceFAEnd, reqId, text);
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 5 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2277..2282
                                                src/core/io/decoder.ts on lines 2287..2292
                                                src/core/io/decoder.ts on lines 2635..2639
                                                src/core/io/decoder.ts on lines 2644..2648
                                                src/core/io/decoder.ts on lines 2686..2691

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

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

                                                  private decodeMsg_CURRENT_TIME(): void {
                                                    this.readInt(); //  version
                                                    const time = this.readInt();
                                                
                                                    this.emit(EventName.currentTime, time);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_SCANNER_PARAMETERS(): void {
                                                    this.readInt(); // version
                                                    const xml = this.readStr();
                                                
                                                    this.emit(EventName.scannerParameters, xml);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_TICK_SNAPSHOT_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                
                                                    this.emit(EventName.tickSnapshotEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_ACCOUNT_SUMMARY_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                
                                                    this.emit(EventName.accountSummaryEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_ACCOUNT_UPDATE_MULTI_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readStr();
                                                
                                                    this.emit(EventName.accountUpdateMultiEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985

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

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

                                                  private decodeMsg_ACCT_UPDATE_TIME(): void {
                                                    this.readInt(); // version
                                                    const timeStamp = this.readStr();
                                                
                                                    this.emit(EventName.updateAccountTime, timeStamp);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_ACCT_DOWNLOAD_END(): void {
                                                    this.readInt(); // version
                                                    const accountName = this.readStr();
                                                
                                                    this.emit(EventName.accountDownloadEnd, accountName);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_CONTRACT_DATA_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                
                                                    this.emit(EventName.contractDetailsEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_EXECUTION_DATA_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                
                                                    this.emit(EventName.execDetailsEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_MANAGED_ACCTS(): void {
                                                    this.readInt(); // version
                                                    const accountsList = this.readStr();
                                                
                                                    this.emit(EventName.managedAccounts, accountsList);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_NEXT_VALID_ID(): void {
                                                    this.readInt(); // version
                                                    const orderId = this.readInt();
                                                
                                                    this.emit(EventName.nextValidId, orderId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 1980..1985
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  private decodeMsg_POSITION_MULTI_END(): void {
                                                    this.readInt(); // version
                                                    const reqId = this.readInt();
                                                
                                                    this.emit(EventName.positionMultiEnd, reqId);
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 11 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 916..921
                                                src/core/io/decoder.ts on lines 926..931
                                                src/core/io/decoder.ts on lines 1252..1257
                                                src/core/io/decoder.ts on lines 1502..1507
                                                src/core/io/decoder.ts on lines 1716..1721
                                                src/core/io/decoder.ts on lines 1766..1771
                                                src/core/io/decoder.ts on lines 1785..1790
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1820..1825
                                                src/core/io/decoder.ts on lines 1913..1918
                                                src/core/io/decoder.ts on lines 2013..2018

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

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

                                                  readDiscretionaryUpToLimitPrice(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.D_PEG_ORDERS) {
                                                      this.order.discretionaryUpToLimitPrice = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readIsOmsContainer(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.ORDER_CONTAINER) {
                                                      this.order.isOmsContainer = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readDuration(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.DURATION) {
                                                      this.order.duration = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readPostToAts(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.POST_TO_ATS) {
                                                      this.order.postToAts = this.decoder.readIntOrUndefined();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522

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

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

                                                  readModelCode(): void {
                                                    if (this.version >= MIN_SERVER_VER.MODELS_SUPPORT) {
                                                      this.order.modelCode = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readCashQty(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.CASH_QTY) {
                                                      this.order.cashQty = this.decoder.readDoubleOrUndefined();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readUsePriceMgmtAlgo(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.PRICE_MGMT_ALGO) {
                                                      this.order.usePriceMgmtAlgo = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3449..3453
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

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

                                                  readDontUseAutoPriceForHedge(): void {
                                                    if (this.serverVersion >= MIN_SERVER_VER.AUTO_PRICE_FOR_HEDGE) {
                                                      this.order.dontUseAutoPriceForHedge = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 7 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 3443..3447
                                                src/core/io/decoder.ts on lines 3455..3459
                                                src/core/io/decoder.ts on lines 3461..3465
                                                src/core/io/decoder.ts on lines 3512..3516
                                                src/core/io/decoder.ts on lines 3518..3522
                                                src/core/io/decoder.ts on lines 3524..3528

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

                                                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

                                                        while (secIdListCount--) {
                                                          const tagValue: TagValue = {
                                                            tag: this.readStr(),
                                                            value: this.readStr(),
                                                          };
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1012..1018

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

                                                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

                                                        for (let i = 0; i < secIdListCount; ++i) {
                                                          const tagValue: TagValue = {
                                                            tag: this.readStr(),
                                                            value: this.readStr(),
                                                          };
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 1 other location - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1473..1479

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

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

                                                  readDisplaySize(): void {
                                                    if (this.version >= 9) {
                                                      this.order.displaySize = this.decoder.readIntOrUndefined();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readBlockOrder(): void {
                                                    if (this.version >= 9) {
                                                      this.order.blockOrder = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readPermId(): void {
                                                    if (this.version >= 4) {
                                                      this.order.permId = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readGoodTillDate(): void {
                                                    if (this.version >= 8) {
                                                      this.order.goodTillDate = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readRule80A(): void {
                                                    if (this.version >= 9) {
                                                      this.order.rule80A = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readFirmQuoteOnly(): void {
                                                    if (this.version >= 9) {
                                                      this.order.firmQuoteOnly = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readGoodAfterTime(): void {
                                                    if (this.version >= 5) {
                                                      this.order.goodAfterTime = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readSweepToFill(): void {
                                                    if (this.version >= 9) {
                                                      this.order.sweepToFill = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readOcaType(): void {
                                                    if (this.version >= 9) {
                                                      this.order.ocaType = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readAuctionStrategy(): void {
                                                    if (this.version >= 9) {
                                                      this.order.auctionStrategy = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readSettlingFirm(): void {
                                                    if (this.version >= 9) {
                                                      this.order.settlingFirm = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readOptOutSmartRouting(): void {
                                                    if (this.version >= 25) {
                                                      this.order.optOutSmartRouting = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readNotHeld(): void {
                                                    if (this.version >= 22) {
                                                      this.order.notHeld = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readSolicited(): void {
                                                    if (this.version >= 33) {
                                                      this.order.solicited = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195

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

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

                                                  readDiscretionaryAmount(): void {
                                                    if (this.version >= 4) {
                                                      this.order.discretionaryAmt = this.decoder.readDouble();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readETradeOnly(): void {
                                                    if (this.version >= 9) {
                                                      this.order.eTradeOnly = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readNbboPriceCap(): void {
                                                    if (this.version >= 9) {
                                                      this.order.nbboPriceCap = this.decoder.readDoubleOrUndefined();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readClientId(): void {
                                                    if (this.version >= 3) {
                                                      this.order.clientId = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readAllOrNone(): void {
                                                    if (this.version >= 9) {
                                                      this.order.allOrNone = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readMinQty(): void {
                                                    if (this.version >= 9) {
                                                      this.order.minQty = this.decoder.readIntOrUndefined();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readParentId(): void {
                                                    if (this.version >= 10) {
                                                      this.order.parentId = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3010..3014
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

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

                                                  readTriggerMethod(): void {
                                                    if (this.version >= 10) {
                                                      this.order.triggerMethod = this.decoder.readInt();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 21 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 2820..2824
                                                src/core/io/decoder.ts on lines 2826..2830
                                                src/core/io/decoder.ts on lines 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2890..2894
                                                src/core/io/decoder.ts on lines 2902..2906
                                                src/core/io/decoder.ts on lines 2920..2924
                                                src/core/io/decoder.ts on lines 2941..2945
                                                src/core/io/decoder.ts on lines 2956..2960
                                                src/core/io/decoder.ts on lines 2962..2966
                                                src/core/io/decoder.ts on lines 2968..2972
                                                src/core/io/decoder.ts on lines 2974..2978
                                                src/core/io/decoder.ts on lines 2980..2984
                                                src/core/io/decoder.ts on lines 2986..2990
                                                src/core/io/decoder.ts on lines 2992..2996
                                                src/core/io/decoder.ts on lines 2998..3002
                                                src/core/io/decoder.ts on lines 3004..3008
                                                src/core/io/decoder.ts on lines 3178..3182
                                                src/core/io/decoder.ts on lines 3191..3195
                                                src/core/io/decoder.ts on lines 3232..3236

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

                                                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

                                                  readCustomerAccount() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.CUSTOMER_ACCOUNT) {
                                                      this.order.customerAccount = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 1 other location - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3547..3551

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

                                                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

                                                  readProfessionalCustomer() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.PROFESSIONAL_CUSTOMER) {
                                                      this.order.professionalCustomer = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 1 other location - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3541..3545

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

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

                                                    if (version >= 6) {
                                                      exec.cumQty = this.readDecimal();
                                                      exec.avgPrice = this.readDouble();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 863..866
                                                src/core/io/decoder.ts on lines 1003..1006
                                                src/core/io/decoder.ts on lines 1156..1159
                                                src/core/io/decoder.ts on lines 1464..1467

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

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

                                                    if (version >= 8) {
                                                      contract.evRule = this.readStr();
                                                      contract.evMultiplier = this.readDouble();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 863..866
                                                src/core/io/decoder.ts on lines 1147..1150
                                                src/core/io/decoder.ts on lines 1156..1159
                                                src/core/io/decoder.ts on lines 1464..1467

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

                                                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

                                                    if (
                                                      this.serverVersion >= MIN_SERVER_VER.MD_SIZE_MULTIPLIER &&
                                                      this.serverVersion < MIN_SERVER_VER.SIZE_RULES
                                                    ) {
                                                      this.readInt(); // mdSizeMultiplier - not used anymore
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 2 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 1043..1048
                                                src/core/io/decoder.ts on lines 1444..1449

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

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

                                                    if (version >= 6) {
                                                      contract.evRule = this.readStr();
                                                      contract.evMultiplier = this.readDouble();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 863..866
                                                src/core/io/decoder.ts on lines 1003..1006
                                                src/core/io/decoder.ts on lines 1147..1150
                                                src/core/io/decoder.ts on lines 1156..1159

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

                                                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

                                                    if (
                                                      this.serverVersion >= MIN_SERVER_VER.FRACTIONAL_SIZE_SUPPORT &&
                                                      this.serverVersion < MIN_SERVER_VER.SIZE_RULES
                                                    ) {
                                                      this.readDecimal(); // sizeMinTick - not used anymore
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 2 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 966..971
                                                src/core/io/decoder.ts on lines 1444..1449

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

                                                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

                                                    if (
                                                      this.serverVersion >= MIN_SERVER_VER.MD_SIZE_MULTIPLIER &&
                                                      this.serverVersion < MIN_SERVER_VER.SIZE_RULES
                                                    ) {
                                                      this.readInt(); // mdSizeMultiplier - not used anymore
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 2 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 966..971
                                                src/core/io/decoder.ts on lines 1043..1048

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

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

                                                    if (version >= 9) {
                                                      exec.evRule = this.readStr();
                                                      exec.evMultiplier = this.readDouble();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 863..866
                                                src/core/io/decoder.ts on lines 1003..1006
                                                src/core/io/decoder.ts on lines 1147..1150
                                                src/core/io/decoder.ts on lines 1464..1467

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

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

                                                    if (version >= 7) {
                                                      contract.multiplier = this.readInt();
                                                      contract.primaryExch = this.readStr();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 4 other locations - About 35 mins to fix
                                                src/core/io/decoder.ts on lines 1003..1006
                                                src/core/io/decoder.ts on lines 1147..1150
                                                src/core/io/decoder.ts on lines 1156..1159
                                                src/core/io/decoder.ts on lines 1464..1467

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

                                                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

                                                  private decodeMsg_OPEN_ORDER_END(): void {
                                                    this.readInt(); // version
                                                
                                                    this.emit(EventName.openOrderEnd);
                                                  }
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 1 other location - About 30 mins to fix
                                                src/core/io/decoder.ts on lines 1890..1894

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

                                                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

                                                  private decodeMsg_POSITION_END(): void {
                                                    this.readInt(); // version
                                                
                                                    this.emit(EventName.positionEnd);
                                                  }
                                                Severity: Minor
                                                Found in src/core/io/decoder.ts and 1 other location - About 30 mins to fix
                                                src/core/io/decoder.ts on lines 1776..1780

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

                                                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

                                                There are no issues that match your filters.

                                                Category
                                                Status