SlideShare a Scribd company logo
1 of 35
Download to read offline
UNDERSTANDING SOURCE CODE DIFFERENCES
   BY SEPARATING REFACTORING EFFECTS	

*Sirinut Thangthumachit, Shinpei Hayashi, Motoshi Saeki
           Tokyo Institute of Technology, Japan
2	




    Motivation 	
     •  Source code differences
        •  Comparing and reading the differences of old and new
           versions of source code
     •  Refactoring complicates differences[1,2]
       •  Refactoring: the technique to restructuring source code
         that will not change program’s behavior
          •  makes large amount of differences
          •  shows same differences multiple times
          •  hides other changes’ differences

[1] K. Prete et al, “Template-based reconstruction of complex refactorings” ,
ICSM2010.
[2] Weißgerber et al, “Identifying refactoring from source-code changes” ,
ASE2006.
3	




Source Code Differences	


 public ThreadPoolRxTaskPool (int … 	




RED: deleted code	
    BLUE: added code
Example	
                                                              4	


   public ThreadPool (int maxThreads, int minThreads,
 ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
 throws Exception {
     // fill up the pool with worker threads
     this.maxThreads = maxThreadsmaxTasks = maxTasks;
     this.minThreads = minThreadsminTasks = minTasks;
     this.creator = creator;
     //for (int i = 0; i < minThreads; i++) {
     for (int i = 0; i < maxThreads; i++) { //temporary fix for thread
 hand off problem
       WorkerThread thread = creator.getWorkerThread();
       setupThread(thread);
       idle.add (thread);
     }
   }

   protected void setupThread(WorkerThread
 threadconfigureTask(AbstractRxTask task) {
     synchronized (threadtask) {
       thread.setPooltask.setTaskPool(this);
       thread.setName(thread//            task.setName(task.getClass
 ().getName() + "[" + inc() + "]");
       thread//            task.setDaemon(true);
       thread//            task.setPriority(Thread.MAX_PRIORITY);
       thread//            task.start();
       try {thread.wait(500); }catch ( InterruptedException x ) {}
     }
   }
                                                        Apache Tomcat 6.0.4 – 6.0.5
Example	
                                        5	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }
Example	
                                        6	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }



   Delete ‘for-loop’
Example	
                                              7	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }
                            Class ‘ThreadPool’ → ‘RxTaskPool’



   Delete ‘for-loop’
Example	
                                              8	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }
                            Class ‘ThreadPool’ → ‘RxTaskPool’
                          Parameter ‘maxThreads’ → ‘maxTasks’


   Delete ‘for-loop’
Example	
                                                9	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }
                            Class ‘ThreadPool’ → ‘RxTaskPool’
                          Parameter ‘maxThreads’ → ‘maxTasks’
                                   4 more refactorings
   Delete ‘for-loop’
Example	
                                         10	


  public ThreadPool (int maxThreads, int minThreads,
ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr
eator creator) throws Exception {
    // fill up the pool with worker threads
    this.maxThreads = maxThreadsmaxTasks = maxTasks;
    this.minThreads = minThreadsminTasks = minTasks;
    this.creator = creator;
    //for (int i = 0; i < minThreads; i++) {
    for (int i = 0; i < maxThreads; i++) { //temporary
fix for thread hand off problem
      WorkerThread thread = creator.getWorkerThread();
      setupThread(thread);
      idle.add (thread);
    }
  }



   Delete ‘for-loop’ 	
            Refactorings
Example	
                                                              11	


   public ThreadPool (int maxThreads, int minThreads,
 ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
 throws Exception {
     // fill up the pool with worker threads
     this.maxThreads = maxThreadsmaxTasks = maxTasks;
     this.minThreads = minThreadsminTasks = minTasks;
     this.creator = creator;
     //for (int i = 0; i < minThreads; i++) {
     for (int i = 0; i < maxThreads; i++) { //temporary fix for thread
 hand off problem
       WorkerThread thread = creator.getWorkerThread();
       setupThread(thread);
       idle.add (thread);
     }
   }

   protected void setupThread(WorkerThread
 threadconfigureTask(AbstractRxTask task) {
     synchronized (threadtask) {
       thread.setPooltask.setTaskPool(this);
       thread.setName(thread//            task.setName(task.getClass
 ().getName() + "[" + inc() + "]");
       thread//            task.setDaemon(true);
       thread//            task.setPriority(Thread.MAX_PRIORITY);
       thread//            task.start();
       try {thread.wait(500); }catch ( InterruptedException x ) {}
     }
   }
                                                        Apache Tomcat 6.0.4 – 6.0.5
Example	
                                         12	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }
Example	
                                         13	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }




     Comment Out
Example	
                                              14	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }


                          Method ‘setupThread’ → ‘configureTask’



     Comment Out
Example	
                                              15	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }


                          Method ‘setupThread’ → ‘configureTask’
                               Parameter ‘thread’ → ‘task’


     Comment Out
Example	
                                                 16	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }


                          Method ‘setupThread’ → ‘configureTask’
                               Parameter ‘thread’ → ‘task’
                                    2 more refactorings
     Comment Out
