SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
ChangeCommander
Recommending Method Invocation
Context Changes

Beat Fluri, Jonas Zuberbühler, and Harald C. Gall
s.e.a.l. - software evolution & architecture lab
Department of Informatics
University of Zurich, Switzerland




         University of Zurich
         Department of Informatics                  software evolution & architecture lab
Which changes fix bugs?


Bug fix change study on Eclipse
  43 plugins from Platform, JDT, and PDE


15% of bugs fixes contain context changes
of method invocation statements
Which changes fix bugs?


Bug fix change study on Eclipse
  43 plugins from Platform, JDT, and PDE


15% of bugs fixes contain context changes
of method invocation statements


            Method Invocation Context Change
            Moving a method invocation into the
            then or the else-part of an if-statement.
Which changes fix bugs?


Bug fix change study on Eclipse
  43 plugins from Platform, JDT, and PDE

         visited.add(outputFolder);
15% of bugs fixes contain context changes
of method invocation statements


            Method Invocation Context Change
            Moving a method invocation into the
            then or the else-part of an if-statement.
Which changes fix bugs?


Bug fix change study on Eclipse
  43 pluginsif (!visited.contains(outputFolder)) {
             from Platform, JDT, and PDE

              visited.add(outputFolder);
15% of bugs fixes contain context changes
of method invocation statements
         }

          Method Invocation Context Change
          Moving a method invocation into the
          then or the else-part of an if-statement.
Context changes tend to be similar

Similar conditions for all methods




Similar conditions for specific methods
Context changes tend to be similar

Similar conditions for all methods

  if (myObject != null) {            if (list != null) {
  	 	 list.add(myObject);            	 	 list.add(myObject);
  }                                  }




Similar conditions for specific methods
Context changes tend to be similar

Similar conditions for all methods

  if (myObject != null) {            if (list != null) {
  	 	 list.add(myObject);            	 	 list.add(myObject);
  }                                  }




Similar conditions for specific methods

  if (!list.contains(myObject)) {
  	 	 list.add(myObject);
  }
Pattern extraction process
Pattern extraction process
          Context
          changes
Pattern extraction process
          Context
          changes
Pattern extraction process
          Context
          changes
Pattern extraction process
          Context    Invocation
          changes   aggregation
Pattern extraction process
          Context    Invocation    Pattern
          changes   aggregation   extraction
Pattern extraction process
          Context    Invocation    Pattern
          changes   aggregation   extraction
Invocation aggregation


Method invocations   Invocation signature




list.add(myObject)   java.util.List.add(MyClass)
Invocation aggregation


Method invocations   Invocation signature




list.add(myObject)   java.util.List.add(MyClass)
Invocation aggregation


Method invocations   Invocation signature




list.add(myObject)   java.util.List.add(MyClass)
Invocation aggregation

    Method invocation    Invocation signature
    list.add(anObject)   java.util.List.add(MyClass)
Invocation aggregation

    Method invocation    Invocation signature
    list.add(anObject)   java.util.List.add(MyClass)




    Same Package
Invocation aggregation

    Method invocation    Invocation signature
    list.add(anObject)   java.util.List.add(MyClass)




    Same Package

      Imports
Invocation aggregation

    Method invocation          Invocation signature
    list.add(anObject)         java.util.List.add(MyClass)




                         JDT




    Same Package

      Imports
Invocation aggregation

    Method invocation          Invocation signature
    list.add(anObject)         java.util.List.add(MyClass)




                         JDT




    Same Package

      Imports
Invocation aggregation

    Method invocation          Invocation signature
    list.add(anObject)         java.util.List.add(MyClass)




                                       Post Resolver


                         JDT
                                       Match in scope
                                       variables

                                       Match in imports

                                       ...

    Same Package

      Imports
Invocation aggregation

    Method invocation          Invocation signature
    list.add(anObject)         java.util.List.add(MyClass)




                                       Post Resolver


                         JDT
                                       Match in scope
                                       variables

                                       Match in imports

                                       ...

    Same Package

      Imports
