java.lang.Object
org.variantsync.studies.evolution.simulation.diff.splitting.DiffSplitter

public class DiffSplitter extends Object
DiffSplitter splits the hunks in the difference of two files to create line-level patches that are stored in a FineDiff.
  • Constructor Details

    • DiffSplitter

      public DiffSplitter()
  • Method Details

    • split

      public static FineDiff split(OriginalDiff diff, IContextProvider contextProvider)
      Split the hunks in the given difference into line-level patches.
      Parameters:
      diff - The difference that is to be split
      contextProvider - 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 split
      fileFilter - A file filter that determines whether the difference of specific files is to be kept
      lineFilter - A line filter that determines whether changes to certain lines are to be kept
      contextProvider - A context provider used to provide the correct context for the line-level patches.
      Returns:
      The split and filtered patches