Program: 57153
Project: 57153
Buggy source:
/** 
 * {@inheritDoc} 
 */
@SuppressWarnings("String_Node_Str") @Override protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(final FieldEquationsMapper<T> mapper,final T time,final T theta,final T oneMinusThetaH){
  final T bDot0=theta.multiply(theta.multiply(theta.multiply(-10.0).add(16.0)).add(-15.0 / 2.0)).add(1);
  final T bDot1=getField().getZero();
  final T bDot2=theta.multiply(theta.multiply(theta.multiply(135.0 / 2.0).add(-729.0 / 8.0)).add(459.0 / 16.0));
  final T bDot3=theta.multiply(theta.multiply(theta.multiply(-120.0).add(152.0)).add(-44.0));
  final T bDot4=theta.multiply(theta.multiply(theta.multiply(125.0 / 2.0).add(-625.0 / 8.0)).add(375.0 / 16.0));
  final T bDot5=theta.multiply(5.0 / 8.0).multiply(theta.multiply(2).subtract(1));
  final T[] interpolatedState;
  final T[] interpolatedDerivatives;
  if (getGlobalPreviousState() != null && theta.getReal() <= 0.5) {
    final T hTheta=h.multiply(theta);
    final T b0=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(-5.0 / 2.0).add(16.0 / 3.0)).add(-15.0 / 4.0)).add(1));
    final T b1=getField().getZero();
    final T b2=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(135.0 / 8.0).add(-243.0 / 8.0)).add(459.0 / 32.0)));
    final T b3=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(-30.0).add(152.0 / 3.0)).add(-22.0)));
    final T b4=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(125.0 / 8.0).add(-625.0 / 24.0)).add(375.0 / 32.0)));
    final T b5=hTheta.multiply(theta.multiply(theta.multiply(5.0 / 12.0)).add(-5.0 / 16.0));
    interpolatedState=previousStateLinearCombination(b0,b1,b2,b3,b4,b5);
    interpolatedDerivatives=derivativeLinearCombination(bDot0,bDot1,bDot2,bDot3,bDot4,bDot5);
  }
 else {
    final T theta2=theta.multiply(theta);
    final T b0=h.multiply(theta.multiply(theta.multiply(theta.multiply(theta.multiply(-5.0 / 2.0).add(16.0 / 3.0)).add(-15.0 / 4.0)).add(1.0)).add(-1.0 / 12.0));
    final T b1=getField().getZero();
    final T b2=h.multiply(theta2.multiply(theta.multiply(theta.multiply(135.0 / 8.0).add(-243.0 / 8.0)).add(459.0 / 32.0)).add(-27.0 / 32.0));
    final T b3=h.multiply(theta2.multiply(theta.multiply(theta.multiply(-30.0).add(152.0 / 3.0)).add(-22.0)).add(4.0 / 3.0));
    final T b4=h.multiply(theta2.multiply(theta.multiply(theta.multiply(125.0 / 8.0).add(-625.0 / 24.0)).add(375.0 / 32.0)).add(-125.0 / 96.0));
    final T b5=h.multiply(theta2.multiply(theta.multiply(5.0 / 12.0).add(-5.0 / 16.0)).add(-5.0 / 48.0));
    interpolatedState=currentStateLinearCombination(b0,b1,b2,b3,b4,b5);
    interpolatedDerivatives=derivativeLinearCombination(bDot0,bDot1,bDot2,bDot3,bDot4,bDot5);
  }
  return new FieldODEStateAndDerivative<T>(time,interpolatedState,interpolatedDerivatives);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@SuppressWarnings("String_Node_Str") @Override protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(final FieldEquationsMapper<T> mapper,final T time,final T theta,final T oneMinusThetaH){
  final T bDot0=theta.multiply(theta.multiply(theta.multiply(-10.0).add(16.0)).add(-15.0 / 2.0)).add(1);
  final T bDot1=getField().getZero();
  final T bDot2=theta.multiply(theta.multiply(theta.multiply(135.0 / 2.0).add(-729.0 / 8.0)).add(459.0 / 16.0));
  final T bDot3=theta.multiply(theta.multiply(theta.multiply(-120.0).add(152.0)).add(-44.0));
  final T bDot4=theta.multiply(theta.multiply(theta.multiply(125.0 / 2.0).add(-625.0 / 8.0)).add(375.0 / 16.0));
  final T bDot5=theta.multiply(5.0 / 8.0).multiply(theta.multiply(2).subtract(1));
  final T[] interpolatedState;
  final T[] interpolatedDerivatives;
  if (getGlobalPreviousState() != null && theta.getReal() <= 0.5) {
    final T hTheta=h.multiply(theta);
    final T b0=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(-5.0 / 2.0).add(16.0 / 3.0)).add(-15.0 / 4.0)).add(1));
    final T b1=getField().getZero();
    final T b2=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(135.0 / 8.0).add(-243.0 / 8.0)).add(459.0 / 32.0)));
    final T b3=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(-30.0).add(152.0 / 3.0)).add(-22.0)));
    final T b4=hTheta.multiply(theta.multiply(theta.multiply(theta.multiply(125.0 / 8.0).add(-625.0 / 24.0)).add(375.0 / 32.0)));
    final T b5=hTheta.multiply(theta.multiply(theta.multiply(5.0 / 12.0).add(-5.0 / 16.0)));
    interpolatedState=previousStateLinearCombination(b0,b1,b2,b3,b4,b5);
    interpolatedDerivatives=derivativeLinearCombination(bDot0,bDot1,bDot2,bDot3,bDot4,bDot5);
  }
 else {
    final T theta2=theta.multiply(theta);
    final T b0=h.multiply(theta.multiply(theta.multiply(theta.multiply(theta.multiply(-5.0 / 2.0).add(16.0 / 3.0)).add(-15.0 / 4.0)).add(1.0)).add(-1.0 / 12.0));
    final T b1=getField().getZero();
    final T b2=h.multiply(theta2.multiply(theta.multiply(theta.multiply(135.0 / 8.0).add(-243.0 / 8.0)).add(459.0 / 32.0)).add(-27.0 / 32.0));
    final T b3=h.multiply(theta2.multiply(theta.multiply(theta.multiply(-30.0).add(152.0 / 3.0)).add(-22.0)).add(4.0 / 3.0));
    final T b4=h.multiply(theta2.multiply(theta.multiply(theta.multiply(125.0 / 8.0).add(-625.0 / 24.0)).add(375.0 / 32.0)).add(-125.0 / 96.0));
    final T b5=h.multiply(theta2.multiply(theta.multiply(5.0 / 12.0).add(-5.0 / 16.0)).add(-5.0 / 48.0));
    interpolatedState=currentStateLinearCombination(b0,b1,b2,b3,b4,b5);
    interpolatedDerivatives=derivativeLinearCombination(bDot0,bDot1,bDot2,bDot3,bDot4,bDot5);
  }
  return new FieldODEStateAndDerivative<T>(time,interpolatedState,interpolatedDerivatives);
}