Pattern extraction


Aggregated invocations     Context change patterns




list != null &&            <qualifier> != null

!list.contains(myObject)   !<qualifier>.contains(<argument_0>)



list.add(myObject)
Pattern extraction


Aggregated invocations     Context change patterns




list != null &&            <qualifier> != null

!list.contains(myObject)   !<qualifier>.contains(<argument_0>)



list.add(myObject)
Pattern extraction


Aggregated invocations     Context change patterns




list != null &&            <qualifier> != null

!list.contains(myObject)   !<qualifier>.contains(<argument_0>)



list.add(myObject)
Pattern extraction

       Aggregated invocations     Context change patterns
       list != null &&            <qualifier> != null
       !list.contains(myObject)
                                  !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into
  single conditions
Pattern extraction

       Aggregated invocations                    Context change patterns
       list != null &&                           <qualifier> != null
       !list.contains(myObject)
                                                 !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into          Token streams for
  single conditions        - conditions
                           - method invocation
Pattern extraction

       Aggregated invocations                    Context change patterns
       list != null &&                           <qualifier> != null
       !list.contains(myObject)
                                                 !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into          Token streams for
  single conditions        - conditions
                           - method invocation
Pattern extraction

       Aggregated invocations                    Context change patterns
       list != null &&                           <qualifier> != null
       !list.contains(myObject)
                                                 !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into          Token streams for
  single conditions        - conditions
                           - method invocation


                        list.add(myObject)
Pattern extraction

       Aggregated invocations                    Context change patterns
       list != null &&                           <qualifier> != null
       !list.contains(myObject)
                                                 !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into          Token streams for
  single conditions        - conditions
                           - method invocation


                        list.add(myObject)
Pattern extraction

       Aggregated invocations                    Context change patterns
       list != null &&                           <qualifier> != null
       !list.contains(myObject)
                                                 !<qualifier>.contains(<argument_0>)




  Split compound
  conditions into          Token streams for
  single conditions        - conditions
                           - method invocation


                        list.add(myObject)
Recommendation
Recommendation
Recommendation
Recommendation



                 java.util.List.add(MyClass)
Recommendation



                 java.util.List.add(MyClass)
Recommendation



                 java.util.List.add(MyClass)
Recommendation



                          java.util.List.add(MyClass)




           x
               x

       Surrounding if
       already contains
       condition

       Filter predefined
       method
       invocations
Recommendation



                          java.util.List.add(MyClass)




           x
               x

       Surrounding if
       already contains
       condition

       Filter predefined
       method
       invocations
ChangeCommander
A first validation

Split history
Training set: Past context changes up to a
certain release
Test set: Context changes after that
particular release

Recommended context change
True positive (TP): in test set
False positive (FP): not in test set
False negative (FN): context change in test set but not recommended
A first validation


           Project       TP   #B     FP   FN

           ArgoUML       29   11   4675   75

           Azureus       15    3      -   82

           Eclipse JDT   51   27      -   158

           Eclipse PDE   35   25   8011   46

           jEdit          1    0   1307   13
A first validation


           Project       TP   #B     FP   FN

           ArgoUML       29   11   4675   75

           Azureus       15    3      -   82

           Eclipse JDT   51   27      -   158

           Eclipse PDE   35   25   8011   46

           jEdit          1    0   1307   13
Conclusions

                                 Recommending context changes
                                 We leverages context change data to
                                 suggest corresponding modifications on
                                 existing or newly added method
                                 invocations.



ChangeCommander
By integrating our recommendation
approach into the development
process, we aim at reducing future
bugs.

Mais conteúdo relacionado

Mais procurados

Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartRefactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartGabriele Lana
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and UtilitiesPramod Kumar
 
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...Uehara Junji
 
