Buggy code:
public class SpringBeanLocator implements IProxyTargetLocator { private transient Class beanTypeCache ; private String beanTypeName ; private String beanId ; private ISpringContextLocator springContextLocator ; public SpringBeanLocator ( Class beanType , ISpringContextLocator locator ) { } public SpringBeanLocator ( String beanId , Class beanType , ISpringContextLocator locator ) { } public Class getBeanType ( ) { } public Object locateProxyTarget ( ) { } public final String getBeanId ( ) { } public final ISpringContextLocator getSpringContextLocator ( ) { } private final Object lookupSpringBean ( ApplicationContext ctx , Class clazz ) { Map beans = BeanFactoryUtils . beansOfTypeIncludingAncestors ( ctx , clazz ) ; if ( ( beans . size ( ) ) == 0 ) { throw new IllegalStateException ( ( ( "bean<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( clazz . getName ( ) ) ) + "]<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } if ( ( beans . size ( ) ) > 1 ) { final String defaultName = clazz . getSimpleName ( ) ; final Iterator entries = beans . entrySet ( ) . iterator ( ) ; while ( entries . hasNext ( ) ) { Map . Entry beanDef = ( ( Map . Entry ) ( entries . next ( ) ) ) ; if ( defaultName . equalsIgnoreCase ( ( ( String ) ( beanDef . getKey ( ) ) ) ) ) { return beanDef . getValue ( ) ; } } <START_BUG> String msg = ( "more<seq2seq4repair_space>then<seq2seq4repair_space>one<seq2seq4repair_space>bean<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[[" + ( clazz . getName ( ) ) ) + "]]<seq2seq4repair_space>found,<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>bean<seq2seq4repair_space>(@SpringBean(name=\"foo\"))<seq2seq4repair_space>in<seq2seq4repair_space>order<seq2seq4repair_space>to<seq2seq4repair_space>resolve<seq2seq4repair_space>this<seq2seq4repair_space>conflict.<seq2seq4repair_space>Beans<seq2seq4repair_space>that<seq2seq4repair_space>match<seq2seq4repair_space>type<seq2seq4repair_space>[[" ; <END_BUG> Iterator beanNames = beans . keySet ( ) . iterator ( ) ; while ( beanNames . hasNext ( ) ) { String beanName = ( ( String ) ( beanNames . next ( ) ) ) ; msg += beanName ; if ( beanNames . hasNext ( ) ) { msg += ",<seq2seq4repair_space>" ; } } msg += "]]" ; throw new IllegalStateException ( msg ) ; } return beans . values ( ) . iterator ( ) . next ( ) ; } private static Object lookupSpringBean ( ApplicationContext ctx , String name , Class clazz ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
String msg = ( "more<seq2seq4repair_space>then<seq2seq4repair_space>one<seq2seq4repair_space>bean<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[[" + ( clazz . getName ( ) ) ) + "]]<seq2seq4repair_space>found,<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>bean<seq2seq4repair_space>(@SpringBean(id=\"foo\"))<seq2seq4repair_space>in<seq2seq4repair_space>order<seq2seq4repair_space>to<seq2seq4repair_space>resolve<seq2seq4repair_space>this<seq2seq4repair_space>conflict.<seq2seq4repair_space>Beans<seq2seq4repair_space>that<seq2seq4repair_space>match<seq2seq4repair_space>type<seq2seq4repair_space>[[" ;