SlideShare ist ein Scribd-Unternehmen logo
1 von 49
SAFE-COMMIT Analysis to Facilitate
           Team Software Development
           Jan Wloka
           PROLANGS
           Rutgers University




                                        Barbara G. Ryder     Frank Tip       Xiaoxia Ren
                                          Virginia Tech    IBM Research   Rutgers University
© Jan Wloka 2009 All Rights reserved.
Parallel Work on Shared Code

                Problems: Merge conflicts, duplicative work
                   Revision control systems (RCS) detect
                   quot;directquot; merge conflicts
                   Commit policy governs commit process
                                        “Commit early and commit often.”
                                        “Don’t commit compilation or test failures.”




© Jan Wloka 2009 All Rights reserved.                                                  2
Parallel Work on Shared Code

                Problems: Merge conflicts, duplicative work
                   Revision control systems (RCS) detect
                   quot;directquot; merge conflicts
                   Commit policy governs commit process
                                        “Commit early and commit often.”
                                        “Don’t commit compilation or test failures.”
                Problems are still not solved!
                   RCS offer limited conflict detection/resolution
                   Policies are not enforced
                   Policies may be too restrictive

© Jan Wloka 2009 All Rights reserved.                                                  2
Enforceable SAFE-COMMIT Policies

                      Idea: Observe effects on test results to detect unsafe
                      changes, e.g.:
                         Changes affect a failing test
                         Changes affect a worsening test
                         Changes not tested




© Jan Wloka 2009 All Rights reserved.                                          3
Enforceable SAFE-COMMIT Policies

                      Idea: Observe effects on test results to detect unsafe
                      changes, e.g.:
                         Changes affect a failing test
                         Changes affect a worsening test
                         Changes not tested
                      Policies of varying degrees of strictness (intuition)
                         Commit changes that affect only passing tests
                         Commit changes that affect only non-worsening tests
                         Commit changes that don’t degrade test outcomes

© Jan Wloka 2009 All Rights reserved.                                          3
Change Models
                                        [PASTE’01, OOPSLA’04, ICSE’05, TSE’06, ICSE’09]

                      Decompose an edit into 19 distinct atomic changes
                        Reflecting language semantics
                        Are atomic
                      Potential change in dispatch behavior
                        Lookup change: explicit effect on a dispatch entry
                      Inter-dependences between changes
                         Syntactic, structural requirements
                         Cause – effect mapping


