Showing 497 of 497 total issues

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

  getHistoricalTicksLast(
    contract: Contract,
    startDateTime: string,
    endDateTime: string,
    numberOfTicks: number,
Severity: Major
Found in src/api-next/api-next.ts and 1 other location - About 6 hrs to fix
src/api-next/api-next.ts on lines 1932..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 163.

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

  getHistoricalTicksMid(
    contract: Contract,
    startDateTime: string,
    endDateTime: string,
    numberOfTicks: number,
Severity: Major
Found in src/api-next/api-next.ts and 1 other location - About 6 hrs to fix
src/api-next/api-next.ts on lines 2068..2094

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

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 readonly onHistoricalTicksLast = (
    subscriptions: Map<number, IBApiNextSubscription<HistoricalTickLast[]>>,
    reqId: number,
    ticks: HistoricalTickLast[],
    done: boolean,
Severity: Major
Found in src/api-next/api-next.ts and 2 other locations - About 6 hrs to fix
src/api-next/api-next.ts on lines 1893..1918
src/api-next/api-next.ts on lines 1961..1986

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

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 readonly onHistoricalTicksBidAsk = (
    subscriptions: Map<number, IBApiNextSubscription<HistoricalTickBidAsk[]>>,
    reqId: number,
    ticks: HistoricalTickBidAsk[],
    done: boolean,
Severity: Major
Found in src/api-next/api-next.ts and 2 other locations - About 6 hrs to fix
src/api-next/api-next.ts on lines 1893..1918
src/api-next/api-next.ts on lines 2031..2054

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

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 readonly onHistoricalTicks = (
    subscriptions: Map<number, IBApiNextSubscription<HistoricalTick[]>>,
    reqId: number,
    ticks: HistoricalTick[],
    done: boolean,
Severity: Major
Found in src/api-next/api-next.ts and 2 other locations - About 6 hrs to fix
src/api-next/api-next.ts on lines 1961..1986
src/api-next/api-next.ts on lines 2031..2054

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

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

  getCommissionReport(filter: ExecutionFilter): Promise<CommissionReport[]> {
    return lastValueFrom(
      this.subscriptions
        .register<CommissionReport[]>(
          (reqId) => {
Severity: Major
Found in src/api-next/api-next.ts and 1 other location - About 5 hrs to fix
src/api-next/api-next.ts on lines 2967..2985

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

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

  getExecutionDetails(filter: ExecutionFilter): Promise<ExecutionDetail[]> {
    return lastValueFrom(
      this.subscriptions
        .register<ExecutionDetail[]>(
          (reqId) => {
Severity: Major
Found in src/api-next/api-next.ts and 1 other location - About 5 hrs to fix
src/api-next/api-next.ts on lines 2991..3009

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 138.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 138.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 135.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 135.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 134.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 134.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          case IBApiTickType.DELAYED_BID_OPTION:
            ticks.push(
              [
                IBApiNextTickType.DELAYED_BID_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1242..1266
    src/api-next/api-next.ts on lines 1295..1319
    src/api-next/api-next.ts on lines 1320..1347
    src/api-next/api-next.ts on lines 1348..1372
    src/api-next/api-next.ts on lines 1373..1400
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

          case IBApiTickType.DELAYED_LAST_OPTION:
            ticks.push(
              [
                IBApiNextTickType.DELAYED_LAST_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1242..1266
    src/api-next/api-next.ts on lines 1267..1294
    src/api-next/api-next.ts on lines 1295..1319
    src/api-next/api-next.ts on lines 1320..1347
    src/api-next/api-next.ts on lines 1348..1372
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

          case IBApiTickType.LAST_OPTION:
            ticks.push(
              [
                IBApiNextTickType.LAST_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1242..1266
    src/api-next/api-next.ts on lines 1267..1294
    src/api-next/api-next.ts on lines 1295..1319
    src/api-next/api-next.ts on lines 1320..1347
    src/api-next/api-next.ts on lines 1373..1400
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

          case IBApiTickType.ASK_OPTION:
            ticks.push(
              [
                IBApiNextTickType.ASK_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1242..1266
    src/api-next/api-next.ts on lines 1267..1294
    src/api-next/api-next.ts on lines 1320..1347
    src/api-next/api-next.ts on lines 1348..1372
    src/api-next/api-next.ts on lines 1373..1400
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

          case IBApiTickType.DELAYED_ASK_OPTION:
            ticks.push(
              [
                IBApiNextTickType.DELAYED_ASK_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1242..1266
    src/api-next/api-next.ts on lines 1267..1294
    src/api-next/api-next.ts on lines 1295..1319
    src/api-next/api-next.ts on lines 1348..1372
    src/api-next/api-next.ts on lines 1373..1400
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

          case IBApiTickType.BID_OPTION:
            ticks.push(
              [
                IBApiNextTickType.BID_OPTION_IV,
                { value: impliedVolatility, ingressTm: now },
    Severity: Major
    Found in src/api-next/api-next.ts and 7 other locations - About 4 hrs to fix
    src/api-next/api-next.ts on lines 1267..1294
    src/api-next/api-next.ts on lines 1295..1319
    src/api-next/api-next.ts on lines 1320..1347
    src/api-next/api-next.ts on lines 1348..1372
    src/api-next/api-next.ts on lines 1373..1400
    src/api-next/api-next.ts on lines 1401..1428
    src/api-next/api-next.ts on lines 1429..1456

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

    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

    Severity
    Category
    Status
    Source
    Language