Example	
                                         17	




  protected void setupThread(WorkerThread threadconfigure
Task(AbstractRxTask task) {
    synchronized (threadtask) {
   thread.setPooltask.setTaskPool(this);
       thread.setName(thread//       task.setName(task.
getClass().getName() + "[" + inc() + "]");
      thread//       task.setDaemon(true);
      thread//       task.setPriority(Thread.MAX_PRIORITY);
   thread//       task.start();
   try {thread.wait(500); }catch ( InterruptedException x )
    }
  }




     Comment Out	
                 Refactorings
18	




 Basic Ideas	
•  Developer knows refactoring well
   •  ‘ThreadPool’ was renamed to ‘RxTaskPool’
•  → It is no need to read refactorings in source code
 differences
 •  ThreadPoolRxTaskPool


•  → Extract & Eliminate Refactorings
 •  Source code differences without refactoring
•  → Show refactoring information to user
Separating Refactorings	
                                                  19	



      public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
   throws Exception {	
          // fill up the pool with worker threads	
          this.maxTasks = maxTasks;	
          this.minTasks = minTasks;	
          this.creator = creator;	
          //for (int i = 0; i < minThreads; i++) {	
          for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand
   off problem	
              AbstractRxTask thread = creator.createRxTask();	
              configureTask(thread);	
              idle.add (thread);	
          }	
      }	
      	
      protected void configureTask(AbstractRxTask task) {	
          synchronized (task) {	
                   task.setTaskPool(this);	
   //                 task.setName(task.getClass().getName() + "[" + inc() + "]");	
   //                 task.setDaemon(true);	
   //                 task.setPriority(Thread.MAX_PRIORITY);	
   //                 task.start();	
              try {Thread.wait(500); }catch ( InterruptedException x ) {}	
          }	
      }	
                                               ‘ThreadPool’ → ‘RxTaskPool’
                                                      ‘setupThread’ → ‘configureTask’
                                                      and 8 more.
