text:
package com.ensoftcorp.open.immutability.analysis.solvers;

import static com.ensoftcorp.open.immutability.analysis.AnalysisUtilities.getTypes;
import static com.ensoftcorp.open.immutability.analysis.AnalysisUtilities.removeTypes;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.Set;

import com.ensoftcorp.atlas.core.db.graph.Node;
import com.ensoftcorp.open.immutability.analysis.ImmutabilityTypes;
import com.ensoftcorp.open.immutability.log.Log;

public class XMethodAdaptYGreaterThanEqualZConstraintSolver {

	// all possible sets, 3 choose 3, 3 choose 2, and 3 choose 1
	private static final ArrayList<EnumSet<ImmutabilityTypes>> sets = new ArrayList<EnumSet<ImmutabilityTypes>>();
	static {
		EnumSet<ImmutabilityTypes> SET1 = EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY);
		EnumSet<ImmutabilityTypes> SET2 = EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY);
		EnumSet<ImmutabilityTypes> SET3 = EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD);
		EnumSet<ImmutabilityTypes> SET4 = EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.READONLY);
		EnumSet<ImmutabilityTypes> SET5 = EnumSet.of(ImmutabilityTypes.READONLY);
		EnumSet<ImmutabilityTypes> SET6 = EnumSet.of(ImmutabilityTypes.POLYREAD);
		EnumSet<ImmutabilityTypes> SET7 = EnumSet.of(ImmutabilityTypes.MUTABLE);
		sets.add(SET1);
		sets.add(SET2);
		sets.add(SET3);
		sets.add(SET4);
		sets.add(SET5);
		sets.add(SET6);
		sets.add(SET7);
	}

	public static boolean satisify(Node x, Node y, Node z) {
		Set<ImmutabilityTypes> xTypes = getTypes(x);
		if (xTypes.isEmpty()) {
			Log.warning("x [" + x.address().toAddressString() + "] is untyped, constraint 'qx madapt qy :> qz' cannot be satisfied", new IllegalArgumentException());
			return false;
		}

		Set<ImmutabilityTypes> yTypes = getTypes(y);
		if (yTypes.isEmpty()) {
			Log.warning("y [" + y.address().toAddressString() + "] is untyped, constraint 'qx madapt qy :> qz' cannot be satisfied", new IllegalArgumentException());
			return false;
		}

		Set<ImmutabilityTypes> zTypes = getTypes(z);
		if (zTypes.isEmpty()) {
			Log.warning("z [" + z.address().toAddressString() + "] is untyped, constraint 'qx madapt qy :> qz' cannot be satisfied", new IllegalArgumentException());
			return false;
		}

		return satisify(x, xTypes, y, yTypes, z, zTypes);
	}

	private static short getCase(Set<ImmutabilityTypes> xTypes, Set<ImmutabilityTypes> yTypes, Set<ImmutabilityTypes> zTypes) {
		short input = 0;

		int setID = 0;
		for (EnumSet<ImmutabilityTypes> set : sets) {
			if (xTypes.equals(set)) {
				break;
			} else {
				setID++;
			}
		}
		input |= setID;
		input <<= 3;

		setID = 0;
		for (EnumSet<ImmutabilityTypes> set : sets) {
			if (yTypes.equals(set)) {
				break;
			} else {
				setID++;
			}
		}
		input |= setID;
		input <<= 3;

		setID = 0;
		for (EnumSet<ImmutabilityTypes> set : sets) {
			if (zTypes.equals(set)) {
				break;
			} else {
				setID++;
			}
		}
		input |= setID;

		return input;
	}

	private static boolean satisify(Node x, Set<ImmutabilityTypes> xTypes, Node y, Set<ImmutabilityTypes> yTypes, Node z, Set<ImmutabilityTypes> zTypes) {
		boolean xTypesChanged = false;
		boolean yTypesChanged = false;
		boolean zTypesChanged = false;
		short input = getCase(xTypes, yTypes, zTypes);
		switch (input) {
		case 0: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 1: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 2: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 3: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 4: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 5: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 6: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 8: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 9: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 10: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 11: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 12: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return false;
		case 13: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 14: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 16: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 17: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 18: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 19: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 20: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 21: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 22: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 24: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 25: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 26: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 27: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 28: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 29: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 30: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 32: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 33: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 34: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 35: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 36: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 37: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 38: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 40: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 41: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 42: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 43: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 44: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[READONLY]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 45: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 46: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 48: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 49: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 50: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 51: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 52: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 53: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 54: // xTypes=[MUTABLE, POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 64: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 65: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 66: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 67: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 68: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 69: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 70: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 72: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 73: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 74: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 75: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 76: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return false;
		case 77: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 78: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 80: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 81: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 82: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 83: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 84: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 85: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 86: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 88: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 89: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 90: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 91: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 92: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 93: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 94: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 96: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 97: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 98: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 99: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 100: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 101: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 102: // xTypes=[POLYREAD, READONLY], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 104: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 105: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			return false;
		case 106: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 107: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 108: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[READONLY]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 109: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return false;
		case 110: // xTypes=[POLYREAD, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 112: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 113: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 114: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 115: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 116: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 117: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 118: // xTypes=[POLYREAD, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 128: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 129: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 130: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 131: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 132: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 133: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 134: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 136: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 137: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 138: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 139: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 140: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 141: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 142: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 144: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 145: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 146: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 147: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 148: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 149: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 150: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 152: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 153: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 154: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 155: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 156: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 157: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 158: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 160: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 161: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 162: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 163: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 164: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 165: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 166: // xTypes=[MUTABLE, POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 168: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 169: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || zTypesChanged;
		case 170: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 171: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 172: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 173: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 174: // xTypes=[MUTABLE, POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 176: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 177: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 178: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 179: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 180: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 181: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 182: // xTypes=[MUTABLE, POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 192: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 193: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 194: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 195: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 196: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 197: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 198: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 200: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 201: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 202: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 203: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 204: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return false;
		case 205: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 206: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 208: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 209: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 210: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 211: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 212: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 213: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			return xTypesChanged || yTypesChanged;
		case 214: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 216: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 217: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 218: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 219: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 220: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 221: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 222: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 224: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 225: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 226: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 227: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 228: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 229: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 230: // xTypes=[MUTABLE, READONLY], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 232: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 233: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 234: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 235: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 236: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[READONLY]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 237: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 238: // xTypes=[MUTABLE, READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 240: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 241: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 242: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 243: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 244: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 245: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 246: // xTypes=[MUTABLE, READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 256: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 257: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 258: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 259: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 260: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 261: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 262: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 264: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 265: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 266: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 267: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 268: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return false;
		case 269: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 270: // xTypes=[READONLY], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 272: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 273: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 274: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 275: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 276: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 277: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 278: // xTypes=[READONLY], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 280: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 281: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 282: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 283: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 284: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 285: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 286: // xTypes=[READONLY], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 288: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 289: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 290: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 291: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 292: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 293: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 294: // xTypes=[READONLY], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 296: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 297: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			return false;
		case 298: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 299: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return false;
		case 300: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[READONLY]
			return false;
		case 301: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return false;
		case 302: // xTypes=[READONLY], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 304: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 305: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 306: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 307: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 308: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 309: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.READONLY));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 310: // xTypes=[READONLY], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 320: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 321: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 322: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 323: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 324: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 325: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 326: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 328: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 329: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 330: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 331: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 332: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 333: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return false;
		case 334: // xTypes=[POLYREAD], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 336: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 337: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return yTypesChanged || zTypesChanged;
		case 338: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 339: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 340: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 341: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 342: // xTypes=[POLYREAD], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 344: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 345: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 346: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 347: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 348: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 349: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 350: // xTypes=[POLYREAD], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 352: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 353: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 354: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 355: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 356: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 357: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 358: // xTypes=[POLYREAD], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 360: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 361: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 362: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 363: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 364: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 365: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[POLYREAD]
			return false;
		case 366: // xTypes=[POLYREAD], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 368: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 369: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 370: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 371: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 372: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 373: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.POLYREAD));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 374: // xTypes=[POLYREAD], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		case 384: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 385: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 386: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 387: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 388: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 389: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
		case 390: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 392: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 393: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 394: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 395: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 396: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 397: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 398: // xTypes=[MUTABLE], yTypes=[POLYREAD, READONLY], zTypes=[MUTABLE]
			return false;
		case 400: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 401: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 402: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 403: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 404: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 405: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE, ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 406: // xTypes=[MUTABLE], yTypes=[MUTABLE, POLYREAD], zTypes=[MUTABLE]
			return false;
		case 408: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 409: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD, READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 410: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 411: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 412: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[READONLY]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 413: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[POLYREAD]
			return removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
		case 414: // xTypes=[MUTABLE], yTypes=[MUTABLE, READONLY], zTypes=[MUTABLE]
			return false;
		case 416: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD, READONLY]
			return false;
		case 417: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[POLYREAD, READONLY]
			return false;
		case 418: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[MUTABLE, POLYREAD]
			return false;
		case 419: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[MUTABLE, READONLY]
			return false;
		case 420: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[READONLY]
			return false;
		case 421: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[POLYREAD]
			return false;
		case 422: // xTypes=[MUTABLE], yTypes=[READONLY], zTypes=[MUTABLE]
			return false;
		case 424: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 425: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 426: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 427: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 428: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 429: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.POLYREAD));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 430: // xTypes=[MUTABLE], yTypes=[POLYREAD], zTypes=[MUTABLE]
			return false;
		case 432: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
		case 433: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[POLYREAD, READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD, ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 434: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[MUTABLE, POLYREAD]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
		case 435: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[MUTABLE, READONLY]
			return removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
		case 436: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[READONLY]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.READONLY));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 437: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[POLYREAD]
			xTypesChanged = removeTypes(x, EnumSet.of(ImmutabilityTypes.MUTABLE));
			yTypesChanged = removeTypes(y, EnumSet.of(ImmutabilityTypes.MUTABLE));
			zTypesChanged = removeTypes(z, EnumSet.of(ImmutabilityTypes.POLYREAD));
			return xTypesChanged || yTypesChanged || zTypesChanged;
		case 438: // xTypes=[MUTABLE], yTypes=[MUTABLE], zTypes=[MUTABLE]
			return false;
		default:
			throw new IllegalArgumentException("Unhandled case: xTypes=" + xTypes.toString() + ", yTypes=" + yTypes.toString() + ", zTypes=" + zTypes.toString());
		}
	}

}


