SlideShare una empresa de Scribd logo
1 de 59
Improving Software Reliability
via Mining Software Engineering Data
Tao Xie
Department of Computer Science
North Carolina State University
Raleigh, USA
http://www.csc.ncsu.edu/faculty/xie
Joint work with Suresh Thummalapenta
2
MAIN GOAL

Transform static record-
keeping SE data to active
data

Make SE data actionable
by uncovering hidden
patterns and trends
Mining Software Engineering Data
MailingsBugzilla
Code
repository
Execution
traces
CVS
Mining Software Engineering Data
code
bases
change
history
program
states
structural
entities
software engineering data
bug
reports/nl
programming defect detection testing debugging maintenance
software engineering tasks
data mining techniques
…
…
https://sites.google.com/site/asergrp/dmse
Mining Software Engineering Data
code
bases
change
history
program
states
structural
entities
software engineering data
bug
reports/nl
programming defect detection testing debugging maintenance
software engineering tasks
data mining techniques
…
…
5
5

Programmers commonly reuse APIs of existing
frameworks or libraries
–
Advantages: High productivity of development
–
Challenges: Complexity and lack of documentation
–
Consequences:
•
Spend more efforts in understanding APIs
•
Introduce defects in API client code
–
Solution: Mining API properties as common patterns
across API client code Frame
works
Motivation
6
Basic
mining
algorithms
Solution-Driven Problem-Driven
Advanced
mining
algorithms
New/adapted
mining
algorithms
Where can I apply X miner? What patterns do
we really need?
E.g., frequent partial order
mining [ESEC/FSE 07]
E.g., association rule mining,
frequent itemset mining…
E.g., [ICSE 09], [ASE 09]
7
7
7
Code repositoriesCode repositories
1 2 N…
1 2
mining patterns
searching mining patterns
Code search engine
e.g.,
Open source code
on the web
Eclipse, Linux, …
Traditional approaches
Our new approaches
Often lack sufficient relevant data points (Eg. API call sites)
Code repositories
Mining  Searching + Mining
8
Agenda

Motivation

Mining Sequence Association Rules
(CAR-Miner) [ICSE 09]

Detecting Exception-Handling Defects

Mining Alternative Patterns
(Alattin) [ASE 09]

Detecting Neglected Condition Defects

Conclusion
9

APIs throw exceptions during runtime errors
Example: Session API of Hibernate framework throws
HibernateException

APIs expect client applications to implement
recovery actions after exceptions occur
Example: Hibernate Session API expects client application to
rollback open uncommitted transactions after
HibernateException occurs

Failure to handle exceptions results in
Fatal issues, e.g., database lock won’t be released if the
transaction is not rolled back
Exception Handling
10

Use exception-handling specification to detect
violations as defects

Problem: Often specifications are not documented

Solution: Mine specifications from existing API client code

Challenges:

Limited data points: Only from a few code bases 
searching + mining

Limited expressiveness: Not sufficient to characterize
common exception-handling behaviors: why?
Problem Addressed by CAR-Miner
11
Example
1 .1 : ...
1 .2 : O r a c le D a ta S o u rc e o d s = n u ll; S e s s io n s e s s io n = n u ll;
C o n n e c tio n c o n n = n u ll; S ta te m e n t s ta te m e n t = n u ll;
1 .3 : lo g g e r .d e b u g (" S ta rtin g u p d a te " );
1 .4 : tr y {
1 .5 : o d s = n e w O ra c le D a ta S o u rc e ( );
1 .6 : o d s .s e tU R L ( " jd b c :o r a c le :th in :s c o tt/tig e r @ 1 9 2 .1 6 8 .1 .2 :1 5 2 1 :c a tfis h " ) ;
1 .7 : c o n n = o d s .g e tC o n n e c tio n () ;
1 .8 : s t a te m e n t = c o n n .c r e a te S ta te m e n t( );
1 .9 : s t a te m e n t .e x e c u t e U p d a te ( " D E L E T E F R O M t a b le 1 " ) ;
1 .1 0 : c o n n e c tio n .c o m m it() ; }
1 .1 1 : c a tc h ( S Q L E x c e p tio n s e ) {
1 .1 3 : lo g g e r .e rr o r (" E x c e p tio n o c c u r re d " ); }
1 .1 4 : fin a lly {
1 .1 5 : if(s ta te m e n t != n u ll) { s ta te m e n t.c lo s e () ; }
1 .1 6 : if(c o n n != n u ll) { c o n n .c lo s e ( ); }
1 .1 7 : if(o d s != n u ll) { o d s .c lo s e () ; } }
1 .1 8 : }
S c e n a r io 1

Defect: No rollback done
when SQLException occurs

Requires specification such
as “Connection should be
rolled back when a
connection is created and
SQLException occurs”

Q: Should every connection
instance has to be rolled
back when SQLException
occurs?
Missing “conn.rollback()”
12
Example (cont.)
2 .1 : C o n n e c tio n c o n n = n u ll;
2 .2 : S ta te m e n t s tm t = n u ll;
2 .3 : B u ffe re d W rite r b w = n u ll; F ile W rite r fw = n u ll;
2 .3 : tr y {
2 .4 : fw = n e w F il e W rite r( " o u tp u t.tx t") ;
2 .5 : b w = B u ffe r e d W r ite r(fw );
2 .6 : c o n n = D riv e r M a n a g e r.g e tC o n n e c tio n (" jd b c :p l:d b " , " p s " , " p s " );
2 .7 : S ta t e m e n t s t m t = c o n n .c r e a t e S ta te m e n t( );
2 .8 : R e s u ltS e t r e s = s tm t.e x e c u te Q u e r y ( " S E L E C T P a th F R O M F ile s " ) ;
2 .9 : w h ile (r e s .n e x t() ) {
2 .1 0 : b w .w r ite (r e s .g e tS trin g (1 ));
2 .1 1 : }
2 .1 2 : re s .c lo s e ( );
2 .1 3 : } c a tc h ( IO E x c e p tio n e x ) { lo g g e r.e r ro r (" IO E x c e p tio n o c c u r re d " );
2 .1 4 : } fin a lly {
2 .1 5 : if( s tm t != n u ll) s tm t.c lo s e () ;
2 .1 6 : if( c o n n != n u ll ) c o n n .c lo s e ( );
2 .1 7 : if ( b w != n u ll) b w .c lo s e ( );
2 .1 8 : }
1 .1 : ...
1 .2 : O r a c le D a ta S o u rc e o d s = n u ll; S e s s io n s e s s io n = n u ll;
C o n n e c tio n c o n n = n u ll; S ta te m e n t s ta te m e n t = n u ll;
1 .3 : lo g g e r .d e b u g (" S ta rtin g u p d a te " );
1 .4 : tr y {
1 .5 : o d s = n e w O ra c le D a ta S o u rc e ( );
1 .6 : o d s .s e tU R L ( " jd b c :o r a c le :th in :s c o tt/tig e r @ 1 9 2 .1 6 8 .1 .2 :1 5 2 1 :c a tfis h " );
1 .7 : c o n n = o d s .g e tC o n n e c tio n () ;
1 .8 : s t a te m e n t = c o n n .c r e a te S ta te m e n t( );
1 .9 : s t a te m e n t .e x e c u t e U p d a te ( " D E L E T E F R O M t a b le 1 " ) ;
1 .1 0 : c o n n e c tio n .c o m m it() ; }
1 .1 1 : c a tc h ( S Q L E x c e p tio n s e ) {
1 .1 2 : if ( c o n n != n u ll) { c o n n .ro llb a c k () ; }
1 .1 3 : lo g g e r .e rr o r (" E x c e p tio n o c c u r re d " ); }
1 .1 4 : fin a lly {
1 .1 5 : if(s ta te m e n t != n u ll) { s ta te m e n t.c lo s e () ; }
1 .1 6 : if(c o n n != n u ll) { c o n n .c lo s e ( ); }
1 .1 7 : if(o d s != n u ll) { o d s .c lo s e () ; } }
1 .1 8 : }
S c e n a rio 2S c e n a r io 1
Specification: “Connection creation => Connection rollback”

