Buggy code:
@ Alias ( "spring" ) @ RequiresFacet ( { WebResourceFacet . class , PersistenceFacet . class } ) public class SpringScaffold extends BaseFacet implements ScaffoldProvider { private static String XMLNS_PREFIX = "xmlns:" ; private static final String SPRING_CONTROLLER_TEMPLATE = "scaffold//spring//SpringControllerTemplate.jv" ; private static final String DAO_INTERFACE_TEMPLATE = "scaffold//spring//DaoInterfaceTemplate.jv" ; private static final String DAO_IMPLEMENTATION_TEMPLATE = "scaffold//spring//DaoImplementationTemplate.jv" ; private static final String VIEW_TEMPLATE = "scaffold//spring//view.jsp" ; private static final String CREATE_TEMPLATE = "scaffold//spring//create.jsp" ; private static final String SEARCH_TEMPLATE = "scaffold//spring//search.jsp" ; private static final String NAVIGATION_TEMPLATE = "scaffold//spring//page.jsp" ; private static final String ERROR_TEMPLATE = "scaffold//spring//error.jsp" ; private static final String INDEX_TEMPLATE = "scaffold//spring//index.jsp" ; protected CompiledTemplateResource backingBeanTemplate ; protected int backingBeanTemplateQbeMetawidgetIndent ; protected CompiledTemplateResource springControllerTemplate ; protected CompiledTemplateResource daoInterfaceTemplate ; protected CompiledTemplateResource daoImplementationTemplate ; protected CompiledTemplateResource viewTemplate ; protected Map < String , String > viewTemplateNamespaces ; protected int viewTemplateEntityMetawidgetIndent ; protected CompiledTemplateResource createTemplate ; protected Map < String , String > createTemplateNamespaces ; protected int createTemplateEntityMetawidgetIndent ; protected CompiledTemplateResource searchTemplate ; protected Map < String , String > searchTemplateNamespaces ; protected int searchTemplateSearchMetawidgetIndent ; protected int searchTemplateBeanMetawidgetIndent ; protected CompiledTemplateResource navigationTemplate ; protected int navigationTemplateIndent ; protected CompiledTemplateResource errorTemplate ; protected CompiledTemplateResource indexTemplate ; private TemplateResolver < ClassLoader > resolver ; private ShellPrompt prompt ; private TemplateCompiler compiler ; private Event < InstallFacets > install ; private StaticSpringMetawidget entityMetawidget ; private StaticSpringMetawidget searchMetawidget ; private StaticSpringMetawidget beanMetawidget ; private StaticJavaMetawidget qbeMetawidget ; @ Inject public SpringScaffold ( final ShellPrompt prompt , final TemplateCompiler compiler , final Event < InstallFacets > install ) { } @ Override public List < Resource < ? > > setup ( Resource < ? > template , boolean overwrite ) { } @ Override public void setProject ( Project project ) { } @ Override public List < Resource < ? > > generateFromEntity ( Resource < ? > template , JavaClass entity , boolean overwrite ) { } @ Override @ SuppressWarnings ( "unchecked" ) public boolean install ( ) { } @ Override public boolean isInstalled ( ) { } @ Override public List < Resource < ? > > generateIndex ( Resource < ? > template , boolean overwrite ) { } @ Override public List < Resource < ? > > generateTemplates ( final boolean overwrite ) { } @ Override public List < Resource < ? > > getGeneratedResources ( ) { } @ Override public AccessStrategy getAccessStrategy ( ) { } @ Override public TemplateStrategy getTemplateStrategy ( ) { } protected Resource < ? > updateApplicationContext ( ) { } protected Resource < ? > setupMVCContext ( ) { WebResourceFacet web = this . project . getFacet ( WebResourceFacet . class ) ; MetadataFacet meta = this . project . getFacet ( MetadataFacet . class ) ; Node beans = new Node ( "beans" ) ; beans . attribute ( "xmlns" , "http:////www.springframework.org//schema//beans" ) ; beans . attribute ( ( ( SpringScaffold . XMLNS_PREFIX ) + "xsi" ) , "http:////www.w3.org//2001//XMLSchema-instance" ) ; beans . attribute ( ( ( SpringScaffold . XMLNS_PREFIX ) + "mvc" ) , "http:////www.springframework.org//schema//mvc" ) ; beans . attribute ( ( ( SpringScaffold . XMLNS_PREFIX ) + "context" ) , "http:////www.springframework.org//schema//context" ) ; String schemaLoc = "http:////www.springframework.org//schema//beans<seq2seq4repair_space>http:////www.springframework.org//schema//beans//spring-beans.xsd" ; schemaLoc += "<seq2seq4repair_space>http:////www.springframework.org//schema//context<seq2seq4repair_space>http:////www.springframework.org//schema//context//spring-context.xsd" ; schemaLoc += "<seq2seq4repair_space>http:////www.springframework.org//schema//mvc<seq2seq4repair_space>http:////www.springframework.org//schema//mvc//spring-mvc.xsd" ; beans . attribute ( "xsi:schemaLocation" , schemaLoc ) ; String mvcPackage = ( meta . getTopLevelPackage ( ) ) + ".mvc" ; Node contextScan = new Node ( "context:component-scan" , beans ) ; contextScan . attribute ( "base-package" , mvcPackage ) ; beans . createChild ( "mvc:annotation-driven" ) ; beans . createChild ( "mvc:default-servlet-handler" ) ; Node viewResolver = new Node ( "bean" , beans ) ; viewResolver . attribute ( "class" , "org.springframework.web.servlet.view.InternalResourceViewResolver" ) ; viewResolver . attribute ( "id" , "viewResolver" ) ; Node prefixProperty = new Node ( "property" , viewResolver ) ; prefixProperty . attribute ( "prefix" , "WEB-INF//views//" ) ; Node suffixProperty = new Node ( "property" , viewResolver ) ; suffixProperty . attribute ( "suffix" , ".jsp" ) ; Node errorViewResolver = new Node ( "bean" , beans ) ; errorViewResolver . attribute ( "class" , "org.springframework.web.servlet.handler.SimpleMappingExceptionResolver" ) ; errorViewResolver . attribute ( "id" , "errorViewResolver" ) ; Node exceptionProperty = new Node ( "property" , errorViewResolver ) ; exceptionProperty . attribute ( "name" , "exceptionMappings" ) ; Node props = new Node ( "props" , exceptionProperty ) ; Node prop = new Node ( "prop" , props ) ; prop . attribute ( "key" , "java.lang.Exception" ) ; prop . text ( "Error!" ) ; Node mvcStaticContent = new Node ( "mvc:resources" , beans ) ; mvcStaticContent . attribute ( "mapping" , "//static//**" ) ; mvcStaticContent . attribute ( "location" , "//" ) ; String mvcContextFile = XMLParser . toXMLString ( beans ) ; <START_BUG> String filename = ( "WEB-INF" + ( meta . getProjectName ( ) . toLowerCase ( ) . replace ( '<seq2seq4repair_space>' , '-' ) ) ) + "-mvc-context.xml" ; <END_BUG> web . createWebResource ( mvcContextFile . toCharArray ( ) , filename ) ; return web . getWebResource ( filename ) ; } protected Resource < ? > updateWebXML ( ) { } protected void loadTemplates ( ) { } protected HashMap < Object , Object > getTemplateContext ( final Resource < ? > template ) { } protected Resource < ? > generateNavigation ( final boolean overwrite ) throws IOException { } protected Map < String , String > parseNamespaces ( final String template ) { } protected int parseIndent ( final String template , final String indentOf ) { } protected void writeEntityMetawidget ( final Map < Object , Object > context , final int entityMetawidgetIndent , final Map < String , String > existingNamespaces ) { } protected String namespacesToString ( Map < String , String > namespaces ) { } }

Fix:
String filename = ( "WEB-INF//" + ( meta . getProjectName ( ) . toLowerCase ( ) . replace ( '<seq2seq4repair_space>' , '-' ) ) ) + "-mvc-context.xml" ;