Upload
benjamin-bates
View
58
Download
10
Embed Size (px)
DESCRIPTION
JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템. 연광흠 , 김문주 Software Testing & Verification Group (SWTV) CS Dept., KAIST. Motivation: Finding Cause of SW Error is Difficult. Developer s hav e spen t a large amoun t o f time i n debugging. - PowerPoint PPT Presentation
Citation preview
12014-07-29
JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템
연광흠 , 김문주Software Testing & Verification Group
(SWTV)CS Dept., KAIST
0
Motivation: Finding Cause of SW Error is Difficult
• Developers have spent a large amount of time in debugging.• One of the most laborious task of debugging activities is to locate
the cause of failures (i.e., fault), which is called fault localization.
• Research Goal: To develop automated fault location techniques that assist developers effectively locate the cause of program failures (i.e., fault)
Test case #1: assertEquals(3, Example. setMax(3,1))
Test result: pass
Inspectingline by line
public class Example { public int SetMax(int x, int y) {
1: int max ‐= x; // should be ‘max=x;’2: if(max<y){ 3: max = y;4: return max;6: }7: return max;8: } Test result:
fail
== Laborious task
2014-07-29 1/5JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적시스템
0
1: stmt …k: stmt …n: stmt
Key Idea of jMUSE
• Utilize differences between testing result changes of mutating – correct statements– faulty statements
Mutate correct
statement
Mutate faulty statement
...
1: stmt …f: stmt …n: stmt
Test 1Test 2Test 3Test 4Test 5Test 6
: Failed test
: Passed test
What is the mutation?single syntactic code change Ex.: if(a) if(!a) a+b a–b
Test 1Test 2Test 3Test 4Test 5Test 6
Test 1Test 2Test 3Test 4Test 5Test 6
1: stmt …k: stmt …n: stmt
Conjecture 1
Conjecture 2
2014-07-29 2/5JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적시스템
0
jMUSE Overall
Calc. Susp.
Test suite T
Source code of program P
Byte code of Program P
Processing
PITEST
Execution Coverage analysis Mutation
m1
Exec. mn
Stmts. Covered by tests
Test result1
Test resultn
Test result
Exec.
1. Testing the program and analyzing the coverage2. Generating and testing the mutants3. Processing data and calculating suspiciousness using the MUSE metric
Step1
Step2
Step3
Susp.&
Rank
2014-07-29 3/5JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적시스템
0
결과가 좋은 경우
• 41 failing test cases out of 94 test cases (35 array index out of bounds exceptions and 6 null pointer excep-tions)
Faulty statement
• Test cases 를 the golden mutation 에 대해 수행하면 정상적인 프로그램에서 실행했던 것과 같은 test case results 를 얻게 된다 . 따라서 , 모든 failing test cases 가 passing test cases 로 변하기 때문에 높은 suspiciousness 를 얻게 된다 .
jMUSE result: jMUSE generates a golden mutation ‘result[i+namespaces.length]’
The generated mutation 은 the faulty program 이 정상적인 동작을 수행하도록 만든다 .
2014-07-29 4/5JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적시스템
0
결과가 좋지 않은 경우
2014-07-29 5/5
• 2 failing test cases out of 94 test cases (2 assert failed er-rors)
Faulty statement
jMUSE result: jMUSE generates a mutation ‘return null’
• Test cases 를 the generated mutation 에 대해 수행하면 null pointer excep-tion 이 발생하면서 기존 failing test cases 를 포함한 더 많은 test cases 들이 fail하게 된다 .
The generated mutation 은 the faulty program 이 더 많은 error 를 발생하도록 만든다 .
JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적시스템