public TYPE_1 METHOD_1 ( TYPE_2 element ) { TYPE_2 VAR_1 = element . METHOD_2 ( ) ; while ( ( ( VAR_1 != null ) && ( ! ( VAR_1 instanceof TYPE_3 ) ) ) && ( ! ( VAR_1 instanceof TYPE_4 ) ) ) VAR_1 = VAR_1 . METHOD_2 ( ) ; return ( ( TYPE_1 ) ( VAR_1 ) ) ; }

public TYPE_1 METHOD_1 ( TYPE_2 element ) { if ( ( element . METHOD_2 ( ) ) == null ) { if ( element instanceof TYPE_1 ) return ( ( TYPE_1 ) ( element ) ) ; return null ; } TYPE_2 VAR_1 = element . METHOD_2 ( ) ; while ( ( ( VAR_1 != null ) && ( ! ( VAR_1 instanceof TYPE_3 ) ) ) && ( ! ( VAR_1 instanceof TYPE_4 ) ) ) VAR_1 = VAR_1 . METHOD_2 ( ) ; return ( ( TYPE_1 ) ( VAR_1 ) ) ; }
