<commit_before>var CONSTANTS = require('../constants.json');
var utils = require('../utils.js');
var adloader = require('../adloader.js');
var bidmanager = require('../bidmanager.js');
var bidfactory = require('../bidfactory.js');
var Adapter = require('./adapter.js');

var AppNexusAdapter = function AppNexusAdapter() {
	var baseAdapter = Adapter.createNew('appnexus');
	var isCalled = false;

	baseAdapter.callBids = function(params){
	 	var bidCode = baseAdapter.getBidderCode();

	 	var anArr = params.bids;
		var bidsCount = anArr.length;

		//set expected bids count for callback execution
		bidmanager.setExpectedBidsCount(bidCode,bidsCount);

		for (var i = 0; i < bidsCount; i++) {
			var bidReqeust = anArr[i];
			var callbackId = utils.getUniqueIdentifierStr();
			adloader.loadScript(buildJPTCall(bidReqeust, callbackId));
			//store a reference to the bidRequest from the callback id
			bidmanager.pbCallbackMap[callbackId] = bidReqeust;
		}
	};


	function buildJPTCall(bid, callbackId) {

		//determine tag params
		var placementId = utils.getBidIdParamater('placementId', bid.params);
		//memberId will be deprecated, use member instead
		var memberId = utils.getBidIdParamater('memberId', bid.params);
		var member = utils.getBidIdParamater('member', bid.params);
		var inventoryCode = utils.getBidIdParamater('invCode', bid.params);
		var query = utils.getBidIdParamater('query', bid.params);
		var referrer = utils.getBidIdParamater('referrer', bid.params);
		var altReferrer = utils.getBidIdParamater('alt_referrer', bid.params);

		//build our base tag, based on if we are http or https

		var jptCall = 'http' + ('https:' === document.location.protocol ? 's://secure.adnxs.com/jpt?' : '://ib.adnxs.com/jpt?');<commit_msg>Small typo in AppNexus adapter<commit_after>var CONSTANTS = require('../constants.json');
var utils = require('../utils.js');
var adloader = require('../adloader.js');
var bidmanager = require('../bidmanager.js');
var bidfactory = require('../bidfactory.js');
var Adapter = require('./adapter.js');

var AppNexusAdapter = function AppNexusAdapter() {
	var baseAdapter = Adapter.createNew('appnexus');
	var isCalled = false;

	baseAdapter.callBids = function(params){
	 	var bidCode = baseAdapter.getBidderCode();

	 	var anArr = params.bids;
		var bidsCount = anArr.length;

		//set expected bids count for callback execution
		bidmanager.setExpectedBidsCount(bidCode,bidsCount);

		for (var i = 0; i < bidsCount; i++) {
			var bidRequest = anArr[i];
			var callbackId = utils.getUniqueIdentifierStr();
			adloader.loadScript(buildJPTCall(bidReqeust, callbackId));
			//store a reference to the bidRequest from the callback id
			bidmanager.pbCallbackMap[callbackId] = bidRequest;
		}
	};


	function buildJPTCall(bid, callbackId) {

		//determine tag params
		var placementId = utils.getBidIdParamater('placementId', bid.params);
		//memberId will be deprecated, use member instead
		var memberId = utils.getBidIdParamater('memberId', bid.params);
		var member = utils.getBidIdParamater('member', bid.params);
		var inventoryCode = utils.getBidIdParamater('invCode', bid.params);
		var query = utils.getBidIdParamater('query', bid.params);
		var referrer = utils.getBidIdParamater('referrer', bid.params);
		var altReferrer = utils.getBidIdParamater('alt_referrer', bid.params);

		//build our base tag, based on if we are http or https

		var jptCall = 'http' + ('https:' === document.location.protocol ? 's://secure.adnxs.com/jpt?' : '://ib.adnxs.com/jpt?');
{'fraction_non_alphanumeric': 0.13865905848787446, 'fraction_numerical': 0.0005706134094151213, 'mean_word_length': 4.719412724306689, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4519974', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1144, 'n_words': 271}