text:
package org.apache.sling.scripting.sightly.impl.filter;

import java.util.Map;

import org.apache.sling.scripting.sightly.compiler.RuntimeFunction;
import org.apache.sling.scripting.sightly.compiler.expression.Expression;
import org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode;
import org.apache.sling.scripting.sightly.compiler.expression.nodes.MapLiteral;
import org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall;

/**
 * The {@code URIManipulationFilter} provides support for Sightly's URI Manipulation options according to the
 * language specification
 */
public class URIManipulationFilter extends AbstractFilter {

    public static final String SCHEME = "scheme";
    public static final String DOMAIN = "domain";
    public static final String PATH = "path";
    public static final String APPEND_PATH = "appendPath";
    public static final String PREPEND_PATH = "prependPath";
    public static final String SELECTORS = "selectors";
    public static final String ADD_SELECTORS = "addSelectors";
    public static final String REMOVE_SELECTORS = "removeSelectors";
    public static final String EXTENSION = "extension";
    public static final String SUFFIX = "suffix";
    public static final String PREPEND_SUFFIX = "prependSuffix";
    public static final String APPEND_SUFFIX = "appendSuffix";
    public static final String FRAGMENT = "fragment";
    public static final String QUERY = "query";
    public static final String ADD_QUERY = "addQuery";
    public static final String REMOVE_QUERY = "removeQuery";

    private static final class URIManipulationFilterLoader {
        private static final URIManipulationFilter INSTANCE = new URIManipulationFilter();
    }

    private URIManipulationFilter() {
        if (URIManipulationFilterLoader.INSTANCE != null) {
            throw new IllegalStateException("INSTANCE was already defined.");
        }
    }

