Cloned from http://beanshell2.googlecode.com/svn/