This is the public repository for FSE Submission.
There are two folders, DepGraph
and DepGraphCodeChange
. Both of the tecnhniques are included in these folders.
System Requirments:
- Pytorch >= 2.0.1
- Python 3
Put the pkl file in the root directory of the project based on the different methods. Then run python runtotal.py project_name
. For example, python runtotal.py Time
.
All of our Data can be found here: https://drive.google.com/drive/folders/172F5Gv82hC_Qvsb5eQ_XUw1_98gXcRi7?usp=sharing
For cross-project evaluation run bash job_cross.sh
.
The data is Seperated in two folders:
- DepGraph
- DepGraphCodeChange
A comparison of the fault localization techniques can be found in Table II. For each system, we show the technique with the best MFR in bold (the lower the better). DepGraph w/o Code Change shows the result after adopting Dependency-Enhanced Coverage Graph, and DepGraph shows the result of incorporating both Dependency-Enhanced Coverage Graph and Code Change Information.. The number in the parentheses shows the percentage improvement over Grace. The best result is marked in bold.
Here is an overview of the specific Abstract Syntax Tree (AST) node types we have utilized in our analysis, focusing on Java code. Our selection of these nodes is driven by their significance in understanding the program's structure, control flow, and data flow. Below is a categorization and rationale for each type of node included in our analysis.
- WhileStatement, IfStatement, ForStatement, SwitchStatement: Essential for dictating the program's execution flow. These nodes often encompass conditions and loops, where faults are likely to occur.
- MethodDeclaration, ConstructorDeclaration: Key to understanding class functionalities, these nodes represent the entry points for execution and often contain core business logic.
- ThrowStatement: Used for exception handling in Java. Analyzing these nodes is crucial, especially for faults related to exceptions.
- BreakStatement, ContinueStatement, ReturnStatement: Control the flow within loops and methods. Critical for analyzing how and when loops terminate and how methods return values.
- Local variable declarations are pivotal for tracking the state and flow of data within various scopes, such as methods or blocks.
- StatementExpression: These expressions, which can include method invocations or assignments, are crucial for understanding the operations performed in the code.
- The
parameters
andreturn_type
nodes help in analyzing method signatures and their interactions, which is fundamental for understanding method functionalities.
- control, SimpleName: The
control
node likely refers to additional control flow elements, whileSimpleName
(excluded in our analysis) typically represents variable and method names.SimpleName
is omitted to reduce complexity and focus on more impactful AST elements.
Our selection criteria for these nodes were based on their relevance in portraying the code's logical and structural flow. By focusing on these specific aspects, we aim to capture the critical elements of the code that are most relevant for tasks like fault localization, program comprehension, or static analysis. This approach helps in reducing the complexity of the analysis while ensuring that the essential elements are thoroughly examined.