prebid/Prebid.js

View on GitHub
modules/goldbachBidAdapter.js

Summary

Maintainability
F
1 mo
Test Coverage

File goldbachBidAdapter.js has 924 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {Renderer} from '../src/Renderer.js';
import {
  createTrackPixelHtml,
  deepAccess,
  deepClone,
Severity: Major
Found in modules/goldbachBidAdapter.js - About 2 days to fix

    Function buildRequests has 149 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      buildRequests: function (bidRequests, bidderRequest) {
        // convert Native ORTB definition to old-style prebid native definition
        bidRequests = convertOrtbRequestToProprietaryNative(bidRequests);
    
        let localBidRequests = [];
    Severity: Major
    Found in modules/goldbachBidAdapter.js - About 5 hrs to fix

      Function bidToTag has 144 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function bidToTag(bid) {
        const tag = {};
        tag.sizes = transformSizes(bid.sizes);
        tag.primary_size = tag.sizes[0];
        tag.ad_types = [];
      Severity: Major
      Found in modules/goldbachBidAdapter.js - About 5 hrs to fix

        Function bidToTag has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
        Open

        function bidToTag(bid) {
          const tag = {};
          tag.sizes = transformSizes(bid.sizes);
          tag.primary_size = tag.sizes[0];
          tag.ad_types = [];
        Severity: Minor
        Found in modules/goldbachBidAdapter.js - About 5 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 newBid has 119 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function newBid(serverBid, rtbBid, bidderRequest) {
          const bidRequest = getBidRequest(serverBid.uuid, [bidderRequest]);
          const bid = {
            requestId: serverBid.uuid,
            cpm: rtbBid.cpm,
        Severity: Major
        Found in modules/goldbachBidAdapter.js - About 4 hrs to fix

          Function reloadViewabilityScriptWithCorrectParameters has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          function reloadViewabilityScriptWithCorrectParameters(bid) {
            let viewJsPayload = getAppnexusViewabilityScriptFromJsTrackers(bid.native.javascriptTrackers);
          
            if (viewJsPayload) {
              let prebidParams = 'pbjs_adid=' + bid.adId + ';pbjs_auc=' + bid.adUnitCode;
          Severity: Minor
          Found in modules/goldbachBidAdapter.js - 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 newBid has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

          function newBid(serverBid, rtbBid, bidderRequest) {
            const bidRequest = getBidRequest(serverBid.uuid, [bidderRequest]);
            const bid = {
              requestId: serverBid.uuid,
              cpm: rtbBid.cpm,
          Severity: Minor
          Found in modules/goldbachBidAdapter.js - 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 buildRequests has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

            buildRequests: function (bidRequests, bidderRequest) {
              // convert Native ORTB definition to old-style prebid native definition
              bidRequests = convertOrtbRequestToProprietaryNative(bidRequests);
          
              let localBidRequests = [];
          Severity: Minor
          Found in modules/goldbachBidAdapter.js - 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 formatRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function formatRequest(payload, bidderRequest) {
            let request = [];
            let options = {
              withCredentials: true
            };
          Severity: Minor
          Found in modules/goldbachBidAdapter.js - About 1 hr to fix

            Function parseAndMapCpm has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              parseAndMapCpm: function(serverResponse) {
                const responseBody = serverResponse.body;
                if (Array.isArray(responseBody) && responseBody.length) {
                  let localData = {};
                  responseBody.forEach(cpmPerSize => {
            Severity: Minor
            Found in modules/goldbachBidAdapter.js - About 1 hr to fix

              Function reloadViewabilityScriptWithCorrectParameters has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function reloadViewabilityScriptWithCorrectParameters(bid) {
                let viewJsPayload = getAppnexusViewabilityScriptFromJsTrackers(bid.native.javascriptTrackers);
              
                if (viewJsPayload) {
                  let prebidParams = 'pbjs_adid=' + bid.adId + ';pbjs_auc=' + bid.adUnitCode;
              Severity: Minor
              Found in modules/goldbachBidAdapter.js - About 1 hr to fix

                Avoid deeply nested control flow statements.
                Open

                                if (localPriceMapping[size]) {
                                  ad.cpm = localPriceMapping[size];
                                } else {
                                  ad.cpm = localPriceMapping['0x0'];
                                }
                Severity: Major
                Found in modules/goldbachBidAdapter.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if (currentScript.getAttribute('data-src') == jsTrackerSrc) {
                                currentScript.setAttribute('src', newJsTrackerSrc);
                                currentScript.setAttribute('data-src', '');
                                if (currentScript.removeAttribute) {
                                  currentScript.removeAttribute('data-src');
                  Severity: Major
                  Found in modules/goldbachBidAdapter.js - About 45 mins to fix

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

                    function getAppnexusViewabilityScriptFromJsTrackers(jsTrackerArray) {
                      let viewJsPayload;
                      if (isStr(jsTrackerArray) && strIsAppnexusViewabilityScript(jsTrackerArray)) {
                        viewJsPayload = jsTrackerArray;
                      } else if (isArray(jsTrackerArray)) {
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js - 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 parseAndMapCpm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                      parseAndMapCpm: function(serverResponse) {
                        const responseBody = serverResponse.body;
                        if (Array.isArray(responseBody) && responseBody.length) {
                          let localData = {};
                          responseBody.forEach(cpmPerSize => {
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js - 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

                      if (rtbBid.rtb.video) {
                        // shared video properties used for all 3 contexts
                        Object.assign(bid, {
                          width: rtbBid.rtb.video.player_width,
                          height: rtbBid.rtb.video.player_height,
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 2 days to fix
                    modules/mediafuseBidAdapter.js on lines 601..708

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

                    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 (videoMediaType) {
                        tag.video = tag.video || {};
                        Object.keys(videoMediaType)
                          .filter(param => includes(VIDEO_RTB_TARGETING, param))
                          .forEach(param => {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 2 days to fix
                    modules/mediafuseBidAdapter.js on lines 820..862

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                      } else if (rtbBid.rtb[NATIVE]) {
                        const nativeAd = rtbBid.rtb[NATIVE];
                    
                        // setting up the jsTracker:
                        // we put it as a data-src attribute so that the tracker isn't called
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 2 days to fix
                    modules/adrelevantisBidAdapter.js on lines 355..420
                    modules/mediafuseBidAdapter.js on lines 639..708

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

                    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

                    function reloadViewabilityScriptWithCorrectParameters(bid) {
                      let viewJsPayload = getAppnexusViewabilityScriptFromJsTrackers(bid.native.javascriptTrackers);
                    
                      if (viewJsPayload) {
                        let prebidParams = 'pbjs_adid=' + bid.adId + ';pbjs_auc=' + bid.adUnitCode;
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 2 days to fix
                    modules/mediafuseBidAdapter.js on lines 390..439

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

                    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

                    function buildNativeRequest(params) {
                      const request = {};
                    
                      // map standard prebid native asset identifier to /ut parameters
                      // e.g., tag specifies `body` but /ut only knows `description`.
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 day to fix
                    modules/appnexusBidAdapter.js on lines 1148..1182
                    modules/mediafuseBidAdapter.js on lines 1004..1038

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function formatRequest(payload, bidderRequest) {
                      let request = [];
                      let options = {
                        withCredentials: true
                      };
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 day to fix
                    modules/appnexusBidAdapter.js on lines 512..556
                    modules/mediafuseBidAdapter.js on lines 475..519

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

                    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 (bid.params.video) {
                        tag.video = {};
                        // place any valid video params on the tag
                        Object.keys(bid.params.video)
                          .filter(param => includes(VIDEO_TARGETING, param))
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 day to fix
                    modules/appnexusBidAdapter.js on lines 870..894
                    modules/mediafuseBidAdapter.js on lines 793..817

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function createAdPodRequest(tags, adPodBid) {
                      const { durationRangeSec, requireExactDuration } = adPodBid.mediaTypes.video;
                    
                      const numberOfPlacements = getAdPodPlacementNumber(adPodBid.mediaTypes.video);
                      const maxDuration = Math.max(...durationRangeSec);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 day to fix
                    modules/appnexusBidAdapter.js on lines 1101..1127
                    modules/mediafuseBidAdapter.js on lines 957..983

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                        if (userObjBid) {
                          Object.keys(userObjBid.params.user)
                            .filter(param => includes(USER_PARAMS, param))
                            .forEach((param) => {
                              let uparam = convertCamelToUnderscore(param);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 1 day to fix
                    modules/appnexusBidAdapter.js on lines 156..175
                    modules/mediafuseBidAdapter.js on lines 126..145
                    modules/pixfutureBidAdapter.js on lines 56..75

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                    function transformSizes(requestSizes) {
                      let sizes = [];
                      let sizeObj = {};
                    
                      if (isArray(requestSizes) && requestSizes.length === 2 &&
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 1 day to fix
                    modules/adrelevantisBidAdapter.js on lines 522..542
                    modules/appnexusBidAdapter.js on lines 975..995
                    modules/mediafuseBidAdapter.js on lines 884..904
                    modules/winrBidAdapter.js on lines 508..531

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

                    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

                    function newRenderer(adUnitCode, rtbBid, rendererOptions = {}) {
                      const renderer = Renderer.install({
                        id: rtbBid.renderer_id,
                        url: rtbBid.renderer_url,
                        config: rendererOptions,
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 7 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 244..268
                    modules/appnexusBidAdapter.js on lines 558..582
                    modules/mediafuseBidAdapter.js on lines 521..545

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        if (bidderRequest && bidderRequest.gdprConsent) {
                          // note - objects for impbus use underscore instead of camelCase
                          payload.gdpr_consent = {
                            consent_string: bidderRequest.gdprConsent.consentString,
                            consent_required: bidderRequest.gdprConsent.gdprApplies
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 7 hrs to fix
                    modules/appnexusBidAdapter.js on lines 283..296
                    modules/mediafuseBidAdapter.js on lines 235..248

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

                    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

                      transformBidParams: function (params, isOpenRtb) {
                        params = convertTypes({
                          'member': 'string',
                          'invCode': 'string',
                          'placementId': 'number',
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 7 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 354..377

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                    function outstreamRender(bid) {
                      hidedfpContainer(bid.adUnitCode);
                      hideSASIframe(bid.adUnitCode);
                      // push to render queue because ANOutstreamVideo may not be loaded yet
                      bid.renderer.push(() => {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 6 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 1063..1077

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        if (bidRequests[0].userId) {
                          let eids = [];
                    
                          addUserId(eids, deepAccess(bidRequests[0], `userId.criteoId`), 'criteo.com', null);
                          addUserId(eids, deepAccess(bidRequests[0], `userId.netId`), 'netid.de', null);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 6 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 275..287
                    modules/winrBidAdapter.js on lines 246..258

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function hasOmidSupport(bid) {
                      let hasOmid = false;
                      const bidderParams = bid.params;
                      const videoParams = bid.params.video;
                      if (bidderParams.frameworks && isArray(bidderParams.frameworks)) {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 5 hrs to fix
                    modules/appnexusBidAdapter.js on lines 1083..1094
                    modules/mediafuseBidAdapter.js on lines 939..950

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                      if (bid.mediaType === NATIVE || deepAccess(bid, `mediaTypes.${NATIVE}`)) {
                        tag.ad_types.push(NATIVE);
                        if (tag.sizes.length === 0) {
                          tag.sizes = transformSizes([1, 1]);
                        }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 4 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 474..484
                    modules/mediafuseBidAdapter.js on lines 764..774

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

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

                    function getBidFloor(bid) {
                      if (!isFn(bid.getFloor)) {
                        return (bid.params.reserve) ? bid.params.reserve : null;
                      }
                    
                    
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 10 other locations - About 4 hrs to fix
                    modules/brightcomBidAdapter.js on lines 287..301
                    modules/brightcomSSPBidAdapter.js on lines 307..319
                    modules/mediafuseBidAdapter.js on lines 1105..1119
                    modules/nextrollBidAdapter.js on lines 197..212
                    modules/omsBidAdapter.js on lines 269..281
                    modules/onomagicBidAdapter.js on lines 260..274
                    modules/pixfutureBidAdapter.js on lines 342..356
                    modules/proxistoreBidAdapter.js on lines 161..175
                    modules/pstudioBidAdapter.js on lines 419..433
                    modules/winrBidAdapter.js on lines 577..591

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                        if (serverResponse.tags) {
                          serverResponse.tags.forEach(serverBid => {
                            const rtbBid = getRtbBid(serverBid);
                            if (rtbBid) {
                              if (rtbBid.cpm !== 0 && includes(this.supportedMediaTypes, rtbBid.ad_type)) {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 4 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 176..187
                    modules/craftBidAdapter.js on lines 86..97
                    modules/winrBidAdapter.js on lines 286..300

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

                    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 (bidderRequest && bidderRequest.refererInfo) {
                          let refererinfo = {
                            // TODO: this collects everything it finds, except for topmostLocation
                            rd_ref: encodeURIComponent(bidderRequest.refererInfo.topmostLocation),
                            rd_top: bidderRequest.refererInfo.reachedTop,
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 4 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 137..146
                    modules/mediafuseBidAdapter.js on lines 254..263
                    modules/pixfutureBidAdapter.js on lines 93..102
                    modules/winrBidAdapter.js on lines 233..244

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

                    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

                    function getAppnexusViewabilityScriptFromJsTrackers(jsTrackerArray) {
                      let viewJsPayload;
                      if (isStr(jsTrackerArray) && strIsAppnexusViewabilityScript(jsTrackerArray)) {
                        viewJsPayload = jsTrackerArray;
                      } else if (isArray(jsTrackerArray)) {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 3 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 451..464

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function hideSASIframe(elementId) {
                      try {
                        // find script tag with id 'sas_script'. This ensures it only works if you're using Smart Ad Server.
                        const el = document.getElementById(elementId).querySelectorAll("script[id^='sas_script']");
                        if (el[0].nextSibling && el[0].nextSibling.localName === 'iframe') {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 3 hrs to fix
                    modules/appnexusBidAdapter.js on lines 1199..1209
                    modules/mediafuseBidAdapter.js on lines 1051..1061

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

                    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

                    function strIsAppnexusViewabilityScript(str) {
                      let regexMatchUrlStart = str.match(VIEWABILITY_URL_START);
                      let viewUrlStartInStr = regexMatchUrlStart != null && regexMatchUrlStart.length >= 1;
                    
                      let regexMatchFileName = str.match(VIEWABILITY_FILE_NAME);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 3 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 441..449

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                        if (appDeviceObjBid && appDeviceObjBid.params && appDeviceObjBid.params.app) {
                          appDeviceObj = {};
                          Object.keys(appDeviceObjBid.params.app)
                            .filter(param => includes(APP_DEVICE_PARAMS, param))
                            .forEach(param => appDeviceObj[param] = appDeviceObjBid.params.app[param]);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 3 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 98..103
                    modules/appnexusBidAdapter.js on lines 179..184
                    modules/mediafuseBidAdapter.js on lines 149..154
                    modules/winrBidAdapter.js on lines 181..186

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

                    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

                      const bid = {
                        requestId: serverBid.uuid,
                        cpm: rtbBid.cpm,
                        creativeId: rtbBid.creative_id,
                        dealId: rtbBid.deal_id,
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 3 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 556..570

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        if (hasAdPodBid) {
                          bidRequests.filter(hasAdPod).forEach(adPodBid => {
                            const adPodTags = createAdPodRequest(tags, adPodBid);
                            // don't need the original adpod placement because it's in adPodTags
                            const nonPodTags = payload.tags.filter(tag => tag.uuid !== adPodBid.bidId);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 3 hrs to fix
                    modules/appnexusBidAdapter.js on lines 331..338
                    modules/mediafuseBidAdapter.js on lines 266..273

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                          debugText = debugText
                            .replace(/(<td>|<th>)/gm, '\t') // Tables
                            .replace(/(<\/td>|<\/th>)/gm, '\n') // Tables
                            .replace(/^<br>/gm, '') // Remove leading <br>
                            .replace(/(<br>\n|<br>)/gm, '\n') // <br>
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 3 hrs to fix
                    modules/appnexusBidAdapter.js on lines 425..432

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

                    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

                    function getAdPodPlacementNumber(videoParams) {
                      const { adPodDurationSec, durationRangeSec, requireExactDuration } = videoParams;
                      const minAllowedDuration = Math.min(...durationRangeSec);
                      const numberOfPlacements = Math.floor(adPodDurationSec / minAllowedDuration);
                    
                    
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 2 hrs to fix
                    modules/appnexusBidAdapter.js on lines 1129..1137
                    modules/mediafuseBidAdapter.js on lines 985..993
                    modules/smaatoBidAdapter.js on lines 440..448

                    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

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    const NATIVE_MAPPING = {
                      body: 'description',
                      body2: 'desc2',
                      cta: 'ctatext',
                      image: {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 2 hrs to fix
                    modules/adrelevantisBidAdapter.js on lines 40..56
                    modules/appnexusBidAdapter.js on lines 83..99
                    modules/mediafuseBidAdapter.js on lines 71..87

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    function addUserId(eids, id, source, rti) {
                      if (id) {
                        if (rti) {
                          eids.push({ source, id, rti_partner: rti });
                        } else {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 2 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 1094..1103
                    modules/pixfutureBidAdapter.js on lines 305..314
                    modules/winrBidAdapter.js on lines 566..575

                    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

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

                    const VIDEO_MAPPING = {
                      playback_method: {
                        'unknown': 0,
                        'auto_play_sound_on': 1,
                        'auto_play_sound_off': 2,
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 2 hrs to fix
                    modules/mediafuseBidAdapter.js on lines 53..70

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        if (debugObj && debugObj.enabled) {
                          Object.keys(debugObj)
                            .filter(param => includes(DEBUG_PARAMS, param))
                            .forEach(param => {
                              debugObjParams[param] = debugObj[param];
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 hr to fix
                    modules/appnexusBidAdapter.js on lines 224..230
                    modules/mediafuseBidAdapter.js on lines 182..188

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                    function getViewabilityScriptUrlFromPayload(viewJsPayload) {
                      // extracting the content of the src attribute
                      // -> substring between src=" and "
                      let indexOfFirstQuote = viewJsPayload.indexOf('src="') + 5; // offset of 5: the length of 'src=' + 1
                      let indexOfSecondQuote = viewJsPayload.indexOf('"', indexOfFirstQuote);
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 1 hr to fix
                    modules/mediafuseBidAdapter.js on lines 466..473

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                        if (appIdObjBid && appIdObjBid.params && appDeviceObjBid.params.app && appDeviceObjBid.params.app.id) {
                          appIdObj = {
                            appid: appIdObjBid.params.app.id
                          };
                        }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 1 hr to fix
                    modules/adrelevantisBidAdapter.js on lines 107..111
                    modules/appnexusBidAdapter.js on lines 188..192
                    modules/mediafuseBidAdapter.js on lines 158..162
                    modules/winrBidAdapter.js on lines 190..194

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                    function hasAppId(bid) {
                      if (bid.params && bid.params.app) {
                        return !!bid.params.app.id
                      }
                      return !!bid.params.app
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 1 hr to fix
                    modules/adrelevantisBidAdapter.js on lines 554..559
                    modules/appnexusBidAdapter.js on lines 1064..1069
                    modules/mediafuseBidAdapter.js on lines 920..925
                    modules/winrBidAdapter.js on lines 547..552

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

                    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

                    function hidedfpContainer(elementId) {
                      var el = document.getElementById(elementId).querySelectorAll("div[id^='google_ads']");
                      if (el[0]) {
                        el[0].style.setProperty('display', 'none');
                      }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 1 hr to fix
                    modules/adrelevantisBidAdapter.js on lines 274..279
                    modules/mediafuseBidAdapter.js on lines 1044..1049

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                      if (bid.params.placementId) {
                        tag.id = parseInt(bid.params.placementId, 10);
                      } else {
                        tag.code = bid.params.invCode;
                      }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 3 other locations - About 1 hr to fix
                    modules/mediafuseBidAdapter.js on lines 719..723
                    modules/pixfutureBidAdapter.js on lines 234..238
                    modules/winrBidAdapter.js on lines 463..467

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                    function parseMediaType(rtbBid) {
                      const adType = rtbBid.ad_type;
                      if (adType === VIDEO) {
                        return VIDEO;
                      } else if (adType === NATIVE) {
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 4 other locations - About 1 hr to fix
                    modules/adrelevantisBidAdapter.js on lines 601..610
                    modules/appnexusBidAdapter.js on lines 1232..1241
                    modules/craftBidAdapter.js on lines 202..211
                    modules/mediafuseBidAdapter.js on lines 1083..1092

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                      getUserSyncs: function (syncOptions, responses, gdprConsent) {
                        if (syncOptions.iframeEnabled && hasPurpose1Consent({gdprConsent})) {
                          return [{
                            type: 'iframe',
                            url: 'https://acdn.adnxs.com/dmp/async_usersync.html'
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 55 mins to fix
                    modules/mediafuseBidAdapter.js on lines 345..352

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 7 locations. Consider refactoring.
                    Open

                    function getRtbBid(tag) {
                      return tag && tag.ads && tag.ads.length && find(tag.ads, ad => ad.rtb);
                    }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 6 other locations - About 55 mins to fix
                    modules/adrelevantisBidAdapter.js on lines 561..563
                    modules/appnexusBidAdapter.js on lines 1144..1146
                    modules/craftBidAdapter.js on lines 198..200
                    modules/mediafuseBidAdapter.js on lines 1000..1002
                    modules/targetVideoBidAdapter.js on lines 192..194
                    modules/winrBidAdapter.js on lines 554..556

                    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

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function setVideoProperty(tag, key, value) {
                      if (isEmpty(tag.video)) { tag.video = {}; }
                      tag.video[key] = value;
                    }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 55 mins to fix
                    modules/appnexusBidAdapter.js on lines 1139..1142
                    modules/mediafuseBidAdapter.js on lines 995..998

                    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

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

                      if (bid.params.position) {
                        tag.position = { 'above': 1, 'below': 2 }[bid.params.position] || 0;
                      }
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 55 mins to fix
                    modules/mediafuseBidAdapter.js on lines 732..734

                    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

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

                          if (rtbBid.rtb.trackers) {
                            const url = rtbBid.rtb.trackers[0].impression_urls[0];
                            const tracker = createTrackPixelHtml(url);
                            bid.ad += tracker;
                          }
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 50 mins to fix
                    modules/adrelevantisBidAdapter.js on lines 413..417

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

                    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

                      isBidRequestValid: function (bid) {
                        return !!(bid.params.placementId || (bid.params.member && bid.params.invCode));
                      },
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 1 other location - About 50 mins to fix
                    modules/mediafuseBidAdapter.js on lines 107..109

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                      if (bid.params.frameworks && isArray(bid.params.frameworks)) {
                        tag['banner_frameworks'] = bid.params.frameworks;
                      }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 45 mins to fix
                    modules/appnexusBidAdapter.js on lines 959..961
                    modules/mediafuseBidAdapter.js on lines 868..870

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

                    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

                    function hasAdPod(bid) {
                      return (
                        bid.mediaTypes &&
                        bid.mediaTypes.video &&
                        bid.mediaTypes.video.context === ADPOD
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 40 mins to fix
                    modules/appnexusBidAdapter.js on lines 1075..1081
                    modules/mediafuseBidAdapter.js on lines 931..937

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

                    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

                      if (rtbBid.advertiser_id) {
                        bid.meta = Object.assign({}, bid.meta, { advertiserId: rtbBid.advertiser_id });
                      }
                    Severity: Major
                    Found in modules/goldbachBidAdapter.js and 5 other locations - About 35 mins to fix
                    modules/adrelevantisBidAdapter.js on lines 325..327
                    modules/appnexusBidAdapter.js on lines 615..617
                    modules/appnexusBidAdapter.js on lines 639..641
                    modules/mediafuseBidAdapter.js on lines 597..599
                    modules/winrBidAdapter.js on lines 421..425

                    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

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                      if (rtbBid.adomain) {
                        bid.meta = Object.assign({}, bid.meta, { advertiserDomains: [] });
                      }
                    Severity: Minor
                    Found in modules/goldbachBidAdapter.js and 2 other locations - About 35 mins to fix
                    modules/mediafuseBidAdapter.js on lines 573..575
                    modules/winrBidAdapter.js on lines 417..419

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

                    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