Beyond Java: 자바 8을 중심으로 본 자바의 혁신
Beyond Java: 자바 8을 중심으로 본 자바의 혁신Beyond Java: 자바 8을 중심으로 본 자바의 혁신
Beyond Java: 자바 8을 중심으로 본 자바의 혁신Sungchul Park
 
Oleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy
 
Easy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVEEasy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVEUehara Junji
 
Javascript basic course
Javascript basic courseJavascript basic course
Javascript basic courseTran Khoa
 
Java best practices
Java best practicesJava best practices
Java best practicesRay Toal
 
Annotation Processing in Android
Annotation Processing in AndroidAnnotation Processing in Android
Annotation Processing in Androidemanuelez
 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Trisha Gee
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1brecke
 
The uniform interface is 42
The uniform interface is 42The uniform interface is 42
The uniform interface is 42Yevhen Bobrov
 
Autoboxing and unboxing
Autoboxing and unboxingAutoboxing and unboxing
Autoboxing and unboxingGeetha Manohar
 
Joose @jsconf
Joose @jsconfJoose @jsconf
Joose @jsconfmalteubl
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimizationadil raja
 

Mais procurados (20)

Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartRefactoring In Tdd The Missing Part
Refactoring In Tdd The Missing Part
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and Utilities
 
JDK Power Tools
JDK Power ToolsJDK Power Tools
JDK Power Tools
 
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...
Let's go Developer 2011 sendai Let's go Java Developer (Programming Language ...
 
Beyond Java: 자바 8을 중심으로 본 자바의 혁신
Beyond Java: 자바 8을 중심으로 본 자바의 혁신Beyond Java: 자바 8을 중심으로 본 자바의 혁신
Beyond Java: 자바 8을 중심으로 본 자바의 혁신
 
Oleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoC
 
Easy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVEEasy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVE
 
Javascript basic course
Javascript basic courseJavascript basic course
Javascript basic course
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Annotation Processing in Android
Annotation Processing in AndroidAnnotation Processing in Android
Annotation Processing in Android
 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)
 
QTP Online Training
QTP Online Training QTP Online Training
QTP Online Training
 
Java Programming - 04 object oriented in java
Java Programming - 04 object oriented in javaJava Programming - 04 object oriented in java
Java Programming - 04 object oriented in java
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1
 
The uniform interface is 42
The uniform interface is 42The uniform interface is 42
The uniform interface is 42
 
Jstl 8
Jstl 8Jstl 8
Jstl 8
 
Autoboxing and unboxing
Autoboxing and unboxingAutoboxing and unboxing
Autoboxing and unboxing
 
Joose @jsconf
Joose @jsconfJoose @jsconf
Joose @jsconf
 
JRuby hacking guide
JRuby hacking guideJRuby hacking guide
JRuby hacking guide
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimization
 

Destaque

Why Is Obesity A Political Problem
Why Is Obesity A Political ProblemWhy Is Obesity A Political Problem
Why Is Obesity A Political Problemndaniels33
 
The Russian Provisional Government & its problems
The Russian Provisional Government & its problemsThe Russian Provisional Government & its problems
The Russian Provisional Government & its problemscolek2014
 
Report ethics in government service
Report ethics in government serviceReport ethics in government service
Report ethics in government serviceLouie Medinaceli
 
Dynamism of Philippine Administrative System and its Role to National Develop...
Dynamism of Philippine Administrative System and its Role to National Develop...Dynamism of Philippine Administrative System and its Role to National Develop...
Dynamism of Philippine Administrative System and its Role to National Develop...Mhd Faheem Aliuden
 
Philippine Administrative System (PAS)
Philippine Administrative System  (PAS)Philippine Administrative System  (PAS)
Philippine Administrative System (PAS)Jo Balucanag - Bitonio
 
Political and administrative structure
Political and administrative structurePolitical and administrative structure
Political and administrative structureAlex Francis Cabrera
 
