Class ProposedEditClasses

java.lang.Object
org.variantsync.diffdetective.editclass.proposed.ProposedEditClasses
All Implemented Interfaces:
EditClassCatalogue

public class ProposedEditClasses extends Object implements EditClassCatalogue
The catalog of edit classes proposed in our ESEC/FSE'22 paper.
Author:
Paul Bittner
  • Field Details

    • AddToPC

      public static final EditClass AddToPC
    • AddWithMapping

      public static final EditClass AddWithMapping
    • RemFromPC

      public static final EditClass RemFromPC
    • RemWithMapping

      public static final EditClass RemWithMapping
    • Specialization

      public static final EditClass Specialization
    • Generalization

      public static final EditClass Generalization
    • Reconfiguration

      public static final EditClass Reconfiguration
    • Refactoring

      public static final EditClass Refactoring
    • Untouched

      public static final EditClass Untouched
    • All

      public static final List<EditClass> All
      A list of all nine edit classes in their order of appearance in the paper.
    • EditClassesByType

      public static final Map<DiffType,List<EditClass>> EditClassesByType
      A map of all nine edit classes, indexed by their DiffType.
    • Instance

      public static final ProposedEditClasses Instance
      Singleton instance of this catalog.
  • Constructor Details

    • ProposedEditClasses

      private ProposedEditClasses()
  • Method Details

    • all

      public List<EditClass> all()
      Description copied from interface: EditClassCatalogue
      Gives a list of all edit classes in this catalogue. The list should be constant and immutable (i.e., the very same list is returned each time all is invoked). The edit class should be immutable, too.
      Specified by:
      all in interface EditClassCatalogue
      Returns:
      a constant list of all edit classes in this catalogue.
    • byType

      public Map<DiffType,List<EditClass>> byType()
      Description copied from interface: EditClassCatalogue
      Returns a mapping from diff types to the edit classes that may match nodes of the given diff type. The returned map as well as all its values should be immutable and constant. *
      Specified by:
      byType in interface EditClassCatalogue
      Returns:
      A classification of edit classes by their diff types.
    • match

      public EditClass match(DiffNode<?> node)
      Description copied from interface: EditClassCatalogue
      Returns the edit class that matches the given node. Each node matches exactly one edit class.
      Specified by:
      match in interface EditClassCatalogue
      Parameters:
      node - The node of which to find its edit class.
      Returns:
      Returns the edit class that matches the given node.
    • fromName

      public Optional<EditClass> fromName(String label)
      Returns the edit class that has the given name. Returns empty of no edit class has the given name.