    public static URIManipulationFilter getInstance() {
        return URIManipulationFilterLoader.INSTANCE;
    }

    @Override
    public Expression apply(Expression expression, ExpressionContext expressionContext) {
        if ((expression.containsOption(SCHEME) || expression.containsOption(DOMAIN) || expression.containsOption(PATH) || expression
                .containsOption(APPEND_PATH) || expression.containsOption(PREPEND_PATH) || expression.containsOption(SELECTORS) ||
                expression.containsOption(ADD_SELECTORS) || expression.containsOption(REMOVE_SELECTORS) || expression.containsOption
                (EXTENSION) || expression.containsOption(SUFFIX) || expression.containsOption(PREPEND_SUFFIX) || expression
                .containsOption(APPEND_SUFFIX) || expression.containsOption(FRAGMENT) || expression.containsOption(QUERY) || expression
                .containsOption(ADD_QUERY) || expression.containsOption(REMOVE_QUERY)) && expressionContext != ExpressionContext
                .PLUGIN_DATA_SLY_USE && expressionContext
                != ExpressionContext.PLUGIN_DATA_SLY_TEMPLATE && expressionContext != ExpressionContext.PLUGIN_DATA_SLY_CALL &&
                expressionContext != ExpressionContext.PLUGIN_DATA_SLY_RESOURCE) {
            Map<String, ExpressionNode> uriOptions = getFilterOptions(expression, SCHEME, DOMAIN, PATH, APPEND_PATH, PREPEND_PATH,
                    SELECTORS, ADD_SELECTORS, REMOVE_SELECTORS, EXTENSION, SUFFIX, PREPEND_SUFFIX, APPEND_SUFFIX, FRAGMENT, QUERY,
                    ADD_QUERY, REMOVE_QUERY);
            if (uriOptions.size() > 0) {
                ExpressionNode translation =
                        new RuntimeCall(RuntimeFunction.URI_MANIPULATION, expression.getRoot(), new MapLiteral(uriOptions));
                return expression.withNode(translation);
            }
        }
        return expression;
    }

}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.commons.lang3.time;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.fail;

import java.text.FieldPosition;
import java.text.Format;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLongArray;

import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.DefaultLocale;
import org.junitpioneer.jupiter.DefaultTimeZone;

/**
 * Unit tests {@link org.apache.commons.lang3.time.FastDateFormat}.
 *
 * @since 2.0
 */
public class FastDateFormatTest {
    /*
     * Only the cache methods need to be tested here.
     * The print methods are tested by {@link FastDateFormat_PrinterTest}
     * and the parse methods are tested by {@link FastDateFormat_ParserTest}
     */
    @Test
    public void test_getInstance() {
        final FastDateFormat format1 = FastDateFormat.getInstance();
        final FastDateFormat format2 = FastDateFormat.getInstance();
        assertSame(format1, format2);
    }

    @Test
    public void test_getInstance_String() {
        final FastDateFormat format1 = FastDateFormat.getInstance("MM/DD/yyyy");
        final FastDateFormat format2 = FastDateFormat.getInstance("MM-DD-yyyy");
        final FastDateFormat format3 = FastDateFormat.getInstance("MM-DD-yyyy");

        assertNotSame(format1, format2);
        assertSame(format2, format3);
        assertEquals("MM/DD/yyyy", format1.getPattern());
        assertEquals(TimeZone.getDefault(), format1.getTimeZone());
        assertEquals(TimeZone.getDefault(), format2.getTimeZone());
    }

    @DefaultLocale(language = "en", country = "US")
    @DefaultTimeZone("America/New_York")
    @Test
    public void test_getInstance_String_TimeZone() {

        final FastDateFormat format1 = FastDateFormat.getInstance("MM/DD/yyyy",
                TimeZone.getTimeZone("Atlantic/Reykjavik"));
        final FastDateFormat format2 = FastDateFormat.getInstance("MM/DD/yyyy");
        final FastDateFormat format3 = FastDateFormat.getInstance("MM/DD/yyyy", TimeZone.getDefault());
        final FastDateFormat format4 = FastDateFormat.getInstance("MM/DD/yyyy", TimeZone.getDefault());
        final FastDateFormat format5 = FastDateFormat.getInstance("MM-DD-yyyy", TimeZone.getDefault());
        final FastDateFormat format6 = FastDateFormat.getInstance("MM-DD-yyyy");

        assertNotSame(format1, format2);
        assertEquals(TimeZone.getTimeZone("Atlantic/Reykjavik"), format1.getTimeZone());
        assertEquals(TimeZone.getDefault(), format2.getTimeZone());
        assertSame(format3, format4);
        assertNotSame(format3, format5);
        assertNotSame(format4, format6);
    }

    @DefaultLocale(language = "en", country = "US")
    @Test
    public void test_getInstance_String_Locale() {
        final FastDateFormat format1 = FastDateFormat.getInstance("MM/DD/yyyy", Locale.GERMANY);
        final FastDateFormat format2 = FastDateFormat.getInstance("MM/DD/yyyy");
        final FastDateFormat format3 = FastDateFormat.getInstance("MM/DD/yyyy", Locale.GERMANY);

        assertNotSame(format1, format2);
        assertSame(format1, format3);
        assertEquals(Locale.GERMANY, format1.getLocale());
    }

    @DefaultLocale(language = "en", country = "US")
    @Test
    public void test_changeDefault_Locale_DateInstance() {
        final FastDateFormat format1 = FastDateFormat.getDateInstance(FastDateFormat.FULL, Locale.GERMANY);
        final FastDateFormat format2 = FastDateFormat.getDateInstance(FastDateFormat.FULL);
        Locale.setDefault(Locale.GERMANY);
        final FastDateFormat format3 = FastDateFormat.getDateInstance(FastDateFormat.FULL);

        assertSame(Locale.GERMANY, format1.getLocale());
        assertEquals(Locale.US, format2.getLocale());
        assertSame(Locale.GERMANY, format3.getLocale());
        assertNotSame(format1, format2);
        assertNotSame(format2, format3);
    }