DPA 102 Philippine Administrative System
DPA 102 Philippine Administrative SystemDPA 102 Philippine Administrative System
DPA 102 Philippine Administrative SystemJo Balucanag - Bitonio
 

Destaque (11)

Why Is Obesity A Political Problem
Why Is Obesity A Political ProblemWhy Is Obesity A Political Problem
Why Is Obesity A Political Problem
 
Karen Hill SIGMA-EU event on Public administration reform challenges Skopje 1...
Karen Hill SIGMA-EU event on Public administration reform challenges Skopje 1...Karen Hill SIGMA-EU event on Public administration reform challenges Skopje 1...
Karen Hill SIGMA-EU event on Public administration reform challenges Skopje 1...
 
The Russian Provisional Government & its problems
The Russian Provisional Government & its problemsThe Russian Provisional Government & its problems
The Russian Provisional Government & its problems
 
Pscn
PscnPscn
Pscn
 
Android ipm 20110409
Android ipm 20110409Android ipm 20110409
Android ipm 20110409
 
Report ethics in government service
Report ethics in government serviceReport ethics in government service
Report ethics in government service
 
Dynamism of Philippine Administrative System and its Role to National Develop...
Dynamism of Philippine Administrative System and its Role to National Develop...Dynamism of Philippine Administrative System and its Role to National Develop...
Dynamism of Philippine Administrative System and its Role to National Develop...
 
Philippine Administrative System (PAS)
Philippine Administrative System  (PAS)Philippine Administrative System  (PAS)
Philippine Administrative System (PAS)
 
Political and administrative structure
Political and administrative structurePolitical and administrative structure
Political and administrative structure
 
DPA 102 Philippine Administrative System
DPA 102 Philippine Administrative SystemDPA 102 Philippine Administrative System
DPA 102 Philippine Administrative System
 
Karen Hill, presentation,SIGMA Bilateral Event,Principles of Public Administr...
Karen Hill, presentation,SIGMA Bilateral Event,Principles of Public Administr...Karen Hill, presentation,SIGMA Bilateral Event,Principles of Public Administr...
Karen Hill, presentation,SIGMA Bilateral Event,Principles of Public Administr...
 

Semelhante a Recommending Method Invocation Context Changes

NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportAnton Arhipov
 
Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Oliver Klee
 
Test-driven Development for TYPO3
Test-driven Development for TYPO3Test-driven Development for TYPO3
Test-driven Development for TYPO3Oliver Klee
 
Pragmatic unittestingwithj unit
Pragmatic unittestingwithj unitPragmatic unittestingwithj unit
Pragmatic unittestingwithj unitliminescence
 
Intro to Testing in Zope, Plone
Intro to Testing in Zope, PloneIntro to Testing in Zope, Plone
Intro to Testing in Zope, PloneQuintagroup
 
SOLID mit Java 8
SOLID mit Java 8SOLID mit Java 8
SOLID mit Java 8Roland Mast
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1brecke
 
Tools09 – Reusing & Composing Tests with Traits
Tools09 – Reusing & Composing Tests with TraitsTools09 – Reusing & Composing Tests with Traits
Tools09 – Reusing & Composing Tests with TraitsDamien Pollet
 
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...vekariyakashyap
 
Generic Programming
Generic ProgrammingGeneric Programming
Generic ProgrammingPingLun Liao
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side JavascriptJulie Iskander
 
DynaMine: Finding Common Error Patterns by Mining Software Revision Histories
DynaMine: Finding Common Error Patterns by Mining Software Revision HistoriesDynaMine: Finding Common Error Patterns by Mining Software Revision Histories
DynaMine: Finding Common Error Patterns by Mining Software Revision HistoriesThomas Zimmermann
 
Test-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DETest-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DEOliver Klee
 
The Anatomy of Analysis Tools (EVO 2008)
The Anatomy of Analysis Tools (EVO 2008)The Anatomy of Analysis Tools (EVO 2008)
The Anatomy of Analysis Tools (EVO 2008)Tudor Girba
 
