<commit_before>package com.kaltura.playersdk;

import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class KPPlayerConfig {

	/// Key names of the video request
	static String sWidKey = "wid";
	static String sUiConfIdKey = "uiconf_id";
	static String sCacheStKey = "cache_st";
	static String sEntryIdKey = "entry_id";
	static String sUridKey = "urid";
	static String sNativeAdIDKey = "&flashvars[nativeAdId]=";
	static String sEnableHoverKey = "&flashvars[controlBarContainer.hover]=true";
	static String sIFrameEmbedKey = "&iframeembed=true";




	private Map<String, String> mParamsHash;
	private String mUrl;

	private String mDomain;
	private String mWid;
	private String mCacheSt;
	private String mUrid;
	private String mAdvertiserID;
	private String mEntryId;
	private boolean mEnableHover;
	private String mUiConfId;

	public KPPlayerConfig(String domain, String uiConfId) {
		mDomain = domain;
		mUiConfId = uiConfId;
		mParamsHash = new HashMap<String, String>();
		mParamsHash.put(sUiConfIdKey, uiConfId);
	}

	public void addConfig(String key, String value) {
		if (key != null && key.length() > 0 && value != null && value.length() > 0) {
			String configKey = "flashvars[" + key + "]";
			mParamsHash.put(configKey, value);
		}
	}

	public String appendConfiguration(String videoURL) {
		if (mAdvertiserID != null && mAdvertiserID.length() > 0) {
			videoURL += sNativeAdIDKey + mAdvertiserID;
		}
		if (mEnableHover) {
			videoURL += sEnableHoverKey;
		}
		videoURL += sIFrameEmbedKey;
		return videoURL;
	}

	public String getVideoURL() {
		mUrl = mDomain + "?";
		for (String key: mParamsHash.keySet()) {
			mUrl += key + "=" + mParamsHash.get(key) + "&";
		}
		mUrl = mUrl.substring(0, mUrl.length() - 1);
		return mUrl;
	}

	public String getWid() {
		return mWid;
	}

	public void setWid(String wid) {
		mWid = wid;
		mParamsHash.put(sWidKey, wid);
	}

	public String getCacheSt() {
		return mCacheSt;
	}

	public void setCacheSt(String cacheSt) {
		mCacheSt = cacheSt;
		mParamsHash.put(sCacheStKey, cacheSt);
	}

	public String getUrid() {
		return mUrid;
	}

	public void setUrid(String urid) {
		mParamsHash.put(sUridKey, urid);
		mUrid = urid;
	}

	public String getAdvertiserID() {
		return mAdvertiserID;
	}

	public void setAdvertiserID(String advertiserID) {
		mAdvertiserID = advertiserID;
	}

	public boolean isEnableHover() {
		return mEnableHover;
	}

	public void setEnableHover(boolean enableHover) {
		mEnableHover = enableHover;
	}

	public String getEntryId() {
		return mEntryId;
	}

	public void setEntryId(String entryId) {
		mEntryId = entryId;
		mParamsHash.put(sEntryIdKey, entryId);
	}

	public String getUiConfId() {
		return mUiConfId;<commit_msg>Removed unnecessary code<commit_after>package com.kaltura.playersdk;

import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class KPPlayerConfig {

	/// Key names of the video request
	static String sWidKey = "wid";
	static String sUiConfIdKey = "uiconf_id";
	static String sEntryIdKey = "entry_id";
	static String sUridKey = "urid";
	static String sNativeAdIDKey = "&flashvars[nativeAdId]=";
	static String sEnableHoverKey = "&flashvars[controlBarContainer.hover]=true";
	static String sIFrameEmbedKey = "&iframeembed=true";




	private Map<String, String> mParamsHash;
	private String mUrl;

	private String mDomain;
	private String mWid;
	private String mUrid;
	private String mAdvertiserID;
	private String mEntryId;
	private boolean mEnableHover;
	private String mUiConfId;

	public KPPlayerConfig(String domain, String uiConfId) {
		mDomain = domain;
		mUiConfId = uiConfId;
		mParamsHash = new HashMap<String, String>();
		mParamsHash.put(sUiConfIdKey, uiConfId);
	}

	public void addConfig(String key, String value) {
		if (key != null && key.length() > 0 && value != null && value.length() > 0) {
			String configKey = "flashvars[" + key + "]";
			mParamsHash.put(configKey, value);
		}
	}

	public String appendConfiguration(String videoURL) {
		if (mAdvertiserID != null && mAdvertiserID.length() > 0) {
			videoURL += sNativeAdIDKey + mAdvertiserID;
		}
		if (mEnableHover) {
			videoURL += sEnableHoverKey;
		}
		videoURL += sIFrameEmbedKey;
		return videoURL;
	}

	public String getVideoURL() {
		mUrl = mDomain + "?";
		for (String key: mParamsHash.keySet()) {
			mUrl += key + "=" + mParamsHash.get(key) + "&";
		}
		mUrl = mUrl.substring(0, mUrl.length() - 1);
		return mUrl;
	}

	public void setWid(String wid) {
		mWid = wid;
		mParamsHash.put(sWidKey, wid);
	}

	public String getAdvertiserID() {
		return mAdvertiserID;
	}

	public void setAdvertiserID(String advertiserID) {
		mAdvertiserID = advertiserID;
	}

	public boolean isEnableHover() {
		return mEnableHover;
	}

	public void setEnableHover(boolean enableHover) {
		mEnableHover = enableHover;
	}

	public String getEntryId() {
		return mEntryId;
	}

	public void setEntryId(String entryId) {
		mEntryId = entryId;
		mParamsHash.put(sEntryIdKey, entryId);
	}

	public String getUiConfId() {
		return mUiConfId;
{'fraction_non_alphanumeric': 0.11215671211830229, 'fraction_numerical': 0.0019204916458613404, 'mean_word_length': 4.430656934306569, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '4264069', 'n_tokens_mistral': 1979, 'n_tokens_neox': 1839, 'n_words': 441}