© Jan Wloka 2009 All Rights reserved.                                                     4
Explicit Representation of Change
   class A {                                     public class Tests extends TestCase {   Test
     int y;                                        public void test1() {
     int zip(int x) {                                A a = new A();
       this.y = x;                                   a.bar(3);                           test
       x = zap(x);                                   assertEquals(5, a.zip(3));
                                                                                         test
       return x + 2;                               }
                                                   public void test2() {                 test
     }
                                                     A a = new A();
     int zap(int x) { return 2 * x; }                                                    test
                                                     int temp = a.bar(2);
     int foo(int x) { return 2 * x; }
                                                     assertEquals(2, a.foo(temp));       test
     int bar(int x) { return x / 2 ; }             }
     int wiff(int x) { return x; }                 public void test3() {
     int baz(int x) { return x + 1; }                B b = new B();
     int val() { return 2; }                         assertEquals(5, b.waff(5));
   }                                               }
   class B extends A {                             public void test4() {
     int waff(int x) { this.y = x; return x; }       B b = new B();
     int bla(int x) { return 7 + this.val(); }       assertEquals(8, b.bla(5));
     int val() { return 1; }                       }
                                                   public void test5() {
   }
                                                     A a = new B();
                                                     assertEquals(a.baz(1), a.val());
                                                   }
© Jan Wloka 2009 All Rights reserved.            }                                       5
Explicit Representation of Change
                                                 Class
   class A {                                       A     public class Tests extends TestCase {          Test
                                                           Method void test1() Method
                                                           public        Method    {         Method
     int y;
                                                           foo(int) = new A();
                                                              A a        bar(int)  wiff(int) baz(int)
     int zip(int x) {
       this.y = x;                                            a.bar(3);                                 test
       x = zap(x);                                            assertEquals(5, a.zip(3));
                                                                                                        test
       return x + 2;                                       }
                                                           public void test2() {                        test
     }
                                                              A a = new A();
     int zap(int x) { return 2 * x; }                                                                   test
                                                            Field tempMethod
                                                              int         = a.bar(2);
                                                                                   Method    Method
     int foo(int x) { return 2 * x; }
                                                              assertEquals(2, a.foo(temp)); val()
                                                              y          zip(int)    zap()              test
     int bar(int x) { return x / 2 ; }                     }
     int wiff(int x) { return x; }                         public void test3() {
     int baz(int x) { return x + 1; }            Class        B b = new B();
     int val() { return 2; }                       B
                                                              assertEquals(5, b.waff(5));
   }                                                       }
   class B extends A {                                     Method void test4() Method
                                                           public        Method    {
     int waff(int x) { this.y = x; return x; }             waff(int) = new B();
                                                              B b        bla(int)    val()
     int bla(int x) { return 7 + this.val(); }                assertEquals(8, b.bla(5));
     int val() { return 1; }                               }
                                                           public void test5() {
   }
                                                              A a = new B();
                                                              assertEquals(a.baz(1), a.val());
                                                           }
© Jan Wloka 2009 All Rights reserved.                    }                                              5
Explicit Representation of Change
                                                 Class
   class A {                                       A     public class Tests extends TestCase {          Test
                                                           Method void test1() Method
                                                           public        Method    {         Method
     int y;
                                                           foo(int) = new A();
                                                              A a        bar(int)  wiff(int) baz(int)
     int zip(int x) {
       this.y = x;                                            a.bar(3);           AM                    test
       x = zap(x);                                            assertEquals(5, a.zip(3));
                                                                                                        test
       return x + 2;                                       }
                                                           public void test2() {                        test
     }
                                                              A a = new A();
     int zap(int x) { return 2 * x; }                                                                   test
                                                            Field tempMethod
                                                              int         = a.bar(2);
                                                                                   Method    Method
     int foo(int x) { return 2 * x; }
                                                              assertEquals(2, a.foo(temp)); val()
                                                              y          zip(int)    zap()              test
     int bar(int x) { return x / 2 ; }                     }
                                                          AF                      AM
     int wiff(int x) { return x; }                         public void test3() {
     int baz(int x) { return x + 1; }            Class        B b = new B();
     int val() { return 2; }                       B
                                                              assertEquals(5, b.waff(5));
   }                                                       }
   class B extends A {                                     Method void test4() Method
                                                           public        Method    {
     int waff(int x) { this.y = x; return x; }             waff(int) = new B();
                                                              B b        bla(int)    val()
     int bla(int x) { return 7 + this.val(); }                assertEquals(8, b.bla(5));
                                                                                  DM
     int val() { return 1; }                               }
                                                           public void test5() {
   }
                                                              A a = new B();
                                                              assertEquals(a.baz(1), a.val());
                                                           }
© Jan Wloka 2009 All Rights reserved.                    }                                              5
Explicit Representation of Change
                                                 Class
   class A {                                       A     public class Tests extends TestCase {            Test
                                                           Method void test1() Method
                                                           public        Method    {          Method
     int y;
                                                           foo(int) = new A();
                                                              A a        bar(int)   wiff(int)  baz(int)
     int zip(int x) {
                                                          CM a.bar(3);  CM        AM          CM          test
       this.y = x;
                                                                                   CM
                                                              assertEquals(5, a.zip(3));
       x = zap(x);                                                                                        test
       return x + 2;                                       }
                                                           public void test2() {                          test
     }
                                                              A a = new A();
     int zap(int x) { return 2 * x; }                                                                     test
                                                            Field tempMethod
                                                              int         = a.bar(2);
                                                                                   Method     Method
     int foo(int x) { return 2 * x; }
                                                              assertEquals(2, a.foo(temp)); val()
                                                              y          zip(int)    zap()                test
     int bar(int x) { return x / 2 ; }                     }
                                                          AF            CM        AM
     int wiff(int x) { return x; }                         public void test3() CM  {
     int baz(int x) { return x + 1; }            Class        B b = new B();
     int val() { return 2; }                       B
                                                              assertEquals(5, b.waff(5));
   }                                                       }
   class B extends A {                                     Method void test4() Method
                                                           public        Method    {
     int waff(int x) { this.y = x; return x; }             waff(int) = new B();
                                                              B b        bla(int)    val()
     int bla(int x) { return 7 + this.val(); }            CM assertEquals(8, b.bla(5));
                                                                        CM        DM
     int val() { return 1; }                               }
                                                                                   CM
                                                           public void test5() {
   }
                                                              A a = new B();
                                                              assertEquals(a.baz(1), a.val());
                                                           }
© Jan Wloka 2009 All Rights reserved.                    }                                                5
Explicit Representation of Change
                                                 Class
   class A {                                       A     public class Tests extends TestCase {            Test
                                                           Method void test1() Method
                                                           public        Method    {          Method
     int y;
                                                           foo(int) = new A();
                                                              A a        bar(int)   wiff(int)  baz(int)
     int zip(int x) {
                                                          CM a.bar(3);  CM        AM          CM          test
       this.y = x;
                                                                                   CM
                                                              assertEquals(5, a.zip(3));
       x = zap(x);                                                                                        test
       return x + 2;                                       }
                                                           public void test2() {                          test
     }
                                                              A a = new A();
     int zap(int x) { return 2 * x; }                                                                     test
                                                            Field tempMethod
                                                              int         = a.bar(2);
                                                                                   Method     Method
     int foo(int x) { return 2 * x; }
                                                              assertEquals(2, a.foo(temp)); val()
                                                              y          zip(int)    zap()                test
     int bar(int x) { return x / 2 ; }                     }
                                                          AF            CM        AM
     int wiff(int x) { return x; }                         public void test3() CM  {
     int baz(int x) { return x + 1; }            Class        B b = new B();
     int val() { return 2; }                       B
                                                              assertEquals(5, b.waff(5));
   }                                                       }
   class B extends A {                                     Method void test4() Method
                                                           public        Method    {
     int waff(int x) { this.y = x; return x; }             waff(int) = new B();
                                                              B b        bla(int)    val()
     int bla(int x) { return 7 + this.val(); }            CM assertEquals(8, b.bla(5));
                                                                        CM        DM
     int val() { return 1; }                               }
                                                                                   CM
                                                           public void test5() {
   }
                                                              A a = new B();
                                                              assertEquals(a.baz(1), a.val());
                                                           }
© Jan Wloka 2009 All Rights reserved.                    }                                                5
Explicit Representation of Change
                                                 Class
   class A {                                       A     public class Tests extends TestCase {            Test
                                                           Method void test1() Method
                                                           public        Method    {           Method
     int y;
                                                           foo(int) = new A();
                                                              A a        bar(int)   wiff(int)  baz(int)
     int zip(int x) {
                                                          CM a.bar(3);  CM        AM          CM          test
       this.y = x;
                                                                                   CM
                                                              assertEquals(5, a.zip(3));
       x = zap(x);                                                                                        test
                                                           }                       LC
       return x + 2;
                                                           public void test2() {   LC                     test
     }
                                                              A a = new A();
     int zap(int x) { return 2 * x; }                                                                     test
                                                            Field tempMethod
                                                              int         = a.bar(2);
                                                                                   Method      Method
     int foo(int x) { return 2 * x; }
                                                              assertEquals(2, a.foo(temp)); val()
                                                              y          zip(int)    zap()                test
     int bar(int x) { return x / 2 ; }                     }
                                                          AF            CM        AM          LC
     int wiff(int x) { return x; }                         public void test3() CM  {
     int baz(int x) { return x + 1; }            Class        B b = new B();
                                                   B                               LC
     int val() { return 2; }                                  assertEquals(5, b.waff(5));
                                                                                   LC
   }                                                       }
   class B extends A {                                     Method void test4() Method
                                                           public        Method    {
     int waff(int x) { this.y = x; return x; }             waff(int) = new B();
                                                              B b        bla(int)    val()
     int bla(int x) { return 7 + this.val(); }            CM assertEquals(8, b.bla(5));
                                                                        CM        DM
     int val() { return 1; }                               }
                                                                                   CM
                                                           public void test5() {
   }                                                                               LC
                                                              A a = new B();
                                                              assertEquals(a.baz(1), a.val());
                                                           }
© Jan Wloka 2009 All Rights reserved.                    }                                                5
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model   Program Behavior



           AST :: original

                                            P

                            I                       C


                            M                       M



            AST :: edited

                                            P

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model   Program Behavior



           AST :: original

                                            P

                            I                       C

                                                            C
                            M                       M


                                                            M         M
            AST :: edited

                                            P

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model     Program Behavior



           AST :: original

                                            P

                            I                       C
                                                                 AC
                                                            C
                            M                       M

                                                                AM        AM
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                  6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                       6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Determining Effects on Program
           Behavior
                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.                                                                                 6