Leveraging Scala Macros for Better Validation
Leveraging Scala Macros for Better ValidationLeveraging Scala Macros for Better Validation
Leveraging Scala Macros for Better ValidationTomer Gabel
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSam Brannen
 
Java Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughJava Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughMahfuz Islam Bhuiyan
 

Semelhante a Recommending Method Invocation Context Changes (20)

NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience Report
 
Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Test-Driven Development for TYPO3
Test-Driven Development for TYPO3
 
Test-driven Development for TYPO3
Test-driven Development for TYPO3Test-driven Development for TYPO3
Test-driven Development for TYPO3
 
Pragmatic unittestingwithj unit
Pragmatic unittestingwithj unitPragmatic unittestingwithj unit
Pragmatic unittestingwithj unit
 
Intro to Testing in Zope, Plone
Intro to Testing in Zope, PloneIntro to Testing in Zope, Plone
Intro to Testing in Zope, Plone
 
SOLID mit Java 8
SOLID mit Java 8SOLID mit Java 8
SOLID mit Java 8
 
Testing untestable code - DPC10
Testing untestable code - DPC10Testing untestable code - DPC10
Testing untestable code - DPC10
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1
 
Java q ref 2018
Java q ref 2018Java q ref 2018
Java q ref 2018
 
Tools09 – Reusing & Composing Tests with Traits
Tools09 – Reusing & Composing Tests with TraitsTools09 – Reusing & Composing Tests with Traits
Tools09 – Reusing & Composing Tests with Traits
 
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...
EContent_11_2023_04_09_11_30_38_Unit_3_Objects_and_Classespptx__2023_03_20_12...
 
Generic Programming
Generic ProgrammingGeneric Programming
Generic Programming
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 
Java custom annotations example
Java custom annotations exampleJava custom annotations example
Java custom annotations example
 
DynaMine: Finding Common Error Patterns by Mining Software Revision Histories
DynaMine: Finding Common Error Patterns by Mining Software Revision HistoriesDynaMine: Finding Common Error Patterns by Mining Software Revision Histories
DynaMine: Finding Common Error Patterns by Mining Software Revision Histories
 
Test-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DETest-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DE
 
The Anatomy of Analysis Tools (EVO 2008)
The Anatomy of Analysis Tools (EVO 2008)The Anatomy of Analysis Tools (EVO 2008)
The Anatomy of Analysis Tools (EVO 2008)
 
Leveraging Scala Macros for Better Validation
Leveraging Scala Macros for Better ValidationLeveraging Scala Macros for Better Validation
Leveraging Scala Macros for Better Validation
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
 
