|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.uds.cs.st.dd.core.InputDeltaDebugger
Delta Debugging algorithm for files. This class provides functionality to automatically simplify a failing test case. All it needs to perform the minimization or isolation algorithm is a JUnit-test, and a filename.
Field Summary | |
private TConfiguration |
config
Stores the initial set of deltas (chunks of the input file). |
private int |
deltaDebuggingMode
Stores the current mode of the Delta Debugging algorithm: MINIMIZATION * or ISOLATION. |
private String |
fileName
Filename of the input file. |
static int |
ISOLATION
Isolation algorithm. |
static int |
MINIMIZATION
Minimization algorithm. |
private String |
originalFileName
Stores the name of the original file. |
private int |
precision
Precision of the test outcomes. |
private TConfiguration |
result
Stores the result of the minimization. |
private junit.framework.Test |
testObject
The JUnit-test. |
private Throwable |
throwable
Original exception trace of the failing test. |
private Vector |
viewers
Registered viewers. |
Constructor Summary | |
InputDeltaDebugger(String fileName)
Constructs an InputDeltaDebugger. |
|
InputDeltaDebugger(String fileName,
ISimpleViewer viewer)
Constructs an InputDeltaDebugger. |
Method Summary | |
void |
addViewer(ISimpleViewer viewer)
Adds a viewer to the registered viewers of this class. |
private void |
createDDReport(PrintWriter writer,
String status,
TConfiguration result)
Sends a message to remotely connected processes by writing contents into * the writer object. |
private void |
createEnhancedDDReport(PrintWriter writer,
String status,
TConfiguration result,
TConfiguration pass,
TConfiguration fail)
Sends a message to remotely connected processes by writing contents into * the writer object. |
void |
deltaDebug(PrintWriter writer)
Performs Delta Debugging on the input of the JUnit-test. |
private void |
deltaDebugFile(DD dd,
PrintWriter writer)
Performs Delta Debugging on the file that has been stored in this object. |
ISimpleViewer[] |
getAttachedViewers()
Returns all currently attached viewers as an array or null if no viewers * are attached. |
TConfiguration |
getResult()
Returns the result of this Delta Debugging run. |
private void |
initialize()
Initializes the fields of this object with default values. |
private DD |
initializeDeltaDebugging()
Initializes the Delta Debugging algorithm and sets some values of the * DD class. |
private void |
isolateConfig(TConfiguration c,
DD dd,
PrintWriter writer)
Isolates a given configuration. |
private void |
minimizeConfig(TConfiguration c,
DD dd,
PrintWriter writer)
Minimizes a given configuration. |
private void |
postTextMessage(String message)
Convenience method to send the specified message to all attached viewers. |
void |
sendMessage(PrintWriter writer,
String msg)
Sends any message to all connected processes by writing the text to * the specified writer object. |
void |
setDeltaDebuggingMode(int mode)
Sets the mode of the Delta Debugging algorithm: Either MINIMIZATION or * ISOLATION. |
void |
setOriginalFileName(String originalFileName)
Stores the name of the original file that is analyzed. |
void |
setPrecision(int precision)
Sets the test outcome precision. |
void |
setTest(junit.framework.Test testObject)
Assigns the specified JUnit-test object to the test of this class. |
void |
setThrowable(Throwable throwable)
Sets the original failing exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MINIMIZATION
public static final int ISOLATION
private junit.framework.Test testObject
private String fileName
private TConfiguration config
private Vector viewers
private int precision
private TConfiguration result
private Throwable throwable
private String originalFileName
private int deltaDebuggingMode
Constructor Detail |
public InputDeltaDebugger(String fileName)
fileName
- name of the input file to be analyzed.public InputDeltaDebugger(String fileName, ISimpleViewer viewer)
fileName
- name of the input file to be minimized.Method Detail |
private void initialize()
public void setTest(junit.framework.Test testObject)
testObject
- JUnit-test objectpublic void setDeltaDebuggingMode(int mode)
private DD initializeDeltaDebugging()
private void postTextMessage(String message)
private void minimizeConfig(TConfiguration c, DD dd, PrintWriter writer)
private void isolateConfig(TConfiguration c, DD dd, PrintWriter writer)
private void deltaDebugFile(DD dd, PrintWriter writer)
private void createDDReport(PrintWriter writer, String status, TConfiguration result)
private void createEnhancedDDReport(PrintWriter writer, String status, TConfiguration result, TConfiguration pass, TConfiguration fail)
public void sendMessage(PrintWriter writer, String msg)
public void setOriginalFileName(String originalFileName)
public void deltaDebug(PrintWriter writer)
public TConfiguration getResult()
public void setThrowable(Throwable throwable)
public void setPrecision(int precision)
public void addViewer(ISimpleViewer viewer)
public ISimpleViewer[] getAttachedViewers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |