<commit_before>var publicGroup = "Public";
var readRoleLabel = "read";
var readRoleValue = "R";

function displayAccessNameLabel() {
	var byGroup = dwr.util.getValue("byGroup");
	var byUser = dwr.util.getValue("byUser");
	var byPublic = dwr.util.getValue("byPublic");
	enablePublicAccess(false);
	dwr.util.setValue("groupName", "");
	dwr.util.setValue("userName", "");
	dwr.util.setValue("roleName", "");
	show("browseIcon");
	if (byGroup == true && byUser == false && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
		show("groupName");
		hide("userName");
	} else if (byGroup == false && byUser == true && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "User Login Name *");
		hide("groupName");
		show("userName");
	} else if (byPublic == true && byGroup == false && byUser == false) {
		dwr.util.setValue("accessNameLabel", "Group Name");
		show("groupName");
		dwr.util.setValue("groupName", publicGroup);
		dwr.util.setValue("roleName", readRoleLabel);
		dwr.util.setValue("hiddenRoleName", readRoleValue);
		dwr.util.setValue("hiddenGroupName", publicGroup);
		enablePublicAccess(true);
		hide("userName");
		hide("browseIcon");
	}
}

function toggleAccessNameLabel() {
	var byGroup = dwr.util.getValue("byGroup");
	var byUser = dwr.util.getValue("byUser");
	var byPublic = dwr.util.getValue("byPublic");
	enablePublicAccess(false);
	show("browseIcon");
	if (byGroup == true && byUser == false && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
		show("groupName");
		hide("userName");
	} else if (byGroup == false && byUser == true && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "User Login Name *");
		hide("groupName");
		show("userName");
		alert('here');
	} else if (byPublic == true && byGroup == false && byUser == false) {
		dwr.util.setValue("accessNameLabel", "Group Name");
		show("groupName");
		dwr.util.setValue("groupName", publicGroup);
		dwr.util.setValue("roleName", readRoleLabel);
		dwr.util.setValue("hiddenRoleName", readRoleValue);
		dwr.util.setValue("hiddenGroupName", publicGroup);
		enablePublicAccess(true);
		hide("userName");
		hide("browseIcon");
	}
}

function enablePublicAccess(enabled) {
	if (enabled) {
		document.getElementById("groupName").disabled = true;
		document.getElementById("roleName").disabled = true;
		dwr.util.setValue("accessNameLabel", "Group Name *");
	} else {
		document.getElementById("groupName").disabled = false;
		document.getElementById("roleName").disabled = false;
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
	}
}

function enableAccessBy(enabled) {
	if (enabled) {
		document.getElementById("byGroup").disabled = false;<commit_msg>removed debugging message<commit_after>var publicGroup = "Public";
var readRoleLabel = "read";
var readRoleValue = "R";

function displayAccessNameLabel() {
	var byGroup = dwr.util.getValue("byGroup");
	var byUser = dwr.util.getValue("byUser");
	var byPublic = dwr.util.getValue("byPublic");
	enablePublicAccess(false);
	dwr.util.setValue("groupName", "");
	dwr.util.setValue("userName", "");
	dwr.util.setValue("roleName", "");
	show("browseIcon");
	if (byGroup == true && byUser == false && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
		show("groupName");
		hide("userName");
	} else if (byGroup == false && byUser == true && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "User Login Name *");
		hide("groupName");
		show("userName");
	} else if (byPublic == true && byGroup == false && byUser == false) {
		dwr.util.setValue("accessNameLabel", "Group Name");
		show("groupName");
		dwr.util.setValue("groupName", publicGroup);
		dwr.util.setValue("roleName", readRoleLabel);
		dwr.util.setValue("hiddenRoleName", readRoleValue);
		dwr.util.setValue("hiddenGroupName", publicGroup);
		enablePublicAccess(true);
		hide("userName");
		hide("browseIcon");
	}
}

function toggleAccessNameLabel() {
	var byGroup = dwr.util.getValue("byGroup");
	var byUser = dwr.util.getValue("byUser");
	var byPublic = dwr.util.getValue("byPublic");
	enablePublicAccess(false);
	show("browseIcon");
	if (byGroup == true && byUser == false && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
		show("groupName");
		hide("userName");
	} else if (byGroup == false && byUser == true && byPublic == false) {
		dwr.util.setValue("accessNameLabel", "User Login Name *");
		hide("groupName");
		show("userName");
	} else if (byPublic == true && byGroup == false && byUser == false) {
		dwr.util.setValue("accessNameLabel", "Group Name");
		show("groupName");
		dwr.util.setValue("groupName", publicGroup);
		dwr.util.setValue("roleName", readRoleLabel);
		dwr.util.setValue("hiddenRoleName", readRoleValue);
		dwr.util.setValue("hiddenGroupName", publicGroup);
		enablePublicAccess(true);
		hide("userName");
		hide("browseIcon");
	}
}

function enablePublicAccess(enabled) {
	if (enabled) {
		document.getElementById("groupName").disabled = true;
		document.getElementById("roleName").disabled = true;
		dwr.util.setValue("accessNameLabel", "Group Name *");
	} else {
		document.getElementById("groupName").disabled = false;
		document.getElementById("roleName").disabled = false;
		dwr.util.setValue("accessNameLabel", "Collaboration Group Name *");
	}
}

function enableAccessBy(enabled) {
	if (enabled) {
		document.getElementById("byGroup").disabled = false;
{'fraction_non_alphanumeric': 0.1770928323910268, 'fraction_numerical': 0.0, 'mean_word_length': 5.753694581280788, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3834487', 'n_tokens_mistral': 1813, 'n_tokens_neox': 1772, 'n_words': 330}