    @DefaultLocale(language = "en", country = "US")
    @Test
    public void test_changeDefault_Locale_DateTimeInstance() {
        final FastDateFormat format1 = FastDateFormat.getDateTimeInstance(FastDateFormat.FULL, FastDateFormat.FULL, Locale.GERMANY);
        final FastDateFormat format2 = FastDateFormat.getDateTimeInstance(FastDateFormat.FULL, FastDateFormat.FULL);
        Locale.setDefault(Locale.GERMANY);
        final FastDateFormat format3 = FastDateFormat.getDateTimeInstance(FastDateFormat.FULL, FastDateFormat.FULL);

        assertSame(Locale.GERMANY, format1.getLocale());
        assertEquals(Locale.US, format2.getLocale());
        assertSame(Locale.GERMANY, format3.getLocale());
        assertNotSame(format1, format2);
        assertNotSame(format2, format3);
    }

    @DefaultLocale(language = "en", country = "US")
    @DefaultTimeZone("America/New_York")
    @Test
    public void test_getInstance_String_TimeZone_Locale() {
        final FastDateFormat format1 = FastDateFormat.getInstance("MM/DD/yyyy",
                TimeZone.getTimeZone("Atlantic/Reykjavik"), Locale.GERMANY);
        final FastDateFormat format2 = FastDateFormat.getInstance("MM/DD/yyyy", Locale.GERMANY);
        final FastDateFormat format3 = FastDateFormat.getInstance("MM/DD/yyyy",
                TimeZone.getDefault(), Locale.GERMANY);

        assertNotSame(format1, format2);
        assertEquals(TimeZone.getTimeZone("Atlantic/Reykjavik"), format1.getTimeZone());
        assertEquals(TimeZone.getDefault(), format2.getTimeZone());
        assertEquals(TimeZone.getDefault(), format3.getTimeZone());
        assertEquals(Locale.GERMANY, format1.getLocale());
        assertEquals(Locale.GERMANY, format2.getLocale());
        assertEquals(Locale.GERMANY, format3.getLocale());
    }

    @Test
    public void testCheckDefaults() {
        final FastDateFormat format = FastDateFormat.getInstance();
        final FastDateFormat medium = FastDateFormat.getDateTimeInstance(FastDateFormat.SHORT, FastDateFormat.SHORT);
        assertEquals(medium, format);

        final SimpleDateFormat sdf = new SimpleDateFormat();
        assertEquals(sdf.toPattern(), format.getPattern());

        assertEquals(Locale.getDefault(), format.getLocale());
        assertEquals(TimeZone.getDefault(), format.getTimeZone());
    }

    @Test
    public void testCheckDifferingStyles() {
        final FastDateFormat shortShort = FastDateFormat.getDateTimeInstance(FastDateFormat.SHORT, FastDateFormat.SHORT, Locale.US);
        final FastDateFormat shortLong = FastDateFormat.getDateTimeInstance(FastDateFormat.SHORT, FastDateFormat.LONG, Locale.US);
        final FastDateFormat longShort = FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.SHORT, Locale.US);
        final FastDateFormat longLong = FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.LONG, Locale.US);

        assertNotEquals(shortShort, shortLong);
        assertNotEquals(shortShort, longShort);
        assertNotEquals(shortShort, longLong);
        assertNotEquals(shortLong, longShort);
        assertNotEquals(shortLong, longLong);
        assertNotEquals(longShort, longLong);
    }

    @Test
    public void testDateDefaults() {
        assertEquals(FastDateFormat.getDateInstance(FastDateFormat.LONG, Locale.CANADA),
                FastDateFormat.getDateInstance(FastDateFormat.LONG, TimeZone.getDefault(), Locale.CANADA));

        assertEquals(FastDateFormat.getDateInstance(FastDateFormat.LONG, TimeZone.getTimeZone("America/New_York")),
                FastDateFormat.getDateInstance(FastDateFormat.LONG, TimeZone.getTimeZone("America/New_York"), Locale.getDefault()));

        assertEquals(FastDateFormat.getDateInstance(FastDateFormat.LONG),
                FastDateFormat.getDateInstance(FastDateFormat.LONG, TimeZone.getDefault(), Locale.getDefault()));
    }

    @Test
    public void testTimeDefaults() {
        assertEquals(FastDateFormat.getTimeInstance(FastDateFormat.LONG, Locale.CANADA),
                FastDateFormat.getTimeInstance(FastDateFormat.LONG, TimeZone.getDefault(), Locale.CANADA));

        assertEquals(FastDateFormat.getTimeInstance(FastDateFormat.LONG, TimeZone.getTimeZone("America/New_York")),
                FastDateFormat.getTimeInstance(FastDateFormat.LONG, TimeZone.getTimeZone("America/New_York"), Locale.getDefault()));

        assertEquals(FastDateFormat.getTimeInstance(FastDateFormat.LONG),
                FastDateFormat.getTimeInstance(FastDateFormat.LONG, TimeZone.getDefault(), Locale.getDefault()));
    }

    @Test
    public void testTimeDateDefaults() {
        assertEquals(FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM, Locale.CANADA),
                FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM, TimeZone.getDefault(), Locale.CANADA));

        assertEquals(FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM, TimeZone.getTimeZone("America/New_York")),
                FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM, TimeZone.getTimeZone("America/New_York"), Locale.getDefault()));

        assertEquals(FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM),
                FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.MEDIUM, TimeZone.getDefault(), Locale.getDefault()));
    }

    @Test
    public void testParseSync() throws InterruptedException {
        final String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS";
        final SimpleDateFormat inner = new SimpleDateFormat(pattern);
        final Format sdf= new Format() {
            private static final long serialVersionUID = 1L;

            @Override
            public StringBuffer format(final Object obj,
                    final StringBuffer toAppendTo,
                    final FieldPosition fieldPosition) {
                synchronized(this) {
                    return inner.format(obj, toAppendTo, fieldPosition);
                }
            }

            @Override
            public Object parseObject(final String source, final ParsePosition pos) {
                synchronized(this) {
                    return inner.parseObject(source, pos);
                }
            }
        };
        final AtomicLongArray sdfTime= measureTime(sdf, sdf);

        final Format fdf = FastDateFormat.getInstance(pattern);
        final AtomicLongArray fdfTime= measureTime(fdf, fdf);

        //System.out.println(">>FastDateFormatTest: FastDatePrinter:"+fdfTime.get(0)+"  SimpleDateFormat:"+sdfTime.get(0));
        //System.out.println(">>FastDateFormatTest: FastDateParser:"+fdfTime.get(1)+"  SimpleDateFormat:"+sdfTime.get(1));
    }

    private static final int NTHREADS = 10;
    private static final int NROUNDS = 10000;

    private AtomicLongArray measureTime(final Format printer, final Format parser) throws InterruptedException {
        final ExecutorService pool = Executors.newFixedThreadPool(NTHREADS);
        final AtomicInteger failures = new AtomicInteger(0);
        final AtomicLongArray totalElapsed = new AtomicLongArray(2);
        try {
            for (int i = 0; i < NTHREADS; ++i) {
                pool.submit(() -> {
                    for (int j = 0; j < NROUNDS; ++j) {
                        try {
                            final Date date = new Date();

                            final long t0 = System.currentTimeMillis();
                            final String formattedDate = printer.format(date);
                            totalElapsed.addAndGet(0, System.currentTimeMillis() - t0);

                            final long t1 = System.currentTimeMillis();
                            final Object pd = parser.parseObject(formattedDate);
                            totalElapsed.addAndGet(1, System.currentTimeMillis() - t1);

                            if (!date.equals(pd)) {
                                failures.incrementAndGet();
                            }
                        } catch (final Exception e) {
                            failures.incrementAndGet();
                            e.printStackTrace();
                        }
                    }
                });
            }
        } finally {
            pool.shutdown();
            // depending on the performance of the machine used to run the parsing,
            // the tests can run for a while. It should however complete within
            // 30 seconds. Might need increase on very slow machines.
            if (!pool.awaitTermination(30, TimeUnit.SECONDS)) {
                pool.shutdownNow();
                fail("did not complete tasks");
            }
        }
        assertEquals(0, failures.get());
        return totalElapsed;
    }

    /**
     * According to LANG-954 (https://issues.apache.org/jira/browse/LANG-954) this is broken in Android 2.1.
     */
    @Test
    public void testLANG_954() {
        final String pattern = "yyyy-MM-dd'T'";
        FastDateFormat.getInstance(pattern);
    }

    @Test
    public void testLANG_1152() {
        final TimeZone utc = FastTimeZone.getGmtTimeZone();
        final Date date = new Date(Long.MAX_VALUE);

        String dateAsString = FastDateFormat.getInstance("yyyy-MM-dd", utc, Locale.US).format(date);
        assertEquals("292278994-08-17", dateAsString);

        dateAsString = FastDateFormat.getInstance("dd/MM/yyyy", utc, Locale.US).format(date);
        assertEquals("17/08/292278994", dateAsString);
    }

    @Test
    public void testLANG_1267() {
        FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
    }
}