Satisfied by Scenario 1 but not by Scenario 2

But Scenario 2 has no defect
c
13

Simple association rules of the form “FCa => FCe” are
not expressive

Requires more general association rules (sequence
association rules) such as
(FCc1 FCc2) Λ FCa => FCe1, where
FCc1 -> Connection conn = OracleDataSource.getConnection()
FCc2 -> Statement stmt = Connection.createStatement()
FCa -> stmt.executeUpdate()
FCe1 -> conn.rollback()
Example (cont.)
14

Simple association rules of the form “FCa => FCe” are
not expressive

Requires more general association rules (sequence
association rules) such as
(FCc1 FCc2) Λ FCa => FCe1, where
FCc1 -> Connection conn = OracleDataSource.getConnection()
FCc2 -> Statement stmt = Connection.createStatement()
FCa -> stmt.executeUpdate() //Triggering Action
FCe1 -> conn.rollback()
Example (cont.)
15

Simple association rules of the form “FCa => FCe” are
not expressive

Requires more general association rules (sequence
association rules) such as
(FCc1 FCc2) Λ FCa => FCe1, where
FCc1 -> Connection conn = OracleDataSource.getConnection()
FCc2 -> Statement stmt = Connection.createStatement()
FCa -> stmt.executeUpdate()
FCe1 -> conn.rollback() //Recovery Action
Example (cont.)
16

Simple association rules of the form “FCa => FCe” are
not expressive

Requires more general association rules (sequence
association rules) such as
(FCc1 FCc2) Λ FCa => FCe1, where
FCc1 -> Connection conn = OracleDataSource.getConnection()
FCc2 -> Statement stmt = conn.createStatement() //Context
FCa -> stmt.executeUpdate()
FCe1 -> conn.rollback()
Example (cont.)
17
CAR-Miner Approach
Input
Application
Check whether there are
any exception-related
defects
Classes and
Functions
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Exception-Flow
Graphs
Static Traces
Sequence
Association
Rules
Violations
Extract classes
and functions
reused
Issue queries and collect relevant
code examples. Eg: “lang:java
java.sql.Statement executeUpdate”
Construct exception-
flow graphs
Collect static traces
Mine static traces
Detect violations
18
CAR-Miner Approach
Input
Application
Classes and
Functions
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Exception-Flow
Graphs
Static Traces
Sequence
Association
Rules
Violations
Exception-Flow-Graph Construction

Based on a previous algorithm [Sinha&Harrold TSE 00] : normal execution path
----: exceptional execution path
20
Exception-Flow-Graph Construction

Prevent infeasible edges using a sound static analysis
[Robillard&Murphy FSE 99]
21
CAR-Miner Approach
Input
Application
Classes and
Methods
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Exception-Flow
Graphs
Static Traces
Sequence
Association
Rules
Violations
22
Static Trace Generation

Collect static traces with the actions
taken when exceptions occur

A static trace for Node 7:
“4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17”
23
Static Trace Generation

Includes 3 sections:

Normal function-
call sequence (4
-> 5 -> 6)

Function call (7)

Exception
function-call
sequence (15 ->
16 -> 17)

A static trace for Node 7: “4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17”
24
Trace Post-Processing

Identify and remove unrelated function
calls using data dependency

“4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17”
4: FileWriter fw = new FileWriter(“output.txt”)
5: BufferedWriter bw = new BufferedWriter(fw)
...
7: Statement stmt = conn.createStatement()
...

Filtered sequence “6 -> 7 -> 15 -> 16“
25
CAR-Miner Approach
Input
Application
Classes and
Methods
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Exception-Flow
Graphs
Static Traces
Sequence
Association
Rules
Violations
26
Static Trace Mining

Handle traces of each function call (triggering
function call) individually

Input: Two sequence databases with a one-to-one
mapping
•
normal function-call sequences (context)
•
exception function-call sequences (recovery)

Objective: Generate sequence association rules of the
form
(FCc1 ... FCcn) Λ FCa => FCe1 ... FCen
Context Trigger Recovery
27

Input: Two sequence databases with a one-to-one mapping
Mining Problem Definition

Objective: To get association rules of the form
FC1 FC2 ... FCm -> FE1 FE2 ... FEn
where {FC1, FC2, ..., Fcm} Є SDB1 and {FE1, FE2, ..., Fen} Є SDB2

Existing association rule mining algorithms cannot be directly
applied on multiple sequence databases
Context Recovery
28

Annotate the sequences to generate a single combined database
Mining Problem Solution

Apply frequent subsequence mining algorithm [Wang and Han, ICDE 04]
to get frequent sequences

Transform mined sequences into sequence association rules

Rank rules based on the support assigned by frequent
subsequence mining algorithm
(3 10) Λ FCa => (2 8)
Context Trigger Recovery
29
CAR-Miner Approach
Input
Application
Classes and
Methods
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Exception-Flow
Graphs
Static Traces
Sequence
Association
Rules
Violations
30
Violation Detection

Analyze each call site of triggering call FCa

Step 1: Extract context call sequence “CC1
CC2 ... CCm” from the beginning of the
function to the call site of FCa

Step 2: If CC1 CC2 ... CCm is super-sequence
of FCc1 ... FCcn

Report any missing function calls of {FCe1 ... FCen} in
any exception path
API client: (CC1 CC2 ... CCm) Λ FCa => Missing any?
isSuperSeqOf
API Rule: (FCc1 ... FCcn) Λ FCa => FCe1 ... FCen
Context Trigger Recovery
31
Evaluation
Research Questions:
1. Do the mined rules represent real rules?
2. Do the detected violations represent real
defects?
3. Does CAR-Miner perform better than WN-
miner [Weimer and Necula, TACAS 05]?
4. Do the sequence association rules help
detect new defects?
32
Subjects

Internal Info: classes and methods belonging to the app

External Info: classes and methods used by the app

Code examples: #files collected through code search engine
33
RQ1: Real Rules
Real rules: 55% (Total: 294)
Usage patterns: 3%
False positives: 43%

Do the mined rules represent real rules?
34
RQ1: Distribution of Real Rules for Axion

#false positives is quite low between 1 to 60 rules

Distribution of rules based on ranks assigned by CAR-Miner
35
RQ2: Detected Violations

