You're setting your numbering to capital roman numerals in your appendix, then you define two sections. The first one \section{appendix} will print I. appendix or appendix I. depending on your section definition. It will also appear in the ToC. The second one (last line) will not appear in the ToC, it will print Appendix I (though i don't know, what you're trying to achieve using \text{}), but it won't affect the counter you especially redefined, because of the * (unnumbered section. I think that is not a good practice for appendicies. Though I'm guessing which document class you're using, this MWE might be more of what you want
\documentclass[a4paper,12pt]{scrartcl}
\usepackage{hyperref,url,ifthen,listings}
\begin{document}\noindent
\section{normal title}
\appendix
\renewcommand{\thesection}{Appendix \Roman{section}}
\section{An appendix title}
\section{Another}
This gets automatically the next number.
\end{document}
Every section after the redefinition gets Appendix and a roman numeral prepended. In the document and in the ToC.
\section{appendix}. – Werner Jan 30 '13 at 06:13\textcommand? – egreg Jan 30 '13 at 10:32