Record Class PatchOutcome

java.lang.Object
java.lang.Record
org.variantsync.studies.evolution.simulation.experiment.PatchOutcome
Record Components:
dataset - The considered subject
runID - The id of this run
commitV0 - The id of the parent commit
commitV1 - The id of the child commit
sourceVariant - The name of the source variant
targetVariant - The name of the target variant
normalActualVsExpected - Number of differences between the patched target variant and the expected result (without filtering)
filteredActualVsExpected - Number of differences between the patched target variant and the expected result (with filtering)
fileNormal - Number of unfiltered file-level patches
lineNormal - Number of unfiltered line-level patches
fileSuccessNormal - Number of successful file-level patches
lineSuccessNormal - Number of successful line-level patches
fileFiltered - Number of filtered file-level patches
lineFiltered - Number of filtered line-level patches
fileSuccessFiltered - Number of successful file-level patches
lineSuccessFiltered - Number of successful line-level patches
normalTP - Number of true positives without filtering
normalFP - Number of false positives without filtering
normalTN - Number of true negatives without filtering
normalFN - Number of false negatives without filtering
normalWrongLocation - Number of patches without filtering applied to the wrong location
filteredTP - Number of true positives with filtering
filteredFP - Number of false positives with filtering
filteredTN - Number of true negatives with filtering
filteredFN - Number of false negatives with filtering
filteredWrongLocation - Number of patches with filtering applied to the wrong location

