typetools / typetools/checker-framework

Possible optimization opportunity in MustCallConsistencyAnalyzer

Open
#5,985 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ResourceLeakChecker
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

For this code:

https://github.com/typetools/checker-framework/blob/42970d9ee4727351dce0d7bf64174c2732d98592/checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java#L1321-L1326

I think we can avoid calling getPath() here by passing down the CFG to this method. It should be possible to get the tree for the enclosing method via the CFG without calling getPath().

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java at lines 1321-1326 and trace the method's callers and CFG handling. Determine how to obtain the enclosing method tree from the CFG without calling getPath(), then verify that the analyzer's existing behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.