Replaying and Isolating Failing Multi-Object Interactions
Martin Burger • Andreas Zeller Saarland University
Replaying and Isolating Failing Multi-Object Interactions Martin - - PowerPoint PPT Presentation
Replaying and Isolating Failing Multi-Object Interactions Martin Burger Andreas Zeller Saarland University e-mail client written in Java 100,200 LOC ~ 1,600 Java classes 17 developers Actively developed from February
Martin Burger • Andreas Zeller Saarland University
component
set of classes
application
component
set of classes
interaction
application
crosses border
component
set of classes
interaction
failure
application
crosses border
component
component
component
computes in the same way
component
computes in the same way
reproduced
many interactions
replaying causes
many interactions
minimal set of interactions replaying causes
minimal set of interactions replaying causes
delta debugging binary search
failing components in Java programs
capture and replay of interactions at component level
delta debugging minimizes interactions
Isolating Relevant Component Interactions with JINSI. Orso + Joshi + Burger + Zeller
WODA 2006
address book importer (GUI) Columba
address book importer (GUI) Columba JINSI instrumentation
address book importer (GUI) Columba JINSI instrumentation event log “incoming call”
written to
address book importer (GUI) Columba
address book importer (GUI) JINSI replaces Columba
address book importer (GUI) JINSI replaces Columba event log read from
address book importer (GUI) JINSI replaces Columba event log
reproduced read from
address book importer (GUI) JINSI uses delta debugging event log
address book importer (GUI) JINSI uses delta debugging event log
AddressbookImporter()
address book importer (GUI) JINSI uses delta debugging event log
AddressbookImporter() init(file)
address book importer (GUI) JINSI uses delta debugging event log
AddressbookImporter() init(file) wizardFinished()
address book importer (GUI) JINSI uses delta debugging event log
AddressbookImporter() init(file) wizardFinished()
Problem
Solution
black box (JINSI 2006)
coarse grained view
finer grained view
finer grained view
finer grained view
finer grained view
event log
captured by JINSI captured by JINSI border crossing interactions are captured by JINSI 2006
all object interactions are captured by JINSI 2008
event log
trace
for all objects
all object interactions are captured by JINSI 2008
addressbook. model
(19 classes)
ContactModel() setSortString() setFormattedName() setNickName() setFamilyName()
49,849 more
JINSI
addressbook. model
(19 classes)
ContactModel() setSortString() setFormattedName() setNickName() setFamilyName()
49,849 more
JINSI
delta debugging: > 2 hours
have influenced a specific object
suspicious
suspicious
at first, include suspicious object
include interacting
include objects that interact with those already in slice
stop when reached largest connected graph
simplified set of failure-inducing interactions within the component
simplified set of failure-inducing interactions within the component
addressbook. model
(19 classes)
ContactModel() setGivenName() setFamilyName() setSortString() getGivenName() JINSI getSortString() getPreferredEmail()
apply delta debugging to
failure
minimized set
interactions within the component
addressbook. model
(19 classes)
JINSI ContactModel() getPreferredEmail()
delta debugging
2
> 2 hours
minimized
7
simplified
delta debugging
2
> 2 hours
minimized
7
2
delta debugging
simplified minimized
delta debugging
2
> 2 hours
minimized
7
2
delta debugging
simplified minimized
delta debugging
2
> 2 hours < 1 min
minimized
7
2
delta debugging
simplified minimized
delta debugging
2
> 2 hours < 1 min < 1 min
minimized
public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); }
public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); }
public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); } IEmailModel model = null; if (it.hasNext()) model = (IEmailModel) it.next();
Selective Capture-Replay Shrinivas Joshi et al. JINSI is based on these methods
method calls in random tests; static slicing
application failing but not defective component
application failing but not defective component
application when observing application: too many interactions failing but not defective component
application failing but not defective component
application failing but not defective component
Future Work
final state e.g. contact model
Future Work
final state e.g. contact model intermediate states
Future Work
final state e.g. contact model input e.g. keystrokes in GUI intermediate states
Future Work
application event log
JINSI captures component interaction
component
event log
JINSI replays component interaction...
component component
Future Work
event log
JINSI replays component interaction...
component
Future Work
event log
trace
for all objects JINSI replays component interaction... ... and captures
component
Future Work