Buggy code:
public class DataBinder implements PropertyEditorRegistry , TypeConverter { public static final String DEFAULT_OBJECT_NAME = "target" ; public static final int DEFAULT_AUTO_GROW_COLLECTION_LIMIT = 256 ; protected static final Log logger = LogFactory . getLog ( DataBinder . class ) ; private final Object target ; private final String objectName ; private AbstractPropertyBindingResult bindingResult ; private SimpleTypeConverter typeConverter ; private BindException bindException ; private boolean ignoreUnknownFields = true ; private boolean ignoreInvalidFields = false ; private boolean autoGrowNestedPaths = true ; private int autoGrowCollectionLimit = DataBinder . DEFAULT_AUTO_GROW_COLLECTION_LIMIT ; private String [ ] allowedFields ; private String [ ] disallowedFields ; private String [ ] requiredFields ; private BindingErrorProcessor bindingErrorProcessor = new DefaultBindingErrorProcessor ( ) ; private Validator validator ; private ConversionService conversionService ; public DataBinder ( Object target ) { } public DataBinder ( Object target , String objectName ) { } public Object getTarget ( ) { } public String getObjectName ( ) { } public void setAutoGrowNestedPaths ( boolean autoGrowNestedPaths ) { } public boolean isAutoGrowNestedPaths ( ) { } public void setAutoGrowCollectionLimit ( int autoGrowCollectionLimit ) { } public int getAutoGrowCollectionLimit ( ) { } public void initBeanPropertyAccess ( ) { } public void initDirectFieldAccess ( ) { } protected AbstractPropertyBindingResult getInternalBindingResult ( ) { } protected ConfigurablePropertyAccessor getPropertyAccessor ( ) { } protected SimpleTypeConverter getSimpleTypeConverter ( ) { } protected PropertyEditorRegistry getPropertyEditorRegistry ( ) { } protected TypeConverter getTypeConverter ( ) { } public BindingResult getBindingResult ( ) { } @ Deprecated public BindException getErrors ( ) { } public void setIgnoreUnknownFields ( boolean ignoreUnknownFields ) { } public boolean isIgnoreUnknownFields ( ) { } public void setIgnoreInvalidFields ( boolean ignoreInvalidFields ) { } public boolean isIgnoreInvalidFields ( ) { } public void setAllowedFields ( String ... allowedFields ) { } public String [ ] getAllowedFields ( ) { } public void setDisallowedFields ( String ... disallowedFields ) { } public String [ ] getDisallowedFields ( ) { } public void setRequiredFields ( String ... requiredFields ) { } public String [ ] getRequiredFields ( ) { } public void setExtractOldValueForEditor ( boolean extractOldValueForEditor ) { } public void setMessageCodesResolver ( MessageCodesResolver messageCodesResolver ) { } public void setBindingErrorProcessor ( BindingErrorProcessor bindingErrorProcessor ) { } public BindingErrorProcessor getBindingErrorProcessor ( ) { } public void setValidator ( Validator validator ) { } public Validator getValidator ( ) { } public void setConversionService ( ConversionService conversionService ) { } public ConversionService getConversionService ( ) { } public void registerCustomEditor ( Class < ? > requiredType , PropertyEditor propertyEditor ) { } public void registerCustomEditor ( Class < ? > requiredType , String field , PropertyEditor propertyEditor ) { } public PropertyEditor findCustomEditor ( Class < ? > requiredType , String propertyPath ) { } public < T > T convertIfNecessary ( Object value , Class < T > requiredType ) throws TypeMismatchException { } public < T > T convertIfNecessary ( Object value , Class < T > requiredType , MethodParameter methodParam ) throws TypeMismatchException { } public void bind ( PropertyValues pvs ) { } protected void doBind ( MutablePropertyValues mpvs ) { } protected void checkAllowedFields ( MutablePropertyValues mpvs ) { } protected boolean isAllowed ( String field ) { } protected void checkRequiredFields ( MutablePropertyValues mpvs ) { } protected void applyPropertyValues ( MutablePropertyValues mpvs ) { } public void validate ( ) { } public void validate ( Object ... validationHints ) { Validator validator = getValidator ( ) ; <START_BUG> if ( validator instanceof SmartValidator ) { <END_BUG> ( ( SmartValidator ) ( validator ) ) . validate ( getTarget ( ) , getBindingResult ( ) , validationHints ) ; } else if ( validator != null ) { validator . validate ( getTarget ( ) , getBindingResult ( ) ) ; } } public Map < ? , ? > close ( ) throws BindException { } }

Fix:
if ( ( ! ( ObjectUtils . isEmpty ( validationHints ) ) ) && ( validator instanceof SmartValidator ) ) {