Do the detected violations represent real defects?

Total number of defects: 160

New defects not found by WN-Miner approach: 87
36
RQ2: Status of Detected Violations

HsqlDB developers responded on the first 10 reported
defects

Accepted 7 defects

Rejected 3 defects

Reason given by HsqlDB developers for rejected defects:
“Although it can throw exceptions in general, it should not throw with
HsqlDB, So it is fine”
37
RQ3: Comparison with WN-miner

Does CAR-Miner performs better than WN-miner?

Found 224 new rules and missed 32 rules

CAR-Miner detected most of the rules mined by WN-miner

Two major factors:

sequence association rules

Increase in the data scope
38
RQ4: New defects by sequence association rules

Detected 21 new real defects among all applications

Do the sequence association rules detect new defects?
39
Agenda

Motivation

Mining Sequence Association Rules
(CAR-Miner) [ICSE 09]

Detecting Exception-Handling Defects

Mining Alternative Patterns
(Alattin) [ASE 09]

Detecting Neglected Condition Defects

Conclusion
40
40

Existing approaches produce a large number of false
positives

One major observation:

Programmers often write code in different ways for
achieving the same task

Some ways are more frequent than others
Large Number of False Positives
Frequent
ways
Infrequent
ways
Mined Patterns
mine patterns detect violations
41
Example: java.util.Iterator.next()
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
Code Sample 1
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
Code Example 2
Code Sample 2
Java.util.Iterator.next() throws NoSuchElementException when invoked on a list
without any elements
42
Example: java.util.Iterator.next()
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
Code Sample 1
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
Code Sample 2
1243 code examples
Sample 1 (1218 / 1243)
Sample 2 (6/1243)
Mined Pattern from existing approaches:
“boolean check on return of Iterator.hasNext before Iterator.next”
43
Example: java.util.Iterator.next()
 Require more general patterns (alternative patterns): P1 or P2
P1 : boolean check on return of Iterator.hasNext before Iterator.next
P2 : boolean check on return of ArrayList.size before Iterator.next
 Cannot be mined by existing approaches, since alternative P2
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
PrintEntries1(ArrayList<string>
entries)
{
…
Iterator it = entries.iterator();
if(it.hasNext()) {
string last = (string) it.next();
}
…
}
Code Sample 1
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
PrintEntries2(ArrayList<string>
entries)
{
…
if(entries.size() > 0) {
Iterator it = entries.iterator();
string last = (string) it.next();
}
…
}
Code Sample 2
44
Our Solution: ImMiner Algorithm
 Mines alternative patterns of the form P1 or P2
 Based on the observation that infrequent alternatives such as P2 are
frequent among code examples that do not support P1
1243 code examples
Sample 1 (1218 / 1243)
Sample 2 (6/1243)
P2 is frequent among code
examples not supporting P1
P2 is infrequent among entire
1243 code examples
45
Alternative Patterns

ImMiner mines three kinds of alternative
patterns of the general form “P1 or P2”
Balanced: all alternatives (both P1 and P2) are frequent
Imbalanced: some alternatives (P1) are frequent and
others are infrequent (P2). Represented as “P1 or P^
2”
Single: only one alternative
46
ImMiner Algorithm

Uses frequent-itemset mining [Burdick et al. ICDE 01]
iteratively

An input database with the following APIs
for Iterator.next()
Input database Mapping of IDs to APIs
47
ImMiner Algorithm: Frequent Alternatives
Input database
Frequent itemset
mining
(min_sup 0.5)
Frequent item: 1
P1: boolean-check on the return of
Iterator.hasNext() before Iterator.next()
48
ImMiner: Infrequent Alternatives of P1
Positive database (PSD)
Negative database (NSD)

Split input database into two databases: Positive and Negative

Mine patterns that are frequent in NSD and are infrequent in PSD

Reason: Only such patterns serve as alternatives for P1
 Alternative Pattern : P2 “const check on the return of ArrayList.size()
before Iterator.next()”

Alattin applies ImMiner algorithm to detect neglected conditions
49
Neglected Conditions

Neglected conditions refer to

Missing conditions that check the arguments or
receiver of the API call before the API call

Missing conditions that check the return or
receiver of the API call after the API call

One of the primary reasons for many fatal
issues

security or buffer-overflow vulnerabilities [Chang et
al. ISSTA 07]
50
Evaluation

Research Questions:
1. Do alternative patterns exist in real
applications?
2. How high percentage of false positives are
reduced (with low or no increase of false
negatives) in detected violations?
51
Subjects

Two categories of subjects:

3 Java default API libraries

3 popular open source libraries
#Samples: #code examples collected from Google code search
52
RQ1: Balanced and Imbalanced Patterns

How high percentage of balanced and imbalanced patterns exist in real
apps?

Balanced patterns: 0% to 30% (average: 9.69%)

Imbalanced patterns:

30% to 100% (average: 65%) for Java default API libraries

0% to 9.5% (average: 5%) for open source libraries

Explanation: Java default API libraries provide more different ways of
writing code compared to open source libraries
53
RQ2: False Positives and False Negatives

How high % of false positives are reduced (with low or no increase of
false negatives)?
 Applied mined patterns (“P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j ”) in
three modes:

Existing mode:
“P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j ”
 P1 ,P2, ... , Pi

Balanced mode:
“P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j ”
 “P1 or P2 or ... orPi”

Imbalanced mode:
“P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j ”
 “P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j ”
54
RQ2: False Positives and False Negatives
Application Existing Mode Balanced Mode
Defects False
Positives
Defects False
Positives
% of
reduction
False
Negatives
Java Util 37 104 37 104 0 0
Java
Transaction
51 105 51 105 0 0
Java SQL 56 143 56 90 37.06 0
BCEL 2 14 2 8 42.86 0
HSqlDB 1 0 1 0 0 0
Hibernate 10 9 10 8 11.11 0
AVERAGE/
TOTAL
15.17 0

Existing Mode vs Balanced Mode

Balanced mode reduced false positives by 15.17% without
any increase in false negatives
RQ2: False Positives and False Negatives
Application Existing Mode Imbalanced Mode
Defects False
Positives
Defects False
Positives
% of
reduction
False
Negatives
Java Util 37 104 36 74 28.85 1
Java
Transaction
51 105 47 76 27.62 4
Java SQL 56 143 53 81 43.36 3
BCEL 2 14 2 6 57.04 0
HSqlDB 1 0 1 0 0 0
Hibernate 10 9 10 8 11.11 0
AVERAGE/
TOTAL
28.01 8

Existing Mode vs Imbalanced Mode

Imbalanced mode reduced false positives by 28% with quite
small increase in false negatives
55
56
Conclusion

Problem-driven methodology by identifying
•
new problems, patterns
•
mining algorithms, defects

CAR-Miner [ICSE 09]: mining sequence association
rules of the form
(FCc1 ... FCcn) Λ FCa => (FCe1 ... Fcen)
Context Trigger Recovery
 reduce false negatives

Alattin [ASE 09]: mining alternative patterns classified
into three categories: balanced, imbalanced, and single
P1 or P2 or ... or Pi or A^
1 or A^
2 or ... or A^
j
 reduce false positives
