Buggy code:
public class DecimalDatatypeValidator extends AbstractDatatypeValidator { private Locale fLocale = null ; private DatatypeValidator fBaseValidator = null ; private boolean fDerivedByList = false ; private BigDecimal [ ] fEnumDecimal = null ; private String fPattern = null ; private BigDecimal fMaxInclusive = null ; private BigDecimal fMaxExclusive = null ; private BigDecimal fMinInclusive = null ; private BigDecimal fMinExclusive = null ; private int fFacetsDefined = 0 ; private int fScale = 0 ; private int fPrecision = 0 ; private boolean isMaxExclusiveDefined = false ; private boolean isMaxInclusiveDefined = false ; private boolean isMinExclusiveDefined = false ; private boolean isMinInclusiveDefined = false ; private boolean isScaleDefined = false ; private boolean isPrecisionDefined = false ; private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider ( ) ; private RegularExpression fRegex = null ; private Hashtable fFacets = null ; public DecimalDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public DecimalDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { if ( ( fDerivedByList ) == false ) { if ( ( this . fBaseValidator ) != null ) { this . fBaseValidator . validate ( content , state ) ; } if ( ( ( fFacetsDefined ) & ( DatatypeValidator . FACET_PATTERN ) ) != 0 ) { if ( ( ( fRegex ) == null ) || ( ( fRegex . matches ( content ) ) == false ) ) <START_BUG> throw new InvalidDatatypeValueException ( ( ( ( "Value'" + content ) + "does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>regular<seq2seq4repair_space>expression<seq2seq4repair_space>facet" ) + ( fPattern ) ) ) ; <END_BUG> } BigDecimal d = null ; try { d = new BigDecimal ( DecimalDatatypeValidator . stripPlusIfPresent ( content ) ) ; } catch ( Exception nfe ) { throw new InvalidDatatypeValueException ( getErrorString ( NotDecimal , MSG_NONE , new Object [ ] { ( "'" + content ) + "'" } ) ) ; } if ( ( isScaleDefined ) == true ) { if ( ( d . scale ( ) ) > ( fScale ) ) throw new InvalidDatatypeValueException ( getErrorString ( ScaleExceeded , MSG_NONE , new Object [ ] { content } ) ) ; } if ( ( isPrecisionDefined ) == true ) { int precision = ( d . movePointRight ( d . scale ( ) ) . toString ( ) . length ( ) ) - ( ( d . signum ( ) ) < 0 ? 1 : 0 ) ; if ( precision > ( fPrecision ) ) throw new InvalidDatatypeValueException ( getErrorString ( PrecisionExceeded , MSG_NONE , new Object [ ] { content } ) ) ; } boundsCheck ( d ) ; if ( ( fEnumDecimal ) != null ) enumCheck ( d ) ; } else { } return null ; } public void boundsCheck ( BigDecimal d ) throws InvalidDatatypeValueException { } private void enumCheck ( BigDecimal v ) throws InvalidDatatypeValueException { } public void setLocale ( Locale locale ) { } public Hashtable getFacets ( ) { } private String getErrorString ( int major , int minor , Object [ ] args ) { } public Object clone ( ) throws CloneNotSupportedException { } public int compare ( String content1 , String content2 ) { } private void setBasetype ( DatatypeValidator base ) { } private static String stripPlusIfPresent ( String value ) { } private Hashtable checkForFacetConsistency ( Hashtable thisTypeFacets , Hashtable baseTypeFacets ) throws InvalidDatatypeFacetException { } }

Fix:
throw new InvalidDatatypeValueException ( ( ( ( "Value'" + content ) + "'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>regular<seq2seq4repair_space>expression<seq2seq4repair_space>facet<seq2seq4repair_space>" ) + ( fRegex . getPattern ( ) ) ) ) ;