Class DiffSplitter
java.lang.Object
org.variantsync.studies.evolution.simulation.diff.splitting.DiffSplitter
DiffSplitter splits the hunks in the difference of two files to create line-level patches that are stored in a FineDiff.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FineDiff
split
(OriginalDiff originalDiff, IFileDiffFilter fileFilter, ILineFilter lineFilter, IContextProvider contextProvider) Split the hunks in the given difference into line-level patches while filtering certain patches depending on the decision of the provided filters.static FineDiff
split
(OriginalDiff diff, IContextProvider contextProvider) Split the hunks in the given difference into line-level patches.
-
Constructor Details
-
DiffSplitter
public DiffSplitter()
-
-
Method Details
-
split
Split the hunks in the given difference into line-level patches.- Parameters:
diff
- The difference that is to be splitcontextProvider
- A context provider used to provide the correct context for the line-level patches.- Returns:
- A FineDiff containing the line-level patches.
-
split
public static FineDiff split(OriginalDiff originalDiff, IFileDiffFilter fileFilter, ILineFilter lineFilter, IContextProvider contextProvider) Split the hunks in the given difference into line-level patches while filtering certain patches depending on the decision of the provided filters.- Parameters:
originalDiff
- The difference that is to be splitfileFilter
- A file filter that determines whether the difference of specific files is to be keptlineFilter
- A line filter that determines whether changes to certain lines are to be keptcontextProvider
- A context provider used to provide the correct context for the line-level patches.- Returns:
- The split and filtered patches
-