@@ -76,7 +76,7 @@ public class DiffNode {
7676 * @param nodeType The type of this node (i.e., mapping or artifact).
7777 * @param fromLines The starting line number of the corresponding text.
7878 * @param toLines The ending line number of the corresponding text.
79- * @param featureMapping The formula stored in this node. Should be null for code (/ artifact) nodes.
79+ * @param featureMapping The formula stored in this node. Should be null for artifact nodes.
8080 * @param label A text label containing information to identify the node (such as the corresponding source code).
8181 */
8282 public DiffNode (DiffType diffType , NodeType nodeType ,
@@ -123,16 +123,16 @@ public static DiffNode createRoot() {
123123 * For parameter descriptions, see {@link DiffNode#DiffNode(DiffType, NodeType, DiffLineNumber, DiffLineNumber, Node, String)}.
124124 * The <code>code</code> parameter will be set as the node's label.
125125 */
126- public static DiffNode createCode (DiffType diffType , DiffLineNumber fromLines , DiffLineNumber toLines , String code ) {
127- return new DiffNode (diffType , NodeType .CODE , fromLines , toLines , null , code );
126+ public static DiffNode createArtifact (DiffType diffType , DiffLineNumber fromLines , DiffLineNumber toLines , String code ) {
127+ return new DiffNode (diffType , NodeType .ARTIFACT , fromLines , toLines , null , code );
128128 }
129129
130130 /**
131- * The same as {@link DiffNode#createCode (DiffType, DiffLineNumber, DiffLineNumber, String)} but with the code for the label
131+ * The same as {@link DiffNode#createArtifact (DiffType, DiffLineNumber, DiffLineNumber, String)} but with the code for the label
132132 * given as a list of individual lines instead of a single String with linebreaks to identify newlines.
133133 */
134- public static DiffNode createCode (DiffType diffType , DiffLineNumber fromLines , DiffLineNumber toLines , List <String > lines ) {
135- return new DiffNode (diffType , NodeType .CODE , fromLines , toLines , null , lines );
134+ public static DiffNode createArtifact (DiffType diffType , DiffLineNumber fromLines , DiffLineNumber toLines , List <String > lines ) {
135+ return new DiffNode (diffType , NodeType .ARTIFACT , fromLines , toLines , null , lines );
136136 }
137137
138138 /**
@@ -651,7 +651,7 @@ public Lines getLinesAfterEdit() {
651651
652652 /**
653653 * Returns the formula that is stored in this node.
654- * The formula is null for artifact nodes (i.e., {@link NodeType#CODE }).
654+ * The formula is null for artifact nodes (i.e., {@link NodeType#ARTIFACT }).
655655 * The formula is not null for mapping nodes
656656 * @see NodeType#isAnnotation
657657 */
@@ -693,7 +693,7 @@ public boolean isMultilineMacro() {
693693 * Returns the full feature mapping formula of this node.
694694 * The feature mapping of an {@link NodeType#IF} node is its {@link DiffNode#getDirectFeatureMapping direct feature mapping}.
695695 * The feature mapping of {@link NodeType#ELSE} and {@link NodeType#ELIF} nodes is determined by all formulas in the respective if-elif-else chain.
696- * The feature mapping of an {@link NodeType#CODE artifact} node is the feature mapping of its parent.
696+ * The feature mapping of an {@link NodeType#ARTIFACT artifact} node is the feature mapping of its parent.
697697 * See Equation (1) in our paper (+ its extension to time for variation tree diffs described in Section 3.1).
698698 * @param parentOf Function that returns the parent of a node.
699699 * This function decides whether the before or after parent should be visited.
@@ -718,14 +718,14 @@ private List<Node> getFeatureMappingClauses(final Function<DiffNode, DiffNode> p
718718 and .add (negate (ancestor .getDirectFeatureMapping ()));
719719 } else {
720720 throw new RuntimeException ("Expected If or Elif above Else or Elif but got " + ancestor .nodeType + " from " + ancestor );
721- // Assert.assertTrue(ancestor.isCode ());
721+ // Assert.assertTrue(ancestor.isArtifact ());
722722 }
723723 ancestor = parentOf .apply (ancestor );
724724 }
725725 and .add (negate (ancestor .getDirectFeatureMapping ()));
726726
727727 return and ;
728- } else if (isCode ()) {
728+ } else if (isArtifact ()) {
729729 return parent .getFeatureMappingClauses (parentOf );
730730 }
731731
@@ -747,7 +747,7 @@ private Node getFeatureMapping(Function<DiffNode, DiffNode> parentOf) {
747747 * Returns the full feature mapping formula of this node before the edit.
748748 * The feature mapping of an {@link NodeType#IF} node is its {@link DiffNode#getDirectFeatureMapping direct feature mapping}.
749749 * The feature mapping of {@link NodeType#ELSE} and {@link NodeType#ELIF} nodes is determined by all formulas in the respective if-elif-else chain.
750- * The feature mapping of an {@link NodeType#CODE artifact} node is the feature mapping of its parent.
750+ * The feature mapping of an {@link NodeType#ARTIFACT artifact} node is the feature mapping of its parent.
751751 * See Equation (1) in our paper (+ its extension to time for variation tree diffs described in Section 3.1).
752752 * @return The feature mapping of this node for the given parent edges.
753753 */
@@ -759,7 +759,7 @@ public Node getBeforeFeatureMapping() {
759759 * Returns the full feature mapping formula of this node after the edit.
760760 * The feature mapping of an {@link NodeType#IF} node is its {@link DiffNode#getDirectFeatureMapping direct feature mapping}.
761761 * The feature mapping of {@link NodeType#ELSE} and {@link NodeType#ELIF} nodes is determined by all formulas in the respective if-elif-else chain.
762- * The feature mapping of an {@link NodeType#CODE artifact} node is the feature mapping of its parent.
762+ * The feature mapping of an {@link NodeType#ARTIFACT artifact} node is the feature mapping of its parent.
763763 * See Equation (1) in our paper (+ its extension to time for variation tree diffs described in Section 3.1).
764764 * @return The feature mapping of this node for the given parent edges.
765765 */
@@ -807,7 +807,7 @@ private List<Node> getPresenceCondition(Function<DiffNode, DiffNode> parentOf) {
807807 }
808808
809809 return clauses ;
810- } else if (isCode ()) {
810+ } else if (isArtifact ()) {
811811 return parent .getPresenceCondition (parentOf );
812812 }
813813
@@ -944,10 +944,10 @@ public boolean isIf() {
944944
945945 /**
946946 * Returns true if this node is an artifact node.
947- * @see NodeType#CODE
947+ * @see NodeType#ARTIFACT
948948 */
949- public boolean isCode () {
950- return this .nodeType .equals (NodeType .CODE );
949+ public boolean isArtifact () {
950+ return this .nodeType .equals (NodeType .ARTIFACT );
951951 }
952952
953953 /**
@@ -1127,7 +1127,7 @@ public String toTextDiff() {
11271127 @ Override
11281128 public String toString () {
11291129 String s ;
1130- if (isCode ()) {
1130+ if (isArtifact ()) {
11311131 s = String .format ("%s_%s from %d to %d" , diffType , nodeType , from .inDiff , to .inDiff );
11321132 } else if (isRoot ()) {
11331133 s = "ROOT" ;
0 commit comments