Skip to main content
Log in

Precise semantic history slicing through dynamic delta refinement

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Semantic history slicing solves the problem of extracting changes related to a particular high-level functionality from software version histories. State-of-the-art techniques combine static program analysis and dynamic execution tracing to infer an over-approximated set of changes that can preserve the functional behaviors captured by a test suite. However, due to the conservative nature of such techniques, the sliced histories may contain irrelevant changes. In this paper, we propose a divide-and-conquer-style partitioning approach enhanced by dynamic delta refinement to produce much smaller semantic history slices. We utilize deltas in dynamic invariants generated from successive test executions to learn significance of changes with respect to the target functionality. Additionally, we introduce a file-level commit splitting technique for untangling unrelated changes introduced in a single commit. Empirical results indicate that these measurements accurately rank changes according to their relevance to the desired test behaviors and thus partition history slices in an efficient and effective manner.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

Similar content being viewed by others

Notes

  1. We could not directly compare with the original implementation in Zeller (1999), which does not work with Git repositories.

References

  • Apache Commons Byte Code Engineering Library. https://commons.apache.org/proper/commons-bcel (2015)

  • Apache Commons Compress Library. https://commons.apache.org/proper/commons-compress (2018)

  • Apache Commons CSV Library. https://commons.apache.org/proper/commons-csv (2017)

  • Apache Commons IO Library. https://commons.apache.org/proper/commons-io (2017)

  • Apache Commons Lang Library. https://commons.apache.org/proper/commons-lang (2018)

  • Apache Commons Net Library. https://commons.apache.org/proper/commons-net (2017)

  • Apache Maven Project. https://maven.apache.org (2015)

  • Apache Subversion (SVN) Version Control System. http://subversion.apache.org (2016)

  • Arnold, R.S.: Software Change Impact Analysis. IEEE Computer Society Press, Los Alamitos (1996)

    Google Scholar 

  • Brun, Y., Ernst, M.D.: Finding latent code errors via machine learning over program executions. In: Proceedings of the 26th International Conference on Software Engineering, pp. 480–490. IEEE Computer Society, Washington (2004)

  • Brun, Y., Holmes, R., Ernst, M.D., Notkin, D.: Early detection of collaboration conflicts and risks. IEEE Trans. Softw. Eng. 39(10), 1358–1375 (2013)

    Article  Google Scholar 

  • Chawathe, S.S., Rajaraman, A., Garcia-Molina, H., Widom, J.: Change detection in hierarchically structured information. In: Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data, pp. 493–504 (1996)

  • Dodoo, N., Lin, L., Ernst, M.D.: Selecting, Refining, and Evaluating Predicates for Program Analysis. Technical Report. MIT-LCS-TR-914, MIT Laboratory for Computer Science, Cambridge, MA (2003)

  • Ernst, M.D., Cockrell, J., Griswold, W.G., Notkin, D.: Dynamically discovering likely program invariants to support program evolution. In: Proceedings of the 21st International Conference on Software Engineering, pp. 213–224. ACM, New York, NY (1999). https://doi.org/10.1145/302405.302467

  • Ernst, M.D., Perkins, J.H., Guo, P.J., McCamant, S., Pacheco, C., Tschantz, M.S., Xiao, C.: The daikon system for dynamic detection of likely invariants. Sci. Comput. Program. 69(1–3), 35–45 (2007)

    Article  MathSciNet  Google Scholar 

  • Ferzund, J., Ahsan, S.N., Wotawa, F.: Empirical evaluation of hunk metrics as bug predictors. In: Proceedings of the International Conferences on Software Process and Product Measurement, pp. 242–254. Springer, Berlin (2009). https://doi.org/10.1007/978-3-642-05415-0_18

    Chapter  Google Scholar 

  • Fluri, B., Gall, H.C.: Classifying change types for qualifying change couplings. In: Proceedings of the 14th IEEE International Conference on Program Comprehension, pp. 35–45. IEEE (2006)

  • Fluri, B., Wuersch, M., Pinzger, M., Gall, H.: Change distilling: tree differencing for fine-grained source code change extraction. IEEE Trans. Softw. Eng. 33(11), 725–743 (2007)

    Article  Google Scholar 

  • Git Tools-Interactive Staging. https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging (2018)

  • Git Version Control System. https://git-scm.com (2016)

  • Git: git-bisect Documentation. http://git-scm.com/docs/git-bisect (2016)

  • Git-Git Basics. https://git-scm.com/book/en/v2/Getting-Started-Git-Basics (2018)

  • Hangal, S., Lam, M.S.: Tracking down software bugs using automatic anomaly detection. In: Proceedings of the 24th International Conference on Software Engineering, pp. 291–301. ACM, New York (2002). https://doi.org/10.1145/581339.581377

  • Hayashi, S., Omori, T., Zenmyo, T., Maruyama, K., Saeki, M.: Refactoring edit history of source code. In: Proceedings of the 28th IEEE International Conference on Software Maintenance, pp. 617–620. IEEE (2012)

  • Herzig, K., Zeller, A.: The impact of tangled code changes. In: Proceedings of the 10th Working Conference on Mining Software Repositories, pp. 121–130. IEEE Press, Piscataway (2013)

  • Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)

    Article  Google Scholar 

  • JGit: A Lightweight, Pure Java Library Implementing the Git Version Control System. https://eclipse.org/jgit (2016)

  • Jin, W., Orso, A., Xie, T.: Automated behavioral regression testing. In: Proceedings of the 2010 3rd International Conference on Software Testing, Verification and Validation, pp. 137–146. IEEE Computer Society, Washington (2010). https://doi.org/10.1109/ICST.2010.64

  • JIRA Software. https://www.atlassian.com/software/jira (2017)

  • Kästner, C., Apel, S.: Type-checking software product lines—a formal approach. In: Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering, pp. 258–267. IEEE Computer Society, Washington (2008)

  • Kung, D.C., Gao, J., Hsia, P., Wen, F., Toyoshima, Y., Chen, C.: Change impact identification in object oriented software maintenance. In: Proceedings of the International Conference on Software Maintenance, pp. 202–211. IEEE Computer Society, Washington (1994)

  • Law, J., Rothermel, G.: Whole program path-based dynamic impact analysis. In: Proceedings of the 25th International Conference on Software Engineering, pp. 308–318. IEEE (2003)

  • Li, Y., Rubin, J., Chechik, M.: Semantic slicing of software version histories. In: Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering, pp. 686–696. Lincoln, NE (2015)

  • Li, Y., Zhu, C., Gligoric, M., Rubin, J., Chechik, M.: Towards Generalized Semantic History Slicing. Technical Report. Nanyang Technological University (2019)

  • Li, Y., Zhu, C., Rubin, J., Chechik, M.: CSlicerCloud: a web-based semantic history slicing framework. In: Proceedings of the 40th International Conference on Software Engineering (2018)

  • Li, Y., Zhu, C., Rubin, J., Chechik, M.: Precise semantic history slicing through dynamic delta refinement. In: Proceedings of the 31 IEEE/ACM International Conference on Automated Software Engineering, pp. 495–506 (2016)

  • Li, Y., Zhu, C., Rubin, J., Chechik, M.: Semantic slicing of software version histories. IEEE Trans. Softw. Eng. 44(2), 182–201 (2017)

    Article  Google Scholar 

  • Mercurial Source Control Management System. http://mercurial.selenic.com (2016)

  • Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012)

    Article  Google Scholar 

  • Muşlu, K., Swart, L., Brun, Y., Ernst, M.D.: Development history granularity transformations. In: Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering, pp. 697–702. Lincoln, NE (2015)

  • Orso, A., Xie, T.: BERT: BEhavioral regression testing. In: Proceedings of the 2008 International Workshop on Dynamic Analysis: Held in Conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 36–42. New York, NY (2008)

  • Pastore, F., Mariani, L., Hyvärinen, A.E.J., Fedyukovich, G., Sharygina, N., Sehestedt, S., Muhammad, A.: Verification-aided regression testing. In: Proceedings of the 2014 International Symposium on Software Testing and Analysis, pp. 37–48. ACM, New York, NY (2014). https://doi.org/10.1145/2610384.2610387

  • Perkins, J.H., Ernst, M.D.: Efficient incremental algorithms for dynamic detection of likely invariants. In: Proceedings of the 12th ACM SIGSOFT Twelfth International Symposium on Foundations of Software Engineering, pp. 23–32. ACM, New York, NY (2004). https://doi.org/10.1145/1029894.1029901

  • Ren, X., Shah, F., Tip, F., Ryder, B.G., Chesley, O.: Chianti: a tool for change impact analysis of java programs. In: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 432–448. ACM, New York, NY (2004)

  • Rothermel, G., Harrold, M.J.: Analyzing regression test selection techniques. IEEE Trans. Softw. Eng. 22(8), 529–551 (1996). https://doi.org/10.1109/32.536955

    Article  Google Scholar 

  • Rubin, J., Kirshin, A., Botterweck, G., Chechik, M.: Managing forked product variants. In: Proceedings of the 16th International Software Product Line Conference, vol. 1, pp. 156–160. ACM, New York, NY (2012)

  • Saha, R., Gligoric, M.: Selective bisection debugging. In: Proceedings of the 20th International Conference on Fundamental Approaches to Software Engineering, pp. 60–77. Springer, New York, Inc., New York, NY (2017). https://doi.org/10.1007/978-3-662-54494-5_4

    Chapter  Google Scholar 

  • Servant, F., Jones, J.A.: History slicing. In: Proceedings of the 26th IEEE/ACM International Conference on Automated Software Engineering, pp. 452–455 (2011)

  • Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot—a java bytecode optimization framework. In: Proceedings of the 1999 Conference of the Centre for Advanced Studies on Collaborative Research, pp. 125–135. IBM Press (1999)

  • Xie, T., Notkin, D.: Checking inside the black box: regression testing by comparing value spectra. IEEE Trans. Softw. Eng. 31(10), 869–883 (2005)

    Article  Google Scholar 

  • YAML Ain’t Markup Language. http://www.yaml.org/ (2017)

  • Zeller, A.: Yesterday, my program worked. Today, it does not. why? In: Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 253–267. Springer, London (1999)

    Article  Google Scholar 

  • Zeller, A., Hildebrandt, R.: Simplifying and isolating failure-inducing input. IEEE Trans. Softw. Eng. 28(2), 183–200 (2002)

    Article  Google Scholar 

  • Zhang, L., Kim, M., Khurshid, S.: Localizing failure-inducing program edits based on spectrum information. In: Proceedings of the 27th International Conference on Software Maintenance, pp. 23–32. IEEE (2011)

  • Zhu, C., Li, Y., Rubin, J., Chechik, M.: A dataset for dynamic discovery of semantic changes in version controlled software histories. In: Proceedings of the 14th International Conference on Mining Software Repositories, pp. 523–526. IEEE Press, Piscataway, NJ (2017). https://doi.org/10.1109/MSR.2017.49

  • Zimmermann, T., Weißgerber, P., Diehl, S., Zeller, A.: Mining version histories to guide software changes. In: Proceedings of the 26th International Conference on Software Engineering, pp. 563–572. IEEE Computer Society, Washington, DC (2004)

Download references

Acknowledgements

This research is partly supported by the Singapore Ministry of Education Academic Research Fund Tier 1 (Award No. 2018-T1-002-069).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yi Li.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, Y., Zhu, C., Gligoric, M. et al. Precise semantic history slicing through dynamic delta refinement. Autom Softw Eng 26, 757–793 (2019). https://doi.org/10.1007/s10515-019-00260-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10515-019-00260-8

Keywords

Navigation