Skip to main content

An Approach for Code Annotation Validation with Metadata Location Transparency

  • Conference paper
  • First Online:
Book cover Computational Science and Its Applications -- ICCSA 2016 (ICCSA 2016)

Abstract

The use of metadata in software development, specially by code annotations, has emerged to complement some limitations of object-oriented programming. A recent study revealed that a lack of validation on the configured metadata can lead to bugs hard to identify and correct. There are approaches to optimize metadata configuration that add the annotation out of the target code element, such as its definition on the enclosing code element or indirectly inside other annotations. Annotation validation rules that rely on the presence of other annotations are specially hard to perform when it is possible to configure it out of the target element. Available approaches for annotation validation in the literature consider their presence only in the target element. This paper presents a validation of code annotations approach in object-oriented software with location transparency, whereas definitions can occur in different parts of source code related to the target element. An evaluation with a meta-framework supports our hypothesis that the approach is capable of decoupling the annotation location from the validation rules.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://www.jcp.org/en/jsr/detail?id=299.

  2. 2.

    http://www.jcp.org/en/jsr/detail?id=220.

  3. 3.

    http://www.jcp.org/en/jsr/detail?id=303.

  4. 4.

    http://www.jcp.org/en/jsr/detail?id=311.

  5. 5.

    https://www.python.org.

  6. 6.

    https://github.com/EsfingeFramework/metadata.

  7. 7.

    http://junit.org/.

  8. 8.

    https://www.jetbrains.com/idea/.

  9. 9.

    Available at: https://github.com/EsfingeFramework/metadata.

References

  1. JSR175, JSR 175: a metadata facility for the java programming language (2003). http://www.jcp.org/en/jsr/detail?id=175

  2. Guerra, E., Souza, J.T., Fernandes, C.: A pattern language for metadata-based frameworks. In: Proceedings of the 16th Conference on Pattern Languages of Programs, pp. 3:1–3:29. ACM (2009)

    Google Scholar 

  3. Guerra, E., Fernandes, C.: A qualitative and quantitative analysis on metadata-based frameworks usage. In: Murgante, B., Misra, S., Carlini, M., Torre, C.M., Nguyen, H.-Q., Taniar, D., Apduhan, B.O., Gervasi, O. (eds.) ICCSA 2013, Part II. LNCS, vol. 7972, pp. 375–390. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  4. Noguera, C., Pawlak, R.: AVal: An extensible attribute-oriented programming validator for java: research articles. J. Softw. Maint. Evol. 19(4), 253–275 (2007)

    Article  Google Scholar 

  5. Darwin, I.: Annabot: a static verifier for java annotation usage. Adv. Softw. Eng. 2010(540547), 1–7 (2010)

    Article  Google Scholar 

  6. Cordoba, I., de Lara, J.: A modelling language for the effective design of java annotations. In: Proceedings of the 30th Annual ACM Symposium on Applied Computing, SAC 2015, pp. 2087–2092. ACM, New York (2015)

    Google Scholar 

  7. Guerra, E., Cardoso, M., Silva, J., Fernandes, C.: Idioms for code annotations in the java language. In: Proceedings of the 17th Latin-American Conference on Pattern Languages of Programs, SugarLoafPLoPe, pp. 1–14 (2010)

    Google Scholar 

  8. Fernandes, C., Ribeiro, D., Guerra, E., Nakao, E.: Xml, annotations and database: a comparative study of metadata definition strategies for frameworks. In: XML: Aplicaes e Tecnologias Associadas, pp. 115–126, Vila do Conde, Portugal (2010)

    Google Scholar 

  9. Miller, J.S., Ragsdale, S.: The Common Language Infrastructure Annotated Standard. Addison-Wesley, Boston (2003)

    Google Scholar 

  10. Noguera, C., Duchien, L.: Annotation framework validation using domain models. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 48–62. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Baldwin, C.Y., Clark, K.B.: The Power of Modularity. The MIT Press, Cambridge (2000)

    Google Scholar 

  12. Neto, A.C., Ribeiro, M.M., Dsea, D., Bonifcio, R., Borba, P., Soares, S.: Semantic dependencies and modularity of aspect-oriented software. In: Proceedings of the First International Workshop on Assessment of Contemporary Modularization Techniques, pp. 11–16. IEEE Computer Society (2007)

    Google Scholar 

  13. Eichberg, M., Schäfer, T., Mezini, M.: Using annotations to check structural properties of classes. In: Cerioli, M. (ed.) FASE 2005. LNCS, vol. 3442, pp. 237–252. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  14. Ruska, S.: Defining annotation constraints in attribute oriented programming. Acta Electrotechnica et Informatica 10(4), 89–93 (2010)

    Google Scholar 

Download references

Acknowledgments

The authors would like to thank FAPESP (grant 2014/16236-6), CAPES, and CNPq (grants 445562/2014-5 and 455080/2014-3) for financial support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to José Lázaro de Siqueira Jr. .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

de Siqueira, J.L., Silveira, F.F., Guerra, E.M. (2016). An Approach for Code Annotation Validation with Metadata Location Transparency. In: Gervasi, O., et al. Computational Science and Its Applications -- ICCSA 2016. ICCSA 2016. Lecture Notes in Computer Science(), vol 9789. Springer, Cham. https://doi.org/10.1007/978-3-319-42089-9_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-42089-9_30

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-42088-2

  • Online ISBN: 978-3-319-42089-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics