Buggy code:
public Object removeAttribute ( String name ) { } public Object getAttribute ( String name , boolean recurse ) { } public boolean hasAttribute ( String name , boolean recurse ) { } public Object setAttribute ( String name , Object value , boolean recurse ) { } public Object removeAttribute ( String name , boolean recurse ) { } public Object getAttributeOrFellow ( String name , boolean recurse ) { } public boolean hasAttributeOrFellow ( String name , boolean recurse ) { } public boolean addScopeListener ( ScopeListener listener ) { } public boolean removeScopeListener ( ScopeListener listener ) { } public void invalidate ( ) { } public boolean addClassResolver ( ClassResolver resolver ) { } public Class < ? > resolveClass ( String clsnm ) throws ClassNotFoundException { } public Class < ? > getZScriptClass ( String clsnm ) { } public Function getZScriptFunction ( String name , Class [ ] argTypes ) { } public Function getZScriptFunction ( Component comp , String name , Class [ ] argTypes ) { } public Object getZScriptVariable ( String name ) { } public Object getZScriptVariable ( Component comp , String name ) { } public Object getXelVariable ( String name ) { } public Object getXelVariable ( XelContext ctx , Object base , Object name , boolean ignoreExec ) { } public boolean addVariableResolver ( VariableResolver resolver ) { } public boolean removeVariableResolver ( VariableResolver resolver ) { } public boolean hasVariableResolver ( VariableResolver resolver ) { } public boolean addEventListener ( String evtnm , EventListener < ? extends Event > listener ) { } public boolean removeEventListener ( String evtnm , EventListener < ? extends Event > listener ) { } private static boolean duplicateListenerIgnored ( ) { } private static Boolean dupListenerIgnored ; public boolean isComplete ( ) { } public void setComplete ( boolean complete ) { } public void preInit ( ) { } public void init ( PageConfig config ) { } public void destroy ( ) { } public boolean isAlive ( ) { } public String getBeforeHeadTags ( ) { } public String getAfterHeadTags ( ) { } public void addBeforeHeadTags ( String tags ) { } public void addAfterHeadTags ( String tags ) { } public Collection < Object [ ] > getResponseHeaders ( ) { } public String getRootAttributes ( ) { } public void setRootAttributes ( String rootAttrs ) { } public String getContentType ( ) { } public void setContentType ( String contentType ) { } public String getWidgetClass ( ) { } public void setWidgetClass ( String wgtcls ) { } public String getDocType ( ) { } public void setDocType ( String docType ) { } public String getFirstLine ( ) { } public void setFirstLine ( String firstLine ) { } public Boolean getCacheable ( ) { } public void setCacheable ( Boolean cacheable ) { } public Boolean getAutomaticTimeout ( ) { } public void setAutomaticTimeout ( Boolean autoTimeout ) { } public final Desktop getDesktop ( ) { } public void redraw ( Writer out ) throws IOException { } private static Boolean _ie7compat ; private static Boolean _ieAutoCompat ; private static boolean shallIE7Compatible ( ) { } private static boolean shallDisableAutoCompatible ( ) { } public void interpret ( String zslang , String script , Scope scope ) { } public Interpreter getInterpreter ( String zslang ) { } public Collection < Interpreter > getLoadedInterpreters ( ) { } public String getZScriptLanguage ( ) { } public void setZScriptLanguage ( String zslang ) throws InterpreterNotFoundException { } public void addDeferredZScript ( Component parent , ZScript zscript ) { } private void evalDeferredZScripts ( Interpreter ip , String zslang ) { } private boolean isEffective ( Condition cond , Component comp ) { } public boolean isListenerAvailable ( String evtnm ) { } public Iterator < EventListener < ? extends Event > > getListenerIterator ( String evtnm ) { } public Iterable < EventListener < ? extends Event > > getEventListeners ( String evtnm ) { } public final Component getOwner ( ) { } public final void setOwner ( Component comp ) { } public void sessionWillPassivate ( Desktop desktop ) { } public void sessionDidActivate ( Desktop desktop ) { } private void willPassivate ( Collection c ) { } private void willPassivate ( Object o ) { } private void didActivate ( Collection c ) { } private void didActivate ( Object o ) { } public LanguageDefinition getLanguageDefinition ( ) { } public ComponentDefinitionMap getComponentDefinitionMap ( ) { } public ComponentDefinition getComponentDefinition ( String name , boolean recurse ) { } public ComponentDefinition getComponentDefinition ( Class < ? extends Component > cls , boolean recurse ) { } public Class < ? extends ExpressionFactory > getExpressionFactoryClass ( ) { } public void setExpressionFactoryClass ( Class < ? extends ExpressionFactory > expfcls ) { } public void addTemplate ( String name , Template template ) { } public void removeTemplate ( String name ) { } public Template getTemplate ( String name ) { <START_BUG> return _templates . get ( name ) ; <END_BUG> } private synchronized void writeObject ( ObjectOutputStream s ) throws IOException { } private void willSerialize ( Collection c ) { } private void willSerialize ( Object o ) { } private void readObject ( ObjectInputStream s ) throws IOException , ClassNotFoundException { } private void didDeserialize ( Collection c ) { } private void didDeserialize ( Object o ) { } public String toString ( ) { } private class PageFuncMapper implements Serializable , FunctionMapper , FunctionMapperExt { public Function resolveFunction ( String prefix , String name ) throws XelException { } public Collection < String > getClassNames ( ) { } public Class resolveClass ( String name ) throws XelException { } } private static < E > Collection < E > combine ( Collection < E > first , Collection < E > second ) { } }

Fix:
return ( _templates ) != null ? _templates . get ( name ) : null ;