Interface FixCandidateSearcher<T>


public interface FixCandidateSearcher<T>
Searches for potential fix locations in the source code.
  • Method Details

    • search

      FixCandidateSearchResults<T> search(com.github.javaparser.ast.CompilationUnit cu, String path, io.codemodder.codetf.DetectorRule rule, List<T> issuesForFile, Function<T,String> getKey, Function<T,Integer> getStartLine, Function<T,Optional<Integer>> getEndLine, Function<T,Optional<Integer>> getColumn)
      Searches the AST for nodes associated with the given issues. Issues are sorted into FixCandidates, UnfixedFindings and unmatched.
      Parameters:
      cu -
      path -
      rule -
      issuesForFile - A list of issues.
      getKey - A function that extracts the key for T.
      getStartLine - A function that extracts start line information from T. Always required.
      getEndLine - A function that extracts end line information from T. May not be available
      getColumn - A function that extracts column information from T. May not be available
      Returns:
      A FixSearchResults object that sorts the issues into FixCandidates, unfixed and unmatched.