Classifications of Unsafe Changes

                      Definition Change Coverage: A change c is covered by a
                      test t if
                      (i) c is exercised by t
                      (ii) c depends on c′, c′ is covered by t, or
                      (iii) c′ depends on c , c′ is covered by t.




© Jan Wloka 2009 All Rights reserved.                                         7
Classifications of Unsafe Changes

                      Definition Change Coverage: A change c is covered by a
                      test t if
                      (i) c is exercised by t
                      (ii) c depends on c′, c′ is covered by t, or  Test Outcomes
                                                                     pass → pass
                      (iii) c′ depends on c , c′ is covered by t.     fail → pass
                      Classification of test outcomes                   pass → fail
                                                                        fail → fail
                         Passing: {p→p, f→p, ∅→p}                      ∅ → pass
                         Not worsening: Passing + {f→f, ∅→f}             ∅ → fail
                                                                       pass → ∅
                         Worsening: {p→f}
                                                                         fail → ∅


© Jan Wloka 2009 All Rights reserved.                                                 7
Classifications of Unsafe Changes

                      Definition Change Coverage: A change c is covered by a
                      test t if
                      (i) c is exercised by t
                      (ii) c depends on c′, c′ is covered by t, or  Test Outcomes
                                                                     pass → pass
                      (iii) c′ depends on c , c′ is covered by t.     fail → pass
                      Classification of test outcomes                   pass → fail
                                                                        fail → fail
                         Passing: {p→p, f→p, ∅→p}                      ∅ → pass
                         Not worsening: Passing + {f→f, ∅→f}             ∅ → fail
                                                                       pass → ∅
                         Worsening: {p→f}
                                                                         fail → ∅

            ➾ E.g, c is unsafe, because it’s covered by a worsening test.
© Jan Wloka 2009 All Rights reserved.                                                 7
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));
            }
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }
          }

{        Test Results

                           original         edited
         test1                 !             quot;
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
         test5                 !             !

    © Jan Wloka 2009 All Rights reserved.            8
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));                                 Tests.test1()
            }
                                                                  <A,A.bar()> <A,A.zip()>
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
                                                     A.A()   A.bar()         A.zip()         Assert.assertEquals()
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }
          }                                                                      <A,A.zap()>


{        Test Results                                                                       A.zap()

                           original         edited
         test1                 !             quot;
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
         test5                 !             !

    © Jan Wloka 2009 All Rights reserved.                                                                            8
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));                                                       Tests.test1()
            }
                                                                                        <A,A.bar()> <A,A.zip()>
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
                                                                      A.A()       A.bar()          A.zip()         Assert.assertEquals()
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }                                     CM1            CM2
          }                                                                                            <A,A.zap()>


{        Test Results                                                                                             A.zap()
                                                     CM:B.waff()         AF:A.y
                           original         edited                                                           CM3
                                                                                                             LC1
         test1                 !             quot;
                                                               LC2:<B,A.zap()>           AM1:A.zap()
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
         test5                 !             !

    © Jan Wloka 2009 All Rights reserved.                                                                                                  8
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));                                                       Tests.test1()
            }
                                                                                        <A,A.bar()> <A,A.zip()>
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
                                                                      A.A()       A.bar()          A.zip()         Assert.assertEquals()
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }                                     CM1            CM2
          }                                                                                            <A,A.zap()>


{        Test Results                                                                                             A.zap()
                                                     CM:B.waff()         AF:A.y
                           original         edited                                                           CM3
                                                                                                             LC1
         test1                 !             quot;
                                                               LC2:<B,A.zap()>           AM1:A.zap()
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
         test5                 !             !

    © Jan Wloka 2009 All Rights reserved.                                                                                                  8
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));                                                       Tests.test1()
            }
                                                                                        <A,A.bar()> <A,A.zip()>
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
                                                                      A.A()       A.bar()          A.zip()         Assert.assertEquals()
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }                                     CM1            CM2
          }                                                                                            <A,A.zap()>