Separating Refactorings	
                                                    20	

                                              public ThreadPool (int maxThreads, int minThre
      public RxTaskPool (int maxTasks, ThreadCreatorRxTaskPool (int maxTasks, int minTa
                                           int minTasks, TaskCreator creator)
   throws Exception {	
                   throws Exception {
          // fill up the pool with worker threads	
 up the pool with worker threads
                                                // fill
          this.maxTasks = maxTasks;	
           this.maxThreads = maxThreadsmaxTasks = maxTa
          this.minTasks = minTasks;	
           this.minThreads = minThreadsminTasks = minTa
          this.creator = creator;	
             this.creator = creator;
          //for (int i = 0; i < minThreads; i++) {	
                                                //for (int i = 0; i < minThreads; i++) {
          for (int i = 0; i < maxTasks; i++) for//temporary fix <for thread hand
                                                 { (int i = 0; i     maxThreads; i++) { //tem
   off problem	
                          hand off problem
              AbstractRxTask thread = creator.createRxTask();	
                                                  WorkerThread thread = creator.getWorkerThr
              configureTask(thread);	
            setupThread(thread);
              idle.add (thread);	
                idle.add (thread);
          }	
                                   }
      }	
                                     }
      	
      protected void configureTask(AbstractRxTask task) setupThread(WorkerThread
                                              protected void {	
          synchronized (task) {	
         threadconfigureTask(AbstractRxTask task) {
                   task.setTaskPool(this);	
    synchronized (threadtask) {
   //                 task.setName(task.getClass().getName() + "[" + inc() + "]");	
                                                  thread.setPooltask.setTaskPool(this);
   //                 task.setDaemon(true);	
     thread.setName(thread//             task.se
   //                 task.setPriority(Thread.MAX_PRIORITY);	
 + inc() + "]");
                                          ().getName() + "["
   //                 task.start();	
             thread//             task.setDaemon(true);
              try {Thread.wait(500); }catch ( InterruptedException xtask.setPriority(Threa
                                                  thread//              ) {}	
          }	
                                     thread//             task.start();
      }	
                                         try {thread.wait(500); }catch ( Interrupte
                                                           ‘ThreadPool’ → ‘RxTaskPool’
                                                }
                Without Refactorings 	
       } With Refactorings 	
                                                           ‘setupThread’ → ‘configureTask’
                                                       and 8 more.
Separating Refactorings	
                                                  21	



      public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
   throws Exception {	
          // fill up the pool with worker threads	
          this.maxTasks = maxTasks;	
          this.minTasks = minTasks;	
          this.creator = creator;	
          //for (int i = 0; i < minThreads; i++) {	
          for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand
   off problem	
              AbstractRxTask thread = creator.createRxTask();	
              configureTask(thread);	
              idle.add (thread);	
          }	
      }	
      	
      protected void configureTask(AbstractRxTask task) {	
                                                                Delete 'for-loop' 	
          synchronized (task) {	
                   task.setTaskPool(this);	
   //                 task.setName(task.getClass().getName() + "[" + inc() + "]");	
   //                 task.setDaemon(true);	
   //                 task.setPriority(Thread.MAX_PRIORITY);	
   //                 task.start();	
              try {Thread.wait(500); }catch ( InterruptedException x ) {}	
          }	
      }	
                                               ‘ThreadPool’ → ‘RxTaskPool’
                                                      ‘setupThread’ → ‘configureTask’
                                                      and 8 more.
Separating Refactorings	
                                                  22	



      public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
   throws Exception {	
          // fill up the pool with worker threads	
          this.maxTasks = maxTasks;	
          this.minTasks = minTasks;	
          this.creator = creator;	
          //for (int i = 0; i < minThreads; i++) {	
          for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand
   off problem	
              AbstractRxTask thread = creator.createRxTask();	
              configureTask(thread);	
              idle.add (thread);	
          }	
      }	
      	
      protected void configureTask(AbstractRxTask task) {	
                                                                Delete 'for-loop' 	
          synchronized (task) {	
                   task.setTaskPool(this);	
                     Comment out	
   //                 task.setName(task.getClass().getName() + "[" + inc() + "]");	
   //                 task.setDaemon(true);	
   //                 task.setPriority(Thread.MAX_PRIORITY);	
   //                 task.start();	
              try {Thread.wait(500); }catch ( InterruptedException x ) {}	
          }	
      }	
                                               ‘ThreadPool’ → ‘RxTaskPool’
                                                      ‘setupThread’ → ‘configureTask’
                                                      and 8 more.
Separating Refactorings	
                                                  23	



      public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator)
   throws Exception {	
          // fill up the pool with worker threads	
          this.maxTasks = maxTasks;	
          this.minTasks = minTasks;	
          this.creator = creator;	
          //for (int i = 0; i < minThreads; i++) {	
          for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand
   off problem	
              AbstractRxTask thread = creator.createRxTask();	
              configureTask(thread);	
              idle.add (thread);	
          }	
      }	
      	
      protected void configureTask(AbstractRxTask task) {	
                                                                Delete 'for-loop' 	
          synchronized (task) {	
                   task.setTaskPool(this);	
                    Comment out	
   //                 task.setName(task.getClass().getName() + "[" + inc() + "]");	
   //                 task.setDaemon(true);	
                  Delete 'try&catch'	
   //                 task.setPriority(Thread.MAX_PRIORITY);	
   //                 task.start();	
              try {Thread.wait(500); }catch ( InterruptedException x ) {}	
          }	
      }	
                                               ‘ThreadPool’ → ‘RxTaskPool’
                                                      ‘setupThread’ → ‘configureTask’
                                                      and 8 more.
24	

                         Old	
   Old version of source code
                                 New version of source code
Approach	
                         New	

                                 Source code differences
                                 refactoring	




   Old	
                               New	




Old	
        Modified	
                         New
25	




Overview of the proposed technique	

New Ver.	


              Separating          Comparing

Old Ver.	
   Refactorings	
      Source Code	

  Inputs	
                                 Source Code

                                  Differences

                              without Refactoring	

                                 Ordered List

                                of Refactorings	
                                    Outputs
26	




Overview of the proposed technique	

               New Ver.	
 Input 2	



               Extracting
Old Ver.	
              Refactorings	
 Input 1	
             Ordered List of
              Refactorings	
           Applying "       Modified

                                      Refactorings	
      Ver.	
                                                         Output 2	

                 Output 1
27	




    Overview of the proposed technique	

New	




                                          Method"                  Comparing

 Old	
     Package	
   File	
   Class	
              Local	
      Source Code	
                                           Field	
Inputs	



                                                                  Source Code

                                                                   Differences

                                                               without Refactoring	


                                                                  Ordered List

                                                                 of Refactorings	
                                                                     Outputs
Supporting tool	
  •  Refactoring Extraction
     •  Automatical extraction
     •  External Input
  •  Refactoring Application
     •  Automatically apply by using Eclipse Refactoring
         Browser

                           Extraction	
                Application	
               packages, files, classes, interfaces,
Rename	
                                                all elements	
                       enums, methods	
Move	
                    files, methods	
             files, methods	
                                                                      28	
Extract	
                        -	
                     methods
Evaluations	
•  Application on OSS
   •  Can extracted refactorings be applied?
   •  Can separating refactorings reduce the amount of source
      code differences?


•  Human Subject Study
   •  With approach, can subjects understand more changes in
      the same limited time?
   •  Does the approach satisfy subjects?

                                                          29
Evaluation 1 (Application on OSS)	
•  Target projects
   •  OW2 Carol 1.0.1-1.8.5 (30 pairs)
•  Result
   •  Tool found refactorings in 5 pairs
    •  1.0.1–1.3.0, 1.4.0–1.4.2, 1.5.2–1.5.3, 1.5.6–1.5.7, 1.5.8–1.6.

  •  Refactorings application

                                          Found	
            Successfully applied	
    Detected Refactorings                   21	
                        18	
    False                                    5	
                        2	
    True	
                                  16	
                        16	
                                                                                  30	
  •  → All real refactorings were applied successfully
Evaluation 1	
•  The amount of source code differences
                                   Changed lines	
  WO: without approach             18,721 (100%)	
  A: with approach	
              14,624 (78.12%)	
  WO - A	
                         4,097 (21.88%)	

 → Approach reduced more than 21%

•  Can extracted refactorings be applied?
   •  → Yes
•  Can separating refactorings reduce the amount of source
 code differences?
                                                       31	
  •  → Yes
Evaluation 2 (Human Subject)	
•  Procedure
   •  Let subjects read the source code differences with and
      without our approach.
   •  Ask them to answer what was changed between the
      versions
   •  Evaluate by time and changes found
•  Target Projects
  •  OW2 Carol 1.5.6-1.5.7
  •  Apache Tomcat 6.0.4-6.0.5

                                                               32
33	




 Evaluation 2	
•  Subjects
  Subjects	
          A	
                  B	
                C	
                D	
    Carol	
       Approach	
      w/o Approach	
           Approach	
      w/o approach
   Tomcat	
     w/o Approach	
      Approach	
        w/o Approach	
         Approach	


•  Result
                               Changes             Time              Efficiency
                                found	
          (minute)	
     (changes found/ time)	
              w/o Approach	
     28.3	
           112.75	
              0.25 (100%)	
 average	
               Approach	
        39.25	
           120	
                0.33 (132%)	

•  → Approach made 32% higher efficiency
34	




 Evaluation 2	
•  Questionnaires
   •  All subjects agreed that our approach is useful
    •  Especially, renaming class.




  •  With approach, can subjects understand more changes in
   the same limited time?
    •  → Yes
  •  Does the approach satisfy subjects?
     •  → Yes
Conclusion	
•  Understanding source code differences by
 separating refactorings effects
 •  Separating refactorings
 •  Implemented supporting tool
    •  Rename + Move refactorings
 •  Evaluations
    •  Approach is applicable to OSS
    •  Separating refactorings helps understanding differences

•  Future Works
   •  Better tool
    •  Support more refactoring types                            35

More Related Content

What's hot

Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksMongoDB
 
Java 7 JUG Summer Camp
Java 7 JUG Summer CampJava 7 JUG Summer Camp
Java 7 JUG Summer Campjulien.ponge
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Real Time Web with Node
Real Time Web with NodeReal Time Web with Node
Real Time Web with NodeTim Caswell
 
Node Powered Mobile
Node Powered MobileNode Powered Mobile
Node Powered MobileTim Caswell
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrentRoger Xia
 
Concurrency Concepts in Java
Concurrency Concepts in JavaConcurrency Concepts in Java
Concurrency Concepts in JavaDoug Hawkins
 
The Ring programming language version 1.5.2 book - Part 76 of 181
The Ring programming language version 1.5.2 book - Part 76 of 181The Ring programming language version 1.5.2 book - Part 76 of 181
The Ring programming language version 1.5.2 book - Part 76 of 181Mahmoud Samir Fayed
 
JPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream APIJPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream APItvaleev
 
groovy databases
groovy databasesgroovy databases
groovy databasesPaul King
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance PuzzlersDoug Hawkins
 
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...julien.ponge
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202Mahmoud Samir Fayed
 
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)Simon Su
 
Do more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayDo more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayJaime Buelta
 
Programming with ZooKeeper - A basic tutorial
Programming with ZooKeeper - A basic tutorialProgramming with ZooKeeper - A basic tutorial
Programming with ZooKeeper - A basic tutorialJeff Smith
 

What's hot (20)

Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
 
Java 7 JUG Summer Camp
Java 7 JUG Summer CampJava 7 JUG Summer Camp
Java 7 JUG Summer Camp
 
Spock and Geb in Action
Spock and Geb in ActionSpock and Geb in Action
Spock and Geb in Action
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Real Time Web with Node
Real Time Web with NodeReal Time Web with Node
Real Time Web with Node
 
Node Powered Mobile
Node Powered MobileNode Powered Mobile
Node Powered Mobile
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
 
Concurrency Concepts in Java
Concurrency Concepts in JavaConcurrency Concepts in Java
Concurrency Concepts in Java
 
The Ring programming language version 1.5.2 book - Part 76 of 181
The Ring programming language version 1.5.2 book - Part 76 of 181The Ring programming language version 1.5.2 book - Part 76 of 181
The Ring programming language version 1.5.2 book - Part 76 of 181
 
JPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream APIJPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream API
 
groovy databases
groovy databasesgroovy databases
groovy databases
 
Java 7 LavaJUG
Java 7 LavaJUGJava 7 LavaJUG
Java 7 LavaJUG
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance Puzzlers
 
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
 
Nantes Jug - Java 7
Nantes Jug - Java 7Nantes Jug - Java 7
Nantes Jug - Java 7
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202
 
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
 
Do more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayDo more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python way
 
#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG
 
Programming with ZooKeeper - A basic tutorial
Programming with ZooKeeper - A basic tutorialProgramming with ZooKeeper - A basic tutorial
Programming with ZooKeeper - A basic tutorial
 

Viewers also liked

Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Shinpei Hayashi
 
Historef: A Tool for Edit History Refactoring
Historef: A Tool  for Edit History RefactoringHistoref: A Tool  for Edit History Refactoring
Historef: A Tool for Edit History RefactoringShinpei Hayashi
 
Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Shinpei Hayashi
 
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQM
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQMHow Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQM
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQMShinpei Hayashi
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Shinpei Hayashi
 
Incremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeIncremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeHiroshi Kazato
 
Establishing Regulatory Compliance in Goal-Oriented Requirements Analysis
Establishing Regulatory Compliance in Goal-Oriented Requirements AnalysisEstablishing Regulatory Compliance in Goal-Oriented Requirements Analysis
Establishing Regulatory Compliance in Goal-Oriented Requirements AnalysisShinpei Hayashi
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchShinpei Hayashi
 
Toward Structured Location of Features
Toward Structured Location of FeaturesToward Structured Location of Features
Toward Structured Location of FeaturesHiroshi Kazato
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source CodeShinpei Hayashi
 
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Shinpei Hayashi
 
Guiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationGuiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationShinpei Hayashi
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesShinpei Hayashi
 
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionClass Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionShinpei Hayashi
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsShinpei Hayashi
 
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsModeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsShinpei Hayashi
 
Visualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapVisualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapTakanori Ugai
 
Feature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisFeature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisHiroshi Kazato
 
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」Takashi Kobayashi
 

Viewers also liked (20)

Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...
 
Historef: A Tool for Edit History Refactoring
Historef: A Tool  for Edit History RefactoringHistoref: A Tool  for Edit History Refactoring
Historef: A Tool for Edit History Refactoring
 
Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...
 
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQM
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQMHow Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQM
How Can You Improve Your As-is Models? Requirements Analysis Methods Meet GQM
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
 
Incremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeIncremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source Code
 
Establishing Regulatory Compliance in Goal-Oriented Requirements Analysis
Establishing Regulatory Compliance in Goal-Oriented Requirements AnalysisEstablishing Regulatory Compliance in Goal-Oriented Requirements Analysis
Establishing Regulatory Compliance in Goal-Oriented Requirements Analysis
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic Search
 
Toward Structured Location of Features
Toward Structured Location of FeaturesToward Structured Location of Features
Toward Structured Location of Features
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source Code
 
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
 
Guiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationGuiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature Location
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain Ontologies
 
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionClass Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature Implementations
 
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsModeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
 
Visualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapVisualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored Map
 
Feature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisFeature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept Analysis
 
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
 

Similar to Understanding Source Code Differences by Separating Refactoring Effects

Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3Simon Su
 
.NET Multithreading/Multitasking
.NET Multithreading/Multitasking.NET Multithreading/Multitasking
.NET Multithreading/MultitaskingSasha Kravchuk
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel ProcessingRTigger
 
Csmr2012 bettenburg presentation
Csmr2012 bettenburg presentationCsmr2012 bettenburg presentation
Csmr2012 bettenburg presentationSAIL_QU
 
201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programingwahyuseptiansyah
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
Modern C++ Concurrency API
Modern C++ Concurrency APIModern C++ Concurrency API
Modern C++ Concurrency APISeok-joon Yun
 
Java Concurrency in Practice
Java Concurrency in PracticeJava Concurrency in Practice
Java Concurrency in Practiceericbeyeler
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good TestsTomek Kaczanowski
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍louieuser
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot NetNeeraj Kaushik
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Zianed Hou
 

Similar to Understanding Source Code Differences by Separating Refactoring Effects (20)

Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3
 
.NET Multithreading/Multitasking
.NET Multithreading/Multitasking.NET Multithreading/Multitasking
.NET Multithreading/Multitasking
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Thread 1
Thread 1Thread 1
Thread 1
 
Server1
Server1Server1
Server1
 
Csmr2012 bettenburg presentation
Csmr2012 bettenburg presentationCsmr2012 bettenburg presentation
Csmr2012 bettenburg presentation
 
Multithreading in Java
Multithreading in JavaMultithreading in Java
Multithreading in Java
 
Posix Threads
Posix ThreadsPosix Threads
Posix Threads
 
201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing
 
P threads
P threadsP threads
P threads
 
JavaCro'15 - Spring @Async - Dragan Juričić
JavaCro'15 - Spring @Async - Dragan JuričićJavaCro'15 - Spring @Async - Dragan Juričić
JavaCro'15 - Spring @Async - Dragan Juričić
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Modern C++ Concurrency API
Modern C++ Concurrency APIModern C++ Concurrency API
Modern C++ Concurrency API
 
Java Concurrency in Practice
Java Concurrency in PracticeJava Concurrency in Practice
Java Concurrency in Practice
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍
 
Threads in java
Threads in javaThreads in java
Threads in java
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot Net
 
Xml & Java
Xml & JavaXml & Java
Xml & Java
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 

More from Shinpei Hayashi

Revisiting the Effect of Branch Handling Strategies on Change Recommendation
Revisiting the Effect of Branch Handling Strategies on Change RecommendationRevisiting the Effect of Branch Handling Strategies on Change Recommendation
Revisiting the Effect of Branch Handling Strategies on Change RecommendationShinpei Hayashi
 
An Extensive Study on Smell Aware Bug Localization
An Extensive Study on Smell Aware Bug LocalizationAn Extensive Study on Smell Aware Bug Localization
An Extensive Study on Smell Aware Bug LocalizationShinpei Hayashi
 
RefactorHub: A Commit Annotator for Refactoring
RefactorHub: A Commit Annotator for RefactoringRefactorHub: A Commit Annotator for Refactoring
RefactorHub: A Commit Annotator for RefactoringShinpei Hayashi
 
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?Can Automated Impact Analysis Technique Help Predicting Decaying Modules?
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?Shinpei Hayashi
 
The Impact of Systematic Edits in History Slicing
The Impact of Systematic Edits in History SlicingThe Impact of Systematic Edits in History Slicing
The Impact of Systematic Edits in History SlicingShinpei Hayashi
 
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source Code
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source CodeChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source Code
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source CodeShinpei Hayashi
 
Inference-Based Detection of Architectural Violations in MVC2
Inference-Based Detection of Architectural Violations in MVC2Inference-Based Detection of Architectural Violations in MVC2
Inference-Based Detection of Architectural Violations in MVC2Shinpei Hayashi
 
Detecting Bad Smells of Refinement in Goal-Oriented Requirements Analysis
Detecting Bad Smells of Refinement in Goal-Oriented Requirements AnalysisDetecting Bad Smells of Refinement in Goal-Oriented Requirements Analysis
Detecting Bad Smells of Refinement in Goal-Oriented Requirements AnalysisShinpei Hayashi
 
ソフトウェア工学勉強会への誘い
ソフトウェア工学勉強会への誘いソフトウェア工学勉強会への誘い
ソフトウェア工学勉強会への誘いShinpei Hayashi
 

More from Shinpei Hayashi (9)

Revisiting the Effect of Branch Handling Strategies on Change Recommendation
Revisiting the Effect of Branch Handling Strategies on Change RecommendationRevisiting the Effect of Branch Handling Strategies on Change Recommendation
Revisiting the Effect of Branch Handling Strategies on Change Recommendation
 
An Extensive Study on Smell Aware Bug Localization
An Extensive Study on Smell Aware Bug LocalizationAn Extensive Study on Smell Aware Bug Localization
An Extensive Study on Smell Aware Bug Localization
 
RefactorHub: A Commit Annotator for Refactoring
RefactorHub: A Commit Annotator for RefactoringRefactorHub: A Commit Annotator for Refactoring
RefactorHub: A Commit Annotator for Refactoring
 
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?Can Automated Impact Analysis Technique Help Predicting Decaying Modules?
Can Automated Impact Analysis Technique Help Predicting Decaying Modules?
 
The Impact of Systematic Edits in History Slicing
The Impact of Systematic Edits in History SlicingThe Impact of Systematic Edits in History Slicing
The Impact of Systematic Edits in History Slicing
 
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source Code
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source CodeChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source Code
ChangeMacroRecorder: Recording Fine-Grained Textual Changes of Source Code
 
Inference-Based Detection of Architectural Violations in MVC2
Inference-Based Detection of Architectural Violations in MVC2Inference-Based Detection of Architectural Violations in MVC2
Inference-Based Detection of Architectural Violations in MVC2
 
Detecting Bad Smells of Refinement in Goal-Oriented Requirements Analysis
Detecting Bad Smells of Refinement in Goal-Oriented Requirements AnalysisDetecting Bad Smells of Refinement in Goal-Oriented Requirements Analysis
Detecting Bad Smells of Refinement in Goal-Oriented Requirements Analysis
 
ソフトウェア工学勉強会への誘い
ソフトウェア工学勉強会への誘いソフトウェア工学勉強会への誘い
ソフトウェア工学勉強会への誘い
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Understanding Source Code Differences by Separating Refactoring Effects

  • 1. UNDERSTANDING SOURCE CODE DIFFERENCES BY SEPARATING REFACTORING EFFECTS *Sirinut Thangthumachit, Shinpei Hayashi, Motoshi Saeki Tokyo Institute of Technology, Japan
  • 2. 2 Motivation •  Source code differences •  Comparing and reading the differences of old and new versions of source code •  Refactoring complicates differences[1,2] •  Refactoring: the technique to restructuring source code that will not change program’s behavior •  makes large amount of differences •  shows same differences multiple times •  hides other changes’ differences [1] K. Prete et al, “Template-based reconstruction of complex refactorings” , ICSM2010. [2] Weißgerber et al, “Identifying refactoring from source-code changes” , ASE2006.
  • 3. 3 Source Code Differences public ThreadPoolRxTaskPool (int … RED: deleted code BLUE: added code
  • 4. Example 4 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } protected void setupThread(WorkerThread threadconfigureTask(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task.getClass ().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) {} } } Apache Tomcat 6.0.4 – 6.0.5
  • 5. Example 5 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } }
  • 6. Example 6 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } Delete ‘for-loop’
  • 7. Example 7 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } Class ‘ThreadPool’ → ‘RxTaskPool’ Delete ‘for-loop’
  • 8. Example 8 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } Class ‘ThreadPool’ → ‘RxTaskPool’ Parameter ‘maxThreads’ → ‘maxTasks’ Delete ‘for-loop’
  • 9. Example 9 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } Class ‘ThreadPool’ → ‘RxTaskPool’ Parameter ‘maxThreads’ → ‘maxTasks’ 4 more refactorings Delete ‘for-loop’
  • 10. Example 10 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCr eator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } Delete ‘for-loop’ Refactorings
  • 11. Example 11 public ThreadPool (int maxThreads, int minThreads, ThreadCreatorRxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxThreads = maxThreadsmaxTasks = maxTasks; this.minThreads = minThreadsminTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxThreads; i++) { //temporary fix for thread hand off problem WorkerThread thread = creator.getWorkerThread(); setupThread(thread); idle.add (thread); } } protected void setupThread(WorkerThread threadconfigureTask(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task.getClass ().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) {} } } Apache Tomcat 6.0.4 – 6.0.5
  • 12. Example 12 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } }
  • 13. Example 13 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } } Comment Out
  • 14. Example 14 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } } Method ‘setupThread’ → ‘configureTask’ Comment Out
  • 15. Example 15 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } } Method ‘setupThread’ → ‘configureTask’ Parameter ‘thread’ → ‘task’ Comment Out
  • 16. Example 16 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } } Method ‘setupThread’ → ‘configureTask’ Parameter ‘thread’ → ‘task’ 2 more refactorings Comment Out
  • 17. Example 17 protected void setupThread(WorkerThread threadconfigure Task(AbstractRxTask task) { synchronized (threadtask) { thread.setPooltask.setTaskPool(this); thread.setName(thread// task.setName(task. getClass().getName() + "[" + inc() + "]"); thread// task.setDaemon(true); thread// task.setPriority(Thread.MAX_PRIORITY); thread// task.start(); try {thread.wait(500); }catch ( InterruptedException x ) } } Comment Out Refactorings
  • 18. 18 Basic Ideas •  Developer knows refactoring well •  ‘ThreadPool’ was renamed to ‘RxTaskPool’ •  → It is no need to read refactorings in source code differences •  ThreadPoolRxTaskPool •  → Extract & Eliminate Refactorings •  Source code differences without refactoring •  → Show refactoring information to user
  • 19. Separating Refactorings 19 public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxTasks = maxTasks; this.minTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand off problem AbstractRxTask thread = creator.createRxTask(); configureTask(thread); idle.add (thread); } } protected void configureTask(AbstractRxTask task) { synchronized (task) { task.setTaskPool(this); // task.setName(task.getClass().getName() + "[" + inc() + "]"); // task.setDaemon(true); // task.setPriority(Thread.MAX_PRIORITY); // task.start(); try {Thread.wait(500); }catch ( InterruptedException x ) {} } } ‘ThreadPool’ → ‘RxTaskPool’ ‘setupThread’ → ‘configureTask’ and 8 more.
  • 20. Separating Refactorings 20 public ThreadPool (int maxThreads, int minThre public RxTaskPool (int maxTasks, ThreadCreatorRxTaskPool (int maxTasks, int minTa int minTasks, TaskCreator creator) throws Exception { throws Exception { // fill up the pool with worker threads up the pool with worker threads // fill this.maxTasks = maxTasks; this.maxThreads = maxThreadsmaxTasks = maxTa this.minTasks = minTasks; this.minThreads = minThreadsminTasks = minTa this.creator = creator; this.creator = creator; //for (int i = 0; i < minThreads; i++) { //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxTasks; i++) for//temporary fix <for thread hand { (int i = 0; i maxThreads; i++) { //tem off problem hand off problem AbstractRxTask thread = creator.createRxTask(); WorkerThread thread = creator.getWorkerThr configureTask(thread); setupThread(thread); idle.add (thread); idle.add (thread); } } } } protected void configureTask(AbstractRxTask task) setupThread(WorkerThread protected void { synchronized (task) { threadconfigureTask(AbstractRxTask task) { task.setTaskPool(this); synchronized (threadtask) { // task.setName(task.getClass().getName() + "[" + inc() + "]"); thread.setPooltask.setTaskPool(this); // task.setDaemon(true); thread.setName(thread// task.se // task.setPriority(Thread.MAX_PRIORITY); + inc() + "]"); ().getName() + "[" // task.start(); thread// task.setDaemon(true); try {Thread.wait(500); }catch ( InterruptedException xtask.setPriority(Threa thread// ) {} } thread// task.start(); } try {thread.wait(500); }catch ( Interrupte ‘ThreadPool’ → ‘RxTaskPool’ } Without Refactorings } With Refactorings ‘setupThread’ → ‘configureTask’ and 8 more.
  • 21. Separating Refactorings 21 public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxTasks = maxTasks; this.minTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand off problem AbstractRxTask thread = creator.createRxTask(); configureTask(thread); idle.add (thread); } } protected void configureTask(AbstractRxTask task) { Delete 'for-loop' synchronized (task) { task.setTaskPool(this); // task.setName(task.getClass().getName() + "[" + inc() + "]"); // task.setDaemon(true); // task.setPriority(Thread.MAX_PRIORITY); // task.start(); try {Thread.wait(500); }catch ( InterruptedException x ) {} } } ‘ThreadPool’ → ‘RxTaskPool’ ‘setupThread’ → ‘configureTask’ and 8 more.
  • 22. Separating Refactorings 22 public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxTasks = maxTasks; this.minTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand off problem AbstractRxTask thread = creator.createRxTask(); configureTask(thread); idle.add (thread); } } protected void configureTask(AbstractRxTask task) { Delete 'for-loop' synchronized (task) { task.setTaskPool(this); Comment out // task.setName(task.getClass().getName() + "[" + inc() + "]"); // task.setDaemon(true); // task.setPriority(Thread.MAX_PRIORITY); // task.start(); try {Thread.wait(500); }catch ( InterruptedException x ) {} } } ‘ThreadPool’ → ‘RxTaskPool’ ‘setupThread’ → ‘configureTask’ and 8 more.
  • 23. Separating Refactorings 23 public RxTaskPool (int maxTasks, int minTasks, TaskCreator creator) throws Exception { // fill up the pool with worker threads this.maxTasks = maxTasks; this.minTasks = minTasks; this.creator = creator; //for (int i = 0; i < minThreads; i++) { for (int i = 0; i < maxTasks; i++) { //temporary fix for thread hand off problem AbstractRxTask thread = creator.createRxTask(); configureTask(thread); idle.add (thread); } } protected void configureTask(AbstractRxTask task) { Delete 'for-loop' synchronized (task) { task.setTaskPool(this); Comment out // task.setName(task.getClass().getName() + "[" + inc() + "]"); // task.setDaemon(true); Delete 'try&catch' // task.setPriority(Thread.MAX_PRIORITY); // task.start(); try {Thread.wait(500); }catch ( InterruptedException x ) {} } } ‘ThreadPool’ → ‘RxTaskPool’ ‘setupThread’ → ‘configureTask’ and 8 more.
  • 24. 24 Old Old version of source code New version of source code Approach New Source code differences refactoring Old New Old Modified New
  • 25. 25 Overview of the proposed technique New Ver. Separating Comparing
 Old Ver. Refactorings Source Code Inputs Source Code
 Differences
 without Refactoring Ordered List
 of Refactorings Outputs
  • 26. 26 Overview of the proposed technique New Ver. Input 2 Extracting Old Ver. Refactorings Input 1 Ordered List of Refactorings Applying " Modified
 Refactorings Ver. Output 2 Output 1
  • 27. 27 Overview of the proposed technique New Method" Comparing
 Old Package File Class Local Source Code Field Inputs Source Code
 Differences
 without Refactoring Ordered List
 of Refactorings Outputs
  • 28. Supporting tool •  Refactoring Extraction •  Automatical extraction •  External Input •  Refactoring Application •  Automatically apply by using Eclipse Refactoring Browser Extraction Application packages, files, classes, interfaces, Rename all elements enums, methods Move files, methods files, methods 28 Extract - methods
  • 29. Evaluations •  Application on OSS •  Can extracted refactorings be applied? •  Can separating refactorings reduce the amount of source code differences? •  Human Subject Study •  With approach, can subjects understand more changes in the same limited time? •  Does the approach satisfy subjects? 29
  • 30. Evaluation 1 (Application on OSS) •  Target projects •  OW2 Carol 1.0.1-1.8.5 (30 pairs) •  Result •  Tool found refactorings in 5 pairs •  1.0.1–1.3.0, 1.4.0–1.4.2, 1.5.2–1.5.3, 1.5.6–1.5.7, 1.5.8–1.6. •  Refactorings application Found Successfully applied Detected Refactorings 21 18 False 5 2 True 16 16 30 •  → All real refactorings were applied successfully
  • 31. Evaluation 1 •  The amount of source code differences Changed lines WO: without approach 18,721 (100%) A: with approach 14,624 (78.12%) WO - A 4,097 (21.88%)  → Approach reduced more than 21% •  Can extracted refactorings be applied? •  → Yes •  Can separating refactorings reduce the amount of source code differences? 31 •  → Yes
  • 32. Evaluation 2 (Human Subject) •  Procedure •  Let subjects read the source code differences with and without our approach. •  Ask them to answer what was changed between the versions •  Evaluate by time and changes found •  Target Projects •  OW2 Carol 1.5.6-1.5.7 •  Apache Tomcat 6.0.4-6.0.5 32
  • 33. 33 Evaluation 2 •  Subjects Subjects A B C D Carol Approach w/o Approach Approach w/o approach Tomcat w/o Approach Approach w/o Approach Approach •  Result Changes Time Efficiency found (minute) (changes found/ time) w/o Approach 28.3 112.75 0.25 (100%) average Approach 39.25 120 0.33 (132%) •  → Approach made 32% higher efficiency
  • 34. 34 Evaluation 2 •  Questionnaires •  All subjects agreed that our approach is useful •  Especially, renaming class. •  With approach, can subjects understand more changes in the same limited time? •  → Yes •  Does the approach satisfy subjects? •  → Yes
  • 35. Conclusion •  Understanding source code differences by separating refactorings effects •  Separating refactorings •  Implemented supporting tool •  Rename + Move refactorings •  Evaluations •  Approach is applicable to OSS •  Separating refactorings helps understanding differences •  Future Works •  Better tool •  Support more refactoring types 35