text:
**Gregory Way, Casey Greene, and Jennifer Doherty 2018**

Previous research identified a sparse classifier of few genes that can classify High Grade Serous Ovarian Cancer (HGSC) subtypes.
This classifier (Random Forest) was used to find a sparse set of genes to be placed on a [nanostring](https://www.nanostring.com/) panel.

Here, we test the correlation of these genes against all other genes measured across four HGSC gene expression datasets.
The datasets include TCGA, Tothill, Yoshihara, and Mayo.
We use [curatedOvarianData](https://bioconductor.org/packages/release/data/experiment/html/curatedOvarianData.html) to access datasets.

## Procedure

### Part I

We take the 59 nanostring genes and consider their gene expression vectors across the four datasets independently.
We then take pairwise Pearson correlations of each of these 59 genes against **all** other genes for each dataset.
Lastly, we consider the genes in the top 5% and top 1% of these correlations for all 59 genes for each dataset.
A useful output is the long data frame (`results/all_threshold_classifier_gene_correlations.tsv`), which stores the highest correlated genes against the nanostring classifier genes.

### Part II

In addition, we output geneset files ([`.gmt` format](https://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats)) under 4 different tiers of confidence (see below).
The file is located in `results/correlated_hgsc_classifier_genes.gmt`.
The format of each line in this tab separated file is: [classifier gene and confidence tier, correlated geneset (1, 2, ..., n)].
The first gene in the correlated geneset is the classifier gene itself.

### Part III

We then run a geneset overrepresentation analysis (ORA) using `Tier 1B` genes using all unique genes measured in the 4 datasets as background.
We use [WebGestalt](https://doi.org/10.1093/nar/gkx356 "WebGestalt 2017: a more comprehensive, powerful, flexible and interactive gene set enrichment analysis toolkit") for ORA.
The results of the pathway analysis are stored in `results/overrepresented_pathways_classifier_genes.tsv`.

## Computational Environment

All processing and analysis scripts were performed using the conda environment specified in `environment.yml`.
To build and activate this environment run:

```bash
# conda version 4.5.1
conda env create --force --file environment.yml

conda activate hgsc-nanostring
```

## Reproduce Pipeline

Each of the scripts are designed to be executed sequentially.
The scripts are located in the `scripts/` folder and include:

| Script | Output |
| :----- | :----- |
| `A.get_correlation_output.R` | (A) Correlations between HGSC genes and subtype classifier genes (B) Missing classifier genes by dataset |
| `B.explore_correlations.ipynb` | (A) Distribution of correlations across classifier genes and datasets (B) 95% and 99% threshold correlation dataframes in long format |
| `C.threshold_venns.R` | Venn diagrams describing correlated genes across datasets for both thresholds and against all 29 classifier genes |
| `D.get_overlap_genes.R` | A summary dataframe sorted by highest correlated genes with the highest support (99% threshold across all 4 datasets) |
| `E.gmt_genesets_pathway_analysis.R` | A single `.gmt` file for use in downstream gene set enrichment-like analyses |
| `F.summarize_pathways.R` | A single table describing top 15 enriched gene ontology terms for each classifier gene |

To reproduce the entire pipeline, run the following (after activating the conda environment)

```bash
# Make sure the base directory is `hgsc_subtypes`
bash 7.Nanostring/run_analysis.sh
```

## Output

### All thresholded gene correlations

The file `results/all_threshold_classifier_gene_correlations.tsv` contains 57,551 rows describing correlations of HGSC gene expression values against 59 nanostring classifier genes.
A description of the columns are:

1. `classifier_gene` - The gene used in the nanostring subtype classifier
2. `gene` - The gene compared against in the HGSC gene expression datasets
3. `num_datasets` - How many datasets the nanostring classifier gene is measured in
4. `percent_datasets` - Of `num_datasets` how many times is the gene correlation pair observed
5. `min_gene_cor` - The minimum correlation observed for the gene by gene (for those not filtered by threshold)
6. `max_gene_cor` - The maximum correlation observed for the gene by gene (for those not filtered by threshold)
7. `95_threshold` - Indicator variable if the gene by gene correlation was observed in the top 5% of correlations
8. `99_threshold` - Indicator variable if the gene by gene correlation was observed in the top 1% of correlations

The file is sorted by percentage of datasets encountered, if the correlation exists in the 99% threshold, and then by maximum gene correlation.
Note that the scenario `(0, 1)` is possible for the 95% threshold and 99% threshold.
This happens when a significant gene by gene correlation exists in a different number of datasets per threshold.

### Gene set file

This file is compiled into a `.gmt` file with confidence tiers.
The confidence tiers include

| Confidence Tier | Description |
| :-------------: | :---------- |
| Tier 1A | Genes in 99% threshold correlations for all 4 datasets |
| Tier 1B | Genes in 99% threshold correlations for all 3 datasets measured in (allows for a single dataset with missing measurements) |
| Tier 2A | Genes in 95% threshold correlations for all 4 datasets |
| Tier 2B | Genes in 95% threshold correlations for all 3 datasets measured in (allows for a single dataset with missing measurements) |
| Tier 3 | Genes in 95% threshold correlations for 3/4 datasets (allows for a single dataset to not have correlation) |
| Tier 4 | Genes in 95% threshold correlations for 2/4 datasets (allows for two datasets to not have correlations) |

The tier system is built into the single `.gmt`.
For high confident genesets use Tier 1A but at the cost of smaller sets.

### Overrepresented pathways

The table stores the top 15 enriched gene ontology (GO) biological process terms against correlated genesets for all classifier genes.
We use `Tier 1B` genesets as input.
A description of the columns:

1. `classifier_gene` - The gene used in the nanostring subtype classifier
2. `tier` - which geneset tier was used (in this case `tier-1B` was used)
3. `geneset` - GO identifier
4. `description` - GO term description
5. `link` - a direct link to the GO term online information
6. `PValue` - unadjusted P value for enrichment
7. `FDR` - Benjamini-Hochberg adjusted P value
8. `OverlapGene_UserID` - Which input genes were found in the given pathway

The analyses is designed so that others may make different decisions on which genesets, tiers, or pathways to use.


text:
//=============================================================================
//  THIS SOURCE CODE IS PROPRIETARY INFORMATION BELONGING TO INTERVIDEO, INC.
//  ANY USE INCLUDING BUT NOT LIMITED TO COPYING OF CODE, CONCEPTS, AND/OR
//  ALGORITHMS IS PROHIBITED EXCEPT WITH EXPRESS WRITTEN PERMISSION BY THE
//  COMPANY.
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1998 - 2006  InterVideo Corporation.  All Rights Reserved.
//
//-----------------------------------------------------------------------------
#ifndef _IVI_ANTIMEMORYDUMP_H
#define _IVI_ANTIMEMORYDUMP_H

///*!
// [Internal function. Do not call it.]
//
// Modify the SizeOfImage value of the specified module in
// both PEB structure and PE header.  Save the handle and
// SizeOfImage information to a watch list.
//
// Return value - [bool] true if successful, false if not
// Supported platform: Windows NT/2K
//*/
bool __cdecl gtrRegisterImagesize(HANDLE hModule);

///*!
// [Internal function. Do not call it.]
//
// Restore SizeOfImage vlaue of the target module in both
// PEB and PE header.  Remove the handle of the module and
// its SizeOfImage information entry from the watch list.
//
// Return value - [bool] true if successful, false if not
// Supported platform: Windows NT/2K
//*/
bool __cdecl gtrUnregisterImagesize(HANDLE hModule);

///*!
// [Internal function. Do not call it.]
//
// Start to check periodically if any SizeOfImage values of
// the modules in the watch list have been modified illegally.
//
// Return value - [bool] true if successful, false if not
// Supported platform: Windows NT/2K
//*/
bool __cdecl gtrStartImagesizeChecker();

///*!
// [Internal function. Do not call it.]
//
// Start to check periodically if any SizeOfImage values of
// the modules in the watch list have been modified illegally.
//
// Supported platform: Windows NT/2K
//*/
bool __cdecl gtrStopImagesizeChecker();

#ifdef _WIN32

	///*!
	// The macro iviTR_REGISTER_IMAGESIZE modifies the SizeOfImage values of
	// the specified module, in both PEB structure and PE header.  If the
	// modification is successful, the information is then saved to a watch
	// list.
	//
	// Return value - None
	//
	// -#hModule - [IN] can not be NULL, the target module's handle
	//
	// Supported platform:		Windows NT/2K
	// Performance overhead:	Medium
	// Security level:			Low
	// Usage scope:				Global/process scope
	//
	// Usage:\n
	//
	// When the target module is a WIN32 executable, call the macro at
	// the application's initialization (e.g. InitInstance()).
	// ===================================================================
	//	iviTR_REGISTER_IMAGESIZE(::GetModuleHandle(NULL));
	//
	// When the target module is a DLL and will be loaded upon application's
	// launch (due to dependencies), call iviTR_REGISTER_IMAGESIZE within
	// DllMain.  Place the macro at the end of DLL_PROCESS_ATTACH case
	// statement.
	// ===================================================================
	// BOOL APIENTRY DllMain(HANDLE hModule,
	//						 DWORD  ul_reason_for_call,
	//						 LPVOID lpReserved)
	// {
	//		....
	//		if (DLL_PROCESS_ATTACH == ul_reason_for_call)
	//		{
	//			...
	//			iviTR_REGISTER_IMAGESIZE(hModule);
	//		}
	//
    //		return TRUE;
	//		....
	//	}
	//
	// When the target module is a DLL and loaded and unloaded dynamically
	// inside the application via LoadLibrary() and FreeLibrary().  Call
	// iviTR_REGISTER_IMAGESIZE right after LoadLibrary().
	// iviTR_REGISTER_IMAGESIZE & iviTR_UNREGISTER_IMAGESIZE macros should
	// be called in pair.
	// ===================================================================
	//	HINSTANCE hInstance = NULL;
	//	hInstance = ::LoadLibrary("MyDll.dll");
	//	if (NULL != hInstance)
	//	{
	//		iviTR_REGISTER_IMAGESIZE(hInstance);
	//		...
	//		...
	//		iviTR_UNREGISTER_IMAGESIZE(hInstance);
	//		FreeLibrary(hInstance);
	//	}
	//
	//*/
	#define iviTR_REGISTER_IMAGESIZE(hModule)				\
	{ gtrRegisterImagesize(hModule); }

	///*!
	// The macro iviTR_UNREGISTER_IMAGESIZE removes the entry of
	// the specified module from the checking list.
	//
	// Return value - None
	//
	// -#hModule - [IN] can not be NULL, the target module's handle
	//
	// Supported platform:		Windows NT/2K
	// Performance overhead:	Medium
	// Security level:			Low
	// Usage scope:				Global/process scope
	//
	// Usage:\n
	//
	// When the target module is a WIN32 executable, call the macro
	// at the application's termination (e.g. ExitInstance()).
	// ===================================================================
	//	iviTR_UNREGISTER_IMAGESIZE(::GetModuleHandle(NULL));
	//
	// When the target module is a DLL and loaded and unloaded dynamically
	// inside the application via LoadLibrary() and FreeLibrary().  Call
	// iviTR_UNREGISTER_IMAGESIZE before FreeLibrary().
	// iviTR_REGISTER_IMAGESIZE & iviTR_UNREGISTER_IMAGESIZE macros should
	// be called in pair.
	// ===================================================================
	//	HINSTANCE hInstance = NULL;
	//	hInstance = ::LoadLibrary("MyDll.dll");
	//	if (NULL != hInstance)
	//	{
	//		iviTR_REGISTER_IMAGESIZE(hInstance);
	//		...
	//		...
	//		iviTR_UNREGISTER_IMAGESIZE(hInstance);
	//		FreeLibrary(hInstance);
	//	}
	//
	// Note:\n
	// Do not call iviTR_UNREGISTER_IMAGESIZE macro inside DllMain().
	//
	//*/
	#define iviTR_UNREGISTER_IMAGESIZE(hModule)	\
	{ gtrUnregisterImagesize(hModule); }

	///*!
	// The macro iviTR_START_IMAGESIZE_CHECKER starts an opertation
	// that constantly checks if the new SizeOfImage values of the modules
	// in the watch list are being changed illegally.  If yes, the
	// application crashes immediately.
	//
	// Return value - None
	//
	// Supported platform:		Windows NT/2K
	// Performance overhead:	Medium
	// Security level:			Low
	// Usage scope:				Global/process scope
	//
	// Note:\n
	//
	// Insure the macro is called after the module loading process is fully
	// completely.  E.g. Do not call it in a constructor of a class or
	// DllMain() function of a DLL module.
	//
	//*/
	#define iviTR_START_IMAGESIZE_CHECKER \
	{ gtrStartImagesizeChecker(); }

	///*!
	// The macro iviTR_STOP_IMAGESIZE_CHECKER stops the opertation
	// that constantly checks if the new SizeOfImage values of the modules
	// in the watch list are being changed illegally.
	//
	// Return value - None
	//
	// Supported platform:		Windows NT/2K
	// Performance overhead:	Medium
	// Security level:			Low
	// Usage scope:				Global/process scope
	//
	// Note:\n
	//
	// Always call this macro after iviTR_START_IMAGESIZE_CHECKER.
	//
	//*/
	#define iviTR_STOP_IMAGESIZE_CHECKER \
	{ gtrStopImagesizeChecker(); }

#elif defined(__linux__)

	#define iviTR_REGISTER_IMAGESIZE(hModule)
	#define iviTR_UNREGISTER_IMAGESIZE(hModule)
	#define iviTR_START_IMAGESIZE_CHECKER
	#define iviTR_STOP_IMAGESIZE_CHECKER

#endif // _WIN32

#endif // _IVI_ANTIMEMORYDUMP_H


text:
/*
 * N.B.: This file was copied from `lib/registry_utils.js` in `https://github.com/adobe/brackets-registry`.
 * We can't use the exact same file currently because Brackets uses AMD-style modules, so this version has
 * the AMD wrapper added (and is reindented to avoid JSLint complaints).. If changes are made here, the
 * version in the registry app should be kept in sync.
 * In the future, we should have a better mechanism for sharing code between the two.
 */

/*jslint vars: true, plusplus: true, nomen: true, indent: 4, maxerr: 50 */
/*global brackets, define*/

define(function (require, exports, module) {
    "use strict";

    // From Brackets StringUtils
    function htmlEscape(str) {
        return String(str)
            .replace(/&/g, "&")
            .replace(/"/g, """)
            .replace(/'/g, "'")
            .replace(/</g, "<")
            .replace(/>/g, ">");
    }

    /**
     * Gets the last version from the given object and returns the short form of its date.
     * Assumes "this" is the current template context.
     * @return {string} The formatted date.
     */
    exports.lastVersionDate = function () {
        var result;
        if (this.versions && this.versions.length) {
            result = this.versions[this.versions.length - 1].published;
            if (result) {
                result = new Date(result);
                result = result.toLocaleDateString(brackets.getLocale(), {
                    "year": "numeric",
                    "month": "2-digit",
                    "day": "2-digit"
                });
            }
        }
        return result || "";
    };

    /**
     * Returns a more friendly display form of the owner's internal user id.
     * Assumes "this" is the current template context.
     * @return {string} A display version in the form "id (service)".
     */
    exports.formatUserId = function () {
        var friendlyName;
        if (this.owner) {
            var nameComponents = this.owner.split(":");
            friendlyName = nameComponents[1];
        }
        return friendlyName;
    };

    /**
     * Given a registry item, returns a URL that represents its owner's page on the auth service.
     * Currently only handles GitHub.
     * Assumes "this" is the current template context.
     * @return {string} A link to that user's page on the service.
     */
    exports.ownerLink = function () {
        var url;
        if (this.owner) {
            var nameComponents = this.owner.split(":");
            if (nameComponents[0] === "github") {
                url = "https://github.com/" + nameComponents[1];
            }
        }
        return url;
    };

    /**
     * Given a registry item, formats the author information, including a link to the owner's
     * github page (if available) and the author's name from the metadata.
     */
    exports.authorInfo = function () {
        var result = "",
            ownerLink = exports.ownerLink.call(this),
            userId = exports.formatUserId.call(this);
        if (this.metadata && this.metadata.author) {
            result = htmlEscape(this.metadata.author.name || this.metadata.author);
        } else if (userId) {
            result = htmlEscape(userId);
        }
        if (ownerLink) {
            result = "" + result + "";
        }
        return result;
    };

    /**
     * Returns an array of current registry entries, sorted by the publish date of the latest version of each entry.
     * @param {object} registry The unsorted registry.
     * @param {string} subkey The subkey to look for the registry metadata in. If unspecified, assumes
     *     we should look at the top level of the object.
     * @return {Array} Sorted array of registry entries.
     */
    exports.sortRegistry = function (registry, subkey) {
        function getPublishTime(entry) {
            if (entry.versions) {
                return new Date(entry.versions[entry.versions.length - 1].published).getTime();
            }

            return Number.NEGATIVE_INFINITY;
        }

        var sortedEntries = [];

        // Sort the registry by last published date (newest first).
        Object.keys(registry).forEach(function (key) {
            sortedEntries.push(registry[key]);
        });
        sortedEntries.sort(function (entry1, entry2) {
            return getPublishTime((subkey && entry2[subkey]) || entry2) -
                getPublishTime((subkey && entry1[subkey]) || entry1);
        });

        return sortedEntries;
    };
});


text:
<?php

namespace Brouwkuyp\Bundle\DashboardBundle\Controller;

use Brouwkuyp\Bundle\ServiceBundle\Entity\Log;
use Brouwkuyp\Bundle\ServiceBundle\Entity\Phase;
use Brouwkuyp\Bundle\ServiceBundle\Repository\LogRepository;
use Brouwkuyp\Bundle\ServiceBundle\Repository\PhaseRepository;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * Holds all async data calls for the project
 *
 * @author Evert Harmeling <evertharmeling@gmail.com>
 */
class DataController extends Controller
{
    /**
     * @var LogRepository
     */
    private $logRepository;

    /**
     * @var PhaseRepository
     */
    private $phaseRepository;

    /**
     * @param LogRepository $logRepository
     */
    public function __construct(LogRepository $logRepository, PhaseRepository $phaseRepository)
    {
        $this->logRepository = $logRepository;
        $this->phaseRepository = $phaseRepository;
    }

    /**
     * @return JsonResponse
     */
    public function currentRecipeLogsAction()
    {
        $logs = $this->logRepository->findForCurrentRecipe();

        return JsonResponse::create(['data' => $this->logsToArray($logs)]);
    }

    /**
     * @param  integer $id
     * @return array
     */
    public function batchLogsAction($id)
    {
        $logs = $this->logRepository->findForGraphAndBatchId($id);
        $phases = $this->phaseRepository->findForBatchId($id);

        $mappedPhases = [];
        /** @var Phase $phase */
        foreach ($phases as $phase) {
            $value = sprintf('%s: %s', $phase->getName(), $phase->getValue());
            if ($phase->getType() === Phase::CONTROL_TEMP || $phase->getType() === Phase::REACH_TEMP) {
                $value .= ' °C';
            } else {
                $value .= ' gram';
            }

            $mappedPhases[$phase->getId()] = $value;
        }

        $data = [];
        $previousLog = new Log();
        /** @var Log $log */
        foreach ($logs as $key => $log) {
            if (
                $log->getCreatedAt()->format('YmdHi') - $previousLog->getCreatedAt()->format('YmdHi') < 2
                &&
                $previousLog->getTopic() == $log->getTopic()
            ) {
                continue;
            }

            $item = [
                'type' => $log->getType(),
                'topic' => $log->getTopic(),
                'time' => $log->getCreatedAt()->format('U') * 1000,
                'value' => $log->getValue()
            ];

            if ($log->getTopic() === Log::TOPIC_PUMP_SET_STATE) {
                $item['value'] = 'Pomp: ' . ($log->getValue() === 'on' ? 'aan' : 'uit');
            } elseif ($log->getTopic() === 'phase.start') {
                if (isset($mappedPhases[$log->getValue()])) {
                    $item['value'] = $mappedPhases[$log->getValue()];

                    if ($previousLog->getTopic() == $log->getTopic()
                        && $previousLog->getValue() != $log->getValue()
                    ) {
                        $log->setValue($previousLog->getValue() . ', ' . $log->getValue());
                        continue;
                    }
                } else {
                    // must be set?! probably bad data!
                    continue;
                }
            }

            $data[] = $item;

            $previousLog = clone $log;
        }

        return JsonResponse::create(['data' => $data]);
    }

    /**
     * @param  array $logs
     * @return array
     */
    private function logsToArray(array $logs)
    {
        $data = [];
        /** @var Log $log */
        foreach ($logs as $log) {
            $data[] = [
                'type' => $log->getType(),
                'topic' => $log->getTopic(),
                'time' => $log->getCreatedAt()->format('U') * 1000,
                'value' => $log->getValue()
            ];
        }

        return $data;
    }
}