Program: 92286
Project: 92286
Buggy source:
/** 
 * A method which is common to both   {@code Marshaller} and {@code Unmarshaller}. It saves the initial state if it was not already done, but subclasses will need to complete the work.
 */
public final void setProperty(String name,final Object value) throws PropertyException {
  try {
switch (name) {
case XML.LOCALE:
{
        locale=(value instanceof CharSequence) ? Locales.parse(value.toString()) : (Locale)value;
        return;
      }
case XML.TIMEZONE:
{
      timezone=(value instanceof CharSequence) ? TimeZone.getTimeZone(value.toString()) : (TimeZone)value;
      return;
    }
case XML.SCHEMAS:
{
    final Map<?,?> map=(Map<?,?>)value;
    Map<String,String> copy=null;
    if (map != null) {
      copy=new HashMap<>(4);
      for (      final String key : SCHEMA_KEYS) {
        final Object schema=map.get(key);
        if (schema != null) {
          if (!(schema instanceof String)) {
            throw new PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,name + "String_Node_Str" + key+ "String_Node_Str",value.getClass()));
          }
          copy.put(key,(String)schema);
        }
      }
      copy=CollectionsExt.unmodifiableOrCopy(copy);
    }
    schemas=copy;
    return;
  }
case XML.GML_VERSION:
{
  gmlVersion=(value instanceof CharSequence) ? new Version(value.toString()) : (Version)value;
  return;
}
case XML.RESOLVER:
{
resolver=(ReferenceResolver)value;
return;
}
case XML.CONVERTER:
{
converter=(ValueConverter)value;
return;
}
case XML.STRING_SUBSTITUTES:
{
bitMasks&=~(Context.SUBSTITUTE_LANGUAGE | Context.SUBSTITUTE_COUNTRY | Context.SUBSTITUTE_FILENAME| Context.SUBSTITUTE_MIMETYPE);
if (value != null) {
for (final CharSequence substitute : (CharSequence[])value) {
if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_LANGUAGE;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_COUNTRY;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_FILENAME;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_MIMETYPE;
}
}
}
return;
}
case XML.WARNING_LISTENER:
{
warningListener=(WarningListener<?>)value;
return;
}
case LegacyNamespaces.APPLY_NAMESPACE_REPLACEMENTS:
{
applyNamespaceReplacements=0;
if (value != null) {
applyNamespaceReplacements=((Boolean)value) ? (byte)1 : (byte)2;
}
return;
}
}
}
 catch (ClassCastException|IllegalArgumentException e) {
throw new PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,name,value.getClass()),e);
}
name=convertPropertyKey(name);
if (!initialProperties.containsKey(name)) {
if (initialProperties.put(name,getStandardProperty(name)) != null) {
throw new ConcurrentModificationException(name);
}
}
setStandardProperty(name,value);
}

Fixed version (ground truth):
/** 
 * A method which is common to both   {@code Marshaller} and {@code Unmarshaller}. It saves the initial state if it was not already done, but subclasses will need to complete the work.
 */
public final void setProperty(String name,final Object value) throws PropertyException {
  try {
switch (name) {
case XML.LOCALE:
{
        locale=(value instanceof CharSequence) ? Locales.parse(value.toString()) : (Locale)value;
        return;
      }
case XML.TIMEZONE:
{
      timezone=(value instanceof CharSequence) ? TimeZone.getTimeZone(value.toString()) : (TimeZone)value;
      return;
    }
case XML.SCHEMAS:
{
    final Map<?,?> map=(Map<?,?>)value;
    Map<String,String> copy=null;
    if (map != null) {
      copy=new HashMap<>(4);
      for (      final String key : SCHEMA_KEYS) {
        final Object schema=map.get(key);
        if (schema != null) {
          if (!(schema instanceof String)) {
            throw new PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,name + "String_Node_Str" + key+ "String_Node_Str",value.getClass()));
          }
          copy.put(key,(String)schema);
        }
      }
      copy=CollectionsExt.unmodifiableOrCopy(copy);
    }
    schemas=copy;
    return;
  }
case XML.GML_VERSION:
{
  gmlVersion=(value instanceof CharSequence) ? new Version(value.toString()) : (Version)value;
  return;
}
case XML.RESOLVER:
{
resolver=(ReferenceResolver)value;
return;
}
case XML.CONVERTER:
{
converter=(ValueConverter)value;
return;
}
case XML.STRING_SUBSTITUTES:
{
bitMasks&=~(Context.SUBSTITUTE_LANGUAGE | Context.SUBSTITUTE_COUNTRY | Context.SUBSTITUTE_FILENAME| Context.SUBSTITUTE_MIMETYPE);
if (value != null) {
for (final CharSequence substitute : (CharSequence[])value) {
if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_LANGUAGE;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_COUNTRY;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_FILENAME;
}
 else if (CharSequences.equalsIgnoreCase(substitute,"String_Node_Str")) {
  bitMasks|=Context.SUBSTITUTE_MIMETYPE;
}
}
}
return;
}
case XML.WARNING_LISTENER:
{
warningListener=(WarningListener<?>)value;
return;
}
case LegacyNamespaces.APPLY_NAMESPACE_REPLACEMENTS:
{
xmlnsReplaceCode=0;
if (value != null) {
xmlnsReplaceCode=((Boolean)value) ? (byte)1 : (byte)2;
}
return;
}
}
}
 catch (ClassCastException|IllegalArgumentException e) {
throw new PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,name,value.getClass()),e);
}
name=convertPropertyKey(name);
if (!initialProperties.containsKey(name)) {
if (initialProperties.put(name,getStandardProperty(name)) != null) {
throw new ConcurrentModificationException(name);
}
}
setStandardProperty(name,value);
}