57
Other Selected Work on Mining SE Data
API/Trace mining
•
MAPO: mining call sequences for code reuse [ECOOP 09]
•
MSeqGen: mining call seqs for test gen [ESEC/FSE 09]
•
MAM: mining API mapping for lang migration [ICSE 10]
•
Iterative mining of resource-releasing specs [ASE 11]
•
StackMine: mining callstack traces [ICSE 12]
•
INDICATOR: mining parameters dependency [WWW 13]
Text mining
•
Mining bug reports@Cisco for security ones [MSR 10]
•
Mining bug reports+exec traces for duplicates [ICSE 08]
•
Mining API docs for defect detection [ASE 09, ICSE 12]
•
Mining requirements for policy extraction [FSE 12]
T. Xie, S. Thummalapenta, D. Lo, and C. Liu. Data Mining for Software Engineering.
IEEE Computer, August 2009.
58
Thank You
Questions?
https://sites.google.com/site/asergrp/
59
Alattin Approach
Application
Under Analysis
Detect neglected
conditions
Classes and
methods
Open Source Projects on web
Open Source Projects on web
1 2 N…
…
Pattern
Candidates
Alternative
Patterns
Violations
Extract classes
and methods
reused
Phase 1: Issue queries and collect
relevant code samples. Eg: “lang:java
java.util.Iterator next”
Phase 2: Generate
pattern candidates
Phase 3: Mine
alternative patterns
Phase 4: Detect neglected
conditions statically

Más contenido relacionado

Destacado

Predictive Analytics in Software Testing
Predictive Analytics in Software TestingPredictive Analytics in Software Testing
Predictive Analytics in Software TestingPavan Kumar Kodedela
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingGhanshyam Yadav
 
Artificial intelligence in qa
Artificial intelligence in qaArtificial intelligence in qa
Artificial intelligence in qaTaras Lytvyn
 
EXTENT-2016: The Future of Software Testing
EXTENT-2016:	 The Future of Software TestingEXTENT-2016:	 The Future of Software Testing
EXTENT-2016: The Future of Software TestingIosif Itkin
 
H2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.aiH2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.aiSri Ambati
 
Machine learning in software testing
Machine learning in software testingMachine learning in software testing
Machine learning in software testingThoughtworks
 
Automated testing of software applications using machine learning edited
Automated testing of software applications using machine learning   editedAutomated testing of software applications using machine learning   edited
Automated testing of software applications using machine learning editedMilind Kelkar
 

Destacado (8)

L14 Software and AI
L14 Software and AIL14 Software and AI
L14 Software and AI
 
Predictive Analytics in Software Testing
Predictive Analytics in Software TestingPredictive Analytics in Software Testing
Predictive Analytics in Software Testing
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software Testing
 
Artificial intelligence in qa
Artificial intelligence in qaArtificial intelligence in qa
Artificial intelligence in qa
 
EXTENT-2016: The Future of Software Testing
EXTENT-2016:	 The Future of Software TestingEXTENT-2016:	 The Future of Software Testing
EXTENT-2016: The Future of Software Testing
 
H2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.aiH2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
 
Machine learning in software testing
Machine learning in software testingMachine learning in software testing
Machine learning in software testing
 
Automated testing of software applications using machine learning edited
Automated testing of software applications using machine learning   editedAutomated testing of software applications using machine learning   edited
Automated testing of software applications using machine learning edited
 

Similar a Improving Software Reliability via Mining Software Engineering Data

Spring scala - Sneaking Scala into your corporation
Spring scala  - Sneaking Scala into your corporationSpring scala  - Sneaking Scala into your corporation
Spring scala - Sneaking Scala into your corporationHenryk Konsek
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldCédric Brun
 
Modeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frModeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frCédric Brun
 
Auntonomous second no4
Auntonomous second no4Auntonomous second no4
Auntonomous second no4Jun Terauchi
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersMarina Kolpakova
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamHenryk Konsek
 
GraphQL Relay Introduction
GraphQL Relay IntroductionGraphQL Relay Introduction
GraphQL Relay IntroductionChen-Tsu Lin
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingLars Thorup
 
Breathe life into your designer!
Breathe life into your designer!Breathe life into your designer!
Breathe life into your designer!Cédric Brun
 
Writing (Meteor) Code With Style
Writing (Meteor) Code With StyleWriting (Meteor) Code With Style
Writing (Meteor) Code With StyleStephan Hochhaus
 
Compact Street Lights - 25W LED STELLAR STREET LIGHT Specifications
Compact Street Lights - 25W LED STELLAR STREET LIGHT SpecificationsCompact Street Lights - 25W LED STELLAR STREET LIGHT Specifications
Compact Street Lights - 25W LED STELLAR STREET LIGHT SpecificationsCompact Lighting
 
Android & PostgreSQL
Android & PostgreSQLAndroid & PostgreSQL
Android & PostgreSQLMark Wong
 
TensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsTensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsJeongkyu Shin
 
Kamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, codeKamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, codeKamil Witecki
 
Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Pivorak MeetUp
 
Cassandra EU - State of CQL
Cassandra EU - State of CQLCassandra EU - State of CQL
Cassandra EU - State of CQLpcmanus
 
C* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLC* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLDataStax Academy
 
E xact micro 10 photometer v4
E xact micro 10 photometer v4E xact micro 10 photometer v4
E xact micro 10 photometer v4Ronnie Lewis
 
Hardware Description Languages .pptx
Hardware Description Languages .pptxHardware Description Languages .pptx
Hardware Description Languages .pptxwafawafa52
 

Similar a Improving Software Reliability via Mining Software Engineering Data (20)

JavaFX, because you're worth it
JavaFX, because you're worth itJavaFX, because you're worth it
JavaFX, because you're worth it
 
Spring scala - Sneaking Scala into your corporation
Spring scala  - Sneaking Scala into your corporationSpring scala  - Sneaking Scala into your corporation
Spring scala - Sneaking Scala into your corporation
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the world
 
Modeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frModeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ fr
 
Auntonomous second no4
Auntonomous second no4Auntonomous second no4
Auntonomous second no4
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limiters
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax Exam
 
GraphQL Relay Introduction
GraphQL Relay IntroductionGraphQL Relay Introduction
GraphQL Relay Introduction
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit Testing
 
Breathe life into your designer!
Breathe life into your designer!Breathe life into your designer!
Breathe life into your designer!
 
Writing (Meteor) Code With Style
Writing (Meteor) Code With StyleWriting (Meteor) Code With Style
Writing (Meteor) Code With Style
 
Compact Street Lights - 25W LED STELLAR STREET LIGHT Specifications
Compact Street Lights - 25W LED STELLAR STREET LIGHT SpecificationsCompact Street Lights - 25W LED STELLAR STREET LIGHT Specifications
Compact Street Lights - 25W LED STELLAR STREET LIGHT Specifications
 
Android & PostgreSQL
Android & PostgreSQLAndroid & PostgreSQL
Android & PostgreSQL
 
TensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsTensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning Models
 
Kamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, codeKamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, code
 
Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"
 
Cassandra EU - State of CQL
Cassandra EU - State of CQLCassandra EU - State of CQL
Cassandra EU - State of CQL
 
C* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLC* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQL
 
E xact micro 10 photometer v4
E xact micro 10 photometer v4E xact micro 10 photometer v4
E xact micro 10 photometer v4
 
Hardware Description Languages .pptx
Hardware Description Languages .pptxHardware Description Languages .pptx
Hardware Description Languages .pptx
 

Más de Tao Xie

MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...
MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...
MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...Tao Xie
 
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...Tao Xie
 
Intelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringIntelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringTao Xie
 
Diversity and Computing/Engineering: Perspectives from Allies
Diversity and Computing/Engineering: Perspectives from AlliesDiversity and Computing/Engineering: Perspectives from Allies
Diversity and Computing/Engineering: Perspectives from AlliesTao Xie
 
Intelligent Software Engineering: Synergy between AI and Software Engineering...
Intelligent Software Engineering: Synergy between AI and Software Engineering...Intelligent Software Engineering: Synergy between AI and Software Engineering...
Intelligent Software Engineering: Synergy between AI and Software Engineering...Tao Xie
 
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...Tao Xie
 
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...Tao Xie
 
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven Research
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven ResearchISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven Research
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven ResearchTao Xie
 
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...Tao Xie
 
Intelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringIntelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringTao Xie
 
Software Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and SecuritySoftware Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and SecurityTao Xie
 
Planning and Executing Practice-Impactful Research
Planning and Executing Practice-Impactful ResearchPlanning and Executing Practice-Impactful Research
Planning and Executing Practice-Impactful ResearchTao Xie
 
Software Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringSoftware Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringTao Xie
 
Transferring Software Testing Tools to Practice (AST 2017 Keynote)
Transferring Software Testing Tools to Practice (AST 2017 Keynote)Transferring Software Testing Tools to Practice (AST 2017 Keynote)
Transferring Software Testing Tools to Practice (AST 2017 Keynote)Tao Xie
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTao Xie
 
Advances in Unit Testing: Theory and Practice
Advances in Unit Testing: Theory and PracticeAdvances in Unit Testing: Theory and Practice
Advances in Unit Testing: Theory and PracticeTao Xie
 
Common Technical Writing Issues
Common Technical Writing IssuesCommon Technical Writing Issues
Common Technical Writing IssuesTao Xie
 
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William Enck
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William EnckHotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William Enck
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William EnckTao Xie
 
Transferring Software Testing and Analytics Tools to Practice
Transferring Software Testing and Analytics Tools to PracticeTransferring Software Testing and Analytics Tools to Practice
Transferring Software Testing and Analytics Tools to PracticeTao Xie
 
User Expectations in Mobile App Security
User Expectations in Mobile App SecurityUser Expectations in Mobile App Security
User Expectations in Mobile App SecurityTao Xie
 

Más de Tao Xie (20)

MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...
MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...
MSR 2022 Foundational Contribution Award Talk: Software Analytics: Reflection...
 
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...
DSML 2021 Keynote: Intelligent Software Engineering: Working at the Intersect...
 
Intelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringIntelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software Engineering
 
Diversity and Computing/Engineering: Perspectives from Allies
Diversity and Computing/Engineering: Perspectives from AlliesDiversity and Computing/Engineering: Perspectives from Allies
Diversity and Computing/Engineering: Perspectives from Allies
 
Intelligent Software Engineering: Synergy between AI and Software Engineering...
Intelligent Software Engineering: Synergy between AI and Software Engineering...Intelligent Software Engineering: Synergy between AI and Software Engineering...
Intelligent Software Engineering: Synergy between AI and Software Engineering...
 
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...
MSRA 2018: Intelligent Software Engineering: Synergy between AI and Software ...
 
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...
SETTA'18 Keynote: Intelligent Software Engineering: Synergy between AI and So...
 
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven Research
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven ResearchISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven Research
ISEC'18 Tutorial: Research Methodology on Pursuing Impact-Driven Research
 
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...
ISEC'18 Keynote: Intelligent Software Engineering: Synergy between AI and Sof...
 
Intelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software EngineeringIntelligent Software Engineering: Synergy between AI and Software Engineering
Intelligent Software Engineering: Synergy between AI and Software Engineering
 
Software Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and SecuritySoftware Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and Security
 
Planning and Executing Practice-Impactful Research
Planning and Executing Practice-Impactful ResearchPlanning and Executing Practice-Impactful Research
Planning and Executing Practice-Impactful Research
 
Software Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringSoftware Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software Engineering
 
Transferring Software Testing Tools to Practice (AST 2017 Keynote)
Transferring Software Testing Tools to Practice (AST 2017 Keynote)Transferring Software Testing Tools to Practice (AST 2017 Keynote)
Transferring Software Testing Tools to Practice (AST 2017 Keynote)
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
 
Advances in Unit Testing: Theory and Practice
Advances in Unit Testing: Theory and PracticeAdvances in Unit Testing: Theory and Practice
Advances in Unit Testing: Theory and Practice
 
Common Technical Writing Issues
Common Technical Writing IssuesCommon Technical Writing Issues
Common Technical Writing Issues
 
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William Enck
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William EnckHotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William Enck
HotSoS16 Tutorial "Text Analytics for Security" by Tao Xie and William Enck
 
Transferring Software Testing and Analytics Tools to Practice
Transferring Software Testing and Analytics Tools to PracticeTransferring Software Testing and Analytics Tools to Practice
Transferring Software Testing and Analytics Tools to Practice
 
User Expectations in Mobile App Security
User Expectations in Mobile App SecurityUser Expectations in Mobile App Security
User Expectations in Mobile App Security
 

Último

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

