Skip to content

Java: use overlayChangedFiles in discard prediactes#20049

Merged
nickrolfe merged 1 commit intomainfrom
nickrolfe/java-deleted-files
Jul 15, 2025
Merged

Java: use overlayChangedFiles in discard prediactes#20049
nickrolfe merged 1 commit intomainfrom
nickrolfe/java-deleted-files

Conversation

@nickrolfe
Copy link
Copy Markdown
Contributor

@nickrolfe nickrolfe commented Jul 15, 2025

This should improve accuracy of overlay analysis, since we'll now correctly discard entities from files that were deleted.

@nickrolfe nickrolfe added the no-change-note-required This PR does not need a change note label Jul 15, 2025
@github-actions github-actions Bot added the Java label Jul 15, 2025
@nickrolfe nickrolfe marked this pull request as ready for review July 15, 2025 09:38
Copilot AI review requested due to automatic review settings July 15, 2025 09:38
@nickrolfe nickrolfe requested a review from a team as a code owner July 15, 2025 09:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the overlay system by replacing the extractedInOverlay predicate with the existing overlayChangedFiles predicate for determining which files should be discarded in the base variant.

  • Removes the extractedInOverlay predicate definition
  • Updates discard predicates to use overlayChangedFiles instead of extractedInOverlay

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
java/ql/lib/semmle/code/java/Overlay.qll Removes extractedInOverlay predicate and updates two discard predicates to use overlayChangedFiles
java/ql/lib/semmle/code/Location.qll Updates location discard predicate to use overlayChangedFiles

@kaspersv
Copy link
Copy Markdown
Contributor

Improves non-diff-informed overlay accuracy from 99.2% to 99.4% for Java's code scanning suite based on DCA experiments.

@nickrolfe nickrolfe merged commit 16e9e8e into main Jul 15, 2025
19 checks passed
@nickrolfe nickrolfe deleted the nickrolfe/java-deleted-files branch July 15, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants