Bug 118516 [DataBinding] Asserts should provide meaningful messages
Currently we use JDK Assert in various places in the code. However, if an assert fails, there often is no indication of why it failed or what the assert failure means without looking at the code indicated by the stack trace. It would be nicer if we would log exceptions or throw RuntimeExceptions with useful error messages instead.
bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
*            index of element to return
	 * @return element at the specified index
	 */
	public Object getSegment(int index) {
		return segments[index];
	}
	/**
	 * Returns the number of elements in this path.
	 * 
	 * @return the number of elements in this path
	 */
	public int getSegmentCount() {
		return segments.length;
	}
	/**
	 * Returns the first element in this path.
	 * 
	 * @return the first element in this path
	 */
	public Object getFirstSegment() {
		if (segments.length == 0) {
			return null;
		}
		return segments[0];
	}
	/**
	 * Returns the last element in this path.
	 * 
	 * @return the last element in this path
	 */