{        Test Results                                                                                             A.zap()
                                                     CM:B.waff()         AF:A.y
                           original         edited                                                           CM3
                                                                                                             LC1
         test1                 !             quot;
                                                               LC2:<B,A.zap()>           AM1:A.zap()
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
         test5                 !             !

    © Jan Wloka 2009 All Rights reserved.                                                                                                  8
Preserving Test Behavior
          public class Tests extends TestCase {
            public void test1() {
              A a = new A();
              a.bar(3);
              assertEquals(5, a.zip(3));                                                       Tests.test1()
            }
                                                                                        <A,A.bar()> <A,A.zip()>
            public void test2() { /* ... */ }
            public void test3() { /* ... */ }
                                                                      A.A()       A.bar()          A.zip()         Assert.assertEquals()
            public void test4() { /* ... */ }
            public void test5() { /* ... */ }                                     CM1            CM2
          }                                                                                            <A,A.zap()>


{        Test Results                                                                                             A.zap()
                                                     CM:B.waff()         AF:A.y
                           original         edited                                                           CM3
                                                                                                             LC1
         test1                 !             quot;
                                                               LC2:<B,A.zap()>           AM1:A.zap()
         test2                 !             !
         test3                 !             !
         test4                 !             quot;
                                                                   {CM1, CM2, CM3, LC1, LC2, AM1}
         test5                 !             !                        may affect a worsening test.
    © Jan Wloka 2009 All Rights reserved.                                                                                                  8
SAFE-COMMIT Algorithm                               Sk etch

          Input: CHANGES, EXERCISED(t), COVERED(t), INPUTTESTS
                    Add INPUTTESTS to set PRESERVEDTESTS
                    Step1: Selection of NONCOMMITTABLE
                       Find changes in EXERCISED(t)
                       Find changes in DEPENDENCES(c)
                    Step2: Selection of new PRESERVEDTESTS
                       Find tests t : COVERED(t) contains c in NONCOMMITTABLE
                    COMMITTABLE= CHANGES  (NONCOMMITTABLE ∪ UNCOVERED)
          Output: COMMITTABLE, PRESERVEDTESTS

© Jan Wloka 2009 All Rights reserved.                                           9
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
SAFE-COMMIT Example Run
   Example: Find all successfully tested changes.
                          AM:A.zap()            LC:<A, A.zap()>       CM:A.bar()            CM:A.foo()




                                        CM:A.zap           test1()          test2()               test3()



                     LC:<B, A.zap()>      CM:A.zip()                        AF:A.y                                CM:B.waff()



                                                                                   DM:B.val()                                   LC:<B, A.val()>
                                             CM:A.wiff()



                          AM:B.wiff()        LC:<A, A.wiff()>        CM:B.bla()       LC:<[B, B.val()>        CM:B.val()

                                                                                                                                CM:A.baz()
                                             LC:<B, A.wiff()>
                                                                                  test4()                   test5()




© Jan Wloka 2009 All Rights reserved.                                                                                                             10
Modeling Commit Policies

                      RESTRICTIVE: “Covered by passing tests only”
                        Tight control of commits
                        E.g., major release is imminent
                      MODERATE: “Covered by non-worsening tests only”
                        Tested changes, that don't degrade test outcomes
                        E.g., for test-first methodologies
                      PERMISSIVE: “Not covered by a worsening test”
                        Moderate Policy + untested changes
                        E.g., for technology prototypes

© Jan Wloka 2009 All Rights reserved.                                      11
Experiments
                      Goal: Set of committable changes is significant!
                        Bi-weekly repository snapshots of Daikon
                        Six pairs with failling tests
                                        Daikon
                                           Version Avg    p1     p2     p3     p4    p5     p6
                                         Changes          1751   274    1485   614   302    6050
                                          Covered         1013    5     1225   20    130    185
                         Restrictive      Total %   4.6   6.3    1.5    1.8    1.0   16.6   0.5
                            Moderate      Total % 31.4    57.9   1.5    82.5   3.3   43.0   0.5
                        Permissive        Total % 99.5    100    99.6   100    100   100    97.4



© Jan Wloka 2009 All Rights reserved.                                                              12
Experiments
                      Goal: Set of committable changes is significant!
                        Bi-weekly repository snapshots of Daikon
                        Six pairs with failling tests
                                        Daikon
                                           Version Avg      p1     p2     p3     p4     p5     p6
                                         Changes            1751   274    1485   614    302    6050
                                          Covered           1013    5     1225   20     130    185
                                            Total %   4.6   6.3    1.5    1.8    1.0    16.6   0.5
                         Restrictive
                                        Covered % 29.4      11.0   80.0   2.1    30.0   38.5   15.1
                                            Total % 31.4    57.9   1.5    82.5   3.3    43.0   0.5
                             Moderate
                                        Covered % 82.5      100    80.0   100    100    100    15.1
                         Permissive         Total % 99.5    100    99.6   100    100    100    97.4

© Jan Wloka 2009 All Rights reserved.                                                                 12
Related Work

                      Revision Control, Software Merging
                        No indirect merge conflicts, manual resolution
                        SAFE-COMMIT semantic detection w/ behavior in tests
                      Workspace Awareness Tools
                        Palantír, Hipicat, Jazz detect conflicts or similarities
                        SAFE-COMMIT prevents premature change releases
                      Continuous Integration
                        Automatic builds w/ testing to detect conflicts early
                        SAFE-COMMIT enables partial but safe commits

© Jan Wloka 2009 All Rights reserved.                                             13
Conclusions and Future Work

                      SAFE-COMMIT can reduce risk of duplicative work and
                      merge conflicts:
                        Compute safely committable changes
                        Policies of varying strictness using test outcomes
                        Commit policies can be enforced automatically
                        Experiments committed significant #changes
                      Future directions
                         Change-centric test development/generation
                         Automated resolution of merge conflicts

© Jan Wloka 2009 All Rights reserved.                                        14

Weitere ähnliche Inhalte

Andere mochten auch

Personalising Your Internet V2
Personalising Your Internet V2Personalising Your Internet V2
Personalising Your Internet V2Peng Hui Lee
 
Super Over Presentation
Super Over PresentationSuper Over Presentation
Super Over PresentationMuhammad Raza
 
Effectively Automate and Enforce Process Rules and Tasks when Delivering Changes
Effectively Automate and Enforce Process Rules and Tasks when Delivering ChangesEffectively Automate and Enforce Process Rules and Tasks when Delivering Changes
Effectively Automate and Enforce Process Rules and Tasks when Delivering ChangesJan Wloka
 
PERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENTPERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENTvshalini
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEMJan Wloka
 
Introduction To Reference Final Project
Introduction To Reference   Final ProjectIntroduction To Reference   Final Project
Introduction To Reference Final Projectwit10born
 
Colonography Gp Talk 2 Sept 2008
Colonography Gp Talk 2 Sept 2008Colonography Gp Talk 2 Sept 2008
Colonography Gp Talk 2 Sept 2008Peng Hui Lee
 
Outcome of imaging investigations in patients with iron deficiency anaemia
Outcome of imaging investigations in patients with iron deficiency anaemiaOutcome of imaging investigations in patients with iron deficiency anaemia
Outcome of imaging investigations in patients with iron deficiency anaemiaPeng Hui Lee
 

Andere mochten auch (8)

Personalising Your Internet V2
Personalising Your Internet V2Personalising Your Internet V2
Personalising Your Internet V2
 
Super Over Presentation
Super Over PresentationSuper Over Presentation
Super Over Presentation
 
Effectively Automate and Enforce Process Rules and Tasks when Delivering Changes
Effectively Automate and Enforce Process Rules and Tasks when Delivering ChangesEffectively Automate and Enforce Process Rules and Tasks when Delivering Changes
Effectively Automate and Enforce Process Rules and Tasks when Delivering Changes
 
PERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENTPERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENT
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEM
 
Introduction To Reference Final Project
Introduction To Reference   Final ProjectIntroduction To Reference   Final Project
Introduction To Reference Final Project
 
Colonography Gp Talk 2 Sept 2008
Colonography Gp Talk 2 Sept 2008Colonography Gp Talk 2 Sept 2008
Colonography Gp Talk 2 Sept 2008
 
Outcome of imaging investigations in patients with iron deficiency anaemia
Outcome of imaging investigations in patients with iron deficiency anaemiaOutcome of imaging investigations in patients with iron deficiency anaemia
Outcome of imaging investigations in patients with iron deficiency anaemia
 

Ähnlich wie Safe-Commit Analysis to Facilitate Team Software Development

Mutation testing
Mutation testingMutation testing
Mutation testing기영 이
 
Unit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran JanardhanaUnit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran JanardhanaRavikiran J
 
White Box Testing (Introduction to)
White Box Testing (Introduction to)White Box Testing (Introduction to)
White Box Testing (Introduction to)Henry Muccini
 
Example First / A Sane Test-Driven Approach to Programming
Example First / A Sane Test-Driven Approach to ProgrammingExample First / A Sane Test-Driven Approach to Programming
Example First / A Sane Test-Driven Approach to ProgrammingJonathan Acker
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testingdavidmus
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Will Shen
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Формальная верификация как средство тестирования (в Java)
Формальная верификация как средство тестирования (в Java)Формальная верификация как средство тестирования (в Java)
Формальная верификация как средство тестирования (в Java)SQALab
 
QM-013-DOE Introduction
QM-013-DOE IntroductionQM-013-DOE Introduction
QM-013-DOE Introductionhandbook
 
J unit스터디슬라이드
J unit스터디슬라이드J unit스터디슬라이드
J unit스터디슬라이드ksain
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test frameworkAbner Chih Yi Huang
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia岳華 杜
 
System Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSystem Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSubash John
 
Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Oliver Klee
 

Ähnlich wie Safe-Commit Analysis to Facilitate Team Software Development (20)

Mutation testing
Mutation testingMutation testing
Mutation testing
 
Unit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran JanardhanaUnit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran Janardhana
 
White Box Testing (Introduction to)
White Box Testing (Introduction to)White Box Testing (Introduction to)
White Box Testing (Introduction to)
 
Example First / A Sane Test-Driven Approach to Programming
Example First / A Sane Test-Driven Approach to ProgrammingExample First / A Sane Test-Driven Approach to Programming
Example First / A Sane Test-Driven Approach to Programming
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testing
 
Junit 4.0
Junit 4.0Junit 4.0
Junit 4.0
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)
 
sample_midterm.pdf
sample_midterm.pdfsample_midterm.pdf
sample_midterm.pdf
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
Формальная верификация как средство тестирования (в Java)
Формальная верификация как средство тестирования (в Java)Формальная верификация как средство тестирования (в Java)
Формальная верификация как средство тестирования (в Java)
 
Introduction to JUnit
Introduction to JUnitIntroduction to JUnit
Introduction to JUnit
 
Unit testing 101
Unit testing 101Unit testing 101
Unit testing 101
 
QM-013-DOE Introduction
QM-013-DOE IntroductionQM-013-DOE Introduction
QM-013-DOE Introduction
 
J unit스터디슬라이드
J unit스터디슬라이드J unit스터디슬라이드
J unit스터디슬라이드
 
JUnit
JUnitJUnit
JUnit
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test framework
 
TestNG vs Junit
TestNG vs JunitTestNG vs Junit
TestNG vs Junit
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia
 
System Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSystem Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancements
 
Test-Driven Development for TYPO3
Test-Driven Development for TYPO3Test-Driven Development for TYPO3
Test-Driven Development for TYPO3
 

Kürzlich hochgeladen

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Safe-Commit Analysis to Facilitate Team Software Development

  • 1. SAFE-COMMIT Analysis to Facilitate Team Software Development Jan Wloka PROLANGS Rutgers University Barbara G. Ryder Frank Tip Xiaoxia Ren Virginia Tech IBM Research Rutgers University © Jan Wloka 2009 All Rights reserved.
  • 2. Parallel Work on Shared Code Problems: Merge conflicts, duplicative work Revision control systems (RCS) detect quot;directquot; merge conflicts Commit policy governs commit process “Commit early and commit often.” “Don’t commit compilation or test failures.” © Jan Wloka 2009 All Rights reserved. 2
  • 3. Parallel Work on Shared Code Problems: Merge conflicts, duplicative work Revision control systems (RCS) detect quot;directquot; merge conflicts Commit policy governs commit process “Commit early and commit often.” “Don’t commit compilation or test failures.” Problems are still not solved! RCS offer limited conflict detection/resolution Policies are not enforced Policies may be too restrictive © Jan Wloka 2009 All Rights reserved. 2
  • 4. Enforceable SAFE-COMMIT Policies Idea: Observe effects on test results to detect unsafe changes, e.g.: Changes affect a failing test Changes affect a worsening test Changes not tested © Jan Wloka 2009 All Rights reserved. 3
  • 5. Enforceable SAFE-COMMIT Policies Idea: Observe effects on test results to detect unsafe changes, e.g.: Changes affect a failing test Changes affect a worsening test Changes not tested Policies of varying degrees of strictness (intuition) Commit changes that affect only passing tests Commit changes that affect only non-worsening tests Commit changes that don’t degrade test outcomes © Jan Wloka 2009 All Rights reserved. 3
  • 6. Change Models [PASTE’01, OOPSLA’04, ICSE’05, TSE’06, ICSE’09] Decompose an edit into 19 distinct atomic changes Reflecting language semantics Are atomic Potential change in dispatch behavior Lookup change: explicit effect on a dispatch entry Inter-dependences between changes Syntactic, structural requirements Cause – effect mapping © Jan Wloka 2009 All Rights reserved. 4
  • 7. Explicit Representation of Change class A { public class Tests extends TestCase { Test int y; public void test1() { int zip(int x) { A a = new A(); this.y = x; a.bar(3); test x = zap(x); assertEquals(5, a.zip(3)); test return x + 2; } public void test2() { test } A a = new A(); int zap(int x) { return 2 * x; } test int temp = a.bar(2); int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); test int bar(int x) { return x / 2 ; } } int wiff(int x) { return x; } public void test3() { int baz(int x) { return x + 1; } B b = new B(); int val() { return 2; } assertEquals(5, b.waff(5)); } } class B extends A { public void test4() { int waff(int x) { this.y = x; return x; } B b = new B(); int bla(int x) { return 7 + this.val(); } assertEquals(8, b.bla(5)); int val() { return 1; } } public void test5() { } A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 8. Explicit Representation of Change Class class A { A public class Tests extends TestCase { Test Method void test1() Method public Method { Method int y; foo(int) = new A(); A a bar(int) wiff(int) baz(int) int zip(int x) { this.y = x; a.bar(3); test x = zap(x); assertEquals(5, a.zip(3)); test return x + 2; } public void test2() { test } A a = new A(); int zap(int x) { return 2 * x; } test Field tempMethod int = a.bar(2); Method Method int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); val() y zip(int) zap() test int bar(int x) { return x / 2 ; } } int wiff(int x) { return x; } public void test3() { int baz(int x) { return x + 1; } Class B b = new B(); int val() { return 2; } B assertEquals(5, b.waff(5)); } } class B extends A { Method void test4() Method public Method { int waff(int x) { this.y = x; return x; } waff(int) = new B(); B b bla(int) val() int bla(int x) { return 7 + this.val(); } assertEquals(8, b.bla(5)); int val() { return 1; } } public void test5() { } A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 9. Explicit Representation of Change Class class A { A public class Tests extends TestCase { Test Method void test1() Method public Method { Method int y; foo(int) = new A(); A a bar(int) wiff(int) baz(int) int zip(int x) { this.y = x; a.bar(3); AM test x = zap(x); assertEquals(5, a.zip(3)); test return x + 2; } public void test2() { test } A a = new A(); int zap(int x) { return 2 * x; } test Field tempMethod int = a.bar(2); Method Method int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); val() y zip(int) zap() test int bar(int x) { return x / 2 ; } } AF AM int wiff(int x) { return x; } public void test3() { int baz(int x) { return x + 1; } Class B b = new B(); int val() { return 2; } B assertEquals(5, b.waff(5)); } } class B extends A { Method void test4() Method public Method { int waff(int x) { this.y = x; return x; } waff(int) = new B(); B b bla(int) val() int bla(int x) { return 7 + this.val(); } assertEquals(8, b.bla(5)); DM int val() { return 1; } } public void test5() { } A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 10. Explicit Representation of Change Class class A { A public class Tests extends TestCase { Test Method void test1() Method public Method { Method int y; foo(int) = new A(); A a bar(int) wiff(int) baz(int) int zip(int x) { CM a.bar(3); CM AM CM test this.y = x; CM assertEquals(5, a.zip(3)); x = zap(x); test return x + 2; } public void test2() { test } A a = new A(); int zap(int x) { return 2 * x; } test Field tempMethod int = a.bar(2); Method Method int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); val() y zip(int) zap() test int bar(int x) { return x / 2 ; } } AF CM AM int wiff(int x) { return x; } public void test3() CM { int baz(int x) { return x + 1; } Class B b = new B(); int val() { return 2; } B assertEquals(5, b.waff(5)); } } class B extends A { Method void test4() Method public Method { int waff(int x) { this.y = x; return x; } waff(int) = new B(); B b bla(int) val() int bla(int x) { return 7 + this.val(); } CM assertEquals(8, b.bla(5)); CM DM int val() { return 1; } } CM public void test5() { } A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 11. Explicit Representation of Change Class class A { A public class Tests extends TestCase { Test Method void test1() Method public Method { Method int y; foo(int) = new A(); A a bar(int) wiff(int) baz(int) int zip(int x) { CM a.bar(3); CM AM CM test this.y = x; CM assertEquals(5, a.zip(3)); x = zap(x); test return x + 2; } public void test2() { test } A a = new A(); int zap(int x) { return 2 * x; } test Field tempMethod int = a.bar(2); Method Method int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); val() y zip(int) zap() test int bar(int x) { return x / 2 ; } } AF CM AM int wiff(int x) { return x; } public void test3() CM { int baz(int x) { return x + 1; } Class B b = new B(); int val() { return 2; } B assertEquals(5, b.waff(5)); } } class B extends A { Method void test4() Method public Method { int waff(int x) { this.y = x; return x; } waff(int) = new B(); B b bla(int) val() int bla(int x) { return 7 + this.val(); } CM assertEquals(8, b.bla(5)); CM DM int val() { return 1; } } CM public void test5() { } A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 12. Explicit Representation of Change Class class A { A public class Tests extends TestCase { Test Method void test1() Method public Method { Method int y; foo(int) = new A(); A a bar(int) wiff(int) baz(int) int zip(int x) { CM a.bar(3); CM AM CM test this.y = x; CM assertEquals(5, a.zip(3)); x = zap(x); test } LC return x + 2; public void test2() { LC test } A a = new A(); int zap(int x) { return 2 * x; } test Field tempMethod int = a.bar(2); Method Method int foo(int x) { return 2 * x; } assertEquals(2, a.foo(temp)); val() y zip(int) zap() test int bar(int x) { return x / 2 ; } } AF CM AM LC int wiff(int x) { return x; } public void test3() CM { int baz(int x) { return x + 1; } Class B b = new B(); B LC int val() { return 2; } assertEquals(5, b.waff(5)); LC } } class B extends A { Method void test4() Method public Method { int waff(int x) { this.y = x; return x; } waff(int) = new B(); B b bla(int) val() int bla(int x) { return 7 + this.val(); } CM assertEquals(8, b.bla(5)); CM DM int val() { return 1; } } CM public void test5() { } LC A a = new B(); assertEquals(a.baz(1), a.val()); } © Jan Wloka 2009 All Rights reserved. } 5
  • 13. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original P I C M M AST :: edited P I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 14. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original P I C C M M M M AST :: edited P I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 15. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original P I C AC C M M AM AM M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 16. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC P LC I C AC C M M LC AM AM M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 17. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 18. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 19. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 20. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 21. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 22. Determining Effects on Program Behavior Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved. 6
  • 23. Classifications of Unsafe Changes Definition Change Coverage: A change c is covered by a test t if (i) c is exercised by t (ii) c depends on c′, c′ is covered by t, or (iii) c′ depends on c , c′ is covered by t. © Jan Wloka 2009 All Rights reserved. 7
  • 24. Classifications of Unsafe Changes Definition Change Coverage: A change c is covered by a test t if (i) c is exercised by t (ii) c depends on c′, c′ is covered by t, or Test Outcomes pass → pass (iii) c′ depends on c , c′ is covered by t. fail → pass Classification of test outcomes pass → fail fail → fail Passing: {p→p, f→p, ∅→p} ∅ → pass Not worsening: Passing + {f→f, ∅→f} ∅ → fail pass → ∅ Worsening: {p→f} fail → ∅ © Jan Wloka 2009 All Rights reserved. 7
  • 25. Classifications of Unsafe Changes Definition Change Coverage: A change c is covered by a test t if (i) c is exercised by t (ii) c depends on c′, c′ is covered by t, or Test Outcomes pass → pass (iii) c′ depends on c , c′ is covered by t. fail → pass Classification of test outcomes pass → fail fail → fail Passing: {p→p, f→p, ∅→p} ∅ → pass Not worsening: Passing + {f→f, ∅→f} ∅ → fail pass → ∅ Worsening: {p→f} fail → ∅ ➾ E.g, c is unsafe, because it’s covered by a worsening test. © Jan Wloka 2009 All Rights reserved. 7
  • 26. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); } public void test2() { /* ... */ } public void test3() { /* ... */ } public void test4() { /* ... */ } public void test5() { /* ... */ } } { Test Results original edited test1 ! quot; test2 ! ! test3 ! ! test4 ! quot; test5 ! ! © Jan Wloka 2009 All Rights reserved. 8
  • 27. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); Tests.test1() } <A,A.bar()> <A,A.zip()> public void test2() { /* ... */ } public void test3() { /* ... */ } A.A() A.bar() A.zip() Assert.assertEquals() public void test4() { /* ... */ } public void test5() { /* ... */ } } <A,A.zap()> { Test Results A.zap() original edited test1 ! quot; test2 ! ! test3 ! ! test4 ! quot; test5 ! ! © Jan Wloka 2009 All Rights reserved. 8
  • 28. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); Tests.test1() } <A,A.bar()> <A,A.zip()> public void test2() { /* ... */ } public void test3() { /* ... */ } A.A() A.bar() A.zip() Assert.assertEquals() public void test4() { /* ... */ } public void test5() { /* ... */ } CM1 CM2 } <A,A.zap()> { Test Results A.zap() CM:B.waff() AF:A.y original edited CM3 LC1 test1 ! quot; LC2:<B,A.zap()> AM1:A.zap() test2 ! ! test3 ! ! test4 ! quot; test5 ! ! © Jan Wloka 2009 All Rights reserved. 8
  • 29. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); Tests.test1() } <A,A.bar()> <A,A.zip()> public void test2() { /* ... */ } public void test3() { /* ... */ } A.A() A.bar() A.zip() Assert.assertEquals() public void test4() { /* ... */ } public void test5() { /* ... */ } CM1 CM2 } <A,A.zap()> { Test Results A.zap() CM:B.waff() AF:A.y original edited CM3 LC1 test1 ! quot; LC2:<B,A.zap()> AM1:A.zap() test2 ! ! test3 ! ! test4 ! quot; test5 ! ! © Jan Wloka 2009 All Rights reserved. 8
  • 30. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); Tests.test1() } <A,A.bar()> <A,A.zip()> public void test2() { /* ... */ } public void test3() { /* ... */ } A.A() A.bar() A.zip() Assert.assertEquals() public void test4() { /* ... */ } public void test5() { /* ... */ } CM1 CM2 } <A,A.zap()> { Test Results A.zap() CM:B.waff() AF:A.y original edited CM3 LC1 test1 ! quot; LC2:<B,A.zap()> AM1:A.zap() test2 ! ! test3 ! ! test4 ! quot; test5 ! ! © Jan Wloka 2009 All Rights reserved. 8
  • 31. Preserving Test Behavior public class Tests extends TestCase { public void test1() { A a = new A(); a.bar(3); assertEquals(5, a.zip(3)); Tests.test1() } <A,A.bar()> <A,A.zip()> public void test2() { /* ... */ } public void test3() { /* ... */ } A.A() A.bar() A.zip() Assert.assertEquals() public void test4() { /* ... */ } public void test5() { /* ... */ } CM1 CM2 } <A,A.zap()> { Test Results A.zap() CM:B.waff() AF:A.y original edited CM3 LC1 test1 ! quot; LC2:<B,A.zap()> AM1:A.zap() test2 ! ! test3 ! ! test4 ! quot; {CM1, CM2, CM3, LC1, LC2, AM1} test5 ! ! may affect a worsening test. © Jan Wloka 2009 All Rights reserved. 8
  • 32. SAFE-COMMIT Algorithm Sk etch Input: CHANGES, EXERCISED(t), COVERED(t), INPUTTESTS Add INPUTTESTS to set PRESERVEDTESTS Step1: Selection of NONCOMMITTABLE Find changes in EXERCISED(t) Find changes in DEPENDENCES(c) Step2: Selection of new PRESERVEDTESTS Find tests t : COVERED(t) contains c in NONCOMMITTABLE COMMITTABLE= CHANGES (NONCOMMITTABLE ∪ UNCOVERED) Output: COMMITTABLE, PRESERVEDTESTS © Jan Wloka 2009 All Rights reserved. 9
  • 33. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 34. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 35. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 36. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 37. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 38. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 39. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 40. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 41. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 42. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 43. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 44. SAFE-COMMIT Example Run Example: Find all successfully tested changes. AM:A.zap() LC:<A, A.zap()> CM:A.bar() CM:A.foo() CM:A.zap test1() test2() test3() LC:<B, A.zap()> CM:A.zip() AF:A.y CM:B.waff() DM:B.val() LC:<B, A.val()> CM:A.wiff() AM:B.wiff() LC:<A, A.wiff()> CM:B.bla() LC:<[B, B.val()> CM:B.val() CM:A.baz() LC:<B, A.wiff()> test4() test5() © Jan Wloka 2009 All Rights reserved. 10
  • 45. Modeling Commit Policies RESTRICTIVE: “Covered by passing tests only” Tight control of commits E.g., major release is imminent MODERATE: “Covered by non-worsening tests only” Tested changes, that don't degrade test outcomes E.g., for test-first methodologies PERMISSIVE: “Not covered by a worsening test” Moderate Policy + untested changes E.g., for technology prototypes © Jan Wloka 2009 All Rights reserved. 11
  • 46. Experiments Goal: Set of committable changes is significant! Bi-weekly repository snapshots of Daikon Six pairs with failling tests Daikon Version Avg p1 p2 p3 p4 p5 p6 Changes 1751 274 1485 614 302 6050 Covered 1013 5 1225 20 130 185 Restrictive Total % 4.6 6.3 1.5 1.8 1.0 16.6 0.5 Moderate Total % 31.4 57.9 1.5 82.5 3.3 43.0 0.5 Permissive Total % 99.5 100 99.6 100 100 100 97.4 © Jan Wloka 2009 All Rights reserved. 12
  • 47. Experiments Goal: Set of committable changes is significant! Bi-weekly repository snapshots of Daikon Six pairs with failling tests Daikon Version Avg p1 p2 p3 p4 p5 p6 Changes 1751 274 1485 614 302 6050 Covered 1013 5 1225 20 130 185 Total % 4.6 6.3 1.5 1.8 1.0 16.6 0.5 Restrictive Covered % 29.4 11.0 80.0 2.1 30.0 38.5 15.1 Total % 31.4 57.9 1.5 82.5 3.3 43.0 0.5 Moderate Covered % 82.5 100 80.0 100 100 100 15.1 Permissive Total % 99.5 100 99.6 100 100 100 97.4 © Jan Wloka 2009 All Rights reserved. 12
  • 48. Related Work Revision Control, Software Merging No indirect merge conflicts, manual resolution SAFE-COMMIT semantic detection w/ behavior in tests Workspace Awareness Tools Palantír, Hipicat, Jazz detect conflicts or similarities SAFE-COMMIT prevents premature change releases Continuous Integration Automatic builds w/ testing to detect conflicts early SAFE-COMMIT enables partial but safe commits © Jan Wloka 2009 All Rights reserved. 13
  • 49. Conclusions and Future Work SAFE-COMMIT can reduce risk of duplicative work and merge conflicts: Compute safely committable changes Policies of varying strictness using test outcomes Commit policies can be enforced automatically Experiments committed significant #changes Future directions Change-centric test development/generation Automated resolution of merge conflicts © Jan Wloka 2009 All Rights reserved. 14