Buggy code:
@ Description ( "A<seq2seq4repair_space>generic<seq2seq4repair_space>operator<seq2seq4repair_space>for<seq2seq4repair_space>use<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>sum-constrained<seq2seq4repair_space>(possibly<seq2seq4repair_space>weighted)<seq2seq4repair_space>vector<seq2seq4repair_space>parameter." ) public class DeltaExchangeOperator extends Operator { public final Input < List < RealParameter > > parameterInput = new Input < List < RealParameter > > ( "parameter" , "if<seq2seq4repair_space>specified,<seq2seq4repair_space>this<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>operated<seq2seq4repair_space>on" , new ArrayList < RealParameter > ( ) ) ; public final Input < List < IntegerParameter > > intparameterInput = new Input < List < IntegerParameter > > ( "intparameter" , "if<seq2seq4repair_space>specified,<seq2seq4repair_space>this<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>operated<seq2seq4repair_space>on" , new ArrayList < IntegerParameter > ( ) ) ; public final Input < Double > deltaInput = new Input < Double > ( "delta" , "Magnitude<seq2seq4repair_space>of<seq2seq4repair_space>change<seq2seq4repair_space>for<seq2seq4repair_space>two<seq2seq4repair_space>randomly<seq2seq4repair_space>picked<seq2seq4repair_space>values." , 1.0 ) ; public final Input < Boolean > autoOptimizeiInput = new Input < Boolean > ( "autoOptimize" , "if<seq2seq4repair_space>true,<seq2seq4repair_space>window<seq2seq4repair_space>size<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>adjusted<seq2seq4repair_space>during<seq2seq4repair_space>the<seq2seq4repair_space>MCMC<seq2seq4repair_space>run<seq2seq4repair_space>to<seq2seq4repair_space>improve<seq2seq4repair_space>mixing." , true ) ; public final Input < Boolean > sIntegerOperatorInput = new Input < Boolean > ( "integer" , "if<seq2seq4repair_space>true,<seq2seq4repair_space>changes<seq2seq4repair_space>are<seq2seq4repair_space>all<seq2seq4repair_space>integers." , false ) ; public final Input < IntegerParameter > parameterWeightsInput = new Input < IntegerParameter > ( "weightvector" , "weights<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>vector<seq2seq4repair_space>parameter" ) ; private boolean autoOptimize ; private double delta ; private boolean isIntegerOperator ; private int [ ] parameterWeights ; private CompoundParameterHelper compoundParameter = null ; public void initAndValidate ( ) { autoOptimize = autoOptimizeiInput . get ( ) ; delta = deltaInput . get ( ) ; isIntegerOperator = sIntegerOperatorInput . get ( ) ; if ( parameterInput . get ( ) . isEmpty ( ) ) { if ( ( intparameterInput . get ( ) . size ( ) ) > 1 ) compoundParameter = new CompoundParameterHelper ( intparameterInput . get ( ) ) ; } else { if ( ( parameterInput . get ( ) . size ( ) ) > 1 ) compoundParameter = new CompoundParameterHelper ( parameterInput . get ( ) ) ; } if ( ( compoundParameter ) == null ) { if ( parameterInput . get ( ) . isEmpty ( ) ) { if ( ( intparameterInput . get ( ) . size ( ) ) > 0 ) { parameterWeights = new int [ intparameterInput . get ( ) . get ( 0 ) . getDimension ( ) ] ; } else { parameterWeights = new int [ 0 ] ; } } else { parameterWeights = new int [ parameterInput . get ( ) . get ( 0 ) . getDimension ( ) ] ; } } else { if ( ( compoundParameter . getDimension ( ) ) < 1 ) throw new IllegalArgumentException ( ( "Compound<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>created<seq2seq4repair_space>properly,<seq2seq4repair_space>dimension<seq2seq4repair_space>=<seq2seq4repair_space>" + ( compoundParameter . getDimension ( ) ) ) ) ; parameterWeights = new int [ compoundParameter . getDimension ( ) ] ; } if ( ( parameterWeightsInput . get ( ) ) != null ) { if ( ( parameterWeights . length ) != ( parameterWeightsInput . get ( ) . getDimension ( ) ) ) throw new IllegalArgumentException ( "Weights<seq2seq4repair_space>vector<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>length<seq2seq4repair_space>as<seq2seq4repair_space>parameter<seq2seq4repair_space>dimension" ) ; for ( int i = 0 ; i < ( parameterWeights . length ) ; i ++ ) { parameterWeights [ i ] = parameterWeightsInput . get ( ) . getValue ( i ) ; } } else { for ( int i = 0 ; i < ( parameterWeights . length ) ; i ++ ) { parameterWeights [ i ] = 1 ; } } if ( ( isIntegerOperator ) && ( ( delta ) != ( Math . round ( delta ) ) ) ) { throw new IllegalArgumentException ( "Can't<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>integer<seq2seq4repair_space>operator<seq2seq4repair_space>if<seq2seq4repair_space>delta<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>integer" ) ; } int dim = - 1 ; if ( ( compoundParameter ) == null ) { <START_BUG> dim = ( ( parameterInput . get ( ) . get ( 0 ) ) != null ) ? parameterInput . get ( ) . get ( 0 ) . getDimension ( ) : intparameterInput . get ( ) . get ( 0 ) . getDimension ( ) ; <END_BUG> } else { dim = compoundParameter . getDimension ( ) ; } if ( dim <= 1 ) { warning . println ( ( ( ( ( ( "WARNING:<seq2seq4repair_space>the<seq2seq4repair_space>dimension<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>" + dim ) + "<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>start<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>run.\n" ) + "<seq2seq4repair_space>The<seq2seq4repair_space>operator<seq2seq4repair_space>" ) + ( getID ( ) ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>effect<seq2seq4repair_space>(if<seq2seq4repair_space>this<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>change)." ) ) ; } } @ Override public final double proposal ( ) { } @ Override public double getCoercableParameterValue ( ) { } @ Override public void setCoercableParameterValue ( final double fValue ) { } @ Override public void optimize ( final double logAlpha ) { } @ Override public final String getPerformanceSuggestion ( ) { } }

Fix:
dim = ( ! ( parameterInput . get ( ) . isEmpty ( ) ) ) ? parameterInput . get ( ) . get ( 0 ) . getDimension ( ) : intparameterInput . get ( ) . get ( 0 ) . getDimension ( ) ;