public record PatchOutcome(String dataset, long runID, String commitV0, String commitV1, String sourceVariant, String targetVariant, long normalActualVsExpected, long filteredActualVsExpected, long fileNormal, long lineNormal, long fileSuccessNormal, long lineSuccessNormal, long fileFiltered, long lineFiltered, long fileSuccessFiltered, long lineSuccessFiltered, long normalTP, long normalFP, long normalTN, long normalFN, long normalWrongLocation, long filteredTP, long filteredFP, long filteredTN, long filteredFN, long filteredWrongLocation) extends Record
Represents the outcome of a single experimental run in the study.
  • Constructor Details

    • PatchOutcome

      public PatchOutcome(String dataset, long runID, String commitV0, String commitV1, String sourceVariant, String targetVariant, long normalActualVsExpected, long filteredActualVsExpected, long fileNormal, long lineNormal, long fileSuccessNormal, long lineSuccessNormal, long fileFiltered, long lineFiltered, long fileSuccessFiltered, long lineSuccessFiltered, long normalTP, long normalFP, long normalTN, long normalFN, long normalWrongLocation, long filteredTP, long filteredFP, long filteredTN, long filteredFN, long filteredWrongLocation)
      Creates an instance of a PatchOutcome record class.
      Parameters:
      dataset - the value for the dataset record component
      runID - the value for the runID record component
      commitV0 - the value for the commitV0 record component
      commitV1 - the value for the commitV1 record component
      sourceVariant - the value for the sourceVariant record component
      targetVariant - the value for the targetVariant record component
      normalActualVsExpected - the value for the normalActualVsExpected record component
      filteredActualVsExpected - the value for the filteredActualVsExpected record component
      fileNormal - the value for the fileNormal record component
      lineNormal - the value for the lineNormal record component
      fileSuccessNormal - the value for the fileSuccessNormal record component
      lineSuccessNormal - the value for the lineSuccessNormal record component
      fileFiltered - the value for the fileFiltered record component
      lineFiltered - the value for the lineFiltered record component
      fileSuccessFiltered - the value for the fileSuccessFiltered record component
      lineSuccessFiltered - the value for the lineSuccessFiltered record component
      normalTP - the value for the normalTP record component
      normalFP - the value for the normalFP record component
      normalTN - the value for the normalTN record component
      normalFN - the value for the normalFN record component
      normalWrongLocation - the value for the normalWrongLocation record component
      filteredTP - the value for the filteredTP record component
      filteredFP - the value for the filteredFP record component
      filteredTN - the value for the filteredTN record component
      filteredFN - the value for the filteredFN record component
      filteredWrongLocation - the value for the filteredWrongLocation record component
  • Method Details

    • toJSON

      public static String toJSON(String key, Object value)
    • toJSON

      public static String toJSON(String key, long value)
    • FromJSON

      public static PatchOutcome FromJSON(com.google.gson.JsonObject object)
    • writeAsJSON

      public void writeAsJSON(Path pathToFile, boolean append) throws IOException
      Throws:
      IOException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dataset

      public String dataset()
      Returns the value of the dataset record component.
      Returns:
      the value of the dataset record component
    • runID

      public long runID()
      Returns the value of the runID record component.
      Returns:
      the value of the runID record component
    • commitV0

      public String commitV0()
      Returns the value of the commitV0 record component.
      Returns:
      the value of the commitV0 record component
    • commitV1

      public String commitV1()
      Returns the value of the commitV1 record component.
      Returns:
      the value of the commitV1 record component
    • sourceVariant

      public String sourceVariant()
      Returns the value of the sourceVariant record component.
      Returns:
      the value of the sourceVariant record component
    • targetVariant

      public String targetVariant()
      Returns the value of the targetVariant record component.
      Returns:
      the value of the targetVariant record component
    • normalActualVsExpected

      public long normalActualVsExpected()
      Returns the value of the normalActualVsExpected record component.
      Returns:
      the value of the normalActualVsExpected record component
    • filteredActualVsExpected

      public long filteredActualVsExpected()
      Returns the value of the filteredActualVsExpected record component.
      Returns:
      the value of the filteredActualVsExpected record component
    • fileNormal

      public long fileNormal()
      Returns the value of the fileNormal record component.
      Returns:
      the value of the fileNormal record component
    • lineNormal

      public long lineNormal()
      Returns the value of the lineNormal record component.
      Returns:
      the value of the lineNormal record component
    • fileSuccessNormal

      public long fileSuccessNormal()
      Returns the value of the fileSuccessNormal record component.
      Returns:
      the value of the fileSuccessNormal record component
    • lineSuccessNormal

      public long lineSuccessNormal()
      Returns the value of the lineSuccessNormal record component.
      Returns:
      the value of the lineSuccessNormal record component
    • fileFiltered

      public long fileFiltered()
      Returns the value of the fileFiltered record component.
      Returns:
      the value of the fileFiltered record component
    • lineFiltered

      public long lineFiltered()
      Returns the value of the lineFiltered record component.
      Returns:
      the value of the lineFiltered record component
    • fileSuccessFiltered

      public long fileSuccessFiltered()
      Returns the value of the fileSuccessFiltered record component.
      Returns:
      the value of the fileSuccessFiltered record component
    • lineSuccessFiltered

      public long lineSuccessFiltered()
      Returns the value of the lineSuccessFiltered record component.
      Returns:
      the value of the lineSuccessFiltered record component
    • normalTP

      public long normalTP()
      Returns the value of the normalTP record component.
      Returns:
      the value of the normalTP record component
    • normalFP

      public long normalFP()
      Returns the value of the normalFP record component.
      Returns:
      the value of the normalFP record component
    • normalTN

      public long normalTN()
      Returns the value of the normalTN record component.
      Returns:
      the value of the normalTN record component
    • normalFN

      public long normalFN()
      Returns the value of the normalFN record component.
      Returns:
      the value of the normalFN record component
    • normalWrongLocation

      public long normalWrongLocation()
      Returns the value of the normalWrongLocation record component.
      Returns:
      the value of the normalWrongLocation record component
    • filteredTP

      public long filteredTP()
      Returns the value of the filteredTP record component.
      Returns:
      the value of the filteredTP record component
    • filteredFP

      public long filteredFP()
      Returns the value of the filteredFP record component.
      Returns:
      the value of the filteredFP record component
    • filteredTN

      public long filteredTN()
      Returns the value of the filteredTN record component.
      Returns:
      the value of the filteredTN record component
    • filteredFN

      public long filteredFN()
      Returns the value of the filteredFN record component.
      Returns:
      the value of the filteredFN record component
    • filteredWrongLocation

      public long filteredWrongLocation()
      Returns the value of the filteredWrongLocation record component.
      Returns:
      the value of the filteredWrongLocation record component