Buggy code:
public class LoggerDynamicMBean extends AbstractDynamicMBean implements NotificationListener { private MBeanConstructorInfo [ ] dConstructors = new MBeanConstructorInfo [ 1 ] ; private MBeanOperationInfo [ ] dOperations = new MBeanOperationInfo [ 1 ] ; private Vector dAttributes = new Vector ( ) ; private String dClassName = this . getClass ( ) . getName ( ) ; private String dDescription = "This<seq2seq4repair_space>MBean<seq2seq4repair_space>acts<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>management<seq2seq4repair_space>facade<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>org.apache.log4j.Logger<seq2seq4repair_space>instance." ; private static Logger cat = Logger . getLogger ( LoggerDynamicMBean . class ) ; private Logger logger ; public LoggerDynamicMBean ( Logger logger ) { } public void handleNotification ( Notification notification , Object handback ) { } private void buildDynamicMBeanInfo ( ) { } protected Logger getLogger ( ) { } public MBeanInfo getMBeanInfo ( ) { } public Object invoke ( String operationName , Object [ ] params , String [ ] signature ) throws MBeanException , ReflectionException { } public Object getAttribute ( String attributeName ) throws AttributeNotFoundException , MBeanException , ReflectionException { } void addAppender ( String appenderClass , String appenderName ) { } public void setAttribute ( Attribute attribute ) throws AttributeNotFoundException , InvalidAttributeValueException , MBeanException , ReflectionException { if ( attribute == null ) { throw new RuntimeOperationsException ( new IllegalArgumentException ( "Attribute<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) , ( ( "Cannot<seq2seq4repair_space>invoke<seq2seq4repair_space>a<seq2seq4repair_space>setter<seq2seq4repair_space>of<seq2seq4repair_space>" + ( dClassName ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>null<seq2seq4repair_space>attribute" ) ) ; } String name = attribute . getName ( ) ; Object value = attribute . getValue ( ) ; if ( name == null ) { throw new RuntimeOperationsException ( new IllegalArgumentException ( "Attribute<seq2seq4repair_space>name<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) , ( ( "Cannot<seq2seq4repair_space>invoke<seq2seq4repair_space>the<seq2seq4repair_space>setter<seq2seq4repair_space>of<seq2seq4repair_space>" + ( dClassName ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>null<seq2seq4repair_space>attribute<seq2seq4repair_space>name" ) ) ; } if ( name . equals ( "priority" ) ) { if ( value instanceof String ) { String s = ( ( String ) ( value ) ) ; Level p = logger . getLevel ( ) ; if ( s . equalsIgnoreCase ( "NULL" ) ) { p = null ; } else { p = OptionConverter . toLevel ( s , p ) ; } <START_BUG> logger . setPriority ( p ) ; <END_BUG> } } else { throw new AttributeNotFoundException ( ( ( ( "Attribute<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( this . getClass ( ) . getName ( ) ) ) ) ; } } void appenderMBeanRegistration ( ) { } void registerAppenderMBean ( Appender appender ) { } public void postRegister ( Boolean registrationDone ) { } }

Fix:
logger . setLevel ( p ) ;