src/core/io/decoder.ts

Summary

Maintainability
F
1 mo
Test Coverage

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

import { IneligibilityReason } from "../..";
import { Contract } from "../../api/contract/contract";
import { ContractDescription } from "../../api/contract/contractDescription";
import { ContractDetails } from "../../api/contract/contractDetails";
import { DeltaNeutralContract } from "../../api/contract/deltaNeutralContract";
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 87 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 135 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 decodeMsg_CONTRACT_DATA has a Cognitive Complexity of 28 (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 4 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 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_OPEN_ORDER has 91 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_BOND_CONTRACT_DATA has 81 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_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_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_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_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_BOND_CONTRACT_DATA has a Cognitive Complexity of 16 (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 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_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_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 split =
                                          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 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 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 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 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_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 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 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 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_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 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_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

                                                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

                                                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 2449..2475

                                                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 2418..2444

                                                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 1716..1740

                                                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 1755..1779

                                                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 3244..3257

                                                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 3155..3168

                                                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 2019..2037

                                                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 1202..1220

                                                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 3560..3567

                                                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 3311..3317

                                                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_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 2270..2281

                                                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_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 2114..2126

                                                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 3416..3432

                                                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 3364..3380

                                                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_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 1256..1270

                                                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_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 848..856

                                                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_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 637..644
                                                src/core/io/decoder.ts on lines 1692..1699

                                                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 1692..1699
                                                src/core/io/decoder.ts on lines 1704..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 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_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 637..644
                                                src/core/io/decoder.ts on lines 1704..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 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.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 3228..3237

                                                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.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 3460..3469

                                                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 2817..2823

                                                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 2809..2815

                                                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 (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 3062..3066

                                                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 (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 2956..2960

                                                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.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 3351..3362

                                                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.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 3403..3414

                                                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

                                                  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 2963..2968
                                                src/core/io/decoder.ts on lines 3101..3106
                                                src/core/io/decoder.ts on lines 3213..3218

                                                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 3101..3106
                                                src/core/io/decoder.ts on lines 3213..3218
                                                src/core/io/decoder.ts on lines 3302..3307

                                                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 2963..2968
                                                src/core/io/decoder.ts on lines 3213..3218
                                                src/core/io/decoder.ts on lines 3302..3307

                                                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

                                                  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 2963..2968
                                                src/core/io/decoder.ts on lines 3101..3106
                                                src/core/io/decoder.ts on lines 3302..3307

                                                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_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 1405..1410
                                                src/core/io/decoder.ts on lines 2237..2243
                                                src/core/io/decoder.ts on lines 2550..2556

                                                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 1395..1400
                                                src/core/io/decoder.ts on lines 1405..1410
                                                src/core/io/decoder.ts on lines 2550..2556

                                                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_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 1395..1400
                                                src/core/io/decoder.ts on lines 2237..2243
                                                src/core/io/decoder.ts on lines 2550..2556

                                                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 permId = this.readInt();
                                                    const clientId = this.readDouble();
                                                    const orderId = 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 1395..1400
                                                src/core/io/decoder.ts on lines 1405..1410
                                                src/core/io/decoder.ts on lines 2237..2243

                                                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_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 1285..1291
                                                src/core/io/decoder.ts on lines 1784..1790
                                                src/core/io/decoder.ts on lines 1859..1865
                                                src/core/io/decoder.ts on lines 1963..1969

                                                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 1285..1291
                                                src/core/io/decoder.ts on lines 1784..1790
                                                src/core/io/decoder.ts on lines 1859..1865
                                                src/core/io/decoder.ts on lines 1952..1958

                                                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 1285..1291
                                                src/core/io/decoder.ts on lines 1859..1865
                                                src/core/io/decoder.ts on lines 1952..1958
                                                src/core/io/decoder.ts on lines 1963..1969

                                                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 1285..1291
                                                src/core/io/decoder.ts on lines 1784..1790
                                                src/core/io/decoder.ts on lines 1952..1958
                                                src/core/io/decoder.ts on lines 1963..1969

                                                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_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 1784..1790
                                                src/core/io/decoder.ts on lines 1859..1865
                                                src/core/io/decoder.ts on lines 1952..1958
                                                src/core/io/decoder.ts on lines 1963..1969

                                                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 3 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 2 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1487..1491
                                                src/core/io/decoder.ts on lines 1519..1523

                                                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 3 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 2 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1061..1065
                                                src/core/io/decoder.ts on lines 1487..1491

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

                                                    if (this.serverVersion >= MIN_SERVER_VER.BOND_TRADING_HOURS) {
                                                      contract.timeZoneId = this.readStr();
                                                      contract.tradingHours = this.readStr();
                                                      contract.liquidHours = this.readStr();
                                                    }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 2 other locations - About 1 hr to fix
                                                src/core/io/decoder.ts on lines 1061..1065
                                                src/core/io/decoder.ts on lines 1519..1523

                                                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 2306..2311
                                                src/core/io/decoder.ts on lines 2655..2659
                                                src/core/io/decoder.ts on lines 2664..2668
                                                src/core/io/decoder.ts on lines 2673..2677
                                                src/core/io/decoder.ts on lines 2715..2720

                                                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 2306..2311
                                                src/core/io/decoder.ts on lines 2316..2321
                                                src/core/io/decoder.ts on lines 2655..2659
                                                src/core/io/decoder.ts on lines 2673..2677
                                                src/core/io/decoder.ts on lines 2715..2720

                                                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 2306..2311
                                                src/core/io/decoder.ts on lines 2316..2321
                                                src/core/io/decoder.ts on lines 2664..2668
                                                src/core/io/decoder.ts on lines 2673..2677
                                                src/core/io/decoder.ts on lines 2715..2720

                                                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 2306..2311
                                                src/core/io/decoder.ts on lines 2316..2321
                                                src/core/io/decoder.ts on lines 2655..2659
                                                src/core/io/decoder.ts on lines 2664..2668
                                                src/core/io/decoder.ts on lines 2715..2720

                                                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 2316..2321
                                                src/core/io/decoder.ts on lines 2655..2659
                                                src/core/io/decoder.ts on lines 2664..2668
                                                src/core/io/decoder.ts on lines 2673..2677
                                                src/core/io/decoder.ts on lines 2715..2720

                                                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 2306..2311
                                                src/core/io/decoder.ts on lines 2316..2321
                                                src/core/io/decoder.ts on lines 2655..2659
                                                src/core/io/decoder.ts on lines 2664..2668
                                                src/core/io/decoder.ts on lines 2673..2677

                                                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_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 927..932
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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_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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1795..1800
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014

                                                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 927..932
                                                src/core/io/decoder.ts on lines 937..942
                                                src/core/io/decoder.ts on lines 1275..1280
                                                src/core/io/decoder.ts on lines 1531..1536
                                                src/core/io/decoder.ts on lines 1745..1750
                                                src/core/io/decoder.ts on lines 1814..1819
                                                src/core/io/decoder.ts on lines 1824..1829
                                                src/core/io/decoder.ts on lines 1849..1854
                                                src/core/io/decoder.ts on lines 1942..1947
                                                src/core/io/decoder.ts on lines 2009..2014
                                                src/core/io/decoder.ts on lines 2042..2047

                                                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

                                                  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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                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 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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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

                                                  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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 2907..2911
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3541..3545
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 1023..1029

                                                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 2907..2911
                                                src/core/io/decoder.ts on lines 3472..3476
                                                src/core/io/decoder.ts on lines 3478..3482
                                                src/core/io/decoder.ts on lines 3484..3488
                                                src/core/io/decoder.ts on lines 3490..3494
                                                src/core/io/decoder.ts on lines 3547..3551
                                                src/core/io/decoder.ts on lines 3553..3557

                                                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 1502..1508

                                                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

                                                  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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

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

                                                  readProfessionalCustomer() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.PROFESSIONAL_CUSTOMER) {
                                                      this.order.professionalCustomer = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3570..3574
                                                src/core/io/decoder.ts on lines 3582..3586
                                                src/core/io/decoder.ts on lines 3588..3592

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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

                                                  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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

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

                                                  readIncludeOvernight() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.INCLUDE_OVERNIGHT) {
                                                      this.order.includeOvernight = this.decoder.readBool();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3570..3574
                                                src/core/io/decoder.ts on lines 3576..3580
                                                src/core/io/decoder.ts on lines 3582..3586

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

                                                  readCustomerAccount() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.CUSTOMER_ACCOUNT) {
                                                      this.order.customerAccount = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3576..3580
                                                src/core/io/decoder.ts on lines 3582..3586
                                                src/core/io/decoder.ts on lines 3588..3592

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

                                                  readBondAccruedInterest() {
                                                    if (this.serverVersion >= MIN_SERVER_VER.BOND_ACCRUED_INTEREST) {
                                                      this.order.bondAccruedInterest = this.decoder.readStr();
                                                    }
                                                  }
                                                Severity: Major
                                                Found in src/core/io/decoder.ts and 3 other locations - About 55 mins to fix
                                                src/core/io/decoder.ts on lines 3570..3574
                                                src/core/io/decoder.ts on lines 3576..3580
                                                src/core/io/decoder.ts on lines 3588..3592

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 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 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3039..3043
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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 2849..2853
                                                src/core/io/decoder.ts on lines 2855..2859
                                                src/core/io/decoder.ts on lines 2878..2882
                                                src/core/io/decoder.ts on lines 2884..2888
                                                src/core/io/decoder.ts on lines 2913..2917
                                                src/core/io/decoder.ts on lines 2919..2923
                                                src/core/io/decoder.ts on lines 2931..2935
                                                src/core/io/decoder.ts on lines 2949..2953
                                                src/core/io/decoder.ts on lines 2970..2974
                                                src/core/io/decoder.ts on lines 2985..2989
                                                src/core/io/decoder.ts on lines 2991..2995
                                                src/core/io/decoder.ts on lines 2997..3001
                                                src/core/io/decoder.ts on lines 3003..3007
                                                src/core/io/decoder.ts on lines 3009..3013
                                                src/core/io/decoder.ts on lines 3015..3019
                                                src/core/io/decoder.ts on lines 3021..3025
                                                src/core/io/decoder.ts on lines 3027..3031
                                                src/core/io/decoder.ts on lines 3033..3037
                                                src/core/io/decoder.ts on lines 3207..3211
                                                src/core/io/decoder.ts on lines 3220..3224
                                                src/core/io/decoder.ts on lines 3261..3265

                                                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) {
                                                      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 874..877
                                                src/core/io/decoder.ts on lines 1014..1017
                                                src/core/io/decoder.ts on lines 1170..1173
                                                src/core/io/decoder.ts on lines 1179..1182

                                                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 1014..1017
                                                src/core/io/decoder.ts on lines 1170..1173
                                                src/core/io/decoder.ts on lines 1179..1182
                                                src/core/io/decoder.ts on lines 1493..1496

                                                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 874..877
                                                src/core/io/decoder.ts on lines 1170..1173
                                                src/core/io/decoder.ts on lines 1179..1182
                                                src/core/io/decoder.ts on lines 1493..1496

                                                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 1054..1059
                                                src/core/io/decoder.ts on lines 1467..1472

                                                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 874..877
                                                src/core/io/decoder.ts on lines 1014..1017
                                                src/core/io/decoder.ts on lines 1170..1173
                                                src/core/io/decoder.ts on lines 1493..1496

                                                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 977..982
                                                src/core/io/decoder.ts on lines 1467..1472

                                                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 977..982
                                                src/core/io/decoder.ts on lines 1054..1059

                                                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) {
                                                      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 874..877
                                                src/core/io/decoder.ts on lines 1014..1017
                                                src/core/io/decoder.ts on lines 1179..1182
                                                src/core/io/decoder.ts on lines 1493..1496

                                                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_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 1805..1809

                                                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_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 1919..1923

                                                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