untangling composite commits untangling composite commits
play

Untangling Composite Commits Untangling Composite Commits Using - PowerPoint PPT Presentation

Untangling Composite Commits Untangling Composite Commits Using Program Slicing Using Program Slicing Ward Muylaert and Coen De Roover @wardmuylaert and @oniroi Sofuware Languages Lab SCAM 2018 Vrije Universiteit Brussel Madrid, Spain


  1. Untangling Composite Commits Untangling Composite Commits Using Program Slicing Using Program Slicing Ward Muylaert and Coen De Roover @wardmuylaert and @oniroi Sofuware Languages Lab SCAM 2018 Vrije Universiteit Brussel Madrid, Spain Brussels, Belgium

  2. Two Types of Commits Single-task commit Composite commit

  3. Composite Commit Difgiculties Revert Understand Integrate Research

  4. Prevalence of Composite Commits K. Herzig et al., “The impact of tangled code “15%” changes on defect prediction models,” Empirical Sofuware Engineering , 2015. Y. Tao et al., “Partitioning Composite Code “17% - 29%” Changes to Facilitate Code Review,” in MSR , 2015. “11% - 39%” H. A. Nguyen et al., “Filtering Noise in Mixed- Purpose Fixing Commits to Improve Defect Prediction and Localization”, in ISSRE , 2013.

  5. Ideal

  6. Ideal Hypothesis Related changes afgect source code from the same program slice. A commit may be decomposed using the created program slices.

  7. Overview of our Approach ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file

  8. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file p u b l i c F i g A c t i o n S t a t e ( ) { - _ b i g P o r t = n e w F i g R R e c t ( 1 0 + 1 , 1 0 + 1 , 9 0 - 2 , 2 5 - 2 , C o l o r . c y a n , C o l o r . c y a n ) ; + b i g P o r t = n e w F i g R R e c t ( 1 0 + 1 , 1 0 + 1 , 9 0 - 2 , 2 5 - 2 , C o l o r . c y a n , C o l o r . c y a n ) ; - _ b i g P o r t . s e t C o r n e r R a d i u s ( _ b i g P o r t . g e t H a l f H e i g h t ( ) ) ; + b i g P o r t . s e t C o r n e r R a d i u s ( b i g P o r t . g e t H a l f H e i g h t ( ) ) ; - _ c o v e r = n e w F i g R R e c t ( 1 0 , 1 0 , 9 0 , 2 5 , C o l o r . b l a c k , C o l o r . w h i t e ) ; + c o v e r = n e w F i g R R e c t ( 1 0 , 1 0 , 9 0 , 2 5 , C o l o r . b l a c k , C o l o r . w h i t e ) ; - _ c o v e r . s e t C o r n e r R a d i u s ( _ c o v e r . g e t H a l f H e i g h t ( ) ) ; + c o v e r . s e t C o r n e r R a d i u s ( _ c o v e r . g e t H a l f H e i g h t ( ) ) ; - _ b i g P o r t . s e t L i n e W i d t h ( 0 ) ; + b i g P o r t . s e t L i n e W i d t h ( 0 ) ; - a d d F i g ( _ b i g P o r t ) ; + a d d F i g ( b i g P o r t ) ; - a d d F i g ( _ c o v e r ) ; + a d d F i g ( c o v e r ) ; }

  9. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file Edit operations ● Insert ● Move 1. Delete x ● Delete 2. Insert y ● Update x y AST before commit AST afuer commit R. Stevens et al., “Extracting executable transformations from distilled code changes,” in SANER , 2017. B. Fluri et al., “Change distilling: Tree AST tree difgerencing difgerencing for fine-grained source code change extraction,” IEEE Transactions on Sofuware Engineering , 2007.

  10. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file U p d a t e S i m p l e N a m e o n l i n e 2 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 3 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 3 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 6 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 7 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 4 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 5 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 5 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 8 : _ c o v e r → c o v e r

  11. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file S. Horwitz et al., “Interprocedural Inter-procedural slicing using dependence graphs,” ACM Transactions on Programming Languages and Systems , 1990. TinyPDG Y. Higo et al., “Enhancing quality of code clone detection with program dependency graph,” in Working Conference on Reverse Engineering , 2009.

  12. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file FigActionState _cover = new FigRRect() _bigport = new FigRRect() _bigPort.setLW(0) addFig(_cover) _cover.setCR(_cover.getHH()) _bigPort.setCR(_bigport.getHH()) addFig(_bigPort) Control dependence Data dependence

  13. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file FigActionState _bigport = new FigRRect() _cover = new FigRRect() _bigPort.setCR(_bigport.getHH()) _bigPort.setLW(0) addFig(_cover) _cover.setCR(_cover.getHH()) addFig(_bigPort) U p d a t e S i m p l e N a m e o n l i n e 6 : _ b i g P o r t → b i g P o r t

  14. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file FigActionState _bigport = new FigRRect() _cover = new FigRRect() _bigPort.setCR(_bigport.getHH()) _bigPort.setLW(0) addFig(_cover) _cover.setCR(_cover.getHH()) addFig(_bigPort) U p d a t e S i m p l e N a m e o n l i n e 6 : _ b i g P o r t → b i g P o r t

  15. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file FigActionState _bigport = new FigRRect() _cover = new FigRRect() _bigPort.setCR(_bigport.getHH()) _bigPort.setLW(0) addFig(_cover) _cover.setCR(_cover.getHH()) addFig(_bigPort) U p d a t e S i m p l e N a m e o n l i n e 6 : _ b i g P o r t → b i g P o r t

  16. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file U p d a t e S i m p l e N a m e o n l i n e 2 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 3 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 3 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 6 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 7 : _ b i g P o r t → b i g P o r t U p d a t e S i m p l e N a m e o n l i n e 4 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 5 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 5 : _ c o v e r → c o v e r U p d a t e S i m p l e N a m e o n l i n e 8 : _ c o v e r → c o v e r

  17. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file U/L2: _bigPort → bigPort U/L4: _cover → cover U/L3: _bigPort → bigPort U/L5: _cover → cover U/L3: _bigPort → bigPort U/L6: _bigPort → bigPort U/L7: _bigPort → bigPort U/L5: _cover → cover U/L8: _cover → cover

  18. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file U/L2: _bigPort → bigPort U/L4: _cover → cover U/L3: _bigPort → bigPort U/L5: _cover → cover U/L3: _bigPort → bigPort U/L6: _bigPort → bigPort U/L7: _bigPort → bigPort U/L5: _cover → cover U/L8: _cover → cover → Change is in the slice associated with the other change

  19. ChangeDistiller per changed file Slice SDG Group Commit on each change changes SDG per changed file Cluster 1 Cluster 2 U/L2: _bigPort → bigPort U/L4: _cover → cover U/L3: _bigPort → bigPort U/L5: _cover → cover U/L3: _bigPort → bigPort U/L6: _bigPort → bigPort U/L7: _bigPort → bigPort U/L5: _cover → cover U/L8: _cover → cover → Transitive closure

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend