prebid/Prebid.js

View on GitHub
modules/ozoneBidAdapter.js

Summary

Maintainability
F
3 wks
Test Coverage

File ozoneBidAdapter.js has 1046 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  logInfo,
  logError,
  deepAccess,
  logWarn,
Severity: Major
Found in modules/ozoneBidAdapter.js - About 2 days to fix

    Function buildRequests has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
    Open

      buildRequests(validBidRequests, bidderRequest) {
        this.loadWhitelabelData(validBidRequests[0]);
        this.propertyBag.buildRequestsStart = new Date().getTime();
        let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
        let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
    Severity: Minor
    Found in modules/ozoneBidAdapter.js - About 2 days 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 252 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      buildRequests(validBidRequests, bidderRequest) {
        this.loadWhitelabelData(validBidRequests[0]);
        this.propertyBag.buildRequestsStart = new Date().getTime();
        let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
        let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
    Severity: Major
    Found in modules/ozoneBidAdapter.js - About 1 day to fix

      Function interpretResponse has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

        interpretResponse(serverResponse, request) {
          if (request && request.bidderRequest && request.bidderRequest.bids) { this.loadWhitelabelData(request.bidderRequest.bids[0]); }
          let startTime = new Date().getTime();
          let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
          let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
      Severity: Minor
      Found in modules/ozoneBidAdapter.js - About 6 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 127 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        interpretResponse(serverResponse, request) {
          if (request && request.bidderRequest && request.bidderRequest.bids) { this.loadWhitelabelData(request.bidderRequest.bids[0]); }
          let startTime = new Date().getTime();
          let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
          let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
      Severity: Major
      Found in modules/ozoneBidAdapter.js - About 5 hrs to fix

        Function tosendtags has 98 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            let tosendtags = validBidRequests.map(ozoneBidRequest => {
              var obj = {};
              let placementId = placementIdOverrideFromGetParam || this.getPlacementId(ozoneBidRequest); // prefer to use a valid override param, else the bidRequest placement Id
              obj.id = ozoneBidRequest.bidId; // this causes an error if we change it to something else, even if you update the bidRequest object: "WARNING: Bidder ozone made bid for unknown request ID: mb7953.859498327448. Ignoring."
              obj.tagid = placementId;
        Severity: Major
        Found in modules/ozoneBidAdapter.js - About 3 hrs to fix

          Function loadWhitelabelData has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

            loadWhitelabelData(bid) {
              if (this.propertyBag.whitelabel) { return; }
              this.propertyBag.whitelabel = JSON.parse(JSON.stringify(this.whitelabel_defaults));
              let bidder = bid.bidder || 'ozone'; // eg. ozone
              this.propertyBag.whitelabel.logId = bidder.toUpperCase();
          Severity: Minor
          Found in modules/ozoneBidAdapter.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

          spec has 28 functions (exceeds 20 allowed). Consider refactoring.
          Open

          export const spec = {
            gvlid: 524,
            aliases: [{code: 'lmc', gvlid: 524}, {code: 'venatus', gvlid: 524}],
            version: OZONEVERSION,
            code: BIDDER_CODE,
          Severity: Minor
          Found in modules/ozoneBidAdapter.js - About 3 hrs to fix

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

              findAllUserIds(bidRequest) {
                var ret = {};
                let searchKeysSingle = ['pubcid', 'tdid', 'idl_env', 'criteoId', 'lotamePanoramaId', 'fabrickId'];
                if (bidRequest.hasOwnProperty('userId')) {
                  for (let arrayId in searchKeysSingle) {
            Severity: Minor
            Found in modules/ozoneBidAdapter.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 21 (exceeds 5 allowed). Consider refactoring.
            Open

              isBidRequestValid(bid) {
                this.loadWhitelabelData(bid);
                logInfo('isBidRequestValid : ', config.getConfig(), bid);
                let adUnitCode = bid.adUnitCode; // adunit[n].code
                let err1 = 'VALIDATION FAILED : missing {param} : siteId, placementId and publisherId are REQUIRED'
            Severity: Minor
            Found in modules/ozoneBidAdapter.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 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              isBidRequestValid(bid) {
                this.loadWhitelabelData(bid);
                logInfo('isBidRequestValid : ', config.getConfig(), bid);
                let adUnitCode = bid.adUnitCode; // adunit[n].code
                let err1 = 'VALIDATION FAILED : missing {param} : siteId, placementId and publisherId are REQUIRED'
            Severity: Major
            Found in modules/ozoneBidAdapter.js - About 2 hrs to fix

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

              export function ozoneGetAllBidsForBidId(matchBidId, serverResponseSeatBid) {
                let objBids = {};
                for (let j = 0; j < serverResponseSeatBid.length; j++) {
                  let theseBids = serverResponseSeatBid[j].bid;
                  let thisSeat = serverResponseSeatBid[j].seat;
              Severity: Minor
              Found in modules/ozoneBidAdapter.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 loadWhitelabelData has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                loadWhitelabelData(bid) {
                  if (this.propertyBag.whitelabel) { return; }
                  this.propertyBag.whitelabel = JSON.parse(JSON.stringify(this.whitelabel_defaults));
                  let bidder = bid.bidder || 'ozone'; // eg. ozone
                  this.propertyBag.whitelabel.logId = bidder.toUpperCase();
              Severity: Major
              Found in modules/ozoneBidAdapter.js - About 2 hrs to fix

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

                  removeSingleBidderMultipleBids(seatbid) {
                    var ret = [];
                    for (let i = 0; i < seatbid.length; i++) {
                      let sb = seatbid[i];
                      var retSeatbid = {'seat': sb.seat, 'bid': []};
                Severity: Minor
                Found in modules/ozoneBidAdapter.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 findAllUserIds has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  findAllUserIds(bidRequest) {
                    var ret = {};
                    let searchKeysSingle = ['pubcid', 'tdid', 'idl_env', 'criteoId', 'lotamePanoramaId', 'fabrickId'];
                    if (bidRequest.hasOwnProperty('userId')) {
                      for (let arrayId in searchKeysSingle) {
                Severity: Minor
                Found in modules/ozoneBidAdapter.js - About 1 hr to fix

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

                    getUserSyncs(optionsType, serverResponse, gdprConsent, usPrivacy) {
                      logInfo('getUserSyncs optionsType', optionsType, 'serverResponse', serverResponse, 'gdprConsent', gdprConsent, 'usPrivacy', usPrivacy, 'cookieSyncBag', this.cookieSyncBag);
                      if (!serverResponse || serverResponse.length === 0) {
                        return [];
                      }
                  Severity: Minor
                  Found in modules/ozoneBidAdapter.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 ozoneGetWinnerForRequestBid has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export function ozoneGetWinnerForRequestBid(requestBidId, serverResponseSeatBid) {
                    let thisBidWinner = null;
                    let winningSeat = null;
                    for (let j = 0; j < serverResponseSeatBid.length; j++) {
                      let theseBids = serverResponseSeatBid[j].bid;
                  Severity: Minor
                  Found in modules/ozoneBidAdapter.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 _addVideoDefaults has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                    _addVideoDefaults(objRet, objConfig, addIfMissing) {
                      let context = deepAccess(objConfig, 'context');
                      if (context === 'outstream') {
                        objRet.placement = 3;
                      } else if (context === 'instream') {
                  Severity: Minor
                  Found in modules/ozoneBidAdapter.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 getUserSyncs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    getUserSyncs(optionsType, serverResponse, gdprConsent, usPrivacy) {
                      logInfo('getUserSyncs optionsType', optionsType, 'serverResponse', serverResponse, 'gdprConsent', gdprConsent, 'usPrivacy', usPrivacy, 'cookieSyncBag', this.cookieSyncBag);
                      if (!serverResponse || serverResponse.length === 0) {
                        return [];
                      }
                  Severity: Minor
                  Found in modules/ozoneBidAdapter.js - About 1 hr to fix

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

                      getLoggableBidObject(bid) {
                        let logObj = {
                          ad: bid.ad,
                          adId: bid.adId,
                          adUnitCode: bid.adUnitCode,
                    Severity: Minor
                    Found in modules/ozoneBidAdapter.js - About 1 hr to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  if (!thisBid.hasOwnProperty('videoCacheKey')) {
                                    let videoCacheUuid = deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'no_hb_uuid');
                                    logInfo(`Adding videoCacheKey: ${videoCacheUuid}`);
                                    thisBid.videoCacheKey = videoCacheUuid;
                                  } else {
                      Severity: Major
                      Found in modules/ozoneBidAdapter.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                  if (objBids[thisSeat]['price'] < theseBids[k].price) {
                                    objBids[thisSeat] = theseBids[k];
                                  }
                        Severity: Major
                        Found in modules/ozoneBidAdapter.js - About 45 mins to fix

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

                            _unpackVideoConfigIntoIABformat(ret, objConfig) {
                              let arrVideoKeysAllowed = ['mimes', 'minduration', 'maxduration', 'protocols', 'w', 'h', 'startdelay', 'placement', 'linearity', 'skip', 'skipmin', 'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate', 'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend', 'delivery', 'pos', 'companionad', 'api', 'companiontype'];
                              for (const key in objConfig) {
                                var found = false;
                                arrVideoKeysAllowed.forEach(function(arg) {
                          Severity: Minor
                          Found in modules/ozoneBidAdapter.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/ozoneBidAdapter.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

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

                              Avoid too many return statements within this function.
                              Open

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

                                Avoid too many return statements within this function.
                                Open

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

                                  Avoid too many return statements within this function.
                                  Open

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

                                    Avoid too many return statements within this function.
                                    Open

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

                                      Avoid too many return statements within this function.
                                      Open

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

                                        Avoid too many return statements within this function.
                                        Open

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

                                          Avoid too many return statements within this function.
                                          Open

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

                                            Avoid too many return statements within this function.
                                            Open

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

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

                                              export function getWidthAndHeightFromVideoObject(objVideo) {
                                                let playerSize = getPlayerSizeFromObject(objVideo);
                                                if (!playerSize) {
                                                  return null;
                                                }
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.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

                                                findAllUserIds(bidRequest) {
                                                  var ret = {};
                                                  let searchKeysSingle = ['pubcid', 'tdid', 'idl_env', 'criteoId', 'lotamePanoramaId', 'fabrickId'];
                                                  if (bidRequest.hasOwnProperty('userId')) {
                                                    for (let arrayId in searchKeysSingle) {
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 2 days to fix
                                              modules/newspassidBidAdapter.js on lines 442..483

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 426.

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

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

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

                                                removeSingleBidderMultipleBids(seatbid) {
                                                  var ret = [];
                                                  for (let i = 0; i < seatbid.length; i++) {
                                                    let sb = seatbid[i];
                                                    var retSeatbid = {'seat': sb.seat, 'bid': []};
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 day to fix
                                              modules/newspassidBidAdapter.js on lines 382..404

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 296.

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

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

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

                                              export function getRoundedBid(price, mediaType) {
                                                const mediaTypeGranularity = config.getConfig(`mediaTypePriceGranularity.${mediaType}`); // might be string or object or nothing; if set then this takes precedence over 'priceGranularity'
                                                let objBuckets = config.getConfig('customPriceBucket'); // this is always an object - {} if strBuckets is not 'custom'
                                                let strBuckets = config.getConfig('priceGranularity'); // priceGranularity value, always a string ** if priceGranularity is set to an object then it's always 'custom' **
                                                let theConfigObject = getGranularityObject(mediaType, mediaTypeGranularity, strBuckets, objBuckets);
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 day to fix
                                              modules/newspassidBidAdapter.js on lines 628..654

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 234.

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

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

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

                                              export function ozoneGetAllBidsForBidId(matchBidId, serverResponseSeatBid) {
                                                let objBids = {};
                                                for (let j = 0; j < serverResponseSeatBid.length; j++) {
                                                  let theseBids = serverResponseSeatBid[j].bid;
                                                  let thisSeat = serverResponseSeatBid[j].seat;
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 day to fix
                                              modules/newspassidBidAdapter.js on lines 573..591

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 196.

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

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

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

                                              See codeclimate-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

                                              export function ozoneGetWinnerForRequestBid(requestBidId, serverResponseSeatBid) {
                                                let thisBidWinner = null;
                                                let winningSeat = null;
                                                for (let j = 0; j < serverResponseSeatBid.length; j++) {
                                                  let theseBids = serverResponseSeatBid[j].bid;
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 7 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 555..572

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 185.

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

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

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

                                              See codeclimate-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 (bid.params.hasOwnProperty('customData')) {
                                                    if (!Array.isArray(bid.params.customData)) {
                                                      logError('VALIDATION FAILED : customData is not an Array', adUnitCode);
                                                      return false;
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 6 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 108..125

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 169.

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

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

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

                                              export function ozoneAddStandardProperties(seatBid, defaultWidth, defaultHeight) {
                                                seatBid.cpm = seatBid.price;
                                                seatBid.bidId = seatBid.impid;
                                                seatBid.requestId = seatBid.impid;
                                                seatBid.width = seatBid.w || defaultWidth;
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 5 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 542..554

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 153.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                getPageId: function() {
                                                  if (this.propertyBag.pageId == null) {
                                                    let randPart = '';
                                                    let allowable = '0123456789abcdefghijklmnopqrstuvwxyz';
                                                    for (let i = 20; i > 0; i--) {
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 5 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 531..541

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 140.

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

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

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

                                                getRefererInfo() {
                                                  if (getRefererInfo().hasOwnProperty('location')) {
                                                    logInfo('FOUND location on getRefererInfo OK (prebid >= 7); will use getRefererInfo for location & page');
                                                    return getRefererInfo();
                                                  } else {
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 4 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 504..522

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 124.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (validBidRequests.length > 0) {
                                                    this.cookieSyncBag.userIdObject = Object.assign(this.cookieSyncBag.userIdObject, this.findAllUserIds(validBidRequests[0]));
                                                    this.cookieSyncBag.siteId = deepAccess(validBidRequests[0], 'params.siteId');
                                                    this.cookieSyncBag.publisherId = deepAccess(validBidRequests[0], 'params.publisherId');
                                                    htmlParams = validBidRequests[0].params;
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 4 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 139..144

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 122.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    if (arrBannerSizes.length > 0) {
                                                      obj.banner = {
                                                        topframe: 1,
                                                        w: arrBannerSizes[0][0] || 0,
                                                        h: arrBannerSizes[0][1] || 0,
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 3 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 187..196

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 107.

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

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

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

                                              export function defaultSize(thebidObj) {
                                                if (!thebidObj) {
                                                  logInfo('defaultSize received empty bid obj! going to return fixed default size');
                                                  return {
                                                    'defaultHeight': 250,
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 3 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 614..627

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 104.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    if (bidderConfig.endpointOverride.origin) {
                                                      this.propertyBag.endpointOverride = bidderConfig.endpointOverride.origin;
                                                      this.propertyBag.whitelabel.auctionUrl = bidderConfig.endpointOverride.origin + AUCTIONURI;
                                                      this.propertyBag.whitelabel.cookieSyncUrl = bidderConfig.endpointOverride.origin + OZONECOOKIESYNC;
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 3 hrs to fix
                                              modules/newspassidBidAdapter.js on lines 44..48

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 100.

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

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

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

                                              See codeclimate-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 (useOzWhitelistAdserverKeys) { // delete any un-whitelisted keys
                                                        logInfo('Going to filter out adserver targeting keys not in the whitelist: ', ozWhitelistAdserverKeys);
                                                        Object.keys(adserverTargeting).forEach(function(key) { if (ozWhitelistAdserverKeys.indexOf(key) === -1) { delete adserverTargeting[key]; } });
                                                      }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 370..373

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 72.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                getBidRequestForBidId(bidId, arrBids) {
                                                  for (let i = 0; i < arrBids.length; i++) {
                                                    if (arrBids[i].bidId === bidId) { // bidId in the request comes back as impid in the seatbid bids
                                                      return arrBids[i];
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 434..441

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 68.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                              export function getGranularityKeyName(mediaType, mediaTypeGranularity, strBuckets) {
                                                if (typeof mediaTypeGranularity === 'string') {
                                                  return mediaTypeGranularity;
                                                }
                                                if (typeof mediaTypeGranularity === 'object') {
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 655..666

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 67.

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

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

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

                                              export function checkDeepArray(Arr) {
                                                if (Array.isArray(Arr)) {
                                                  if (Array.isArray(Arr[0])) {
                                                    return Arr[0];
                                                  } else {
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 603..613

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 67.

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

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

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

                                              See codeclimate-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 (bidderConfig.endpointOverride.auctionUrl) {
                                                      this.propertyBag.endpointOverride = bidderConfig.endpointOverride.auctionUrl;
                                                      this.propertyBag.whitelabel.auctionUrl = bidderConfig.endpointOverride.auctionUrl;
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 52..55

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 65.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                      if (deepAccess(obj, 'ext.' + whitelabelBidder + '.customData.0.targeting', false)) {
                                                        obj.ext[whitelabelBidder].customData[0].targeting = Object.assign(obj.ext[whitelabelBidder].customData[0].targeting, fpd.site);
                                                      } else {
                                                        deepSetValue(obj, 'ext.' + whitelabelBidder + '.customData.0.targeting', fpd.site);
                                                      }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 218..222

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 64.

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

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

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

                                              See codeclimate-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

                                                  logInfo(`buildRequests time: ${this.propertyBag.buildRequestsStart} v ${OZONEVERSION} validBidRequests`, JSON.parse(JSON.stringify(validBidRequests)), 'bidderRequest', JSON.parse(JSON.stringify(bidderRequest)));
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 134..134

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 63.

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

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

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

                                              See codeclimate-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 (ozoneBidRequest.mediaTypes.hasOwnProperty(NATIVE)) {
                                                        obj.native = ozoneBidRequest.mediaTypes[NATIVE];
                                                        logInfo('setting native object from the mediaTypes.native element: ' + obj.id + ':', obj.native);
                                                      }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 182..185

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 62.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                      if (ozoneBidRequest.mediaTypes.hasOwnProperty(BANNER)) {
                                                        arrBannerSizes = ozoneBidRequest.mediaTypes[BANNER].sizes; /* Note - if there is a sizes element in the config root it will be pushed into here */
                                                        logInfo('setting banner size from the mediaTypes.banner element for bidId ' + obj.id + ': ', arrBannerSizes);
                                                      }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/newspassidBidAdapter.js on lines 178..181

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 62.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    if (arr.hasOwnProperty('auction') && arr.auction === 'dev') {
                                                      logInfo('GET: auction=dev');
                                                      this.propertyBag.whitelabel.auctionUrl = ORIGIN_DEV + AUCTIONURI;
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/ozoneBidAdapter.js on lines 89..92

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 57.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    if (arr.hasOwnProperty('cookiesync') && arr.cookiesync === 'dev') {
                                                      logInfo('GET: cookiesync=dev');
                                                      this.propertyBag.whitelabel.cookieSyncUrl = ORIGIN_DEV + OZONECOOKIESYNC;
                                                    }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/ozoneBidAdapter.js on lines 85..88

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 57.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (getParams.hasOwnProperty('ozf')) { extObj[whitelabelBidder]['ozf'] = getParams.ozf === 'true' || getParams.ozf === '1' ? 1 : 0; }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/ozoneBidAdapter.js on lines 336..336

                                              Duplicated Code

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

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

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (getParams.hasOwnProperty('ozpf')) { extObj[whitelabelBidder]['ozpf'] = getParams.ozpf === 'true' || getParams.ozpf === '1' ? 1 : 0; }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 1 hr to fix
                                              modules/ozoneBidAdapter.js on lines 335..335

                                              Duplicated Code

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

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

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (getParams.hasOwnProperty('ozip') && getParams.ozip.match(/^\d+$/)) { extObj[whitelabelBidder]['ozip'] = parseInt(getParams.ozip); }
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 55 mins to fix
                                              modules/ozoneBidAdapter.js on lines 337..337

                                              Duplicated Code

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

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

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

                                                  ozoneRequest.site = {
                                                    'publisher': {'id': htmlParams.publisherId},
                                                    'page': this.getRefererInfo().page,
                                                    'id': htmlParams.siteId
                                                  };
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 55 mins to fix
                                              modules/newspassidBidAdapter.js on lines 253..257

                                              Duplicated Code

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

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

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (getParams.hasOwnProperty('ozrp') && getParams.ozrp.match(/^[0-3]$/)) { extObj[whitelabelBidder]['ozrp'] = parseInt(getParams.ozrp); }
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 55 mins to fix
                                              modules/ozoneBidAdapter.js on lines 338..338

                                              Duplicated Code

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

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

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

                                                    for (let keyname in this.cookieSyncBag.userIdObject) {
                                                      arrQueryString.push(keyname + '=' + this.cookieSyncBag.userIdObject[keyname]);
                                                    }
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 50 mins to fix
                                              modules/newspassidBidAdapter.js on lines 416..418

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 52.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (mediaTypesSizes.native) {
                                                    ret.native = bidRequestRef.getFloor({mediaType: 'native', currency: 'USD', size: mediaTypesSizes.native});
                                                  }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 2 other locations - About 45 mins to fix
                                              modules/ozoneBidAdapter.js on lines 438..440
                                              modules/ozoneBidAdapter.js on lines 441..443

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 50.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (mediaTypesSizes.video) {
                                                    ret.video = bidRequestRef.getFloor({mediaType: 'video', currency: 'USD', size: mediaTypesSizes.video});
                                                  }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 2 other locations - About 45 mins to fix
                                              modules/ozoneBidAdapter.js on lines 438..440
                                              modules/ozoneBidAdapter.js on lines 444..446

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 50.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (request && request.bidderRequest && request.bidderRequest.bids) { this.loadWhitelabelData(request.bidderRequest.bids[0]); }
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 45 mins to fix
                                              modules/newspassidBidAdapter.js on lines 309..309

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 50.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (mediaTypesSizes.banner) {
                                                    ret.banner = bidRequestRef.getFloor({mediaType: 'banner', currency: 'USD', size: mediaTypesSizes.banner});
                                                  }
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 2 other locations - About 45 mins to fix
                                              modules/ozoneBidAdapter.js on lines 441..443
                                              modules/ozoneBidAdapter.js on lines 444..446

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 50.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    logInfo(`buildRequests going to return for single at time ${this.propertyBag.buildRequestsEnd} (took ${this.propertyBag.buildRequestsEnd - this.propertyBag.buildRequestsStart}ms): `, ret);
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 3 other locations - About 40 mins to fix
                                              modules/newspassidBidAdapter.js on lines 286..286
                                              modules/newspassidBidAdapter.js on lines 305..305
                                              modules/ozoneBidAdapter.js on lines 427..427

                                              Duplicated Code

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

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

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

                                                  logInfo(`buildRequests going to return for non-single at time ${this.propertyBag.buildRequestsEnd} (took ${this.propertyBag.buildRequestsEnd - this.propertyBag.buildRequestsStart}ms): `, arrRet);
                                              Severity: Major
                                              Found in modules/ozoneBidAdapter.js and 3 other locations - About 40 mins to fix
                                              modules/newspassidBidAdapter.js on lines 286..286
                                              modules/newspassidBidAdapter.js on lines 305..305
                                              modules/ozoneBidAdapter.js on lines 408..408

                                              Duplicated Code

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

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

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

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

                                              export function getGranularityObject(mediaType, mediaTypeGranularity, strBuckets, objBuckets) {
                                                if (typeof mediaTypeGranularity === 'object') {
                                                  return mediaTypeGranularity;
                                                }
                                                if (strBuckets === 'custom') {
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 40 mins to fix
                                              modules/newspassidBidAdapter.js on lines 667..675

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 48.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    if (!ozoneBidRequest.hasOwnProperty('mediaTypes')) {
                                                      if (ozoneBidRequest.hasOwnProperty('sizes')) {
                                                        logInfo('no mediaTypes detected - will use the sizes array in the config root');
                                                        arrBannerSizes = ozoneBidRequest.sizes;
                                                      } else {
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 40 mins to fix
                                              modules/newspassidBidAdapter.js on lines 170..186

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 48.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  logInfo(`serverResponse, request`, JSON.parse(JSON.stringify(serverResponse)), JSON.parse(JSON.stringify(request)));
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 35 mins to fix
                                              modules/newspassidBidAdapter.js on lines 312..312

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                  if (bidderRequest && bidderRequest.uspConsent) {
                                                    logInfo('ADDING USP consent info');
                                                    deepSetValue(ozoneRequest, 'regs.ext.us_privacy', bidderRequest.uspConsent);
                                                  } else {
                                                    logInfo('WILL NOT ADD USP consent info; no bidderRequest.uspConsent.');
                                              Severity: Minor
                                              Found in modules/ozoneBidAdapter.js and 1 other location - About 35 mins to fix
                                              modules/newspassidBidAdapter.js on lines 259..264

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

                                              There are no issues that match your filters.

                                              Category
                                              Status