--- /dev/null
+\documentclass{beamer}
+\usetheme{Boadilla}
+\usepackage[normalem]{ulem}
+\usepackage{multicol}
+\usepackage{tikz}
+\usepackage{listings}
+\lstset{
+ frame=tlrb,
+ language=Java,
+ aboveskip=3mm,
+ belowskip=3mm,
+ showstringspaces=false,
+ columns=flexible,
+ basicstyle={\small\ttfamily},
+% numbers=none,
+ numberstyle=\tiny\color{gray},
+ keywordstyle=\color{blue},
+ commentstyle=\color{gray},
+ stringstyle=\color{mauve},
+ breaklines=true,
+ breakatwhitespace=true,
+ tabsize=3
+}
+
+
+\begin{document}
+
+%------------- Titlepage -------------%
+\title{Safer Refactorings}
+\author{Anna Maria Eilertsen\inst{1} \and \underline{Volker Stolz}\inst{2} \and Anya Bagge\inst{1}}
+\vspace{2mm}
+\institute{%
+ \inst{1}Inst.\ for Informatikk, University of Bergen \and
+\inst{2} Inst.\ for Data- og Realfag, Western Norway Univ. of Applied Sciences
+\\Norway}
+
+\date{May 23rd, 2017}
+
+\begin{frame}
+\titlepage
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=1.5cm, xshift=1.2cm]current page.center)
+% {\includegraphics[width=0.04\textwidth]{images/twitter}};
+
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=2cm, xshift=5cm]current page.south)
+% %or: (current page.center)
+% {\includegraphics[width=0.1\textwidth]{images/programmer}};
+
+% {\small The results of this thesis has been accepted to the ISOLA\footnote{http://www.isola-conference.org/isola2016/} conference as a paper.}
+\begin{center}
+\small published in:
+
+ISoLA 2016 -- \textit{Static and Runtime Verification: Competitors or Friends?}
+
+LNCS Vol. 9952, Springer, 2016
+\end{center}
+\end{frame}
+
+
+%\begin{frame}
+%\frametitle{Outline}
+%\tableofcontents
+%\end{frame}
+
+
+\section{Introduction}
+\subsection{Motivation}
+
+%------------- Fowler -------------%
+\begin{frame}
+
+\frametitle{Software Refactorings}
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=-3.5cm]current page.center)
+ {\includegraphics[width=0.6\textwidth]{images/fowler}};
+\end{minipage}
+\begin{minipage}[t]{.45\textwidth}
+\vspace{1cm}
+\begin{center}``Behaviour preserving program transformation''\end{center}
+\vspace{1cm}
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=3cm,xshift=2cm]current page.south)
+% {
+ \includegraphics[width=\textwidth]{images/movemethod}
+% };
+
+\end{minipage}
+\end{frame}
+
+
+\begin{frame}\frametitle{Software Refactoring Tools}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-2.5cm,xshift=-2.3cm]current page.north)
+ {\includegraphics[width=0.6\textwidth]{images/errormessage}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5cm,xshift=-4.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5.5cm,xshift=-1.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/netbeans}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-7.5cm,xshift=-3.5cm]current page.north)
+ {\includegraphics[width=0.16\textwidth]{images/intellij}};
+
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ %([yshift=2cm, xshift=5cm]current page.south)
+ %(current page.center)
+ ([xshift=3cm]current page.center)
+ {\includegraphics[width=\textwidth]{images/refactoringtooluse}};
+
+\end{minipage}
+
+
+\end{frame}
+
+
+\begin{frame}\frametitle{Unsafe Refactorings}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm,yshift=2cm]current page.center)
+ {\includegraphics[width=0.35\textwidth]{images/computing}};
+\vspace{3cm}
+
+\begin{minipage}[b]{.65\textwidth}
+\begin{quote}
+``\textit{\small
+The primary risk is regression, mostly from misunderstanding subtle corner cases in the original code and not accounting for them in the refactored code.}''\begin{center}{\small-- interviewee, Microsoft developer,\\Kim et al., 2012
+%\footnote{Kim, Miryung, Zimmermann, and Nachiappan Nagappan. ``A field study of refactoring challenges and benefits.'' 2012.}
+}
+\end{center}
+\end{quote}
+\end{minipage}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm]current page.east)
+ {\includegraphics[width=0.3\textwidth]{images/kimfig}};
+\end{frame}
+
+
+
+
+
+
+
+\begin{frame}[fragile]\frametitle{Unsafe Refactoring Example}
+\textbf{Extract Local Variable}
+
+\vspace{1.5cm}
+
+In Java/Eclipse:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title={Before},
+ linewidth=.8\textwidth]
+public void f() {\r x.n();\r setX();\r x.n();\r}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title=After,
+ linewidth=.8\textwidth]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+\end{minipage}
+
+
+\end{frame}
+
+
+%------------- Discussion: solution -------------%
+\begin{frame}[fragile]\frametitle{An analysing problem}
+\texttt{x = new X();} \hspace{2.3cm} \includegraphics{images/warningsymbol}
+
+\texttt{setX(); // x = new X();} \hspace{2mm} \includegraphics{images/testsuccess}
+
+\vspace{3cm}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=2.5cm]current page.center)
+ {\includegraphics[width=0.5\textwidth]{images/dogproblem} };
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.5cm,xshift=4.5cm]current page.north)
+ {\begin{lstlisting}[numbers=left, firstnumber=1,
+ linewidth=.2\textwidth, basicstyle={\tiny\ttfamily}]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+};
+\textbf{Solution:}\\
+\texttt{assert temp == x;}
+
+\vspace{1.5cm}
+\hrulefill\\
+{\tiny $^\ast$Dog art from Hyperbole and a Half}
+\end{frame}
+
+
+%------------- The problem -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Simplified example:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ x.n();
+ x.m();
+ x.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Output:\\
+1735600054\\
+21685669 \hspace{8.5cm} \hyperlink{frame:exp}{\beamerbutton{skip example}}
+\end{frame}
+
+
+
+
+
+%------------- The problem: refactored -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Refactored:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ X temp = x;
+ temp.n();
+ temp.m();
+ temp.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+1735600054
+\end{frame}
+
+%------------- Code: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+With dynamic checks:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ X temp = x;
+ assert temp == x;
+ temp.n();
+ assert temp == x;
+ temp.m();
+ assert temp == x;
+ temp.n();
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+Exception in thread "main" java.lang.AssertionError
+\end{frame}
+
+
+
+
+
+
+
+
+%------------- Extract And Move: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract And Move Method}
+A similar problem:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ x.bar(this);
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ ...
+ void bar(C c){
+ this.n();
+ assert this == c.x;
+ this.m();
+ assert this == c.x;
+ this.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Similar how?\\
+Evaluate \texttt{x} once.\\
+Refer to that value by \texttt{this}\\
+Substitute every occurrence of \texttt{x} with \texttt{this}
+\end{frame}
+
+
+
+%------------- Experiment:case study -------------%
+\begin{frame}\frametitle{Experiment: Case study}
+\hypertarget{frame:exp}{}
+\textbf{Case: Eclipse JDT UI source code}
+%\begin{itemize}
+% \item Java Programming Language
+% \item Open Source
+% \item 300.000 lines of code
+% \item 25.000 methods
+% \item Automated test suite
+%\end{itemize}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-2cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/java_logo}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-4cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=3cm]current page.center)
+ {\includegraphics[width=0.3\textwidth]{images/programmers}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=0cm]current page.center)
+ {\includegraphics[width=0.15\textwidth]{images/junit}};
+
+\vspace{2cm}
+
+\textbf{Experiment:}
+\begin{itemize}
+ \item Execute our modified refactorings on Eclipse JDT UI project
+ \item Run Eclipse test suite
+ \item Look for triggered asserts
+ \item Profit!!
+\end{itemize}
+
+\bigskip
+
+Need custom automated refactoring tool.
+
+\end{frame}
+
+%------------- Experiment:development -------------%
+\begin{frame}\frametitle{Experiment: Development}
+\textbf{Eclipse refactoring plug-in}
+
+\bigskip
+
+\begin{itemize}
+ \item Modify Eclipse's refactorings to introduce asserts
+ \begin{itemize}
+ \item Extract Local Variable
+ \item Extract And Move Method
+ \end{itemize}
+ \item Automate refactoring process
+ \begin{itemize}
+ \item Execute on Java project
+ \item One refactoring per method
+ \end{itemize}
+ \item Custom heuristic for finding refactoring targets\\
+ (Kristiansen/Stolz, NIK'14)
+\end{itemize}
+\end{frame}
+
+%------------- Experiment:results -------------%
+\begin{frame}\frametitle{Experiment: Results}
+
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2.5mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics{images/testfailure}\includegraphics{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136$^\ast$ & 0 \\
+\hline
+\end{tabular}
+
+\bigskip
+
+$^\ast$ 136 instances of the same 2 assert statements
+\end{frame}
+
+
+%------------- Experiment:discussion -------------%
+\begin{frame}\frametitle{Discussion}
+\vspace{2cm}
+
+\textbf{Take-away and questions:}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.7cm,xshift=2.5cm]current page.north)
+ {
+{\tiny
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics[width=1.5mm]{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics[width=1.5mm]{images/testfailure}\includegraphics[width=1.5mm]{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136 & 0 \\
+\hline
+\end{tabular}
+}
+};
+
+
+
+
+
+
+
+\begin{itemize}
+ \item Dynamic preconditions can be useful!
+% \item Extract And Move Method is complicated
+% \begin{itemize}
+% \item Can use Extract Local Variable as a precondition
+% \end{itemize}
+ \item Assert statements are incomplete.
+% \begin{itemize}
+% \item assignment and reassignment in one statement
+% \item Solution: wrapper methods
+% \end{itemize}
+% \item Can we conclude that this bug would not appear?
+% \begin{itemize}
+% \item Look at code during development
+% \end{itemize}
+ \item Show or hide the asserts from the programmer?
+% \begin{itemize}
+% \item Hide assert statements from the source code
+% \item Show them and let the programmer decide
+% \end{itemize}
+ \item Is reference equivalence too strict?
+\end{itemize}
+
+%\hrulefill
+\vspace{1cm}
+
+\begin{center}
+Thank you!
+\end{center}
+\hrulefill\\
+{\tiny $^\ast$Art with face is from Hyperbole and a Half}
+\end{frame}
+
+
+
+\end{document}
--- /dev/null
+\documentclass{beamer}
+\usetheme{Boadilla}
+\usepackage[normalem]{ulem}
+\usepackage{multicol}
+\usepackage{tikz}
+\usepackage{listings}
+\lstset{
+ frame=tlrb,
+ language=Java,
+ aboveskip=3mm,
+ belowskip=3mm,
+ showstringspaces=false,
+ columns=flexible,
+ basicstyle={\small\ttfamily},
+% numbers=none,
+ numberstyle=\tiny\color{gray},
+ keywordstyle=\color{blue},
+ commentstyle=\color{gray},
+ stringstyle=\color{mauve},
+ breaklines=true,
+ breakatwhitespace=true,
+ tabsize=3
+}
+
+
+\begin{document}
+
+%------------- Titlepage -------------%
+\title{Safer Refactorings}
+\author[Eilertsen, Stolz, Bagge]{Anna M. Eilertsen\inst{1} \and \underline{Volker Stolz}\inst{2} \and Anya H. Bagge\inst{1}}
+\vspace{2mm}
+\institute[]{%
+ \inst{1}Inst.\ for Informatikk, University of Bergen \and
+\inst{2} Inst.\ for Data- og Realfag, Western Norway Univ. of Applied Sciences
+\\Norway}
+
+\setbeamertemplate{navigation symbols}{}
+
+\date{November 20th, 2017}
+
+\begin{frame}
+\titlepage
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=1.5cm, xshift=1.2cm]current page.center)
+% {\includegraphics[width=0.04\textwidth]{images/twitter}};
+
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=2cm, xshift=5cm]current page.south)
+% %or: (current page.center)
+% {\includegraphics[width=0.1\textwidth]{images/programmer}};
+
+% {\small The results of this thesis has been accepted to the ISOLA\footnote{http://www.isola-conference.org/isola2016/} conference as a paper.}
+\begin{center}
+\small published in:
+
+ISoLA 2016 -- \textit{Static and Runtime Verification: Competitors or Friends?}
+
+LNCS Vol. 9952, Springer, 2016
+\end{center}
+\end{frame}
+
+
+%\begin{frame}
+%\frametitle{Outline}
+%\tableofcontents
+%\end{frame}
+
+
+\section{Introduction}
+\subsection{Motivation}
+
+%------------- Fowler -------------%
+\begin{frame}
+
+\frametitle{Software Refactorings}
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=-3.5cm]current page.center)
+ {\includegraphics[width=0.6\textwidth]{images/fowler}};
+\end{minipage}
+\begin{minipage}[t]{.45\textwidth}
+\vspace{1cm}
+\begin{center}``Behaviour preserving program transformation''\end{center}
+\vspace{1cm}
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=3cm,xshift=2cm]current page.south)
+% {
+ \includegraphics[width=\textwidth]{images/movemethod}
+% };
+
+\end{minipage}
+\end{frame}
+
+
+\begin{frame}\frametitle{Software Refactoring Tools}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-2.5cm,xshift=-2.3cm]current page.north)
+ {\includegraphics[width=0.6\textwidth]{images/errormessage}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5cm,xshift=-4.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5.5cm,xshift=-1.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/netbeans}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-7.5cm,xshift=-3.5cm]current page.north)
+ {\includegraphics[width=0.16\textwidth]{images/intellij}};
+
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ %([yshift=2cm, xshift=5cm]current page.south)
+ %(current page.center)
+ ([xshift=3cm]current page.center)
+ {\includegraphics[width=\textwidth]{images/refactoringtooluse}};
+
+\end{minipage}
+
+
+\end{frame}
+
+
+\begin{frame}\frametitle{Unsafe Refactorings}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm,yshift=2cm]current page.center)
+ {\includegraphics[width=0.35\textwidth]{images/computing}};
+\vspace{3cm}
+
+\begin{minipage}[b]{.65\textwidth}
+\begin{quote}
+``\textit{\small
+The primary risk is regression, mostly from misunderstanding subtle corner cases in the original code and not accounting for them in the refactored code.}''\begin{center}{\small-- interviewee, Microsoft developer,\\Kim et al., 2012
+%\footnote{Kim, Miryung, Zimmermann, and Nachiappan Nagappan. ``A field study of refactoring challenges and benefits.'' 2012.}
+}
+\end{center}
+\end{quote}
+\end{minipage}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm]current page.east)
+ {\includegraphics[width=0.3\textwidth]{images/kimfig}};
+\end{frame}
+
+
+
+
+
+
+
+\begin{frame}[fragile]\frametitle{Unsafe Refactoring Example}
+\textbf{Extract Local Variable}
+
+\vspace{1.5cm}
+
+In Java/Eclipse:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title={Before},
+ linewidth=.8\textwidth]
+public void f() {\r x.n();\r setX();\r x.n();\r}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title=After,
+ linewidth=.8\textwidth]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+\end{minipage}
+
+
+\end{frame}
+
+
+%------------- Discussion: solution -------------%
+\begin{frame}[fragile]\frametitle{An analysing problem}
+\texttt{x = new X();} \hspace{2.3cm} \includegraphics{images/warningsymbol}
+
+\texttt{setX(); // x = new X();} \hspace{2mm} \includegraphics{images/testsuccess}
+
+\vspace{3cm}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=2.5cm]current page.center)
+ {\includegraphics[width=0.5\textwidth]{images/dogproblem} };
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.5cm,xshift=4.5cm]current page.north)
+ {\begin{lstlisting}[numbers=left, firstnumber=1,
+ linewidth=.2\textwidth, basicstyle={\tiny\ttfamily}]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+};
+\textbf{Solution:}\\
+\texttt{assert temp == x;}
+
+\vspace{1.5cm}
+\hrulefill\\
+{\tiny $^\ast$Dog art from Hyperbole and a Half}
+\end{frame}
+
+
+%------------- The problem -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Simplified example:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ x.n();
+ x.m();
+ x.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Output:\\
+1735600054\\
+21685669 \hspace{8.5cm} \hyperlink{frame:exp}{\beamerbutton{skip example}}
+\end{frame}
+
+
+
+
+
+%------------- The problem: refactored -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Refactored:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ X temp = x;
+ temp.n();
+ temp.m();
+ temp.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+1735600054
+\end{frame}
+
+%------------- Code: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+With dynamic checks:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ X temp = x;
+ assert temp == x;
+ temp.n();
+ assert temp == x;
+ temp.m();
+ assert temp == x;
+ temp.n();
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+Exception in thread "main" java.lang.AssertionError
+\end{frame}
+
+
+
+
+
+
+
+
+%------------- Extract And Move: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract And Move Method}
+A similar problem:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ x.bar(this);
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ ...
+ void bar(C c){
+ this.n();
+ assert this == c.x;
+ this.m();
+ assert this == c.x;
+ this.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Similar how?\\
+Evaluate \texttt{x} once.\\
+Refer to that value by \texttt{this}\\
+Substitute every occurrence of \texttt{x} with \texttt{this}
+\end{frame}
+
+
+
+%------------- Experiment:case study -------------%
+\begin{frame}\frametitle{Experiment: Case study}
+\hypertarget{frame:exp}{}
+\textbf{Case: Eclipse JDT UI source code}
+%\begin{itemize}
+% \item Java Programming Language
+% \item Open Source
+% \item 300.000 lines of code
+% \item 25.000 methods
+% \item Automated test suite
+%\end{itemize}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-2cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/java_logo}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-4cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=3cm]current page.center)
+ {\includegraphics[width=0.3\textwidth]{images/programmers}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=0cm]current page.center)
+ {\includegraphics[width=0.15\textwidth]{images/junit}};
+
+\vspace{2cm}
+
+\textbf{Experiment:}
+\begin{itemize}
+ \item Execute our modified refactorings on Eclipse JDT UI project
+ \item Run Eclipse test suite
+ \item Look for triggered asserts
+ \item Profit!!
+\end{itemize}
+
+\bigskip
+
+Need custom automated refactoring tool.
+
+\end{frame}
+
+%------------- Experiment:development -------------%
+\begin{frame}\frametitle{Experiment: Development}
+\textbf{Eclipse refactoring plug-in}
+
+\bigskip
+
+\begin{itemize}
+ \item Modify Eclipse's refactorings to introduce asserts
+ \begin{itemize}
+ \item Extract Local Variable
+ \item Extract And Move Method
+ \end{itemize}
+ \item Automate refactoring process
+ \begin{itemize}
+ \item Execute on Java project
+ \item One refactoring per method
+ \end{itemize}
+ \item Custom heuristic for finding refactoring targets\\
+ (Kristiansen/Stolz, NIK'14)
+\end{itemize}
+\end{frame}
+
+%------------- Experiment:results -------------%
+\begin{frame}\frametitle{Experiment: Results}
+
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2.5mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics{images/testfailure}\includegraphics{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136$^\ast$ & 0 \\
+\hline
+\end{tabular}
+
+\bigskip
+
+$^\ast$ 136 instances of the same 2 assert statements
+\end{frame}
+
+
+%------------- Experiment:discussion -------------%
+\begin{frame}\frametitle{Discussion}
+\vspace{2cm}
+
+\textbf{Take-away and questions:}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.7cm,xshift=2.5cm]current page.north)
+ {
+{\tiny
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics[width=1.5mm]{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics[width=1.5mm]{images/testfailure}\includegraphics[width=1.5mm]{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136 & 0 \\
+\hline
+\end{tabular}
+}
+};
+
+
+
+
+
+
+
+\begin{itemize}
+ \item Dynamic preconditions can be useful!
+% \item Extract And Move Method is complicated
+% \begin{itemize}
+% \item Can use Extract Local Variable as a precondition
+% \end{itemize}
+ \item Assert statements are incomplete.
+% \begin{itemize}
+% \item assignment and reassignment in one statement
+% \item Solution: wrapper methods
+% \end{itemize}
+% \item Can we conclude that this bug would not appear?
+% \begin{itemize}
+% \item Look at code during development
+% \end{itemize}
+ \item Show or hide the asserts from the programmer?
+% \begin{itemize}
+% \item Hide assert statements from the source code
+% \item Show them and let the programmer decide
+% \end{itemize}
+ \item Is reference equivalence too strict?
+\end{itemize}
+
+%\hrulefill
+\vspace{1cm}
+
+\begin{center}
+Thank you!
+\end{center}
+\hrulefill\\
+{\tiny $^\ast$Art with face is from Hyperbole and a Half}
+\end{frame}
+
+
+
+\end{document}
--- /dev/null
+\documentclass{beamer}
+\usetheme{Boadilla}
+\usepackage[normalem]{ulem}
+\usepackage{multicol}
+\usepackage{tikz}
+\usepackage{listings}
+\lstset{
+ frame=tlrb,
+ language=Java,
+ aboveskip=3mm,
+ belowskip=3mm,
+ showstringspaces=false,
+ columns=flexible,
+ basicstyle={\small\ttfamily},
+% numbers=none,
+ numberstyle=\tiny\color{gray},
+ keywordstyle=\color{blue},
+ commentstyle=\color{gray},
+ stringstyle=\color{mauve},
+ breaklines=true,
+ breakatwhitespace=true,
+ tabsize=3
+}
+
+
+\begin{document}
+
+%------------- Titlepage -------------%
+\title{Safer Refactorings}
+\author{Anna Maria Eilertsen\inst{1} \and \underline{Volker Stolz}\inst{2} \and Anya Bagge\inst{1}}
+\vspace{2mm}
+\institute{%
+ \inst{1}Inst.\ for Informatikk, University of Bergen \and
+\inst{2} Inst.\ for Data- og Realfag, Bergen University College
+\\Norway}
+
+\date{January 3rd, 2017}
+
+\begin{frame}
+\titlepage
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=1.5cm, xshift=1.2cm]current page.center)
+% {\includegraphics[width=0.04\textwidth]{images/twitter}};
+
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=2cm, xshift=5cm]current page.south)
+% %or: (current page.center)
+% {\includegraphics[width=0.1\textwidth]{images/programmer}};
+
+% {\small The results of this thesis has been accepted to the ISOLA\footnote{http://www.isola-conference.org/isola2016/} conference as a paper.}
+\begin{center}
+\small published in:
+
+ISoLA 2016 -- \textit{Static and Runtime Verification: Competitors or Friends?}
+
+LNCS Vol. 9952, Springer, 2016
+\end{center}
+\end{frame}
+
+
+%\begin{frame}
+%\frametitle{Outline}
+%\tableofcontents
+%\end{frame}
+
+
+\section{Introduction}
+\subsection{Motivation}
+
+%------------- Fowler -------------%
+\begin{frame}
+
+\frametitle{Software Refactorings}
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=-3.5cm]current page.center)
+ {\includegraphics[width=0.6\textwidth]{images/fowler}};
+\end{minipage}
+\begin{minipage}[t]{.45\textwidth}
+\vspace{1cm}
+\begin{center}``Behaviour preserving program transformation''\end{center}
+\vspace{1cm}
+%\tikz [remember picture,overlay]
+% \node at
+% ([yshift=3cm,xshift=2cm]current page.south)
+% {
+ \includegraphics[width=\textwidth]{images/movemethod}
+% };
+
+\end{minipage}
+\end{frame}
+
+
+\begin{frame}\frametitle{Software Refactoring Tools}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-2.5cm,xshift=-2.3cm]current page.north)
+ {\includegraphics[width=0.6\textwidth]{images/errormessage}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5cm,xshift=-4.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-5.5cm,xshift=-1.5cm]current page.north)
+ {\includegraphics[width=0.2\textwidth]{images/netbeans}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-7.5cm,xshift=-3.5cm]current page.north)
+ {\includegraphics[width=0.16\textwidth]{images/intellij}};
+
+\begin{minipage}[t]{.45\textwidth}
+\tikz [remember picture,overlay]
+ \node at
+ %([yshift=2cm, xshift=5cm]current page.south)
+ %(current page.center)
+ ([xshift=3cm]current page.center)
+ {\includegraphics[width=\textwidth]{images/refactoringtooluse}};
+
+\end{minipage}
+
+
+\end{frame}
+
+
+\begin{frame}\frametitle{Unsafe Refactorings}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm,yshift=2cm]current page.center)
+ {\includegraphics[width=0.35\textwidth]{images/computing}};
+\vspace{3cm}
+
+\begin{minipage}[b]{.65\textwidth}
+\begin{quote}
+``\textit{\small
+The primary risk is regression, mostly from misunderstanding subtle corner cases in the original code and not accounting for them in the refactored code.}''\begin{center}{\small-- interviewee, Microsoft developer,\\Kim et al., 2012
+%\footnote{Kim, Miryung, Zimmermann, and Nachiappan Nagappan. ``A field study of refactoring challenges and benefits.'' 2012.}
+}
+\end{center}
+\end{quote}
+\end{minipage}
+\tikz [remember picture,overlay]
+ \node at
+ ([xshift=-2.5cm]current page.east)
+ {\includegraphics[width=0.3\textwidth]{images/kimfig}};
+\end{frame}
+
+
+
+
+
+
+
+\begin{frame}[fragile]\frametitle{Unsafe Refactoring Example}
+\textbf{Extract Local Variable}
+
+\vspace{1.5cm}
+
+In Java/Eclipse:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title={Before},
+ linewidth=.8\textwidth]
+public void f() {\r x.n();\r setX();\r x.n();\r}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1, title=After,
+ linewidth=.8\textwidth]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+\end{minipage}
+
+
+\end{frame}
+
+
+%------------- Discussion: solution -------------%
+\begin{frame}[fragile]\frametitle{An analysing problem}
+\texttt{x = new X();} \hspace{2.3cm} \includegraphics{images/warningsymbol}
+
+\texttt{setX(); // x = new X();} \hspace{2mm} \includegraphics{images/testsuccess}
+
+\vspace{3cm}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=0cm,xshift=2.5cm]current page.center)
+ {\includegraphics[width=0.5\textwidth]{images/dogproblem} };
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.5cm,xshift=4.5cm]current page.north)
+ {\begin{lstlisting}[numbers=left, firstnumber=1,
+ linewidth=.2\textwidth, basicstyle={\tiny\ttfamily}]
+public void f() {\r X temp = x;
+ temp.n();\r setX();\r temp.n();\r}
+\end{lstlisting}
+};
+\textbf{Solution:}\\
+\texttt{assert temp == x;}
+
+\vspace{1.5cm}
+\hrulefill\\
+{\tiny $^\ast$Dog art from Hyperbole and a Half}
+\end{frame}
+
+
+%------------- The problem -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Simplified example:
+
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ x.n();
+ x.m();
+ x.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Output:\\
+1735600054\\
+21685669 \hspace{8.5cm} \hyperlink{frame:exp}{\beamerbutton{skip example}}
+\end{frame}
+
+
+
+
+
+%------------- The problem: refactored -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+Refactored:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+
+ public void f(){
+ X temp = x;
+ temp.n();
+ temp.m();
+ temp.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+1735600054
+\end{frame}
+
+%------------- Code: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract Local Variable}
+With dynamic checks:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ X temp = x;
+ assert temp == x;
+ temp.n();
+ assert temp == x;
+ temp.m();
+ assert temp == x;
+ temp.n();
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ public C myC;
+
+ public void m(){
+ myC.x = new X();
+ }
+
+ public void n(){
+ System.out.println(
+ this.hashCode());
+ }
+}
+\end{lstlisting}
+\end{minipage}
+Output:\\
+1735600054\\
+Exception in thread "main" java.lang.AssertionError
+\end{frame}
+
+
+
+
+
+
+
+
+%------------- Extract And Move: solution -------------%
+\begin{frame}[fragile]\frametitle{Extract And Move Method}
+A similar problem:
+
+\noindent\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class C {
+ public X x = new X();
+ {//initializer
+ x.myC = this;
+ }
+ public void f(){
+ x.bar(this);
+ }
+}
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}[t]{.45\textwidth}
+\begin{lstlisting}[numbers=left, firstnumber=1]
+public class X{
+ ...
+ void bar(C c){
+ this.n();
+ assert this == c.x;
+ this.m();
+ assert this == c.x;
+ this.n();
+ }
+}
+\end{lstlisting}
+\end{minipage}
+
+Similar how?\\
+Evaluate \texttt{x} once.\\
+Refer to that value by \texttt{this}\\
+Substitute every occurrence of \texttt{x} with \texttt{this}
+\end{frame}
+
+
+
+%------------- Experiment:case study -------------%
+\begin{frame}\frametitle{Experiment: Case study}
+\hypertarget{frame:exp}{}
+\textbf{Case: Eclipse JDT UI source code}
+%\begin{itemize}
+% \item Java Programming Language
+% \item Open Source
+% \item 300.000 lines of code
+% \item 25.000 methods
+% \item Automated test suite
+%\end{itemize}
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-2cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/java_logo}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=-4cm]current page.center)
+ {\includegraphics[width=0.1\textwidth]{images/eclipse}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=3cm]current page.center)
+ {\includegraphics[width=0.3\textwidth]{images/programmers}};
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=1.5cm,xshift=0cm]current page.center)
+ {\includegraphics[width=0.15\textwidth]{images/junit}};
+
+\vspace{2cm}
+
+\textbf{Experiment:}
+\begin{itemize}
+ \item Execute our modified refactorings on Eclipse JDT UI project
+ \item Run Eclipse test suite
+ \item Look for triggered asserts
+ \item Profit!!
+\end{itemize}
+
+\bigskip
+
+Need custom automated refactoring tool.
+
+\end{frame}
+
+%------------- Experiment:development -------------%
+\begin{frame}\frametitle{Experiment: Development}
+\textbf{Eclipse refactoring plug-in}
+
+\bigskip
+
+\begin{itemize}
+ \item Modify Eclipse's refactorings to introduce asserts
+ \begin{itemize}
+ \item Extract Local Variable
+ \item Extract And Move Method
+ \end{itemize}
+ \item Automate refactoring process
+ \begin{itemize}
+ \item Execute on Java project
+ \item One refactoring per method
+ \end{itemize}
+ \item Custom heuristic for finding refactoring targets\\
+ (Kristiansen/Stolz, NIK'14)
+\end{itemize}
+\end{frame}
+
+%------------- Experiment:results -------------%
+\begin{frame}\frametitle{Experiment: Results}
+
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2.5mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics{images/testfailure}\includegraphics{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136$^\ast$ & 0 \\
+\hline
+\end{tabular}
+
+\bigskip
+
+$^\ast$ 136 instances of the same 2 assert statements
+\end{frame}
+
+
+%------------- Experiment:discussion -------------%
+\begin{frame}\frametitle{Discussion}
+\vspace{2cm}
+
+\textbf{Take-away and questions:}
+
+\tikz [remember picture,overlay]
+ \node at
+ ([yshift=-1.7cm,xshift=2.5cm]current page.north)
+ {
+{\tiny
+\begin{tabular}{|r|r|r|r|}
+\hline
+ & Extract Local & Extract and\\
+ & Variable & Move Method \\
+\hline
+Executed refactorings & 4538 & 755 \\
+\hline
+Total number of asserts & 7665 & 610 \\
+\hline
+Resulting compile errors \includegraphics[width=2mm]{images/compileerror}& 0 & 14\\
+\hline
+Successful Tests \includegraphics[width=1.5mm]{images/testsuccess} & 2392 & 2151 \\
+\hline
+Unsuccessful Tests \includegraphics[width=1.5mm]{images/testfailure}\includegraphics[width=1.5mm]{images/testerror}& 4 & 245 \\
+\hline
+Asserts triggered & 2 / 136 & 0 \\
+\hline
+\end{tabular}
+}
+};
+
+
+
+
+
+
+
+\begin{itemize}
+ \item Dynamic preconditions can be useful!
+% \item Extract And Move Method is complicated
+% \begin{itemize}
+% \item Can use Extract Local Variable as a precondition
+% \end{itemize}
+ \item Assert statements are incomplete.
+% \begin{itemize}
+% \item assignment and reassignment in one statement
+% \item Solution: wrapper methods
+% \end{itemize}
+% \item Can we conclude that this bug would not appear?
+% \begin{itemize}
+% \item Look at code during development
+% \end{itemize}
+ \item Show or hide the asserts from the programmer?
+% \begin{itemize}
+% \item Hide assert statements from the source code
+% \item Show them and let the programmer decide
+% \end{itemize}
+ \item Is reference equivalence too strict?
+\end{itemize}
+
+%\hrulefill
+\vspace{1cm}
+
+\begin{center}
+Thank you!
+\end{center}
+\hrulefill\\
+{\tiny $^\ast$Art with face is from Hyperbole and a Half}
+\end{frame}
+
+
+
+\end{document}