Improving Software Reliability via Mining Software Engineering Data

  • 1. Improving Software Reliability via Mining Software Engineering Data Tao Xie Department of Computer Science North Carolina State University Raleigh, USA http://www.csc.ncsu.edu/faculty/xie Joint work with Suresh Thummalapenta
  • 2. 2 MAIN GOAL  Transform static record- keeping SE data to active data  Make SE data actionable by uncovering hidden patterns and trends Mining Software Engineering Data MailingsBugzilla Code repository Execution traces CVS
  • 3. Mining Software Engineering Data code bases change history program states structural entities software engineering data bug reports/nl programming defect detection testing debugging maintenance software engineering tasks data mining techniques … … https://sites.google.com/site/asergrp/dmse
  • 4. Mining Software Engineering Data code bases change history program states structural entities software engineering data bug reports/nl programming defect detection testing debugging maintenance software engineering tasks data mining techniques … …
  • 5. 5 5  Programmers commonly reuse APIs of existing frameworks or libraries – Advantages: High productivity of development – Challenges: Complexity and lack of documentation – Consequences: • Spend more efforts in understanding APIs • Introduce defects in API client code – Solution: Mining API properties as common patterns across API client code Frame works Motivation
  • 6. 6 Basic mining algorithms Solution-Driven Problem-Driven Advanced mining algorithms New/adapted mining algorithms Where can I apply X miner? What patterns do we really need? E.g., frequent partial order mining [ESEC/FSE 07] E.g., association rule mining, frequent itemset mining… E.g., [ICSE 09], [ASE 09]
  • 7. 7 7 7 Code repositoriesCode repositories 1 2 N… 1 2 mining patterns searching mining patterns Code search engine e.g., Open source code on the web Eclipse, Linux, … Traditional approaches Our new approaches Often lack sufficient relevant data points (Eg. API call sites) Code repositories Mining  Searching + Mining
  • 8. 8 Agenda  Motivation  Mining Sequence Association Rules (CAR-Miner) [ICSE 09]  Detecting Exception-Handling Defects  Mining Alternative Patterns (Alattin) [ASE 09]  Detecting Neglected Condition Defects  Conclusion
  • 9. 9  APIs throw exceptions during runtime errors Example: Session API of Hibernate framework throws HibernateException  APIs expect client applications to implement recovery actions after exceptions occur Example: Hibernate Session API expects client application to rollback open uncommitted transactions after HibernateException occurs  Failure to handle exceptions results in Fatal issues, e.g., database lock won’t be released if the transaction is not rolled back Exception Handling
  • 10. 10  Use exception-handling specification to detect violations as defects  Problem: Often specifications are not documented  Solution: Mine specifications from existing API client code  Challenges:  Limited data points: Only from a few code bases  searching + mining  Limited expressiveness: Not sufficient to characterize common exception-handling behaviors: why? Problem Addressed by CAR-Miner
  • 11. 11 Example 1 .1 : ... 1 .2 : O r a c le D a ta S o u rc e o d s = n u ll; S e s s io n s e s s io n = n u ll; C o n n e c tio n c o n n = n u ll; S ta te m e n t s ta te m e n t = n u ll; 1 .3 : lo g g e r .d e b u g (" S ta rtin g u p d a te " ); 1 .4 : tr y { 1 .5 : o d s = n e w O ra c le D a ta S o u rc e ( ); 1 .6 : o d s .s e tU R L ( " jd b c :o r a c le :th in :s c o tt/tig e r @ 1 9 2 .1 6 8 .1 .2 :1 5 2 1 :c a tfis h " ) ; 1 .7 : c o n n = o d s .g e tC o n n e c tio n () ; 1 .8 : s t a te m e n t = c o n n .c r e a te S ta te m e n t( ); 1 .9 : s t a te m e n t .e x e c u t e U p d a te ( " D E L E T E F R O M t a b le 1 " ) ; 1 .1 0 : c o n n e c tio n .c o m m it() ; } 1 .1 1 : c a tc h ( S Q L E x c e p tio n s e ) { 1 .1 3 : lo g g e r .e rr o r (" E x c e p tio n o c c u r re d " ); } 1 .1 4 : fin a lly { 1 .1 5 : if(s ta te m e n t != n u ll) { s ta te m e n t.c lo s e () ; } 1 .1 6 : if(c o n n != n u ll) { c o n n .c lo s e ( ); } 1 .1 7 : if(o d s != n u ll) { o d s .c lo s e () ; } } 1 .1 8 : } S c e n a r io 1  Defect: No rollback done when SQLException occurs  Requires specification such as “Connection should be rolled back when a connection is created and SQLException occurs”  Q: Should every connection instance has to be rolled back when SQLException occurs? Missing “conn.rollback()”
  • 12. 12 Example (cont.) 2 .1 : C o n n e c tio n c o n n = n u ll; 2 .2 : S ta te m e n t s tm t = n u ll; 2 .3 : B u ffe re d W rite r b w = n u ll; F ile W rite r fw = n u ll; 2 .3 : tr y { 2 .4 : fw = n e w F il e W rite r( " o u tp u t.tx t") ; 2 .5 : b w = B u ffe r e d W r ite r(fw ); 2 .6 : c o n n = D riv e r M a n a g e r.g e tC o n n e c tio n (" jd b c :p l:d b " , " p s " , " p s " ); 2 .7 : S ta t e m e n t s t m t = c o n n .c r e a t e S ta te m e n t( ); 2 .8 : R e s u ltS e t r e s = s tm t.e x e c u te Q u e r y ( " S E L E C T P a th F R O M F ile s " ) ; 2 .9 : w h ile (r e s .n e x t() ) { 2 .1 0 : b w .w r ite (r e s .g e tS trin g (1 )); 2 .1 1 : } 2 .1 2 : re s .c lo s e ( ); 2 .1 3 : } c a tc h ( IO E x c e p tio n e x ) { lo g g e r.e r ro r (" IO E x c e p tio n o c c u r re d " ); 2 .1 4 : } fin a lly { 2 .1 5 : if( s tm t != n u ll) s tm t.c lo s e () ; 2 .1 6 : if( c o n n != n u ll ) c o n n .c lo s e ( ); 2 .1 7 : if ( b w != n u ll) b w .c lo s e ( ); 2 .1 8 : } 1 .1 : ... 1 .2 : O r a c le D a ta S o u rc e o d s = n u ll; S e s s io n s e s s io n = n u ll; C o n n e c tio n c o n n = n u ll; S ta te m e n t s ta te m e n t = n u ll; 1 .3 : lo g g e r .d e b u g (" S ta rtin g u p d a te " ); 1 .4 : tr y { 1 .5 : o d s = n e w O ra c le D a ta S o u rc e ( ); 1 .6 : o d s .s e tU R L ( " jd b c :o r a c le :th in :s c o tt/tig e r @ 1 9 2 .1 6 8 .1 .2 :1 5 2 1 :c a tfis h " ); 1 .7 : c o n n = o d s .g e tC o n n e c tio n () ; 1 .8 : s t a te m e n t = c o n n .c r e a te S ta te m e n t( ); 1 .9 : s t a te m e n t .e x e c u t e U p d a te ( " D E L E T E F R O M t a b le 1 " ) ; 1 .1 0 : c o n n e c tio n .c o m m it() ; } 1 .1 1 : c a tc h ( S Q L E x c e p tio n s e ) { 1 .1 2 : if ( c o n n != n u ll) { c o n n .ro llb a c k () ; } 1 .1 3 : lo g g e r .e rr o r (" E x c e p tio n o c c u r re d " ); } 1 .1 4 : fin a lly { 1 .1 5 : if(s ta te m e n t != n u ll) { s ta te m e n t.c lo s e () ; } 1 .1 6 : if(c o n n != n u ll) { c o n n .c lo s e ( ); } 1 .1 7 : if(o d s != n u ll) { o d s .c lo s e () ; } } 1 .1 8 : } S c e n a rio 2S c e n a r io 1 Specification: “Connection creation => Connection rollback”  Satisfied by Scenario 1 but not by Scenario 2  But Scenario 2 has no defect c
  • 13. 13  Simple association rules of the form “FCa => FCe” are not expressive  Requires more general association rules (sequence association rules) such as (FCc1 FCc2) Λ FCa => FCe1, where FCc1 -> Connection conn = OracleDataSource.getConnection() FCc2 -> Statement stmt = Connection.createStatement() FCa -> stmt.executeUpdate() FCe1 -> conn.rollback() Example (cont.)
  • 14. 14  Simple association rules of the form “FCa => FCe” are not expressive  Requires more general association rules (sequence association rules) such as (FCc1 FCc2) Λ FCa => FCe1, where FCc1 -> Connection conn = OracleDataSource.getConnection() FCc2 -> Statement stmt = Connection.createStatement() FCa -> stmt.executeUpdate() //Triggering Action FCe1 -> conn.rollback() Example (cont.)
  • 15. 15  Simple association rules of the form “FCa => FCe” are not expressive  Requires more general association rules (sequence association rules) such as (FCc1 FCc2) Λ FCa => FCe1, where FCc1 -> Connection conn = OracleDataSource.getConnection() FCc2 -> Statement stmt = Connection.createStatement() FCa -> stmt.executeUpdate() FCe1 -> conn.rollback() //Recovery Action Example (cont.)
  • 16. 16  Simple association rules of the form “FCa => FCe” are not expressive  Requires more general association rules (sequence association rules) such as (FCc1 FCc2) Λ FCa => FCe1, where FCc1 -> Connection conn = OracleDataSource.getConnection() FCc2 -> Statement stmt = conn.createStatement() //Context FCa -> stmt.executeUpdate() FCe1 -> conn.rollback() Example (cont.)
  • 17. 17 CAR-Miner Approach Input Application Check whether there are any exception-related defects Classes and Functions Open Source Projects on web Open Source Projects on web 1 2 N… … Exception-Flow Graphs Static Traces Sequence Association Rules Violations Extract classes and functions reused Issue queries and collect relevant code examples. Eg: “lang:java java.sql.Statement executeUpdate” Construct exception- flow graphs Collect static traces Mine static traces Detect violations
  • 18. 18 CAR-Miner Approach Input Application Classes and Functions Open Source Projects on web Open Source Projects on web 1 2 N… … Exception-Flow Graphs Static Traces Sequence Association Rules Violations
  • 19. Exception-Flow-Graph Construction  Based on a previous algorithm [Sinha&Harrold TSE 00] : normal execution path ----: exceptional execution path
  • 20. 20 Exception-Flow-Graph Construction  Prevent infeasible edges using a sound static analysis [Robillard&Murphy FSE 99]
  • 21. 21 CAR-Miner Approach Input Application Classes and Methods Open Source Projects on web Open Source Projects on web 1 2 N… … Exception-Flow Graphs Static Traces Sequence Association Rules Violations
  • 22. 22 Static Trace Generation  Collect static traces with the actions taken when exceptions occur  A static trace for Node 7: “4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17”
  • 23. 23 Static Trace Generation  Includes 3 sections:  Normal function- call sequence (4 -> 5 -> 6)  Function call (7)  Exception function-call sequence (15 -> 16 -> 17)  A static trace for Node 7: “4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17”
  • 24. 24 Trace Post-Processing  Identify and remove unrelated function calls using data dependency  “4 -> 5 -> 6 -> 7 -> 15 -> 16 -> 17” 4: FileWriter fw = new FileWriter(“output.txt”) 5: BufferedWriter bw = new BufferedWriter(fw) ... 7: Statement stmt = conn.createStatement() ...  Filtered sequence “6 -> 7 -> 15 -> 16“
  • 25. 25 CAR-Miner Approach Input Application Classes and Methods Open Source Projects on web Open Source Projects on web 1 2 N… … Exception-Flow Graphs Static Traces Sequence Association Rules Violations
  • 26. 26 Static Trace Mining  Handle traces of each function call (triggering function call) individually  Input: Two sequence databases with a one-to-one mapping • normal function-call sequences (context) • exception function-call sequences (recovery)  Objective: Generate sequence association rules of the form (FCc1 ... FCcn) Λ FCa => FCe1 ... FCen Context Trigger Recovery
  • 27. 27  Input: Two sequence databases with a one-to-one mapping Mining Problem Definition  Objective: To get association rules of the form FC1 FC2 ... FCm -> FE1 FE2 ... FEn where {FC1, FC2, ..., Fcm} Є SDB1 and {FE1, FE2, ..., Fen} Є SDB2  Existing association rule mining algorithms cannot be directly applied on multiple sequence databases Context Recovery
  • 28. 28  Annotate the sequences to generate a single combined database Mining Problem Solution  Apply frequent subsequence mining algorithm [Wang and Han, ICDE 04] to get frequent sequences  Transform mined sequences into sequence association rules  Rank rules based on the support assigned by frequent subsequence mining algorithm (3 10) Λ FCa => (2 8) Context Trigger Recovery
  • 29. 29 CAR-Miner Approach Input Application Classes and Methods Open Source Projects on web Open Source Projects on web 1 2 N… … Exception-Flow Graphs Static Traces Sequence Association Rules Violations
  • 30. 30 Violation Detection  Analyze each call site of triggering call FCa  Step 1: Extract context call sequence “CC1 CC2 ... CCm” from the beginning of the function to the call site of FCa  Step 2: If CC1 CC2 ... CCm is super-sequence of FCc1 ... FCcn  Report any missing function calls of {FCe1 ... FCen} in any exception path API client: (CC1 CC2 ... CCm) Λ FCa => Missing any? isSuperSeqOf API Rule: (FCc1 ... FCcn) Λ FCa => FCe1 ... FCen Context Trigger Recovery
  • 31. 31 Evaluation Research Questions: 1. Do the mined rules represent real rules? 2. Do the detected violations represent real defects? 3. Does CAR-Miner perform better than WN- miner [Weimer and Necula, TACAS 05]? 4. Do the sequence association rules help detect new defects?
  • 32. 32 Subjects  Internal Info: classes and methods belonging to the app  External Info: classes and methods used by the app  Code examples: #files collected through code search engine
  • 33. 33 RQ1: Real Rules Real rules: 55% (Total: 294) Usage patterns: 3% False positives: 43%  Do the mined rules represent real rules?
  • 34. 34 RQ1: Distribution of Real Rules for Axion  #false positives is quite low between 1 to 60 rules  Distribution of rules based on ranks assigned by CAR-Miner
  • 35. 35 RQ2: Detected Violations  Do the detected violations represent real defects?  Total number of defects: 160  New defects not found by WN-Miner approach: 87
  • 36. 36 RQ2: Status of Detected Violations  HsqlDB developers responded on the first 10 reported defects  Accepted 7 defects  Rejected 3 defects  Reason given by HsqlDB developers for rejected defects: “Although it can throw exceptions in general, it should not throw with HsqlDB, So it is fine”
  • 37. 37 RQ3: Comparison with WN-miner  Does CAR-Miner performs better than WN-miner?  Found 224 new rules and missed 32 rules  CAR-Miner detected most of the rules mined by WN-miner  Two major factors:  sequence association rules  Increase in the data scope
  • 38. 38 RQ4: New defects by sequence association rules  Detected 21 new real defects among all applications  Do the sequence association rules detect new defects?
  • 39. 39 Agenda  Motivation  Mining Sequence Association Rules (CAR-Miner) [ICSE 09]  Detecting Exception-Handling Defects  Mining Alternative Patterns (Alattin) [ASE 09]  Detecting Neglected Condition Defects  Conclusion
  • 40. 40 40  Existing approaches produce a large number of false positives  One major observation:  Programmers often write code in different ways for achieving the same task  Some ways are more frequent than others Large Number of False Positives Frequent ways Infrequent ways Mined Patterns mine patterns detect violations
  • 41. 41 Example: java.util.Iterator.next() PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } Code Sample 1 PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } Code Example 2 Code Sample 2 Java.util.Iterator.next() throws NoSuchElementException when invoked on a list without any elements
  • 42. 42 Example: java.util.Iterator.next() PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } Code Sample 1 PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } Code Sample 2 1243 code examples Sample 1 (1218 / 1243) Sample 2 (6/1243) Mined Pattern from existing approaches: “boolean check on return of Iterator.hasNext before Iterator.next”
  • 43. 43 Example: java.util.Iterator.next()  Require more general patterns (alternative patterns): P1 or P2 P1 : boolean check on return of Iterator.hasNext before Iterator.next P2 : boolean check on return of ArrayList.size before Iterator.next  Cannot be mined by existing approaches, since alternative P2 PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } PrintEntries1(ArrayList<string> entries) { … Iterator it = entries.iterator(); if(it.hasNext()) { string last = (string) it.next(); } … } Code Sample 1 PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } PrintEntries2(ArrayList<string> entries) { … if(entries.size() > 0) { Iterator it = entries.iterator(); string last = (string) it.next(); } … } Code Sample 2
  • 44. 44 Our Solution: ImMiner Algorithm  Mines alternative patterns of the form P1 or P2  Based on the observation that infrequent alternatives such as P2 are frequent among code examples that do not support P1 1243 code examples Sample 1 (1218 / 1243) Sample 2 (6/1243) P2 is frequent among code examples not supporting P1 P2 is infrequent among entire 1243 code examples
  • 45. 45 Alternative Patterns  ImMiner mines three kinds of alternative patterns of the general form “P1 or P2” Balanced: all alternatives (both P1 and P2) are frequent Imbalanced: some alternatives (P1) are frequent and others are infrequent (P2). Represented as “P1 or P^ 2” Single: only one alternative
  • 46. 46 ImMiner Algorithm  Uses frequent-itemset mining [Burdick et al. ICDE 01] iteratively  An input database with the following APIs for Iterator.next() Input database Mapping of IDs to APIs
  • 47. 47 ImMiner Algorithm: Frequent Alternatives Input database Frequent itemset mining (min_sup 0.5) Frequent item: 1 P1: boolean-check on the return of Iterator.hasNext() before Iterator.next()
  • 48. 48 ImMiner: Infrequent Alternatives of P1 Positive database (PSD) Negative database (NSD)  Split input database into two databases: Positive and Negative  Mine patterns that are frequent in NSD and are infrequent in PSD  Reason: Only such patterns serve as alternatives for P1  Alternative Pattern : P2 “const check on the return of ArrayList.size() before Iterator.next()”  Alattin applies ImMiner algorithm to detect neglected conditions
  • 49. 49 Neglected Conditions  Neglected conditions refer to  Missing conditions that check the arguments or receiver of the API call before the API call  Missing conditions that check the return or receiver of the API call after the API call  One of the primary reasons for many fatal issues  security or buffer-overflow vulnerabilities [Chang et al. ISSTA 07]
  • 50. 50 Evaluation  Research Questions: 1. Do alternative patterns exist in real applications? 2. How high percentage of false positives are reduced (with low or no increase of false negatives) in detected violations?
  • 51. 51 Subjects  Two categories of subjects:  3 Java default API libraries  3 popular open source libraries #Samples: #code examples collected from Google code search
  • 52. 52 RQ1: Balanced and Imbalanced Patterns  How high percentage of balanced and imbalanced patterns exist in real apps?  Balanced patterns: 0% to 30% (average: 9.69%)  Imbalanced patterns:  30% to 100% (average: 65%) for Java default API libraries  0% to 9.5% (average: 5%) for open source libraries  Explanation: Java default API libraries provide more different ways of writing code compared to open source libraries
  • 53. 53 RQ2: False Positives and False Negatives  How high % of false positives are reduced (with low or no increase of false negatives)?  Applied mined patterns (“P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j ”) in three modes:  Existing mode: “P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j ”  P1 ,P2, ... , Pi  Balanced mode: “P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j ”  “P1 or P2 or ... orPi”  Imbalanced mode: “P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j ”  “P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j ”
  • 54. 54 RQ2: False Positives and False Negatives Application Existing Mode Balanced Mode Defects False Positives Defects False Positives % of reduction False Negatives Java Util 37 104 37 104 0 0 Java Transaction 51 105 51 105 0 0 Java SQL 56 143 56 90 37.06 0 BCEL 2 14 2 8 42.86 0 HSqlDB 1 0 1 0 0 0 Hibernate 10 9 10 8 11.11 0 AVERAGE/ TOTAL 15.17 0  Existing Mode vs Balanced Mode  Balanced mode reduced false positives by 15.17% without any increase in false negatives
  • 55. RQ2: False Positives and False Negatives Application Existing Mode Imbalanced Mode Defects False Positives Defects False Positives % of reduction False Negatives Java Util 37 104 36 74 28.85 1 Java Transaction 51 105 47 76 27.62 4 Java SQL 56 143 53 81 43.36 3 BCEL 2 14 2 6 57.04 0 HSqlDB 1 0 1 0 0 0 Hibernate 10 9 10 8 11.11 0 AVERAGE/ TOTAL 28.01 8  Existing Mode vs Imbalanced Mode  Imbalanced mode reduced false positives by 28% with quite small increase in false negatives 55
  • 56. 56 Conclusion  Problem-driven methodology by identifying • new problems, patterns • mining algorithms, defects  CAR-Miner [ICSE 09]: mining sequence association rules of the form (FCc1 ... FCcn) Λ FCa => (FCe1 ... Fcen) Context Trigger Recovery  reduce false negatives  Alattin [ASE 09]: mining alternative patterns classified into three categories: balanced, imbalanced, and single P1 or P2 or ... or Pi or A^ 1 or A^ 2 or ... or A^ j  reduce false positives
  • 57. 57 Other Selected Work on Mining SE Data API/Trace mining • MAPO: mining call sequences for code reuse [ECOOP 09] • MSeqGen: mining call seqs for test gen [ESEC/FSE 09] • MAM: mining API mapping for lang migration [ICSE 10] • Iterative mining of resource-releasing specs [ASE 11] • StackMine: mining callstack traces [ICSE 12] • INDICATOR: mining parameters dependency [WWW 13] Text mining • Mining bug reports@Cisco for security ones [MSR 10] • Mining bug reports+exec traces for duplicates [ICSE 08] • Mining API docs for defect detection [ASE 09, ICSE 12] • Mining requirements for policy extraction [FSE 12] T. Xie, S. Thummalapenta, D. Lo, and C. Liu. Data Mining for Software Engineering. IEEE Computer, August 2009.
  • 59. 59 Alattin Approach Application Under Analysis Detect neglected conditions Classes and methods Open Source Projects on web Open Source Projects on web 1 2 N… … Pattern Candidates Alternative Patterns Violations Extract classes and methods reused Phase 1: Issue queries and collect relevant code samples. Eg: “lang:java java.util.Iterator next” Phase 2: Generate pattern candidates Phase 3: Mine alternative patterns Phase 4: Detect neglected conditions statically