Program: 177913
Project: 177913
Buggy source:
/** 
 * It returns a   {@link Calendar} objects complying with Java bean validationannotations. {@inheritDoc}
 */
public Object getValue(Class<?> attrType,List<Annotation> annotations) throws PodamMockeryException {
  if (null != findTypeFromList(annotations,AssertTrue.class)) {
    return Boolean.TRUE;
  }
  if (null != findTypeFromList(annotations,AssertFalse.class)) {
    return Boolean.FALSE;
  }
  if (null != findTypeFromList(annotations,Past.class)) {
    int days=PodamUtils.getIntegerInRange(1,365);
    long timestamp=System.currentTimeMillis() - TimeUnit.DAYS.toSeconds(days);
    return timestampToReturnType(timestamp);
  }
  if (null != findTypeFromList(annotations,Future.class)) {
    int days=PodamUtils.getIntegerInRange(1,365);
    long timestamp=System.currentTimeMillis() + TimeUnit.DAYS.toSeconds(days);
    return timestampToReturnType(timestamp);
  }
  Size size=findTypeFromList(annotations,Size.class);
  if (null != size) {
    int minValue=size.min();
    int maxValue=size.max();
    if (maxValue == Integer.MAX_VALUE) {
      maxValue=PodamConstants.STR_DEFAULT_LENGTH;
    }
    long length=PodamUtils.getLongInRange(minValue,maxValue);
    StringBuilder sb=new StringBuilder();
    while (sb.length() < length) {
      sb.append(PodamUtils.getNiceCharacter());
    }
    return sb.toString();
  }
  Pattern pattern=findTypeFromList(annotations,Pattern.class);
  if (null != pattern) {
    LOG.warn("String_Node_Str" + "String_Node_Str",pattern.regexp());
    return null;
  }
  boolean isRound=false;
  boolean isFloat=false;
  BigDecimal min=new BigDecimal(-Double.MAX_VALUE);
  BigDecimal max=new BigDecimal(Double.MAX_VALUE);
  DecimalMin decimalMin=findTypeFromList(annotations,DecimalMin.class);
  if (null != decimalMin) {
    isFloat=true;
    min=new BigDecimal(decimalMin.value());
  }
  DecimalMax decimalMax=findTypeFromList(annotations,DecimalMax.class);
  if (null != decimalMax) {
    isFloat=true;
    max=new BigDecimal(decimalMax.value());
  }
  Min minAnno=findTypeFromList(annotations,Min.class);
  if (null != minAnno) {
    isRound=true;
    min=new BigDecimal(minAnno.value()).max(min);
  }
  Max maxAnno=findTypeFromList(annotations,Max.class);
  if (null != maxAnno) {
    isRound=true;
    max=new BigDecimal(maxAnno.value()).min(max);
  }
  Digits digits=findTypeFromList(annotations,Digits.class);
  BigDecimal divisor=null;
  if (null != digits) {
    isRound=true;
    divisor=BigDecimal.TEN.pow(digits.fraction());
    BigDecimal limit=BigDecimal.TEN.pow(digits.integer());
    max=limit.min(max).multiply(divisor);
    min=limit.negate().max(min).multiply(divisor);
  }
  if (isRound || isFloat) {
    BigDecimal value=getValueInRange(min,max);
    if (isRound) {
      BigInteger intValue=value.toBigInteger();
      value=new BigDecimal(intValue);
    }
    if (null != divisor) {
      value=value.divide(divisor);
    }
    return decimalToReturnType(value);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * It returns a   {@link Calendar} objects complying with Java bean validationannotations. {@inheritDoc}
 */
public Object getValue(Class<?> attrType,List<Annotation> annotations) throws PodamMockeryException {
  if (null != findTypeFromList(annotations,AssertTrue.class)) {
    return Boolean.TRUE;
  }
  if (null != findTypeFromList(annotations,AssertFalse.class)) {
    return Boolean.FALSE;
  }
  if (null != findTypeFromList(annotations,Past.class)) {
    int days=PodamUtils.getIntegerInRange(1,365);
    long timestamp=System.currentTimeMillis() - TimeUnit.DAYS.toSeconds(days);
    return timestampToReturnType(timestamp);
  }
  if (null != findTypeFromList(annotations,Future.class)) {
    int days=PodamUtils.getIntegerInRange(1,365);
    long timestamp=System.currentTimeMillis() + TimeUnit.DAYS.toSeconds(days);
    return timestampToReturnType(timestamp);
  }
  Size size=findTypeFromList(annotations,Size.class);
  if (null != size) {
    int minValue=size.min();
    int maxValue=size.max();
    if (minValue < 1 && maxValue > 0) {
      minValue=1;
    }
    if (maxValue == Integer.MAX_VALUE) {
      maxValue=PodamConstants.STR_DEFAULT_LENGTH;
    }
    long length=PodamUtils.getLongInRange(minValue,maxValue);
    StringBuilder sb=new StringBuilder();
    while (sb.length() < length) {
      sb.append(PodamUtils.getNiceCharacter());
    }
    return sb.toString();
  }
  Pattern pattern=findTypeFromList(annotations,Pattern.class);
  if (null != pattern) {
    LOG.warn("String_Node_Str" + "String_Node_Str",pattern.regexp());
    return null;
  }
  boolean isRound=false;
  boolean isFloat=false;
  BigDecimal min=new BigDecimal(-Double.MAX_VALUE);
  BigDecimal max=new BigDecimal(Double.MAX_VALUE);
  DecimalMin decimalMin=findTypeFromList(annotations,DecimalMin.class);
  if (null != decimalMin) {
    isFloat=true;
    min=new BigDecimal(decimalMin.value());
  }
  DecimalMax decimalMax=findTypeFromList(annotations,DecimalMax.class);
  if (null != decimalMax) {
    isFloat=true;
    max=new BigDecimal(decimalMax.value());
  }
  Min minAnno=findTypeFromList(annotations,Min.class);
  if (null != minAnno) {
    isRound=true;
    min=new BigDecimal(minAnno.value()).max(min);
  }
  Max maxAnno=findTypeFromList(annotations,Max.class);
  if (null != maxAnno) {
    isRound=true;
    max=new BigDecimal(maxAnno.value()).min(max);
  }
  Digits digits=findTypeFromList(annotations,Digits.class);
  BigDecimal divisor=null;
  if (null != digits) {
    isRound=true;
    divisor=BigDecimal.TEN.pow(digits.fraction());
    BigDecimal limit=BigDecimal.TEN.pow(digits.integer());
    max=limit.min(max).multiply(divisor);
    min=limit.negate().max(min).multiply(divisor);
  }
  if (isRound || isFloat) {
    BigDecimal value=getValueInRange(min,max);
    if (isRound) {
      BigInteger intValue=value.toBigInteger();
      value=new BigDecimal(intValue);
    }
    if (null != divisor) {
      value=value.divide(divisor);
    }
    return decimalToReturnType(value);
  }
  return null;
}