quantitative analysis done
This commit is contained in:
parent
7a8314c79f
commit
30982cdf76
2 changed files with 37 additions and 5 deletions
BIN
report.pdf
BIN
report.pdf
Binary file not shown.
42
report.tex
42
report.tex
|
@ -45,6 +45,7 @@
|
||||||
\maketitle
|
\maketitle
|
||||||
\pagenumbering{roman}
|
\pagenumbering{roman}
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
\listoffigures
|
||||||
\lstlistoflistings
|
\lstlistoflistings
|
||||||
\end{titlepage}
|
\end{titlepage}
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ code by using the cloc tool, which provided the following output shown in Figure
|
||||||
project contains 58.787 lines of Java code and this satisfies all the
|
project contains 58.787 lines of Java code and this satisfies all the
|
||||||
requirements.
|
requirements.
|
||||||
|
|
||||||
\begin{figure}[H]
|
\begin{figure}[h]
|
||||||
\centering
|
\centering
|
||||||
\begin{tabular}{lrrrr}
|
\begin{tabular}{lrrrr}
|
||||||
\toprule
|
\toprule
|
||||||
|
@ -182,7 +183,7 @@ when referring to a class by its fully-qualified domain name the prefix
|
||||||
\textit{com.fasterxml.jackson.core} is omitted as all classes in the Jackson
|
\textit{com.fasterxml.jackson.core} is omitted as all classes in the Jackson
|
||||||
core project reside in this package or in a sub-package of this package.
|
core project reside in this package or in a sub-package of this package.
|
||||||
|
|
||||||
\section{\textit{Pattern4J} accuracy}
|
\section{\textit{Pattern4J} Accuracy and Quantitative Analysis}
|
||||||
|
|
||||||
As it would be very hard to check each class in the Jackson project for design
|
As it would be very hard to check each class in the Jackson project for design
|
||||||
patterns manually to get a true number of false positives and false negatives,
|
patterns manually to get a true number of false positives and false negatives,
|
||||||
|
@ -282,7 +283,6 @@ false negative rate of 17.2\%, and an accuracy of 75.0\%.
|
||||||
x y C
|
x y C
|
||||||
0 0 3
|
0 0 3
|
||||||
1 0 2.5
|
1 0 2.5
|
||||||
|
|
||||||
0 1 2.5
|
0 1 2.5
|
||||||
1 1 12
|
1 1 12
|
||||||
};
|
};
|
||||||
|
@ -299,6 +299,30 @@ false negative rate of 17.2\%, and an accuracy of 75.0\%.
|
||||||
\label{fig:conf}
|
\label{fig:conf}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
Moreover, based on \textit{Pattern4J} complete analysis output, we are able to
|
||||||
|
report the overall findings, shown in Figure \ref{fig:ana}.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}{lrr}
|
||||||
|
\toprule
|
||||||
|
Design Pattern & Pattern Applications & Classes Covered \\
|
||||||
|
\midrule
|
||||||
|
Factory Method & 2 & 2 \\
|
||||||
|
Singleton & 13 & 13 \\
|
||||||
|
Adapter & 8 & 6 \\
|
||||||
|
Decorator & 2 & 2 \\
|
||||||
|
State & 5 & 3 \\
|
||||||
|
Bridge & 1 & 1 \\
|
||||||
|
Template Method & 7 & 7 \\
|
||||||
|
\midrule
|
||||||
|
Total & 38 & 34 \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Quantitative summary of \textit{Pattern4J} complete analysis output
|
||||||
|
for the Jackson core project.}
|
||||||
|
\label{fig:ana}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
\section{Structural Patterns}
|
\section{Structural Patterns}
|
||||||
|
|
||||||
|
@ -440,7 +464,7 @@ pattern). A manual search in the source code produced the following results:
|
||||||
\subsection{Adapter Pattern}
|
\subsection{Adapter Pattern}
|
||||||
|
|
||||||
\textit{Pattern4J} found many instances of the adapter pattern, however all but
|
\textit{Pattern4J} found many instances of the adapter pattern, however all but
|
||||||
one wVere shown to be false positives by checking the documentation and the code
|
one were shown to be false positives by checking the documentation and the code
|
||||||
using each allegied adaptee. The matches found are reported and commented
|
using each allegied adaptee. The matches found are reported and commented
|
||||||
below. Matches are shown in the \textit{[Adapter] $\leftarrow$ [Adaptee]}
|
below. Matches are shown in the \textit{[Adapter] $\leftarrow$ [Adaptee]}
|
||||||
format.
|
format.
|
||||||
|
@ -484,7 +508,7 @@ time by wrapping them in an object of a decorator class.
|
||||||
\end{description}
|
\end{description}
|
||||||
Only in Pattern4J
|
Only in Pattern4J
|
||||||
|
|
||||||
\subsection{Bridge Pattern}
|
\subsection{TBD Bridge Pattern}
|
||||||
TBD
|
TBD
|
||||||
|
|
||||||
\section{Behavioral Patterns}
|
\section{Behavioral Patterns}
|
||||||
|
@ -576,5 +600,13 @@ Here the pattern is slightly modified by providing a default implementation of
|
||||||
override the method with a body first calling \textit{super()} and then adding
|
override the method with a body first calling \textit{super()} and then adding
|
||||||
additional buffer release code after.
|
additional buffer release code after.
|
||||||
|
|
||||||
|
\section{TBD Conclusions}
|
||||||
|
|
||||||
|
TBD
|
||||||
|
|
||||||
|
\textit{a brief (possibly speculative) discussion about whether your findings
|
||||||
|
are likely to be applicable to other projects or, conversely, they are probably
|
||||||
|
unique to the project you selected – and why you think this to be the case.}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
|
|
Reference in a new issue