Buggy code:
@ SuppressWarnings ( "unchecked" ) public class ApplicationContextMock implements Serializable , ApplicationContext { private static final long serialVersionUID = 1L ; private final Map beans = new HashMap ( ) ; public void putBean ( String name , Object bean ) { if ( beans . containsKey ( name ) ) { <START_BUG> throw new IllegalArgumentException ( ( ( "a<seq2seq4repair_space>bean<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>[" + name ) + "]<seq2seq4repair_space>has<seq2seq4repair_space>alredy<seq2seq4repair_space>been<seq2seq4repair_space>added<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>context" ) ) ; <END_BUG> } beans . put ( name , bean ) ; } public void putBean ( Object bean ) { } public Object getBean ( String name ) throws BeansException { } public Object getBean ( String name , Class requiredType ) throws BeansException { } public Map getBeansOfType ( Class type ) throws BeansException { } public ApplicationContext getParent ( ) { } public String getDisplayName ( ) { } public long getStartupDate ( ) { } public void publishEvent ( ApplicationEvent event ) { } public boolean containsBeanDefinition ( String beanName ) { } public int getBeanDefinitionCount ( ) { } public String [ ] getBeanDefinitionNames ( ) { } public String [ ] getBeanNamesForType ( Class type ) { } public String [ ] getBeanNamesForType ( Class type , boolean includePrototypes , boolean includeFactoryBeans ) { } public Map getBeansOfType ( Class type , boolean includePrototypes , boolean includeFactoryBeans ) throws BeansException { } public boolean containsBean ( String name ) { } public boolean isSingleton ( String name ) throws NoSuchBeanDefinitionException { } public Class getType ( String name ) throws NoSuchBeanDefinitionException { } public String [ ] getAliases ( String name ) throws NoSuchBeanDefinitionException { } public BeanFactory getParentBeanFactory ( ) { } public String getMessage ( String code , Object [ ] args , String defaultMessage , Locale locale ) { } public String getMessage ( String code , Object [ ] args , Locale locale ) throws NoSuchMessageException { } public String getMessage ( MessageSourceResolvable resolvable , Locale locale ) throws NoSuchMessageException { } public Resource [ ] getResources ( String locationPattern ) throws IOException { } public Resource getResource ( String location ) { } public AutowireCapableBeanFactory getAutowireCapableBeanFactory ( ) throws IllegalStateException { } public boolean containsLocalBean ( String arg0 ) { } public ClassLoader getClassLoader ( ) { } public String getId ( ) { } public Object getBean ( String name , Object [ ] args ) throws BeansException { } public boolean isPrototype ( String name ) throws NoSuchBeanDefinitionException { } public boolean isTypeMatch ( String name , Class targetType ) throws NoSuchBeanDefinitionException { } }

Fix:
throw new IllegalArgumentException ( ( ( "a<seq2seq4repair_space>bean<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>[" + name ) + "]<seq2seq4repair_space>has<seq2seq4repair_space>already<seq2seq4repair_space>been<seq2seq4repair_space>added<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>context" ) ) ;