92 lines
8.6 KiB
TeX
92 lines
8.6 KiB
TeX
\section{Function Level}
|
||
|
||
\subsection{Code Summarization}
|
||
|
||
Maintaining documentation of source code is an expensive activities in practice, resulting in incomplete and
|
||
|
||
\subsection{Code Traceability}
|
||
Documentation written in natural language and source code are two of the major artifacts of a software system.
|
||
Tracking a variety of traceability links between software documentation and source code assists software developers in comprehension, efficient development, and effective management of a system.
|
||
Automated traceability systems to date have been faced with a major open research challenge: how to extract these links with both high precision and high recall.
|
||
% 写一段描述,一般用IR做,主要问题是如何避免假阳性率
|
||
|
||
Trevor et al.~\cite{savage2010flat3} describe FLAT, a feature location and textual tracing tool.
|
||
It is a Eclipse plug-in to help developers to locate source code of the desired features.
|
||
FLAT supports textual feature location and dynamic feature location.
|
||
The textual feature location via textually searching based on IR technique.
|
||
Dynamic feature location entails running the software and invoking the feature of interest to capture a trace of the source code that was executed.
|
||
Developers can select one or both location methods to search source code of desired feature.
|
||
Nasir et al.~\cite{ali2011trust} propose an approach, Trustrace, inspired by Web trust models to improve the precision and recall of traceability links.
|
||
They uses any traditional traceability recovery approach to obtain a set of traceability links, which rankings are then re-evaluated using a set of other traceability recovery approaches.
|
||
Then they propose their own approach, Histrace, through CVS/SVN change logs using a Vector Space Model (VSM).
|
||
Finally, they combine traditional approach with their own approach, in which they use Histrace as one expert adding knowledge from CVS/SVN change logs.
|
||
The results of their approach can significantly improve precision compared with VSM-based approach.
|
||
Xiaofan et al.~\cite{chen2011improving} introduce an approach that combines three supporting techniques, Regular Expression, Key Phrases, and Clustering, with a Vector Space Model (VSM) to improve the performance of automated traceability between documents and source code.
|
||
They link code and documentation based on similarity of code and documentation, and combine RE, KP and Clustering to filter out noise links.
|
||
They run their approach on 4 projects (JDK1.5, ArgoUML, Freenet, Jmeter), and the results shows the approach combining RE, KP and clustering performs best.
|
||
Nasir et al.~\cite{ali2011requirements} present an approach, Coparvo, to complement existing traceability recovery approaches for object-oriented programs.
|
||
They use AST to extract identifiers (class name, method names, variable name and comments) and VSM to index requirements and source code.
|
||
Then they select high similarity code partitions as experts to vote and score each links, which are used to filter false link.
|
||
The results show that their approach significantly improves the of the recovered links accuracy and also reduces up to 83\% effort required to manually remove false positive links.
|
||
Diana et al.~\cite{diaz2013using} propose an approach to recovery of traceability links between use cases and Java classes, TYRION, by leveraging code ownership information to help filter out noise.
|
||
They extract author of each source code component and identify the ``context'' for each author.
|
||
For each query from the external documentation, they compute the similarity with the context of the authors.
|
||
Then a standard IR-based approach are used to retrieving classes, which rewards all the classes developed by the authors having their context most similar to the query.
|
||
They evaluate their approach on two software and the results indicate that code ownership information is useful for improving the accuracy.
|
||
Dagenais et al.~\cite{dagenais2014using} apply traceability recovery approach to infer documentation patterns, which is helpful for detecting recently-added framework elements that needs to be documented and identifying references to deprecated or deleted code elements that need to be corrected.
|
||
They use the fully qualified name (FQN) to identify code-term in documentation, and count the number of types (classes and interfaces) from each package mentioned in the same documentation section to disambiguate false links.
|
||
Though identifying links they can recognize documentation patterns, a coherent set of code elements referenced by the documentation, which are used to recommend documentation changes.
|
||
They propose AdDoc to automatically discover documentation patterns.
|
||
Muslim et al.~\cite{chochlov2017historical} implement a toll, ACIR, which can leverage change-sets of source code for feature location.
|
||
They use version control systems (VCSs) to extract change-sets of source code, and use comments in VCSs to help to retrieve code.
|
||
They use this tool and study different configurations of the approach on eight subject systems and 600 features.
|
||
They results show the importance of rigorously characterizing proposed feature location techniques, to identify their optimal configuration.
|
||
|
||
|
||
\subsection{I/O Generation}
|
||
|
||
Recent studies by Duala-Ekoko and Robillard~\cite{duala2012asking} and by Sillito et al.~\cite{sillito2008asking} found that when learning API, programmers look for input/output examples, actual values of a function's input/output, in order to understand the function. In particular, the programmers asked ``How does this data structure look at runtime?''~\cite{sillito2008asking} and ``we have a newInstance(String) method that takes a String argument and I have no idea what this String is supposed to be''~\cite{duala2012asking}.
|
||
|
||
Facing hard comprehending of extensive and complex computations existing in technical software systems,
|
||
Josef et al.~\cite{pichler2013specification} propose an approach to automatically identify input and output data from source code based on symbolic execution, which is helpful to deduce specifications from given program code.
|
||
They use AST to parser programs, executes concrete input values and collect results of a selected function based on symbolic execution.
|
||
Hui et al.~\cite{liu2016nomen} presents an empirical study of the lexical similarity between arguments (values passed to a method at a call site) and parameters (the formal parameter in the method's definition) of methods to show names can provide otherwise missing information.
|
||
Furthermore, they present an anomaly detection technique that identifies 144 renaming opportunities and incorrect arguments in 14 programs, and a code recommendation system that suggests correct arguments with a precision of 83\%.
|
||
Siyuan et al.~\cite{jiang2017docio} implement a prototype toolset, Docio, to generate I/O examples.
|
||
Through running tests of the programs and logging the I/O values during execution, they can extract information and generate examples.
|
||
They combine their examples with a documentation tools, doxygen~\footnote{\url{http://www.doxygen.org}}.
|
||
|
||
\begin{table*}[]
|
||
\centering
|
||
\caption{List of Studies (function level)}
|
||
\label{fls}
|
||
\vspace{0.5em}
|
||
\begin{tabular}{p{0.35\columnwidth}p{0.25\columnwidth}p{0.37\columnwidth}p{0.43\columnwidth}p{0.45\columnwidth}}
|
||
|
||
\toprule[1.5pt]
|
||
Author & Domain & Method & Data Set & Contribution \\
|
||
\midrule[1pt]
|
||
|
||
Trevor et al.~\cite{savage2010flat3} & Traceability & IR + Execution Trace & & feature location \\
|
||
|
||
Nasir et al.~\cite{ali2011trust} & Traceability & VSM & Pooka and SIP & traceability links between requirement and source code \\
|
||
|
||
Xiaofan et al.~\cite{chen2011improving} & Traceability & VSM + RE + KP + Clustering & JDK1.5, ArgoUML, Freenet, Jmeter & traceability links between documents and source code \\
|
||
|
||
Nasir et al.~\cite{ali2011requirements} & Traceability & AST + VSM & Pooka, SIP, iTrust & traceability links between requirement and source code \\
|
||
|
||
Diana et al.~\cite{diaz2013using} & Traceability & IR + User Information & eTour and SMOS & traceability links between use cases and Java classes \\
|
||
|
||
Dagenais et al.~\cite{dagenais2014using} & Traceability & FQN & Joda Time, HttpComponents, Hibernate, XStream & link code-term in documentation to source code, recommend documentation changes. \\
|
||
|
||
Muslim et al.~\cite{chochlov2017historical} & Traceability & VCSs + IR & 8 systems & feature location, change-sets \\
|
||
|
||
Josef et al.~\cite{pichler2013specification} & I/O & AST + symbolic execution & & specifications deduction \\
|
||
|
||
Hui et al.~\cite{liu2016nomen} & I/O & lexical similarity & 14 programs & anomaly detection, arguments recommendation \\
|
||
|
||
Siyuan et al.~\cite{jiang2017docio} & I/O & I/O logging & 3 API libraries & I/O examples \\
|
||
\bottomrule[1.5pt]
|
||
\end{tabular}
|
||
\vspace{\baselineskip}
|
||
\end{table*} |