Skip to content

Commit c8e9461

Browse files
committed
Removed unnecessary HTML tags from javadoc
1 parent 9a26546 commit c8e9461

File tree

4 files changed

+47
-76
lines changed

4 files changed

+47
-76
lines changed

src/main/java/it/unipr/analysis/AbstractStack.java

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,14 @@ public class AbstractStack
4141

4242
/**
4343
* The index representing the beginning of the logical stack in the circular
44-
* array.
45-
* <p>
46-
* This pointer indicates the position in the array that corresponds to the
47-
* bottom of the stack. Tracks the index of the oldest element in the
44+
* array. This pointer indicates the position in the array that corresponds
45+
* to the bottom of the stack. Tracks the index of the oldest element in the
4846
* circular array.
4947
*/
5048
private int head;
5149

5250
/**
5351
* The index representing the next insertion point in the circular array.
54-
* <p>
5552
* This pointer is used to identify the top of the stack, where the next
5653
* element will be pushed.
5754
*/
@@ -249,12 +246,10 @@ public AbstractStack clone() {
249246
}
250247

251248
/**
252-
* Pushes the specified element onto the stack.
253-
* <p>
254-
* This method inserts the given {@link StackElement} at the tail of the
255-
* circular array, effectively updating the top of the stack. The head of
256-
* the stack is also updated to maintain the circular nature of the
257-
* structure.
249+
* Pushes the specified element onto the stack. This method inserts the
250+
* given {@link StackElement} at the tail of the circular array, effectively
251+
* updating the top of the stack. The head of the stack is also updated to
252+
* maintain the circular nature of the structure.
258253
*
259254
* @param element the element to be pushed onto the stack
260255
*/
@@ -265,13 +260,12 @@ public void push(StackElement element) {
265260
}
266261

267262
/**
268-
* Pops the element from the stack.
269-
* <p>
270-
* This method removes and returns the topmost element of the stack. After
271-
* popping, the stack structure is adjusted by shifting the head, and the
272-
* previous bottommost element is updated based on the next element. If the
273-
* next element is {@link StackElement#TOP}, the bottom is set to TOP,
274-
* otherwise, it is set to {@link StackElement#BOTTOM}.
263+
* Pops the element from the stack. This method removes and returns the
264+
* topmost element of the stack. After popping, the stack structure is
265+
* adjusted by shifting the head, and the previous bottommost element is
266+
* updated based on the next element. If the next element is
267+
* {@link StackElement#TOP}, the bottom is set to TOP, otherwise, it is set
268+
* to {@link StackElement#BOTTOM}.
275269
*
276270
* @return the element at the top of the stack before popping
277271
*/

