Buggy code:
public class ConfigurationImpl implements Externalizable , Configuration , ValueListener { private static final String SEP = J2DoPrivHelper . getLineSeparator ( ) ; private static final Localizer _loc = Localizer . forPackage ( ConfigurationImpl . class ) ; public ObjectValue logFactoryPlugin ; public StringValue id ; private String _product = null ; private int _readOnlyState = INIT_STATE_LIQUID ; private Map _props = null ; private boolean _globals = false ; private String _auto = null ; private final List < Value > _vals = new ArrayList < Value > ( ) ; private Set < String > _supportedKeys ; private PropertyChangeSupport _changeSupport = null ; private PropertyDescriptor [ ] _pds = null ; private MethodDescriptor [ ] _mds = null ; public ConfigurationImpl ( ) { } public ConfigurationImpl ( boolean loadGlobals ) { } public boolean loadGlobals ( ) { } public String getProductName ( ) { } public void setProductName ( String name ) { } public LogFactory getLogFactory ( ) { } public void setLogFactory ( LogFactory logFactory ) { } public String getLog ( ) { } public void setLog ( String log ) { } public Log getLog ( String category ) { } public String getId ( ) { } public void setId ( String id ) { } public Log getConfigurationLog ( ) { } public Value [ ] getValues ( ) { } public Value getValue ( String property ) { } public void setReadOnly ( int newState ) { } public void instantiateAll ( ) { } public boolean isReadOnly ( ) { } public void addPropertyChangeListener ( PropertyChangeListener listener ) { } public void removePropertyChangeListener ( PropertyChangeListener listener ) { } public void valueChanged ( Value val ) { } public final void close ( ) { } protected void preClose ( ) { } public BeanInfo [ ] getAdditionalBeanInfo ( ) { } public BeanDescriptor getBeanDescriptor ( ) { } public int getDefaultEventIndex ( ) { } public int getDefaultPropertyIndex ( ) { } public EventSetDescriptor [ ] getEventSetDescriptors ( ) { } public Image getIcon ( int kind ) { } public synchronized MethodDescriptor [ ] getMethodDescriptors ( ) { } public synchronized PropertyDescriptor [ ] getPropertyDescriptors ( ) { } private PropertyDescriptor getPropertyDescriptor ( Value val ) throws IntrospectionException { } @ SuppressWarnings ( "unchecked" ) private String findLocalized ( String key , boolean fatal , Class < ? > scope ) { } public Map toProperties ( boolean storeDefaults ) { } public void fromProperties ( Map map ) { } public List < String > getPropertyKeys ( String propertyName ) { } public Set < String > getPropertyKeys ( ) { } String fixPrefix ( String key ) { } boolean hasKnownPrefix ( String key ) { } private void setValue ( Map map , Value val ) { } private Object findValue ( Map map , Value val ) { } private void warnInvalidProperty ( String propName ) { } private Collection < String > newPropertyList ( ) { } protected boolean isInvalidProperty ( String propName ) { } public void setProperties ( String resourceName ) throws IOException { } public void setPropertiesFile ( File file ) throws IOException { } public String getPropertiesResource ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public static String toXMLName ( String propName ) { if ( propName == null ) return null ; <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> char c ; for ( int i = 0 ; i < ( propName . length ( ) ) ; i ++ ) { c = propName . charAt ( i ) ; if ( ( ( i != 0 ) && ( Character . isUpperCase ( c ) ) ) && ( ( Character . isLowerCase ( propName . charAt ( ( i - 1 ) ) ) ) || ( ( ( ( i > 1 ) && ( i < ( ( propName . length ( ) ) - 1 ) ) ) && ( Character . isUpperCase ( propName . charAt ( ( i - 1 ) ) ) ) ) && ( Character . isLowerCase ( propName . charAt ( ( i + 1 ) ) ) ) ) ) ) buf . append ( '-' ) ; if ( ( i != 0 ) && ( ( ( ! ( Character . isLetter ( c ) ) ) && ( Character . isLetter ( propName . charAt ( ( i - 1 ) ) ) ) ) || ( ( Character . isLetter ( c ) ) && ( ! ( Character . isLetter ( propName . charAt ( ( i - 1 ) ) ) ) ) ) ) ) buf . append ( '-' ) ; buf . append ( Character . toLowerCase ( c ) ) ; } return buf . toString ( ) ; } @ SuppressWarnings ( "unchecked" ) public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } public void writeExternal ( ObjectOutput out ) throws IOException { } public Object clone ( ) { } public boolean removeValue ( Value val ) { } public < T extends Value > T addValue ( T val ) { } public StringValue addString ( String property ) { } public FileValue addFile ( String property ) { } public IntValue addInt ( String property ) { } public DoubleValue addDouble ( String property ) { } public BooleanValue addBoolean ( String property ) { } public StringListValue addStringList ( String property ) { } public ObjectValue addObject ( String property ) { } public PluginValue addPlugin ( String property , boolean singleton ) { } public PluginListValue addPluginList ( String property ) { } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;