logo

SCIENCE CHINA Information Sciences, Volume 60, Issue 7: 072102(2017) https://doi.org/10.1007/s11432-015-0860-9

Reflective feature location: knowledge in mind meets information in system

More info
  • ReceivedAug 1, 2016
  • AcceptedOct 8, 2016
  • PublishedFeb 10, 2017

Abstract

Locating code entities relevant to a feature (i.e., feature location) is an important task in software maintenance.Feature location is challenging due to the information gap between the developer's knowledge about a feature and the feature's implementation in the system. In this paper, we present a reflective feature location approach ReFLex to bridge this gap.ReFLex automatically computes a reflexion model between the developer's logical view of a feature and the feature's implemented view reverse-engineered from the code. It provides interactive reflection support for the developer to refine the logical view and the feature location results such that the logical view and the implemented view converge gradually in an iterative feature location process.We have implemented our approach as an Eclipse plugin and investigated the benefits and challenges in reflective feature location through a user study.


Acknowledgment

This work was supported by National Basic Research Program of China (973 Program) (Grant No. 2016YFB1000801) and National Natural Science Foundation of China (Grant No. 61370079).


References

[1] Dit B, Revelle M, Gethers M. Feature location in source code: a taxonomy and survey. J Softw Evol Proc, 2013, 25: 53-95 CrossRef Google Scholar

[2] Biggerstaff T J, Mitbander B G, Webster D E. Program understanding and the concept assignment problem. Commun ACM, 1994, 37: 72--82. Google Scholar

[3] Rajlich V. Software Engineering: the Current Practice. 1st ed. BocaRaton: CRC Press, 2012. Google Scholar

[4] Rajlich V, Wilde N. The role of concepts in program comprehension. In: Proceedings of the 10th International Workshop on Program Comprehension, Paris, 2002. 271--278. Google Scholar

[5] Wilson L A, Petrenko M, Rajlich V. Using concept maps to assist program comprehension and concept location: an empirical study. J Inf Knowl Manag, 2012. 11: 1250018. Google Scholar

[6] Gay G, Haiduc S, Marcus A, et al. On the use of relevance feedback in ir-based concept location. In: Proceedings of the 25th IEEE International Conference on Software Maintenance, Edmonton, 2009. 351--360. Google Scholar

[7] Wang J, Peng X, Xing Z, et al. Improving feature location practice with multi-faceted interactive exploration. In: Proceedings of the 35th International Conference on Software Engineering, San Francisco, 2013. 762--771. Google Scholar

[8] Haiduc S, Bavota G, Marcus A, et al. Automatic query reformulations for text retrieval in software engineering. In: Proceedings of the 35th International Conference on Software Engineering, San Francisco, 2013. 842--851. Google Scholar

[9] Haiduc S, Bavota G, Oliveto R, et al. Automatic query performance assessment during the retrieval of software artifacts. In: Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, Essen, 2012. 90--99. Google Scholar

[10] Poshyvanyk D, Marcus A. Combining formal concept analysis with information retrieval for concept location in source code. In: Proceedings of the 15th International Conference on Program Comprehension, Banff, 2007. 37--48. Google Scholar

[11] Kruchten P. The 4+ 1 view model of architecture. IEEE Softw, 1995, 12: 42--50. Google Scholar

[12] Murphy G C, Notkin D, Sullivan K J. Software reflexion models: bridging the gap between design and implementation. IIEEE Trans Software Eng, 2001, 27: 364-380 CrossRef Google Scholar

[13] De Lucia A, Di Penta M, Oliveto R. Labeling source code with information retrieval methods: an empirical study. Empir Software Eng, 2014, 19: 1383-1420 CrossRef Google Scholar

[14] Blei D M, Ng A Y, Jordan M I. Latent dirichlet allocation. J Mach Learn Res, 2003, 3: 993--1022. Google Scholar

[15] Lucia A D, Oliveto R, Tortora G. uppercaseIR-based traceability recovery processes: an empirical comparison of “one-shot" and incremental processes. In: Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering. Washington: IEEE Computer Society, 2008. 39--48. Google Scholar

[16] Peng X, Xing Z, Tan X. Improving feature location using structural similarity and iterative graph mapping. J Syst Software, 2013, 86: 664-676 CrossRef Google Scholar

[17] Baeza-Yates R, Ribeiro-Neto B. Modern Information Retrieval. 1st ed. New Jersey: Addison Wesley, 1999. Google Scholar

[18] Hayes J H, Dekhtyar A, Sundaram S K. Advancing candidate link generation for requirements tracing: the study of methods. IIEEE Trans Software Eng, 2006, 32: 4-19 CrossRef Google Scholar

[19] Wang J, Peng X, Xing Z, et al. An exploratory study of feature location process: distinct phases, recurring patterns, and elementary actions. In: Proceedings of the IEEE 27th International Conference on Software Maintenance, Williamsburg, 2011. 213--222. Google Scholar

[20] Pawlak R, Monperrus M, Petitprez N, et al. Spoon: a library for implementing analyses and transformations of java source code. Softw Pract Exper, 2015, 46: 1155--1179. Google Scholar

