Skip to content

Java: use overlayChangedFiles in discard prediactes #20049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

nickrolfe
Copy link
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 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
Contributor

@Copilot 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
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.

2 participants