Abstract
Identifying and selecting suitable Metamorphic Relations is a complex process since it necessitates a thorough grasp of the system under test and its problem domain. Recently, an approach supporting unit testing at the method level called MeMo was proposed. Through a module called MR-Finder, MeMo infers Equivalent Metamorphic Relations (EMRs) by identifying sentences in Javadoc’s comments that describe equivalent behaviours between different methods of the same class. MR-Finder has three main components: (i) a predefined set of 10 words that express an equivalence (S10W). (ii) A mechanism that measures the semantic similarity between two sentences by using Word Move Distance (WDM). (iii) A binary classifier that decides whether a given sentence points to an EMR. The goal of our research is to determine if MeMo’s MR-Finder module can be improved. For that purpose, we first re-build the MR-Finder module and use the same dataset provided by MeMo’s authors to verify the reported results in the original study and establish the basis for further experiments. Second, we explore two strategies, STRTG No.1 and STRTG No.2, to improve the MR-Finder. In STRTG No.1, we increase the set S10W. In STRTG No.2, we keep S10W unchanged but add a second template sentence to the MR-Finder module. We successfully re-implemented the MR-Finder module and achieved comparable results using the same S10W. Our results indicate that the overall performance of MR-Finder is very likely to improve when the initial set of equivalent words increases, i.e., with STRTG No.1.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Blasi, A., Gorla, A., Ernst, M.D., Pezzè, M., Carzaniga, A.: Memo: automatically identifying metamorphic relations in Javadoc comments for test automation. J. Syst. Softw. 181, 111041 (2021). ISSN 0164-1212. https://doi.org/10.1016/j.jss.2021.111041
Chen, T.Y., Cheung, S.C., Yiu, S.M.: Metamorphic testing: a new approach for generating next test cases. Technical report HKUST-CS98-01, Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong (1998)
Duque-Torres, A., Pfahl, D., Claus, K., Ramler, R.: A replication study on predicting metamorphic relations at unit testing level. In: 2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 1–11 (2022)
Duque-Torres, A., Pfahl, D., Klammer, C., Fisher, S.: Using source code metrics for predicting metamorphic relations at method level. In: 5th Workshop on Validation, Analysis and Evolution of Software Tests, VST’22 (2022)
Duque-Torres, A., Shalygina, A., Pfahl, D., Ramler, R.: Using rule mining for automatic test oracle generation. In: 8th International Workshop on Quantitative Approaches to Software Quality, QuASoQ’20 (2020)
Hardin, B., Kanewala, U.: Using semi-supervised learning for predicting metamorphic relations. In: 3rd IEEE/ACM International Workshop on Metamorphic Testing (MET), pp. 14–17, MET’18 (2018). ISBN 9781450357296
Kanewala, U.: Techniques for automatic detection of metamorphic relations. In: IEEE 7th International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 237–238 (2014). https://doi.org/10.1109/ICSTW.2014.62
Kanewala, U., Bieman, J.M.: Using machine learning techniques to detect metamorphic relations for programs without test oracles. In: IEEE 24th International Symposium on Software Reliability Engineering (ISSRE), pp. 1–10 (2013). https://doi.org/10.1109/ISSRE.2013.6698899
Kanewala, U., Bieman, J.M., Ben-Hur, A.: Predicting metamorphic relations for testing scientific software: a machine learning approach using graph kernels. Softw. Test. Verif. Reliab. 26(3), 245–269 (2016)
Liu, H., Kuo, F.C., Towey, D., Chen, T.Y.: How effectively does metamorphic testing alleviate the oracle problem? IEEE Trans. Softw. Eng. 40(1), 4–22 (2014). https://doi.org/10.1109/TSE.2013.46
Nair, A., Meinke, K., Eldh, S.: Leveraging mutants for automatic prediction of metamorphic relations using machine learning. In: Proceedings of the 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation. MaLTeSQuE 2019, pp. 1–6. Association for Computing Machinery, New York (2019). ISBN 9781450368551. https://doi.org/10.1145/3340482.3342741
Rahman, K., Kahanda, I., Kanewala, U.: MRpredT: Using Text Mining for Metamorphic Relation Prediction, pp. 420–424. Association for Computing Machinery, New York (2020). ISBN 9781450379632, https://doi.org/10.1145/3387940.3392250
Rahman, K., Kanewala, U.: Predicting metamorphic relations for matrix calculation programs. In: 3rd IEEE/ACM International Workshop on Metamorphic Testing (MET), MET’18, pp. 10–13 (2018)
Zhang, P., Zhou, X., Pelliccione, P., Leung, H.: RBF-MLMR: a multi-label metamorphic relation prediction approach using RBF neural network. IEEE Access 5, 21791–21805 (2017). https://doi.org/10.1109/ACCESS.2017.2758790
Zhou, Z.Q., Sun, L., Chen, T.Y., Towey, D.: Metamorphic relations for enhancing system understanding and use. IEEE Trans. Softw. Eng. 46(10), 1120–1154 (2020). https://doi.org/10.1109/TSE.2018.2876433
Acknowledgements
This research was partly funded by the Estonian Center of Excellence in ICT research (EXCITE), the IT Academy Programme for ICT Research Development, the Austrian ministries BMVIT and BMDW, the Province of Upper Austria under the COMET (Competence Centers for Excellent Technologies) program managed by FFG, and grant PRG1226 of the Estonian Research Council.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Duque-Torres, A., Pfahl, D. (2022). Inferring Metamorphic Relations from JavaDocs: A Deep Dive into the MeMo Approach. In: Taibi, D., Kuhrmann, M., Mikkonen, T., Klünder, J., Abrahamsson, P. (eds) Product-Focused Software Process Improvement. PROFES 2022. Lecture Notes in Computer Science, vol 13709. Springer, Cham. https://doi.org/10.1007/978-3-031-21388-5_29
Download citation
DOI: https://doi.org/10.1007/978-3-031-21388-5_29
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-21387-8
Online ISBN: 978-3-031-21388-5
eBook Packages: Computer ScienceComputer Science (R0)