Attribute Sniffer: Collecting Attribute Metrics for C# Code

  • Lydia Braga INATEL
  • Phyllipe Lima INPE
  • Eduardo Guerra INPE
  • Paulo Meirelles UNIFESP

Resumo


The C# attributes have been available since the release of this language as a means to configure custom metadata on code elements. Being very similar to Java annotations, they are both introduced directly in the source code. Several C# frameworks such as NUnit, Unity Game Engine, and JSON.net use attributes to allow applications to configure custom metadata, as to execute different behavior and validation. This paper presents the Attribute Sniffer, a tool to collect attributes metrics on the C# source code, also validating the metrics proposed initially for Java annotations.

Referências

Chidamber, S. R. and Kemerer, C. F. (1991). Towards a metrics suite for object-oriented design. In Proceedings of OOPSLA’91, pages 197–211.

ECMA (2001). C# Language Specification. European Computer Manufacturers Association.

Guerra, E., Alves, F., Kulesza, U., and Fernandes, C. (2013). A reference architecture for organizing the internal
structure of metadata-based frameworks. Journal of Systems and Software, 86(5):1239 – 1256.

Guerra, E. M., Silveira, F. F., and Fernandes, C. T. (2009). Questioning traditional metrics for applications which uses metadata-based frameworks. In Proceedings of the 3rd Workshop on Assessment of Contemporary Modularization Techniques (ACoM’09), October, volume 26, pages 35–39.

Lanza, M. and Marinescu, R. (2006). Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer.

Lima, P., Guerra, E., and Meirelles, P. (2018a). Annotation sniffer: Open source tool for annotated code elements. In CBSoft 2018 - Tools Session ().

Lima, P., Guerra, E., Meirelles, P., Kanashiro, L., Silva, H., and Silveira, F. (2018b). A metrics suite for code annotation assessment. Journal of Systems and Software, 137:163 – 183.

Meirelles, P. R. M. (2013). Monitoring Source Code Metrics in Free Software Projects. PhD thesis, Department of Computer Science – Institute of Mathematics and Statistics of University of São Paulo. [in portuguese].

Microsoft (2019). The .net compiler platform sdk (roslyn apis). Accessed: 2019-03-29.

Polancec, D. and Mekterovic, I. (2017). Developing moba games using the unity game engine. In 2017 40th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), pages 1510–1515.
Publicado
25/09/2019
BRAGA, Lydia; LIMA, Phyllipe; GUERRA, Eduardo; MEIRELLES, Paulo. Attribute Sniffer: Collecting Attribute Metrics for C# Code. In: SESSÃO DE FERRAMENTAS - CONGRESSO BRASILEIRO DE SOFTWARE: TEORIA E PRÁTICA (CBSOFT), 1. , 2019, Salvador. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2019 . p. 96-101. DOI: https://doi.org/10.5753/cbsoft_estendido.2019.7664.