Buggy code:
public class Category implements AppenderAttachable { protected String name ; protected volatile Level level ; protected volatile Category parent ; private static final String FQCN = Category . class . getName ( ) ; protected ResourceBundle resourceBundle ; protected LoggerRepository repository ; AppenderAttachableImpl aai ; protected boolean additive = true ; protected Category ( String name ) { } public synchronized void addAppender ( Appender newAppender ) { if ( ( aai ) == null ) { aai = new AppenderAttachableImpl ( ) ; } aai . addAppender ( newAppender ) ; <START_BUG> repository . fireAddAppenderEvent ( this , newAppender ) ; <END_BUG> } public void assertLog ( boolean assertion , String msg ) { } public void callAppenders ( LoggingEvent event ) { } synchronized void closeNestedAppenders ( ) { } public void debug ( Object message ) { } public void debug ( Object message , Throwable t ) { } public void error ( Object message ) { } public void error ( Object message , Throwable t ) { } public static Logger exists ( String name ) { } public void fatal ( Object message ) { } public void fatal ( Object message , Throwable t ) { } protected void forcedLog ( String fqcn , Priority level , Object message , Throwable t ) { } public boolean getAdditivity ( ) { } public synchronized Enumeration getAllAppenders ( ) { } public synchronized Appender getAppender ( String name ) { } public Level getEffectiveLevel ( ) { } public Priority getChainedPriority ( ) { } public static Enumeration getCurrentCategories ( ) { } public static LoggerRepository getDefaultHierarchy ( ) { } public LoggerRepository getHierarchy ( ) { } public LoggerRepository getLoggerRepository ( ) { } public static Category getInstance ( String name ) { } public static Category getInstance ( Class clazz ) { } public final String getName ( ) { } public final Category getParent ( ) { } public final Level getLevel ( ) { } public final Level getPriority ( ) { } public static final Category getRoot ( ) { } public ResourceBundle getResourceBundle ( ) { } protected String getResourceBundleString ( String key ) { } public void info ( Object message ) { } public void info ( Object message , Throwable t ) { } public boolean isAttached ( Appender appender ) { } public boolean isDebugEnabled ( ) { } public boolean isEnabledFor ( Priority level ) { } public boolean isInfoEnabled ( ) { } public void l7dlog ( Priority priority , String key , Throwable t ) { } public void l7dlog ( Priority priority , String key , Object [ ] params , Throwable t ) { } public void log ( Priority priority , Object message , Throwable t ) { } public void log ( Priority priority , Object message ) { } public void log ( String callerFQCN , Priority level , Object message , Throwable t ) { } public synchronized void removeAllAppenders ( ) { } public synchronized void removeAppender ( Appender appender ) { } public synchronized void removeAppender ( String name ) { } public void setAdditivity ( boolean additive ) { } final void setHierarchy ( LoggerRepository repository ) { } public void setLevel ( Level level ) { } public void setPriority ( Priority priority ) { } public void setResourceBundle ( ResourceBundle bundle ) { } public static void shutdown ( ) { } public void warn ( Object message ) { } public void warn ( Object message , Throwable t ) { } }

Fix:
repository . fireAddAppenderEvent ( ( ( Logger ) ( this ) ) , newAppender ) ;