prebid/Prebid.js

View on GitHub
modules/ixBidAdapter.js

Summary

Maintainability
F
3 wks
Test Coverage

File ixBidAdapter.js has 1492 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  contains,
  deepAccess,
  deepClone,
  deepSetValue,
Severity: Major
Found in modules/ixBidAdapter.js - About 3 days to fix

    Function addImpressions has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

    function addImpressions(impressions, impKeys, r, adUnitIndex) {
      const adUnitImpressions = impressions[impKeys[adUnitIndex]];
      const { missingImps: missingBannerImpressions = [], ixImps = [] } = adUnitImpressions;
      const sourceImpressions = { ixImps, missingBannerImpressions };
      const impressionObjects = Object.keys(sourceImpressions)
    Severity: Minor
    Found in modules/ixBidAdapter.js - About 1 day 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 addImpressions has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function addImpressions(impressions, impKeys, r, adUnitIndex) {
      const adUnitImpressions = impressions[impKeys[adUnitIndex]];
      const { missingImps: missingBannerImpressions = [], ixImps = [] } = adUnitImpressions;
      const sourceImpressions = { ixImps, missingBannerImpressions };
      const impressionObjects = Object.keys(sourceImpressions)
    Severity: Major
    Found in modules/ixBidAdapter.js - About 4 hrs to fix

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

      function parseBid(rawBid, currency, bidRequest) {
        const bid = {};
        const isValidExpiry = !!((deepAccess(rawBid, 'exp') && isInteger(rawBid.exp)));
        const dealID = deepAccess(rawBid, 'dealid') || deepAccess(rawBid, 'ext.dealid');
      
      
      Severity: Minor
      Found in modules/ixBidAdapter.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 interpretResponse has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

        interpretResponse: function (serverResponse, bidderRequest) {
          const bids = [];
          let bid = null;
      
          // Extract the FLEDGE auction configuration list from the response
      Severity: Minor
      Found in modules/ixBidAdapter.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 applyRegulations has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

      function applyRegulations(r, bidderRequest) {
        // Apply GDPR information to the request if GDPR is enabled.
        if (bidderRequest) {
          if (bidderRequest.gdprConsent) {
            gdprConsent = bidderRequest.gdprConsent;
      Severity: Minor
      Found in modules/ixBidAdapter.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 isBidRequestValid has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

        isBidRequestValid: function (bid) {
          const paramsVideoRef = deepAccess(bid, 'params.video');
          const paramsSize = deepAccess(bid, 'params.size');
          const mediaTypeBannerSizes = deepAccess(bid, 'mediaTypes.banner.sizes');
          const mediaTypeVideoRef = deepAccess(bid, 'mediaTypes.video');
      Severity: Minor
      Found in modules/ixBidAdapter.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 23 (exceeds 5 allowed). Consider refactoring.
      Open

        buildRequests: function (validBidRequests, bidderRequest) {
          const reqs = []; // Stores banner + video requests
          const bannerImps = {}; // Stores created banner impressions
          const videoImps = {}; // Stores created video impressions
          const nativeImps = {}; // Stores created native impressions
      Severity: Minor
      Found in modules/ixBidAdapter.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 buildRequest has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      function buildRequest(validBidRequests, bidderRequest, impressions, version) {
        // Always use secure HTTPS protocol.
        let baseUrl = SECURE_BID_URL;
        // Get ids from Prebid User ID Modules
        let eidInfo = getEidInfo(deepAccess(validBidRequests, '0.userIdAsEids'));
      Severity: Minor
      Found in modules/ixBidAdapter.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 bidToVideoImp has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      export function bidToVideoImp(bid) {
        const imp = bidToImp(bid, VIDEO);
        const videoAdUnitRef = deepAccess(bid, 'mediaTypes.video');
        const videoParamRef = deepAccess(bid, 'params.video');
        const videoParamErrors = checkVideoParams(videoAdUnitRef, videoParamRef);
      Severity: Minor
      Found in modules/ixBidAdapter.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 buildIXDiag has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

      function buildIXDiag(validBidRequests, fledgeEnabled) {
        var adUnitMap = validBidRequests
          .map(bidRequest => bidRequest.adUnitCode)
          .filter((value, index, arr) => arr.indexOf(value) === index);
      
      
      Severity: Minor
      Found in modules/ixBidAdapter.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 addFPD has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

      function addFPD(bidderRequest, r, fpd, site, user) {
        r.ext.ixdiag.fpd = true;
      
        Object.keys(site).forEach(key => {
          if (FIRST_PARTY_DATA.SITE.indexOf(key) === -1) {
      Severity: Minor
      Found in modules/ixBidAdapter.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function buildRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function buildRequest(validBidRequests, bidderRequest, impressions, version) {
        // Always use secure HTTPS protocol.
        let baseUrl = SECURE_BID_URL;
        // Get ids from Prebid User ID Modules
        let eidInfo = getEidInfo(deepAccess(validBidRequests, '0.userIdAsEids'));
      Severity: Major
      Found in modules/ixBidAdapter.js - About 2 hrs to fix

        Function setDisplayManager has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

        function setDisplayManager(imp, bid) {
          if (deepAccess(bid, 'mediaTypes.video.context') === OUTSTREAM) {
            let renderer = deepAccess(bid, 'mediaTypes.video.renderer');
            if (!renderer) {
              renderer = deepAccess(bid, 'renderer');
        Severity: Minor
        Found in modules/ixBidAdapter.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

          isBidRequestValid: function (bid) {
            const paramsVideoRef = deepAccess(bid, 'params.video');
            const paramsSize = deepAccess(bid, 'params.size');
            const mediaTypeBannerSizes = deepAccess(bid, 'mediaTypes.banner.sizes');
            const mediaTypeVideoRef = deepAccess(bid, 'mediaTypes.video');
        Severity: Major
        Found in modules/ixBidAdapter.js - About 2 hrs to fix

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

            buildRequests: function (validBidRequests, bidderRequest) {
              const reqs = []; // Stores banner + video requests
              const bannerImps = {}; // Stores created banner impressions
              const videoImps = {}; // Stores created video impressions
              const nativeImps = {}; // Stores created native impressions
          Severity: Major
          Found in modules/ixBidAdapter.js - About 2 hrs to fix

            Function parseBid has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function parseBid(rawBid, currency, bidRequest) {
              const bid = {};
              const isValidExpiry = !!((deepAccess(rawBid, 'exp') && isInteger(rawBid.exp)));
              const dealID = deepAccess(rawBid, 'dealid') || deepAccess(rawBid, 'ext.dealid');
            
            
            Severity: Major
            Found in modules/ixBidAdapter.js - About 2 hrs to fix

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

                interpretResponse: function (serverResponse, bidderRequest) {
                  const bids = [];
                  let bid = null;
              
                  // Extract the FLEDGE auction configuration list from the response
              Severity: Major
              Found in modules/ixBidAdapter.js - About 2 hrs to fix

                Function getUserSyncs has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                  getUserSyncs: function (syncOptions, serverResponses) {
                    const syncs = [];
                    let publisherSyncsPerBidderOverride = null;
                    if (serverResponses.length > 0) {
                      publisherSyncsPerBidderOverride = deepAccess(serverResponses[0], 'body.ext.publishersyncsperbidderoverride');
                Severity: Minor
                Found in modules/ixBidAdapter.js - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function bidToVideoImp has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function bidToVideoImp(bid) {
                  const imp = bidToImp(bid, VIDEO);
                  const videoAdUnitRef = deepAccess(bid, 'mediaTypes.video');
                  const videoParamRef = deepAccess(bid, 'params.video');
                  const videoParamErrors = checkVideoParams(videoAdUnitRef, videoParamRef);
                Severity: Major
                Found in modules/ixBidAdapter.js - About 2 hrs to fix

                  Function getEidInfo has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function getEidInfo(allEids) {
                    let toSend = [];
                    let seenSources = {};
                    if (isArray(allEids)) {
                      for (const eid of allEids) {
                  Severity: Minor
                  Found in modules/ixBidAdapter.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function createBannerImps has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function createBannerImps(validBidRequest, missingBannerSizes, bannerImps, bidderRequest) {
                    let imp = bidToBannerImp(validBidRequest);
                  
                    const bannerSizeDefined = includesSize(deepAccess(validBidRequest, 'mediaTypes.banner.sizes'), deepAccess(validBidRequest, 'params.size'));
                  
                  
                  Severity: Minor
                  Found in modules/ixBidAdapter.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

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

                  function addFPD(bidderRequest, r, fpd, site, user) {
                    r.ext.ixdiag.fpd = true;
                  
                    Object.keys(site).forEach(key => {
                      if (FIRST_PARTY_DATA.SITE.indexOf(key) === -1) {
                  Severity: Minor
                  Found in modules/ixBidAdapter.js - About 1 hr to fix

                    Function _applyFloor has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function _applyFloor(bid, imp, mediaType) {
                      let adapterFloor = null;
                      let moduleFloor = null;
                    
                      if (bid.params.bidFloor && bid.params.bidFloorCur) {
                    Severity: Minor
                    Found in modules/ixBidAdapter.js - About 1 hr to fix

                      Function buildIXDiag has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function buildIXDiag(validBidRequests, fledgeEnabled) {
                        var adUnitMap = validBidRequests
                          .map(bidRequest => bidRequest.adUnitCode)
                          .filter((value, index, arr) => arr.indexOf(value) === index);
                      
                      
                      Severity: Minor
                      Found in modules/ixBidAdapter.js - About 1 hr to fix

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

                        function _applyFloor(bid, imp, mediaType) {
                          let adapterFloor = null;
                          let moduleFloor = null;
                        
                          if (bid.params.bidFloor && bid.params.bidFloorCur) {
                        Severity: Minor
                        Found in modules/ixBidAdapter.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function createBannerImps has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function createBannerImps(validBidRequest, missingBannerSizes, bannerImps, bidderRequest) {
                          let imp = bidToBannerImp(validBidRequest);
                        
                          const bannerSizeDefined = includesSize(deepAccess(validBidRequest, 'mediaTypes.banner.sizes'), deepAccess(validBidRequest, 'params.size'));
                        
                        
                        Severity: Minor
                        Found in modules/ixBidAdapter.js - About 1 hr to fix

                          Function addRTI has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function addRTI(userEids, eidInfo) {
                            let identityInfo = window.headertag.getIdentityInfo();
                            if (identityInfo && typeof identityInfo === 'object') {
                              for (const partnerName in identityInfo) {
                                if (userEids.length >= MAX_EID_SOURCES) {
                          Severity: Minor
                          Found in modules/ixBidAdapter.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          function applyRegulations(r, bidderRequest) {
                            // Apply GDPR information to the request if GDPR is enabled.
                            if (bidderRequest) {
                              if (bidderRequest.gdprConsent) {
                                gdprConsent = bidderRequest.gdprConsent;
                          Severity: Minor
                          Found in modules/ixBidAdapter.js - About 1 hr to fix

                            Function deduplicateImpExtFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function deduplicateImpExtFields(r) {
                              r.imp.forEach((imp, index) => {
                                const impExt = imp.ext;
                                if (impExt == undefined) {
                                  return r;
                            Severity: Minor
                            Found in modules/ixBidAdapter.js - About 1 hr to fix

                              Function removeSiteIDs has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function removeSiteIDs(r) {
                                r.imp.forEach((imp, index) => {
                                  const impExt = imp.ext;
                                  if (impExt == undefined) {
                                    return r;
                              Severity: Minor
                              Found in modules/ixBidAdapter.js - About 1 hr to fix

                                Function getUserSyncs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  getUserSyncs: function (syncOptions, serverResponses) {
                                    const syncs = [];
                                    let publisherSyncsPerBidderOverride = null;
                                    if (serverResponses.length > 0) {
                                      publisherSyncsPerBidderOverride = deepAccess(serverResponses[0], 'body.ext.publishersyncsperbidderoverride');
                                Severity: Minor
                                Found in modules/ixBidAdapter.js - About 1 hr to fix

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

                                  function bidToImp(bid, mediaType) {
                                    const imp = {};
                                  
                                    imp.id = bid.bidId;
                                  
                                  
                                  Severity: Minor
                                  Found in modules/ixBidAdapter.js - About 1 hr to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

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

                                  function bidToImp(bid, mediaType) {
                                    const imp = {};
                                  
                                    imp.id = bid.bidId;
                                  
                                  
                                  Severity: Minor
                                  Found in modules/ixBidAdapter.js - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                  if (rImp.video.ext.bidfloor < rImp.bidfloor) {
                                                    rImp.bidfloor = rImp.video.ext.bidfloor;
                                                  }
                                    Severity: Major
                                    Found in modules/ixBidAdapter.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                  if (!deepAccess(rImp, 'ext.siteID', false) && deepAccess(imp, 'native.ext.siteID', false)) {
                                                    deepSetValue(rImp, 'ext.siteID', imp.native.ext.siteID);
                                                    deepSetValue(r, 'ext.ixdiag.usid', true);
                                                  }
                                      Severity: Major
                                      Found in modules/ixBidAdapter.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                  if (_bannerImpression.banner.format[i].ext.externalID != null) {
                                                    delete _bannerImpression.banner.format[i].ext.externalID;
                                                  }
                                        Severity: Major
                                        Found in modules/ixBidAdapter.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                    if (_bannerImpression.banner.format[i].ext.sid != null) {
                                                      delete _bannerImpression.banner.format[i].ext.sid;
                                                    }
                                          Severity: Major
                                          Found in modules/ixBidAdapter.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                        if (deepAccess(rImp, 'native.ext.bidfloor', false) && deepAccess(rImp, 'bidfloor', false)) {
                                                          if (rImp.native.ext.bidfloor < rImp.bidfloor) {
                                                            rImp.bidfloor = rImp.native.ext.bidfloor;
                                                          }
                                                        }
                                            Severity: Major
                                            Found in modules/ixBidAdapter.js - About 45 mins to fix

                                              Function addIdentifiersInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                              function addIdentifiersInfo(impressions, r, impKeys, adUnitIndex, payload, baseUrl) {
                                              Severity: Minor
                                              Found in modules/ixBidAdapter.js - About 45 mins to fix

                                                Consider simplifying this complex logical expression.
                                                Open

                                                      if (dfpAdUnitCode || gpid || tid || sid || auctionEnvironment || externalID) {
                                                        _bannerImpression.ext = {};
                                                
                                                        _bannerImpression.ext.dfp_ad_unit_code = dfpAdUnitCode;
                                                        _bannerImpression.ext.gpid = gpid;
                                                Severity: Major
                                                Found in modules/ixBidAdapter.js - About 40 mins to fix

                                                  Function addFPD has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                  function addFPD(bidderRequest, r, fpd, site, user) {
                                                  Severity: Minor
                                                  Found in modules/ixBidAdapter.js - About 35 mins to fix

                                                    Function enrichRequest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                    function enrichRequest(r, bidderRequest, impressions, validBidRequests, userEids) {
                                                    Severity: Minor
                                                    Found in modules/ixBidAdapter.js - About 35 mins to fix

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

                                                      function buildImgSyncUrl(syncsPerBidder, index) {
                                                        let consentString = '';
                                                        let gdprApplies = '0';
                                                        if (gdprConsent && gdprConsent.hasOwnProperty('gdprApplies')) {
                                                          gdprApplies = gdprConsent.gdprApplies ? '1' : '0';
                                                      Severity: Minor
                                                      Found in modules/ixBidAdapter.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 getIxFirstPartyDataPageUrl has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function getIxFirstPartyDataPageUrl (bidderRequest) {
                                                        // Parse additional runtime configs.
                                                        const bidderCode = (bidderRequest && bidderRequest.bidderCode) || 'ix';
                                                        const otherIxConfig = config.getConfig(bidderCode);
                                                      
                                                      
                                                      Severity: Minor
                                                      Found in modules/ixBidAdapter.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

                                                      Avoid too many return statements within this function.
                                                      Open

                                                              return false;
                                                      Severity: Major
                                                      Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                              return false;
                                                        Severity: Major
                                                        Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                              return nativeMediaTypeValid(bid);
                                                          Severity: Major
                                                          Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return false;
                                                            Severity: Major
                                                            Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return false;
                                                              Severity: Major
                                                              Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                          return false;
                                                                Severity: Major
                                                                Found in modules/ixBidAdapter.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return false;
                                                                  Severity: Major
                                                                  Found in modules/ixBidAdapter.js - About 30 mins to fix

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

                                                                    function checkVideoParams(mediaTypeVideoRef, paramsVideoRef) {
                                                                      const errorList = [];
                                                                    
                                                                      if (!mediaTypeVideoRef) {
                                                                        logWarn('IX Bid Adapter: mediaTypes.video is the preferred location for video params in ad unit');
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.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

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

                                                                    function updateMissingSizes(validBidRequest, missingBannerSizes, imp) {
                                                                      if (missingBannerSizes.hasOwnProperty(validBidRequest.adUnitCode)) {
                                                                        let currentSizeList = [];
                                                                        if (missingBannerSizes[validBidRequest.adUnitCode].hasOwnProperty('missingSizes')) {
                                                                          currentSizeList = missingBannerSizes[validBidRequest.adUnitCode].missingSizes;
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.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

                                                                    function createVideoImps(validBidRequest, videoImps) {
                                                                      const imp = bidToVideoImp(validBidRequest);
                                                                      if (Object.keys(imp).length != 0) {
                                                                        videoImps[validBidRequest.adUnitCode] = {};
                                                                        videoImps[validBidRequest.adUnitCode].ixImps = [];
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 day to fix
                                                                    modules/ixBidAdapter.js on lines 1375..1392

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 281.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 createNativeImps(validBidRequest, nativeImps) {
                                                                      const imp = bidToNativeImp(validBidRequest);
                                                                    
                                                                      if (Object.keys(imp).length != 0) {
                                                                        nativeImps[validBidRequest.adUnitCode] = {};
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 day to fix
                                                                    modules/ixBidAdapter.js on lines 1399..1415

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 281.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (NATIVE in imp) {
                                                                            const nativeExt = imp.native.ext;
                                                                            if (nativeExt !== undefined && nativeExt[key] !== undefined && nativeExt[key] == impExt[key]) {
                                                                              delete r.imp[index].native.ext[key];
                                                                            }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 2 hrs to fix
                                                                    modules/ixBidAdapter.js on lines 1993..1998

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 90.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                          if (VIDEO in imp) {
                                                                            const videoExt = imp.video.ext;
                                                                            if (videoExt !== undefined && videoExt[key] !== undefined && videoExt[key] == impExt[key]) {
                                                                              delete r.imp[index].video.ext[key];
                                                                            }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 2 hrs to fix
                                                                    modules/ixBidAdapter.js on lines 2000..2005

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 90.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        if (VIDEO in imp) {
                                                                          const videoExt = imp.video.ext;
                                                                          if (videoExt !== undefined && videoExt.siteID !== undefined) {
                                                                            delete r.imp[index].video.ext.siteID;
                                                                          }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 2051..2056

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 74.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (NATIVE in imp) {
                                                                          const nativeExt = imp.native.ext;
                                                                          if (nativeExt !== undefined && nativeExt.siteID !== undefined) {
                                                                            delete r.imp[index].native.ext.siteID;
                                                                          }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 2044..2049

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 74.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (deepAccess(rImp, 'video.ext.bidfloor', false) && deepAccess(rImp, 'bidfloor', false)) {
                                                                                  if (rImp.video.ext.bidfloor < rImp.bidfloor) {
                                                                                    rImp.bidfloor = rImp.video.ext.bidfloor;
                                                                                  }
                                                                                }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1084..1088

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 73.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                                if (deepAccess(rImp, 'native.ext.bidfloor', false) && deepAccess(rImp, 'bidfloor', false)) {
                                                                                  if (rImp.native.ext.bidfloor < rImp.bidfloor) {
                                                                                    rImp.bidfloor = rImp.native.ext.bidfloor;
                                                                                  }
                                                                                }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1071..1075

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 73.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                      Object.keys(site).forEach(key => {
                                                                        if (FIRST_PARTY_DATA.SITE.indexOf(key) === -1) {
                                                                          delete site[key];
                                                                        }
                                                                      });
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1185..1189

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 59.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                      Object.keys(user).forEach(key => {
                                                                        if (FIRST_PARTY_DATA.USER.indexOf(key) === -1) {
                                                                          delete user[key];
                                                                        }
                                                                      });
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1179..1183

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 59.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (_bannerImpression.banner.format[i].ext.externalID != null) {
                                                                                delete _bannerImpression.banner.format[i].ext.externalID;
                                                                              }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1003..1005

                                                                    Duplicated Code

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

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

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                              if (_bannerImpression.banner.format[i].ext.sid != null) {
                                                                                delete _bannerImpression.banner.format[i].ext.sid;
                                                                              }
                                                                    Severity: Major
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 1 hr to fix
                                                                    modules/ixBidAdapter.js on lines 1006..1008

                                                                    Duplicated Code

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

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

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                      } else if (adapterFloor) {
                                                                        imp.bidfloor = adapterFloor.floor;
                                                                        imp.bidfloorcur = adapterFloor.currency;
                                                                        deepSetValue(imp, 'ext.fl', FLOOR_SOURCE.IX);
                                                                        setFloor = true;
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 55 mins to fix
                                                                    modules/ixBidAdapter.js on lines 412..422

                                                                    Duplicated Code

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

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

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                      if (moduleFloor) {
                                                                        imp.bidfloor = moduleFloor.floor;
                                                                        imp.bidfloorcur = moduleFloor.currency;
                                                                        deepSetValue(imp, 'ext.fl', FLOOR_SOURCE.PBJS);
                                                                        setFloor = true;
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 55 mins to fix
                                                                    modules/ixBidAdapter.js on lines 417..422

                                                                    Duplicated Code

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

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

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                                                                    Open

                                                                          ['dsarequired', 'pubrender', 'datatopub'].forEach((dsaKey) => {
                                                                            if (isNumber(pubDsaObj[dsaKey])) {
                                                                              dsaObj[dsaKey] = pubDsaObj[dsaKey];
                                                                            }
                                                                          });
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 50 mins to fix
                                                                    modules/appnexusBidAdapter.js on lines 363..367

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 51.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (imp.banner.format[i].ext != undefined && imp.banner.format[i].ext[key] != undefined && imp.banner.format[i].ext[key] == impExt[key]) {
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 40 mins to fix
                                                                    modules/ixBidAdapter.js on lines 2035..2035

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 49.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (imp.banner.format[i].ext !== undefined && imp.banner.format[i].ext.siteID !== undefined) {
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 40 mins to fix
                                                                    modules/ixBidAdapter.js on lines 1987..1987

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 49.

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

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

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (bidderRequest.gppConsent) {
                                                                          deepSetValue(r, 'regs.gpp', bidderRequest.gppConsent.gppString);
                                                                          deepSetValue(r, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
                                                                        }
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 30 mins to fix
                                                                    modules/sovrnBidAdapter.js on lines 195..198

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 45.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                      return Array.isArray(size) && size.length === 2 && isInteger(size[0]) && isInteger(size[1]);
                                                                    Severity: Minor
                                                                    Found in modules/ixBidAdapter.js and 1 other location - About 30 mins to fix
                                                                    modules/getintentBidAdapter.js on lines 211..211

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 45.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

                                                                    There are no issues that match your filters.

                                                                    Category
                                                                    Status