src/main/java/it/unipr/cfg/EVMCFG.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -803,12 +803,11 @@ private boolean dfsWithoutTypes(Statement start,
803803

804804
/**
805805
* Retrieves all statements of the specified types that lie on any
806-
* control‑flow path between two given statements in the CFG.
807-
* <p>
808-
* This method performs a depth‑first traversal from the {@code start}
809-
* statement until reaching the {@code target}. Along every explored path,
810-
* it collects any intermediate statements whose runtime class matches one
811-
* of the provided types.
806+
* control‑flow path between two given statements in the CFG. This method
807+
* performs a depth‑first traversal from the {@code start} statement until
808+
* reaching the {@code target}. Along every explored path, it collects any
809+
* intermediate statements whose runtime class matches one of the provided
810+
* types.
812811
*
813812
* @param start the entry point of the search
814813
* @param target the termination point of the search

src/main/java/it/unipr/crosschain/checker/UncheckedExternalInfluenceChecker.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@
2727
* emission without proper verification. It operates by tracking tainted values
2828
* from external sources (e.g., CALLDATALOAD, CALLDATACOPY) and checking if
2929
* these values propagate to event parameters without encountering a validation
30-
* step (e.g., via a JUMPI). The checker performs the following:
31-
* <ul>
32-
* <li>Phase 1: Iterates through the CFG to record JUMPI nodes that exhibit
33-
* tainted values.</li>
34-
* <li>Phase 2: For each log event node, analyzes the tainted stack to determine
35-
* if a definite or possible violation exists based on the propagation of
36-
* unvalidated external inputs.</li>
37-
* </ul>
38-
* Definite violations are raised when tainted values are confirmed, while
39-
* possible violations are flagged when the values are indeterminate (marked as
40-
* TOP).
30+
* step (e.g., via a JUMPI). The checker performs the following: Phase 1:
31+
* Iterates through the CFG to record JUMPI nodes that exhibit tainted values.
32+
* Phase 2: For each log event node, analyzes the tainted stack to determine if
33+
* a definite or possible violation exists based on the propagation of
34+
* unvalidated external inputs. Definite violations are raised when tainted
35+
* values are confirmed, while possible violations are flagged when the values
36+
* are indeterminate (marked as TOP).
4137
*
4238
* @see TaintAbstractDomain
4339
*/
@@ -61,7 +57,7 @@ public UncheckedExternalInfluenceChecker(SmartContract contract, EVMCFG xCFG) {
6157
*
6258
* @param tool the analysis tool providing semantic check results
6359
* @param graph the control-flow graph (CFG) of the smart contract
64-
*
60+
*
6561
* @return always returns true after processing all nodes
6662
*/
6763
@Override
@@ -107,7 +103,7 @@ public boolean visit(
107103
* @param tool the analysis tool providing semantic check results
108104
* @param graph the control-flow graph (CFG) of the smart contract
109105
* @param node the log node to analyze
110-
*
106+
*
111107
* @return always returns true after processing the node
112108
*/
113109
@Override

src/main/java/it/unipr/crosschain/xEVMLiSA.java

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,11 @@ public static void runCrossChainCheckers(Bridge bridge) {
265265

266266
/**
267267
* Executes the Local Dependency analysis for all contracts in the given
268-
* bridge.
269-
* <p>
270-
* This method performs three phases in parallel across all contracts:
271-
* <ol>
272-
* <li>Identify vulnerable LOG statements for the Local Dependency
273-
* Checker.</li>
274-
* <li>Mark any CALLDATALOAD sites reachable from those LOGs as
275-
* tainted.</li>
276-
* <li>Run the core Local Dependency Checker logic on each contract.</li>
277-
* </ol>
268+
* bridge. This method performs three phases in parallel across all
269+
* contracts: (i) Identify vulnerable LOG statements for the Local
270+
* Dependency Checker. (ii) Mark any CALLDATALOAD sites reachable from those
271+
* LOGs as tainted. (iii) Run the core Local Dependency Checker logic on
272+
* each contract.
278273
*
279274
* @param bridge the Bridge instance whose contracts will be analyzed
280275
*/
@@ -303,9 +298,8 @@ public static void runLocalDependencyCheckers(Bridge bridge) {
303298
}
304299

305300
/**
306-
* Runs the Unchecked External Influence Checker on a single contract.
307-
* <p>
308-
* This sets up the LiSA analysis environment, registers the
301+
* Runs the Unchecked External Influence Checker on a single contract. This
302+
* sets up the LiSA analysis environment, registers the
309303
* UncheckedExternalInfluenceChecker, and executes the analysis to find
310304
* event emit influenced by unvalidated external inputs. Reports definite
311305
* and possible findings to the configured cache.
@@ -338,9 +332,8 @@ public static void runUncheckedExternalInfluenceChecker(Bridge bridge, SmartCont
338332
}
339333

340334
/**
341-
* Runs the Unchecked External Call Checker on a single contract.
342-
* <p>
343-
* This configures and invokes LiSA with the UncheckedExternalCallChecker to
335+
* Runs the Unchecked External Call Checker on a single contract. This
336+
* configures and invokes LiSA with the UncheckedExternalCallChecker to
344337
* detect any CALL, STATICCALL or DELEGATECALL instructions whose results
345338
* directly influence event emit without proper validation.
346339
*
@@ -369,18 +362,12 @@ public static void runUncheckedExternalCallChecker(Bridge bridge, SmartContract
369362
}
370363

371364
/**
372-
* Executes the Event Order Checker on a single contract.
373-
* <p>
374-
* For each public function:
375-
* <ul>
376-
* <li>Follow only successful return paths (STOP for void, RETURN
377-
* otherwise).</li>
378-
* <li>Collect any SSTORE and LOG instructions on that path.</li>
379-
* <li>If LOGs occur without a preceding SSTORE, flag an event-order
380-
* issue.</li>
381-
* <li>Classify as definite if across a cross‑chain edge, else
382-
* possible.</li>
383-
* </ul>
365+
* Executes the Event Order Checker on a single contract. For each public
366+
* function: (i) Follow only successful return paths (STOP for void, RETURN
367+
* otherwise). (ii) Collect any SSTORE and LOG instructions on that path.
368+
* (iii) If LOGs occur without a preceding SSTORE, flag an event-order
369+
* issue. (iv) Classify as definite if across a cross‑chain edge, else
370+
* possible.
384371
*
385372
* @param bridge the Bridge providing the cross-chain CFG context
386373
* @param contract the specific SmartContract to analyze
@@ -479,17 +466,12 @@ public static void runEventOrderChecker(Bridge bridge, SmartContract contract) {
479466
}
480467

481468
/**
482-
* Executes the Missing Event Notification Checker on a single contract.
483-
* <p>
484-
* For each public function:
485-
* <ul>
486-
* <li>Follow only successful return paths (STOP for void, RETURN
487-
* otherwise).</li>
488-
* <li>Identify any SSTORE instructions on that path.</li>
489-
* <li>Ensure that each such SSTORE is followed by at least one LOG before
490-
* termination.</li>
491-
* <li>Flag any missing notifications as vulnerabilities.</li>
492-
* </ul>
469+
* Executes the Missing Event Notification Checker on a single contract. For
470+
* each public function: (i) Follow only successful return paths (STOP for
471+
* void, RETURN otherwise). (ii) Identify any SSTORE instructions on that
472+
* path. (iii) Ensure that each such SSTORE is followed by at least one LOG
473+
* before termination. (iv) Flag any missing notifications as
474+
* vulnerabilities.
493475
*
494476
* @param contract the SmartContract to analyze for missing event logs
495477
*/

0 commit comments

Comments
 (0)