Initial port from commons-lang plugin