Skip to main content
Erschienen in: Automated Software Engineering 1/2007

01.03.2007

JDiff: A differencing technique and tool for object-oriented programs

verfasst von: Taweesup Apiwattanapong, Alessandro Orso, Mary Jean Harrold

Erschienen in: Automated Software Engineering | Ausgabe 1/2007

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

During software evolution, information about changes between different versions of a program is useful for a number of software engineering tasks. For example, configuration-management systems can use change information to assess possible conflicts among updates from different users. For another example, in regression testing, knowledge about which parts of a program are unchanged can help in identifying test cases that need not be rerun. For many of these tasks, a purely syntactic differencing may not provide enough information for the task to be performed effectively. This problem is especially relevant in the case of object-oriented software, for which a syntactic change can have subtle and unforeseen effects. In this paper, we present a technique for comparing object-oriented programs that identifies both differences and correspondences between two versions of a program. The technique is based on a representation that handles object-oriented features and, thus, can capture the behavior of object-oriented programs. We also present JDiff, a tool that implements the technique for Java programs. Finally, we present the results of four empirical studies, performed on many versions of two medium-sized subjects, that show the efficiency and effectiveness of the technique when used on real programs.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
A control-flow graph is a directed graph in which nodes represent statements and edges represent flow of control between statements.
 
2
The ECFG is similar to the Java Interclass Graph (JIG)  (Harrold et al., 2001) in terms of the handling of variable and object types and exception constructs. However, the JIG is an inter-procedural representation of a program whereas the ECFG is an intra-procedural representation of a method with summarized information from inter-procedural analyses. In addition, the ECFG also models synchronization constructs.
 
3
For efficiency, we exclude class Object from the name, except that for class Object itself.
 
4
We use the subscript notation to distinguish variables in recursively called procedures.
 
5
http: //www.cc.gatech.edu/aristotle/Tools/jaba.html
 
