<commit_before>import Foundation


class PluginRTCPeerConnectionConfig {
	private var iceServers: [RTCICEServer] = []


	init(pcConfig: NSDictionary?) {
		NSLog("PluginRTCPeerConnectionConfig#init()")

		var iceServers = pcConfig?.objectForKey("iceServers") as? [NSDictionary]

		if iceServers == nil {
			return
		}

		for iceServer: NSDictionary in iceServers! {
			var url = iceServer.objectForKey("url") as? String
			var username = iceServer.objectForKey("username") as? String
			var password = iceServer.objectForKey("password") as? String

			if (url != nil) {
				NSLog("PluginRTCPeerConnectionConfig#init() | adding ICE server [url:\(url!)]")

				self.iceServers.append(RTCICEServer(
					URI: NSURL(string: url!),
					username: username != nil ? username : "",
					password: <PASSWORD> : ""
				))
			}
		}
	}


	func getIceServers() -> [RTCICEServer] {
		NSLog("PluginRTCPeerConnectionConfig#getIceServers()")

		return self.iceServers
	}
}
<commit_msg>Check "credential" in RTCIceServer rather than "password" (fixes #17)<commit_after>import Foundation


class PluginRTCPeerConnectionConfig {
	private var iceServers: [RTCICEServer] = []


	init(pcConfig: NSDictionary?) {
		NSLog("PluginRTCPeerConnectionConfig#init()")

		var iceServers = pcConfig?.objectForKey("iceServers") as? [NSDictionary]

		if iceServers == nil {
			return
		}

		for iceServer: NSDictionary in iceServers! {
			var url = iceServer.objectForKey("url") as? String
			var username = iceServer.objectForKey("username") as? String ?? ""
			var password = iceServer.objectForKey("credential") as? String ?? ""

			if (url != nil) {
				NSLog("PluginRTCPeerConnectionConfig#init() | adding ICE server [url:\(url!), username:\(username), password:\(password)]")

				self.iceServers.append(RTCICEServer(
					URI: NSURL(string: url!),
					username: username,
					password: password
				))
			}
		}
	}


	func getIceServers() -> [RTCICEServer] {
		NSLog("PluginRTCPeerConnectionConfig#getIceServers()")

		return self.iceServers
	}
}

{'fraction_non_alphanumeric': 0.1316831683168317, 'fraction_numerical': 0.0009900990099009901, 'mean_word_length': 4.476964769647696, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '4540850', 'n_tokens_mistral': 777, 'n_tokens_neox': 638, 'n_words': 136}