responsibilities and dependency constraints of com-
ponents is required in a fine-grained way. As de-
scribed herein, we proposed a technique to detect vi-
olations by introducing role inference rules to esti-
mate the components to which each code fragment
can belong. In role inference, both the responsibil-
ities and dependency constraints of components are
expressed as inference rules. Using MVC2 and Play
Framework as the target architecture and framework,
we have implemented an automated violation detec-
tor and evaluated its usefulness by its application to
multiple projects.
An important future task is to establish a refactor-
ing technique of the detected violations. In this pa-
per, we did detect the code fragments including vi-
olations, but we did not address to which technique
the detected code fragments should be moved. It is
preferable to move a code fragment containing vio-
lations along with its surrounding related code frag-
ments. It is important to find the code fragments to
be moved at the same time, which can be specified
using the result of our role inference. In addition, it
is also necessary to find other refactoring techniques
to fix violations that are unable to be fixed by Move
refactoring.
It is also an important task to apply our approach
to other architectural patterns. We believe that the in-
ference rules on dependency constraints are consid-
ered to be applicable to other architecture patterns
such as Layers, but rules on responsibilities can vary
greatly depending on the architecture themselves. It
is important to confirm whether inference rules can
express responsibilities of components for various ar-
chitecture patterns.
ACKNOWLEDGEMENTS
This work was partly supported by JSPS Grants-in-
Aid for Scientific Research Numbers JP15K15970,
JP15H02683, and JP15H02685.
REFERENCES
Budi, A., Lucia, Lo, D., Jiang, L., and Wang, S. (2011).
Automated detection of likely design flaws in layered
architectures. In Proc. 23rd International Conference
on Software Engineering and Knowledge Engineer-
ing, pages 613–618.
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P.,
and Stal, M. (1996). Pattern-oriented Software Archi-
tecture. John Wiley & Sons, Inc.
Coelho, W. and Murphy, G. (2007). ClassCompass: A
software design mentoring system. Educational Re-
sources in Computing, 7:1–18.
Fowler, M. (1999). Refactoring: Improving the Design of
Existing Code. Addison-Wesley.
Fowler, M. (2003). AnemicDomainModel. http://www.
martinfowler.com/bliki/AnemicDomainModel.html.
Hickey, S. and
´
O Cinn´eide, M. (2015). Search-based refac-
toring for layered architecture repair: An initial inves-
tigation. In Proc. 1st North American Search Based
Software Engineering Symposium.
Macia, I., Arcoverde, R., Cirilo, E., Garcia, A., and von
Staa, A. (2012). Supporting the identification of
architecturally-relevant code anomalies. In Proc. 28th
IEEE International Conference on Software Mainte-
nance, pages 662–665.
Macia, I., Garcia, A., Chavez, C., and von Staa, A.
(2013). Enhancing the detection of code anomalies
with architecture-sensitive strategies. In Proc. 17th
European Conference on Software Maintenance and
Reengineering, pages 177–186.
Sales, V., Terra, R., Miranda, L. F., and Valente, M. T.
(2013). Recommending move method refactorings us-
ing dependency sets. In Proc. 20th Working Confer-
ence on Reverse Engineering, pages 232–241.
Terra, R., Valente, M. T., Czarnecki, K., and Bigonha,
R. S. (2015). A recommendation system for repair-
ing violations detected by static architecture confor-
mance checking. Software: Practice and Experience,
45(3):315–342.
Trifu, A. and Reupke, U. (2007). Towards automated re-
structuring of object oriented systems. In Proc. 12th
Working Conference on Reverse Engineering, pages
39–48.
Tsantalis, N. and Chatzigeorgiou, A. (2009). Identifica-
tion of move method refactoring opportunities. IEEE
Transactions on Software Engineering, 35(3):347–
367.
Turner, J. and Bedell, K. (2002). Struts Kick Start. Sams.