Java Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughJava Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner Walkthrough
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Recommending Method Invocation Context Changes

  • 1. ChangeCommander Recommending Method Invocation Context Changes Beat Fluri, Jonas Zuberbühler, and Harald C. Gall s.e.a.l. - software evolution & architecture lab Department of Informatics University of Zurich, Switzerland University of Zurich Department of Informatics software evolution & architecture lab
  • 2. Which changes fix bugs? Bug fix change study on Eclipse 43 plugins from Platform, JDT, and PDE 15% of bugs fixes contain context changes of method invocation statements
  • 3. Which changes fix bugs? Bug fix change study on Eclipse 43 plugins from Platform, JDT, and PDE 15% of bugs fixes contain context changes of method invocation statements Method Invocation Context Change Moving a method invocation into the then or the else-part of an if-statement.
  • 4. Which changes fix bugs? Bug fix change study on Eclipse 43 plugins from Platform, JDT, and PDE visited.add(outputFolder); 15% of bugs fixes contain context changes of method invocation statements Method Invocation Context Change Moving a method invocation into the then or the else-part of an if-statement.
  • 5. Which changes fix bugs? Bug fix change study on Eclipse 43 pluginsif (!visited.contains(outputFolder)) { from Platform, JDT, and PDE visited.add(outputFolder); 15% of bugs fixes contain context changes of method invocation statements } Method Invocation Context Change Moving a method invocation into the then or the else-part of an if-statement.
  • 6. Context changes tend to be similar Similar conditions for all methods Similar conditions for specific methods
  • 7. Context changes tend to be similar Similar conditions for all methods if (myObject != null) { if (list != null) { list.add(myObject); list.add(myObject); } } Similar conditions for specific methods
  • 8. Context changes tend to be similar Similar conditions for all methods if (myObject != null) { if (list != null) { list.add(myObject); list.add(myObject); } } Similar conditions for specific methods if (!list.contains(myObject)) { list.add(myObject); }
  • 10. Pattern extraction process Context changes
  • 11. Pattern extraction process Context changes
  • 12. Pattern extraction process Context changes
  • 13. Pattern extraction process Context Invocation changes aggregation
  • 14. Pattern extraction process Context Invocation Pattern changes aggregation extraction
  • 15. Pattern extraction process Context Invocation Pattern changes aggregation extraction
  • 16. Invocation aggregation Method invocations Invocation signature list.add(myObject) java.util.List.add(MyClass)
  • 17. Invocation aggregation Method invocations Invocation signature list.add(myObject) java.util.List.add(MyClass)
  • 18. Invocation aggregation Method invocations Invocation signature list.add(myObject) java.util.List.add(MyClass)
  • 19. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass)
  • 20. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) Same Package
  • 21. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) Same Package Imports
  • 22. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) JDT Same Package Imports
  • 23. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) JDT Same Package Imports
  • 24. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) Post Resolver JDT Match in scope variables Match in imports ... Same Package Imports
  • 25. Invocation aggregation Method invocation Invocation signature list.add(anObject) java.util.List.add(MyClass) Post Resolver JDT Match in scope variables Match in imports ... Same Package Imports
  • 26. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) list.add(myObject)
  • 27. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) list.add(myObject)
  • 28. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) list.add(myObject)
  • 29. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into single conditions
  • 30. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into Token streams for single conditions - conditions - method invocation
  • 31. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into Token streams for single conditions - conditions - method invocation
  • 32. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into Token streams for single conditions - conditions - method invocation list.add(myObject)
  • 33. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into Token streams for single conditions - conditions - method invocation list.add(myObject)
  • 34. Pattern extraction Aggregated invocations Context change patterns list != null && <qualifier> != null !list.contains(myObject) !<qualifier>.contains(<argument_0>) Split compound conditions into Token streams for single conditions - conditions - method invocation list.add(myObject)
  • 38. Recommendation java.util.List.add(MyClass)
  • 39. Recommendation java.util.List.add(MyClass)
  • 40. Recommendation java.util.List.add(MyClass)
  • 41. Recommendation java.util.List.add(MyClass) x x Surrounding if already contains condition Filter predefined method invocations
  • 42. Recommendation java.util.List.add(MyClass) x x Surrounding if already contains condition Filter predefined method invocations
  • 44. A first validation Split history Training set: Past context changes up to a certain release Test set: Context changes after that particular release Recommended context change True positive (TP): in test set False positive (FP): not in test set False negative (FN): context change in test set but not recommended
  • 45. A first validation Project TP #B FP FN ArgoUML 29 11 4675 75 Azureus 15 3 - 82 Eclipse JDT 51 27 - 158 Eclipse PDE 35 25 8011 46 jEdit 1 0 1307 13
  • 46. A first validation Project TP #B FP FN ArgoUML 29 11 4675 75 Azureus 15 3 - 82 Eclipse JDT 51 27 - 158 Eclipse PDE 35 25 8011 46 jEdit 1 0 1307 13
  • 47. Conclusions Recommending context changes We leverages context change data to suggest corresponding modifications on existing or newly added method invocations. ChangeCommander By integrating our recommendation approach into the development process, we aim at reducing future bugs.