public static final String getCommonRoot(String fullPathOne, String fullPathTwo) {
		int i;
		int len1;
		int len2;
		int max;

		if (fullPathOne == null) {
			len1 = 0;
		} else {
			fullPathOne = fullPathOne.replace('\\', '/');
			len1 = fullPathOne.length();
		}

		if (fullPathTwo == null) {
			len2 = 0;
		} else {
			fullPathTwo = fullPathTwo.replace('\\', '/');
			len2 = fullPathTwo.length();
		}

		max = len1 > len2 ? len2 : len1;

		for (i = 0; i < max; i++) {
			if (fullPathOne.charAt(i) != fullPathTwo.charAt(i)) {
				i--;
				break;
			}
		}

		if (i == max) {
			i = max - 1;
		}
		while (i >= 0 && fullPathOne.charAt(i) != '/') {
			i--;
		}
		if (i < 0) {
			return null;
		}
		return fullPathOne.substring(0, i + 1);
	}