Here's a minimal example.
\documentclass{article}
\usepackage{titlesec}
\usepackage{algorithm2e}
\usepackage{natbib}
\begin{document}
\bibliographystyle{plainnat}
\begin{thebibliography}{1}
\bibitem[Bar(2011)]{bar}
Bar
\end{thebibliography}
\end{document}
This produces a heading akin to
*Bibliography
If titlesec
is commented out, it fails to compile unless natbib
is also commented out
If either algorithm2e
or natbib
are commented out, then it produces the heading
References
I would clearly like to see the latter. Do I need to use another pseudocode package or can this be solved?