[21] Lucia A D, Fasano F, Oliveto R. Recovering traceability links in software artifact management systems using information retrieval methods. ACM Trans Softw Eng Methodol, 2007, 16: 13-es CrossRef Google Scholar

[22] Hayashi S, Sekine K, Saeki M. iFL: an interactive environment for understanding feature implementations. In: Proceedings of the 26th IEEE International Conference on Software Maintenance, Timisoara, 2010. 1--5. Google Scholar

[23] Beck F, Dit B, Velasco-Madden J, et al. Rethinking user interfaces for feature location. In: Proceedings of the IEEE 23rd International Conference on Program Comprehension, Florence, 2015. 151--162. Google Scholar

[24] Kuhn A, Ducasse S, G?rba T. Semantic clustering: Identifying topics in source code. Inf Software Tech, 2007, 49: 230-243 CrossRef Google Scholar

[25] Haiduc S, Aponte J, Marcus A. Supporting program comprehension with source code summarization. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, Cape Town, 2010. 223--226. Google Scholar

[26] Fritz T, Shepherd D C, Kevic K, et al. Developers' code context models for change tasks. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, 2014. 7--18. Google Scholar

[27] Hill E, Pollock L L, Vijay-Shanker K. Exploring the neighborhood with dora to expedite software maintenance. In: Proceedings of the 22nd IEEE/ACM International Conference on Automated Software Engineering, Atlanta, 2007. 14--23. Google Scholar

[28] Robillard M P. Topology analysis of software dependencies. ACM Trans Softw Eng Meth, 2008, 17: 18. Google Scholar

[29] Wang X, Lo D, Cheng J, et al. Matching dependence-related queries in the system dependence graph. In: Proceedings of the 25th IEEE/ACM International Conference on Automated Software Engineering, Antwerp, 2010. 457--466. Google Scholar

[30] McMillan C, Grechanik M, Poshyvanyk D, et al. Portfolio: finding relevant functions and their usage. In: Proceedings of the 33rd International Conference on Software Engineering, Waikiki, 2011. 111--120. Google Scholar

[31] Hill E, Shepherd D, Pollock L L. Exploring the use of concern element role information in feature location evaluation. In: Proceedings of the IEEE 23rd International Conference on Program Comprehension, Florence, 2015. 140--150. Google Scholar

[32] Knodel J, Popescu D. A comparison of static architecture compliance checking approaches. In: Proceedings of the 6th Working IEEE / IFIP Conference on Software Architecture. Washington: IEEE Computer Society, 2007. 12. Google Scholar

[33] Kim T, Kim K, Kim W. An interactive change impact analysis based on an architectural reflexion model approach. In: Proceedings of the 34th Annual IEEE International Computer Software and Applications Conference. Washington: IEEE Computer Society, 2010. 297--302. Google Scholar

[34] Murphy G C, Notkin D. Reengineering with reflexion models: a case study. IEEE Comput, 1997, 30: 29--36. Google Scholar

  • Figure 1

    Reflective feature location process.

  • Figure 2

    Examples of metamodels. (a) Logical-view metamodel; (b) implemented-view metamodel.

  • Figure 3

    A logical view of “Reloading From Disk”.

  • Figure 4

    (Color online) The ReFLex tool.

  • Figure 5

    (Color online) The reflexion model of the third iteration.

  •   

    Algorithm 1 Identify relevant code entities

    Require:${\rm identifyRelevant} ({\rm lv}, {\rm iv}, t_{\rm cand}, t_{\rm rel})$

    for each $d \in {\rm lv.entities}$ & $d$.descchanged

    iv.unmappeds = iv.unmappeds $\bigcup$ $d$.rels

    $d$.rels = $\{\};$ $d$.cands = $\{\}$

    end for

    for each $d$ $\in$ lv.entities & $d$.descchanged

    for each $p \in {\rm iv.unmappeds}$

    if $S_{\rm lex}(d,p) \geqslant t_{\rm cand}$ then

    $d$.cands = $d$.cands $\bigcup \{p\}$

    end if

    end for

    end for

    for each $(d,p)$ : $d \in {\rm lv.entities}$ & $p \in$ $d$.rels

    $(d,p).{\rm sim}$ = $S(d,p)$

    end for

    for each $d \in$ lv.entities & $d$.unfronzen

    $d$.newrels = $\{\}$

    for each $p \in$ $d$.cands

    if $S(d,p) \geqslant t_{\rm rel}$ then

    $d$.newrels = $d$.newrels $\bigcup \{p\}$

    end if

    end for

    iv.unmappeds = iv.unmapped$-$$d$.newrels

    removeCandidateEntities(lv.entities, $d$.newrels)

    end for

    for each $d\in$ lv.entities & $d$.unfronzen

    $d$.rels = $d$.rels $\bigcup$ $d$.newrels

    end for

Copyright 2020 Science China Press Co., Ltd. 《中国科学》杂志社有限责任公司 版权所有

京ICP备18024590号-1       京公网安备11010102003388号