Literatur
Zurück zum Zitat Apiwattanapong, T., Orso, A., Harrold, M.J.: A differencing algorithm for object-oriented programs. In: Proceedings of the 19th IEEE International Conference on Automated Software Engineering (ASE 2004), pp. 2–13 (2004) Apiwattanapong, T., Orso, A., Harrold, M.J.: A differencing algorithm for object-oriented programs. In: Proceedings of the 19th IEEE International Conference on Automated Software Engineering (ASE 2004), pp. 2–13 (2004)
Zurück zum Zitat Apiwattanapong, T., Orso, A., Harrold, M.J.: Efficient and precise dynamic impact analysis using execute-after sequences. In: Proceedings of the 27th IEEE and ACM SIGSOFT International Conference on Software Engineering (ICSE 2005), pp. 432–441 (2005) Apiwattanapong, T., Orso, A., Harrold, M.J.: Efficient and precise dynamic impact analysis using execute-after sequences. In: Proceedings of the 27th IEEE and ACM SIGSOFT International Conference on Software Engineering (ICSE 2005), pp. 432–441 (2005)
Zurück zum Zitat Binkley, D.: Using semantic differencing to reduce the cost of regression testing. In: Proceedings of IEEE Conference on Software Maintenance, pp. 41–50 (1992) Binkley, D.: Using semantic differencing to reduce the cost of regression testing. In: Proceedings of IEEE Conference on Software Maintenance, pp. 41–50 (1992)
Zurück zum Zitat Bohner, S.A., Arnold, R.S.: Software Change Impact Analysis. IEEE Press, Los Alamitos, CA, USA (1996) Bohner, S.A., Arnold, R.S.: Software Change Impact Analysis. IEEE Press, Los Alamitos, CA, USA (1996)
Zurück zum Zitat Elbaum, S., Gable, D., Rothermel, G.: The impact of software evolution on code coverage information. In: Proceedings of the International Conference on Software Maintenance, pp. 169–179 (2001) Elbaum, S., Gable, D., Rothermel, G.: The impact of software evolution on code coverage information. In: Proceedings of the International Conference on Software Maintenance, pp. 169–179 (2001)
Zurück zum Zitat Ernst, M.D.: Dynamically discovering likely program invariants. Ph.D., University of Washington Department of Computer Science and Engineering, Seattle, Washington (Aug. 2000) Ernst, M.D.: Dynamically discovering likely program invariants. Ph.D., University of Washington Department of Computer Science and Engineering, Seattle, Washington (Aug. 2000)
Zurück zum Zitat Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987) Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987)
Zurück zum Zitat Fischer, M., Pinzger, M., Gall, H.: Populating a release history database from version control and bug tracking systems. In: Proceedings of the 19th IEEE International Conference on Software Maintenance (ICSM 2003), pp. 23–32 (2003) Fischer, M., Pinzger, M., Gall, H.: Populating a release history database from version control and bug tracking systems. In: Proceedings of the 19th IEEE International Conference on Software Maintenance (ICSM 2003), pp. 23–32 (2003)
Zurück zum Zitat German, D.M.: Mining CVS repositories, the softChange experience. In: Proceedings of the First International Workshop on Mining Software Repositories, pp. 17–21 (2004) German, D.M.: Mining CVS repositories, the softChange experience. In: Proceedings of the First International Workshop on Mining Software Repositories, pp. 17–21 (2004)
Zurück zum Zitat Grass, J.E.: Cdiff: A syntax directed differencer for C++ programs. In: Proceedings of the USENIX C++ Conference, pp. 181–193 (1992) Grass, J.E.: Cdiff: A syntax directed differencer for C++ programs. In: Proceedings of the USENIX C++ Conference, pp. 181–193 (1992)
Zurück zum Zitat Harrold, M.J., Jones, J.A., Li, T., Liang, D., Orso, A., Pennings, M., Sinha, S., Spoon, S.A., Gujarathi, A.: Regression test selection for java software. In: Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 312–326 (2001) Harrold, M.J., Jones, J.A., Li, T., Liang, D., Orso, A., Pennings, M., Sinha, S., Spoon, S.A., Gujarathi, A.: Regression test selection for java software. In: Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 312–326 (2001)
Zurück zum Zitat Horwitz, S.: Identifying the semantic and textual differences between two versions of a program. In: Proceedings of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation, pp. 234–246 (1990) Horwitz, S.: Identifying the semantic and textual differences between two versions of a program. In: Proceedings of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation, pp. 234–246 (1990)
Zurück zum Zitat Hunt, J.J., Tichy, W.F.: Extensible language-aware merging. In: Proceedingsof the International Conference on Software Maintenance, pp. 511–520 (2002) Hunt, J.J., Tichy, W.F.: Extensible language-aware merging. In: Proceedingsof the International Conference on Software Maintenance, pp. 511–520 (2002)
Zurück zum Zitat Jackson, D., Ladd, D.A.: Semantic diff: A tool for summarizing the effects of modifications. In: Proceedings of the Internation Conference on Software Maintenance, pp. 243–252 (1994) Jackson, D., Ladd, D.A.: Semantic diff: A tool for summarizing the effects of modifications. In: Proceedings of the Internation Conference on Software Maintenance, pp. 243–252 (1994)
Zurück zum Zitat Laski, J., Szermer, W.: Identification of program nodifications and its applications in software maintenance. In: Proceedings of IEEE Conference on Software Maintenance, pp. 282–290 (1992) Laski, J., Szermer, W.: Identification of program nodifications and its applications in software maintenance. In: Proceedings of IEEE Conference on Software Maintenance, pp. 282–290 (1992)
Zurück zum Zitat Law, J., Rothermel, G.: Whole program path-based dynamic impact analysis. In: Proceedings of the 25th International Conference on Software Engineering, pp. 308–318 (2003) Law, J., Rothermel, G.: Whole program path-based dynamic impact analysis. In: Proceedings of the 25th International Conference on Software Engineering, pp. 308–318 (2003)
Zurück zum Zitat Leung, H.K.N., White, L.: Insights into regression testing. In: Proceedings of the Conference on Software Maintenance, pp. 60–69. IEEE Computer Society Press (1989) Leung, H.K.N., White, L.: Insights into regression testing. In: Proceedings of the Conference on Software Maintenance, pp. 60–69. IEEE Computer Society Press (1989)
Zurück zum Zitat Maletic, J.I., Collard, M.L.: Supporting source code difference analysis. In: Proceedings of the 20th IEEE International Conference on Software Maintenance (ICSM 2004), pp. 210–219 (2004) Maletic, J.I., Collard, M.L.: Supporting source code difference analysis. In: Proceedings of the 20th IEEE International Conference on Software Maintenance (ICSM 2004), pp. 210–219 (2004)
Zurück zum Zitat Mens, T.: A state-of-the-art survey on software merging. IEEE Trans. Softw. Eng. 28(5), 449–462 (2002) Mens, T.: A state-of-the-art survey on software merging. IEEE Trans. Softw. Eng. 28(5), 449–462 (2002)
Zurück zum Zitat Myers, E.W.: An O(ND) Difference algorithm an its variations. Algorithmica 1(2), 251–266 (1986) Myers, E.W.: An O(ND) Difference algorithm an its variations. Algorithmica 1(2), 251–266 (1986)
Zurück zum Zitat Orso, A., Apiwattanapong, T., Harrold, M.J.: Leveraging field data for impact analysis and regression testing. In: Proceedings of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering In (2003) Orso, A., Apiwattanapong, T., Harrold, M.J.: Leveraging field data for impact analysis and regression testing. In: Proceedings of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering In (2003)
Zurück zum Zitat Orso, A., Shi, N., Harrold, M.J.: Scaling regression testing to large software systems. In: Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering In (2004) Orso, A., Shi, N., Harrold, M.J.: Scaling regression testing to large software systems. In: Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering In (2004)
Zurück zum Zitat Raghavan, S., Rohana, R., Loen, D., Podgurski, A., Augustine, V.: Dex: A semantic-graph differencing tool for studying changes in large code bases. In: Proceedings of the 20th IEEE International Conference on Software Maintenance (ICSM 2004), pp. 188–197 (2004) Raghavan, S., Rohana, R., Loen, D., Podgurski, A., Augustine, V.: Dex: A semantic-graph differencing tool for studying changes in large code bases. In: Proceedings of the 20th IEEE International Conference on Software Maintenance (ICSM 2004), pp. 188–197 (2004)
Zurück zum Zitat Rangarajan, K.: Automatic analysis of java program evolution and its relevance to regression testing. http: //www.mmsindia.com/JEvolve.html (2001) Rangarajan, K.: Automatic analysis of java program evolution and its relevance to regression testing. http: //www.mmsindia.com/JEvolve.html (2001)
Zurück zum Zitat 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 Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 432–448 (2004) 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 Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 432–448 (2004)
Zurück zum Zitat Rothermel, G., Harrold, M.J.: Analyzing regression test selection techniques. IEEE Trans. Softw. Eng. 22(8), 529–551 (1996) Rothermel, G., Harrold, M.J.: Analyzing regression test selection techniques. IEEE Trans. Softw. Eng. 22(8), 529–551 (1996)
Zurück zum Zitat Rothermel, G., Harrold, M.J.: A safe, efficient regressing test selection technique. ACM Trans. Softw. Eng. Methodol. 6(2), 173–210 (1997) Rothermel, G., Harrold, M.J.: A safe, efficient regressing test selection technique. ACM Trans. Softw. Eng. Methodol. 6(2), 173–210 (1997)
Zurück zum Zitat Sinha, S., Harrold, M.J.: Analysis and testing of programs with exception handling constructs. IEEE Trans. Softw. Eng. 26(9), 849–871 (2000) Sinha, S., Harrold, M.J.: Analysis and testing of programs with exception handling constructs. IEEE Trans. Softw. Eng. 26(9), 849–871 (2000)
Zurück zum Zitat the Eclipse Foundation. http: //www.eclipse.org (2001) the Eclipse Foundation. http: //www.eclipse.org (2001)
Zurück zum Zitat Wang, Z., Pierce, K., McFarling, S.: BMAT–A binary matching tool for stale profile propagation. J. Instruction-Level Parallelism 2 (2000) Wang, Z., Pierce, K., McFarling, S.: BMAT–A binary matching tool for stale profile propagation. J. Instruction-Level Parallelism 2 (2000)
Zurück zum Zitat Xing, Z., Stroulia, E.: UMLDiff: An algorithm for object-oriented design differencing. In: Proceedings of the 20th IEEE/ACM Conference on Automated Software Engineering, pp. 54–65 (2005) Xing, Z., Stroulia, E.: UMLDiff: An algorithm for object-oriented design differencing. In: Proceedings of the 20th IEEE/ACM Conference on Automated Software Engineering, pp. 54–65 (2005)
Zurück zum Zitat Yang, W.: Identifying syntactic differences between two programs. Software–Practice Exp. 7, 739–755 (1991) Yang, W.: Identifying syntactic differences between two programs. Software–Practice Exp. 7, 739–755 (1991)
Metadaten
Titel
JDiff: A differencing technique and tool for object-oriented programs
verfasst von
Taweesup Apiwattanapong
Alessandro Orso
Mary Jean Harrold
Publikationsdatum
01.03.2007
Erschienen in
Automated Software Engineering / Ausgabe 1/2007
Print ISSN: 0928-8910
Elektronische ISSN: 1573-7535
DOI
https://doi.org/10.1007/s10515-006-0002-0

Weitere Artikel der Ausgabe 1/2007

Automated Software Engineering 1/2007 Zur Ausgabe

EditorialNotes

Introduction

Book Review

Dessert Island