Program: 51310
Project: 51310
Buggy source:
ValueInfo(final String dataType,final Object inputValue){
  final String valueTypeHint=getValueTypeHint(dataType);
  if (valueTypeHint != null) {
    if (valueTypeHint.equals(XSD_STRING)) {
      this.valueType=valueTypeHint;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (valueTypeHint.equals(XSD_INT)) {
      if (inputValue instanceof Integer) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Byte) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Short) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Long) {
        Long l=(Long)inputValue;
        long lval=l.longValue();
        setValueAndType(lval);
      }
 else       if (inputValue instanceof BigInteger) {
        BigInteger bi=(BigInteger)inputValue;
        long lval=bi.longValue();
        if (bi.equals(BigInteger.valueOf(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_INTEGER;
          this.value=inputValue;
          this.isDecimal=false;
        }
      }
 else       if (inputValue instanceof Float) {
        Float f=(Float)inputValue;
        long lval=f.longValue();
        if (f.equals(new Float(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_DOUBLE;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof Double) {
        Double d=(Double)inputValue;
        long lval=d.longValue();
        if (d.equals(new Double(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_DOUBLE;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof BigDecimal) {
        BigDecimal bd=(BigDecimal)inputValue;
        try {
          long lval=bd.longValue();
          setValueAndType(lval);
        }
 catch (        ArithmeticException ex) {
          try {
            BigInteger bi=bd.toBigIntegerExact();
            this.valueType=XSD_INTEGER;
            this.value=bi;
            this.isDecimal=false;
          }
 catch (          ArithmeticException ex1) {
            this.valueType=XSD_DECIMAL;
            this.value=inputValue;
            this.isDecimal=true;
          }
        }
      }
 else       if (inputValue instanceof Number) {
        long lval=((Number)inputValue).longValue();
        this.value=new Long(lval);
        this.valueType=valueTypeHint;
        this.isDecimal=false;
      }
 else {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
    }
 else     if (valueTypeHint.equals(XSD_DOUBLE)) {
      if (inputValue instanceof Double) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof Byte || inputValue instanceof Short || inputValue instanceof Integer|| inputValue instanceof Long) {
        double dval=((Number)inputValue).doubleValue();
        this.value=new Double(dval);
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof Float) {
        this.value=inputValue;
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof BigDecimal) {
        BigDecimal bd=(BigDecimal)inputValue;
        double dval=bd.doubleValue();
        try {
          BigDecimal bd2=Util.makeBigDecimalFromDouble(dval);
          if (bd.compareTo(bd2) == 0) {
            this.valueType=XSD_DOUBLE;
            this.value=new Double(dval);
          }
 else {
            this.valueType=XSD_DECIMAL;
            this.value=inputValue;
          }
        }
 catch (        NumberFormatException ex) {
          this.valueType=XSD_DECIMAL;
          this.value=inputValue;
        }
        this.isDecimal=true;
      }
 else       if (inputValue instanceof BigInteger) {
        BigInteger bi=(BigInteger)inputValue;
        long lval=bi.longValue();
        if (bi.equals(BigInteger.valueOf(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_INTEGER;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof Number) {
        double dval=((Number)inputValue).doubleValue();
        this.value=new Double(dval);
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=true;
      }
    }
  }
 else {
    if (inputValue instanceof String) {
      this.valueType=XSD_STRING;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Integer) {
      this.valueType=XSD_INT;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Byte) {
      Byte b=(Byte)inputValue;
      this.valueType=XSD_INT;
      this.value=new Integer(b.intValue());
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Short) {
      Short s=(Short)inputValue;
      this.valueType=XSD_INT;
      this.value=new Integer(s.intValue());
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Long) {
      Long l=(Long)inputValue;
      long lval=l.longValue();
      setValueAndType(lval);
    }
 else     if (inputValue instanceof BigInteger) {
      BigInteger bi=(BigInteger)inputValue;
      long lval=bi.longValue();
      if (bi.equals(BigInteger.valueOf(lval))) {
        setValueAndType(lval);
      }
 else {
        this.valueType=XSD_INTEGER;
        this.value=inputValue;
        this.isDecimal=false;
      }
    }
 else     if (inputValue instanceof Float) {
      this.valueType=XSD_DOUBLE;
      this.value=inputValue;
      this.isDecimal=true;
    }
 else     if (inputValue instanceof Double) {
      this.valueType=XSD_DOUBLE;
      this.value=inputValue;
      this.isDecimal=true;
    }
 else     if (inputValue instanceof BigDecimal) {
      BigDecimal bd=(BigDecimal)inputValue;
      double dval=bd.doubleValue();
      try {
        BigDecimal bd2=Util.makeBigDecimalFromDouble(dval);
        if (bd.compareTo(bd2) == 0) {
          this.valueType=XSD_DOUBLE;
          this.value=new Double(dval);
        }
 else {
          this.valueType=XSD_DECIMAL;
          this.value=inputValue;
        }
      }
 catch (      NumberFormatException ex) {
        this.valueType=XSD_DECIMAL;
        this.value=inputValue;
      }
      this.isDecimal=true;
    }
 else     if (inputValue instanceof Number) {
      long lval=((Number)inputValue).longValue();
      this.value=new Long(lval);
      this.valueType=XSD_LONG;
      this.isDecimal=false;
    }
 else {
      this.valueType=XSD_STRING;
      this.value=inputValue;
      this.isDecimal=false;
    }
  }
}

Fixed version (ground truth):
ValueInfo(final String dataType,final Object inputValue){
  final String valueTypeHint=getValueTypeHint(dataType);
  if (valueTypeHint != null) {
    if (valueTypeHint.equals(XSD_STRING)) {
      this.valueType=valueTypeHint;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (valueTypeHint.equals(XSD_INT)) {
      if (inputValue instanceof Integer) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Byte) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Short) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
 else       if (inputValue instanceof Long) {
        long lval=(Long)inputValue;
        setValueAndType(lval);
      }
 else       if (inputValue instanceof BigInteger) {
        BigInteger bi=(BigInteger)inputValue;
        long lval=bi.longValue();
        if (bi.equals(BigInteger.valueOf(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_INTEGER;
          this.value=inputValue;
          this.isDecimal=false;
        }
      }
 else       if (inputValue instanceof Float) {
        Float f=(Float)inputValue;
        long lval=f.longValue();
        if (f.equals(new Float(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_DOUBLE;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof Double) {
        Double d=(Double)inputValue;
        long lval=d.longValue();
        if (d.equals(new Double(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_DOUBLE;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof BigDecimal) {
        BigDecimal bd=(BigDecimal)inputValue;
        try {
          long lval=bd.longValue();
          setValueAndType(lval);
        }
 catch (        ArithmeticException ex) {
          try {
            BigInteger bi=bd.toBigIntegerExact();
            this.valueType=XSD_INTEGER;
            this.value=bi;
            this.isDecimal=false;
          }
 catch (          ArithmeticException ex1) {
            this.valueType=XSD_DECIMAL;
            this.value=inputValue;
            this.isDecimal=true;
          }
        }
      }
 else       if (inputValue instanceof Number) {
        this.value=((Number)inputValue).longValue();
        this.valueType=valueTypeHint;
        this.isDecimal=false;
      }
 else {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=false;
      }
    }
 else     if (valueTypeHint.equals(XSD_DOUBLE)) {
      if (inputValue instanceof Double) {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof Byte || inputValue instanceof Short || inputValue instanceof Integer|| inputValue instanceof Long) {
        this.value=((Number)inputValue).doubleValue();
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof Float) {
        this.value=inputValue;
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else       if (inputValue instanceof BigDecimal) {
        BigDecimal bd=(BigDecimal)inputValue;
        double dval=bd.doubleValue();
        try {
          BigDecimal bd2=Util.makeBigDecimalFromDouble(dval);
          if (bd.compareTo(bd2) == 0) {
            this.valueType=XSD_DOUBLE;
            this.value=dval;
          }
 else {
            this.valueType=XSD_DECIMAL;
            this.value=inputValue;
          }
        }
 catch (        NumberFormatException ex) {
          this.valueType=XSD_DECIMAL;
          this.value=inputValue;
        }
        this.isDecimal=true;
      }
 else       if (inputValue instanceof BigInteger) {
        BigInteger bi=(BigInteger)inputValue;
        long lval=bi.longValue();
        if (bi.equals(BigInteger.valueOf(lval))) {
          setValueAndType(lval);
        }
 else {
          this.valueType=XSD_INTEGER;
          this.value=inputValue;
          this.isDecimal=true;
        }
      }
 else       if (inputValue instanceof Number) {
        this.value=((Number)inputValue).doubleValue();
        this.valueType=valueTypeHint;
        this.isDecimal=true;
      }
 else {
        this.valueType=valueTypeHint;
        this.value=inputValue;
        this.isDecimal=true;
      }
    }
  }
 else {
    if (inputValue instanceof String) {
      this.valueType=XSD_STRING;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Integer) {
      this.valueType=XSD_INT;
      this.value=inputValue;
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Byte) {
      Byte b=(Byte)inputValue;
      this.valueType=XSD_INT;
      this.value=b.intValue();
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Short) {
      Short s=(Short)inputValue;
      this.valueType=XSD_INT;
      this.value=s.intValue();
      this.isDecimal=false;
    }
 else     if (inputValue instanceof Long) {
      setValueAndType((Long)inputValue);
    }
 else     if (inputValue instanceof BigInteger) {
      BigInteger bi=(BigInteger)inputValue;
      long lval=bi.longValue();
      if (bi.equals(BigInteger.valueOf(lval))) {
        setValueAndType(lval);
      }
 else {
        this.valueType=XSD_INTEGER;
        this.value=inputValue;
        this.isDecimal=false;
      }
    }
 else     if (inputValue instanceof Float) {
      this.valueType=XSD_DOUBLE;
      this.value=inputValue;
      this.isDecimal=true;
    }
 else     if (inputValue instanceof Double) {
      this.valueType=XSD_DOUBLE;
      this.value=inputValue;
      this.isDecimal=true;
    }
 else     if (inputValue instanceof BigDecimal) {
      BigDecimal bd=(BigDecimal)inputValue;
      double dval=bd.doubleValue();
      try {
        BigDecimal bd2=Util.makeBigDecimalFromDouble(dval);
        if (bd.compareTo(bd2) == 0) {
          this.valueType=XSD_DOUBLE;
          this.value=dval;
        }
 else {
          this.valueType=XSD_DECIMAL;
          this.value=inputValue;
        }
      }
 catch (      NumberFormatException ex) {
        this.valueType=XSD_DECIMAL;
        this.value=inputValue;
      }
      this.isDecimal=true;
    }
 else     if (inputValue instanceof Number) {
      this.value=((Number)inputValue).longValue();
      this.valueType=XSD_LONG;
      this.isDecimal=false;
    }
 else {
      this.valueType=XSD_STRING;
      this.value=inputValue;
      this.isDecimal=false;
    }
  }
}