Buggy code:
public class MBeanExporter extends MBeanRegistrationSupport implements BeanClassLoaderAware , BeanFactoryAware , DisposableBean , InitializingBean , MBeanExportOperations { public static final int AUTODETECT_NONE = 0 ; public static final int AUTODETECT_MBEAN = 1 ; public static final int AUTODETECT_ASSEMBLER = 2 ; public static final int AUTODETECT_ALL = ( MBeanExporter . AUTODETECT_MBEAN ) | ( MBeanExporter . AUTODETECT_ASSEMBLER ) ; private static final String WILDCARD = "*" ; private static final String MR_TYPE_OBJECT_REFERENCE = "ObjectReference" ; private static final String CONSTANT_PREFIX_AUTODETECT = "AUTODETECT_" ; private static final Constants constants = new Constants ( MBeanExporter . class ) ; private Map < String , Object > beans ; private Integer autodetectMode ; private boolean allowEagerInit = false ; private boolean ensureUniqueRuntimeObjectNames = true ; private boolean exposeManagedResourceClassLoader = true ; private Set < String > excludedBeans ; private MBeanExporterListener [ ] listeners ; private NotificationListenerBean [ ] notificationListeners ; private final Map < NotificationListenerBean , ObjectName [ ] > registeredNotificationListeners = new LinkedHashMap < NotificationListenerBean , ObjectName [ ] > ( ) ; private MBeanInfoAssembler assembler = new SimpleReflectiveMBeanInfoAssembler ( ) ; private ObjectNamingStrategy namingStrategy = new KeyNamingStrategy ( ) ; private ClassLoader beanClassLoader = ClassUtils . getDefaultClassLoader ( ) ; private ListableBeanFactory beanFactory ; public void setBeans ( Map < String , Object > beans ) { } public void setAutodetect ( boolean autodetect ) { } public void setAutodetectMode ( int autodetectMode ) { <START_BUG> if ( ! ( MBeanExporter . constants . getValues ( MBeanExporter . CONSTANT_PREFIX_AUTODETECT ) . contains ( new Integer ( autodetectMode ) ) ) ) { <END_BUG> throw new IllegalArgumentException ( "Only<seq2seq4repair_space>values<seq2seq4repair_space>of<seq2seq4repair_space>autodetect<seq2seq4repair_space>constants<seq2seq4repair_space>allowed" ) ; } this . autodetectMode = autodetectMode ; } public void setAutodetectModeName ( String constantName ) { } public void setAllowEagerInit ( boolean allowEagerInit ) { } public void setAssembler ( MBeanInfoAssembler assembler ) { } public void setNamingStrategy ( ObjectNamingStrategy namingStrategy ) { } public void setListeners ( MBeanExporterListener [ ] listeners ) { } public void setExcludedBeans ( String [ ] excludedBeans ) { } public void setEnsureUniqueRuntimeObjectNames ( boolean ensureUniqueRuntimeObjectNames ) { } public void setExposeManagedResourceClassLoader ( boolean exposeManagedResourceClassLoader ) { } public void setNotificationListeners ( NotificationListenerBean [ ] notificationListeners ) { } public void setNotificationListenerMappings ( Map < ? , ? extends NotificationListener > listeners ) { } public void setBeanClassLoader ( ClassLoader classLoader ) { } public void setBeanFactory ( BeanFactory beanFactory ) { } public void afterPropertiesSet ( ) { } public void destroy ( ) { } public ObjectName registerManagedResource ( Object managedResource ) throws MBeanExportException { } public void registerManagedResource ( Object managedResource , ObjectName objectName ) throws MBeanExportException { } protected void registerBeans ( ) { } protected boolean isBeanDefinitionLazyInit ( ListableBeanFactory beanFactory , String beanName ) { } protected ObjectName registerBeanNameOrInstance ( Object mapValue , String beanKey ) throws MBeanExportException { } private void replaceNotificationListenerBeanNameKeysIfNecessary ( String beanName , ObjectName objectName ) { } private ObjectName registerBeanInstance ( Object bean , String beanKey ) throws JMException { } private ObjectName registerLazyInit ( String beanName , String beanKey ) throws JMException { } protected ObjectName getObjectName ( Object bean , String beanKey ) throws MalformedObjectNameException { } protected boolean isMBean ( Class beanClass ) { } protected DynamicMBean adaptMBeanIfPossible ( Object bean ) throws JMException { } protected ModelMBean createAndConfigureMBean ( Object managedResource , String beanKey ) throws MBeanExportException { } protected ModelMBean createModelMBean ( ) throws MBeanException { } private ModelMBeanInfo getMBeanInfo ( Object managedBean , String beanKey ) throws JMException { } private void autodetectBeans ( final AutodetectCapableMBeanInfoAssembler assembler ) { } private void autodetectMBeans ( ) { } private void autodetect ( MBeanExporter . AutodetectCallback callback ) { } private boolean isExcluded ( String beanName ) { } private void injectNotificationPublisherIfNecessary ( Object managedResource , ModelMBean modelMBean , ObjectName objectName ) { } private void registerNotificationListeners ( ) throws MBeanExportException { } private void unregisterNotificationListeners ( ) { } @ Override protected void onRegister ( ObjectName objectName ) { } @ Override protected void onUnregister ( ObjectName objectName ) { } private void notifyListenersOfRegistration ( ObjectName objectName ) { } private void notifyListenersOfUnregistration ( ObjectName objectName ) { } private static interface AutodetectCallback { boolean include ( Class beanClass , String beanName ) { } } private class NotificationPublisherAwareLazyTargetSource extends LazyInitTargetSource { private ModelMBean modelMBean ; private ObjectName objectName ; public void setModelMBean ( ModelMBean modelMBean ) { } public void setObjectName ( ObjectName objectName ) { } @ Override protected void postProcessTargetObject ( Object targetObject ) { } } }

Fix:
if ( ! ( MBeanExporter . constants . getValues ( MBeanExporter . CONSTANT_PREFIX_AUTODETECT ) . contains ( autodetectMode ) ) ) {