10. 10
Quantiles
Coupling (CBO)
Aniche, M., Treude, C., Zaidman, A., van Deursen, A., Gerosa, M.A., “SATT: Tailoring Code Metric Thresholds for Different Software
Architectures”. 16th IEEE International Working Conference on Source Code Analysis and Manipulation, 2016.
15. A catalogue
of smells
specific to MVC
(after talking to 50 developers)
15
Grrrrrr…
Controllers that offer many
services
Grrrr…
Repositories that deal with
many Entities
Grrrrr…
Aniche, Maurício, Bavota, Gabriele, Treude, Christoph, van Deursen, Arie, Gerosa, Marco.“A Validated Set of Smells in Model-
View-Controller Architecture”. Software Maintenance and Evolution (ICSME), 2016, 32th International Conference, IEEE, 2016.
21. Queries can get complicated!
SELECT
p.name as project,
c.id as commitId,
a.name as artifactName,
a.path as artifactPath
FROM
Projects p
JOIN
Commits c ON c.project_id = p.id
JOIN
Artifacts a ON a.commit_id = c.id
WHERE
p.repository = ’Apache’;
Where
should I put
it?
22. public class InvoiceDAO {
public Invoice findById(int id) { … }
public ShoppingCart find(User u) { … })
public List<Invoice> getAll() { … }
public void save(Invoice inv) { ...}
}
By the method
signatures we
should!
Where should
we start?
23. Project # of DAO
methods
# of
”correct”
methods
# of
”wrong”
methods
% of
wrong
methods
Caelumweb 590 511 79 13.38%
Gnarus 233 200 33 14.16%
Project # of
inspected
methods
# of
agreement
% of
agreement
Caelumweb 79 59 74.68%
Gnarus 33 16 48.48%
Aniche, Maurício F., Gustavo A. Oliva, and Marco A. Gerosa. “Are the Methods in Your Data Access Objects (DAOs) in the Right Place? A Preliminary
Study.”. 6th Workshop on Managing Technical Debt, in conjunction with ICSME2014, Canada. Short paper.
27. A catalogue
of patterns
27
Fixture API
ID in HTML
Move Fast, Move Slow
…
Aniche, M., Guerra, E., Gerosa, M. “A Set of Patterns to Improve Code Quality of Automated Functional Tests of Web Applications”. 21th
Conference on Pattern Languages of Programs. 2014.