Skip to content

Commit

Permalink
test(spgroup#31): update testes
Browse files Browse the repository at this point in the history
  • Loading branch information
barbosamaatheus committed Sep 14, 2021
1 parent 29127d4 commit e8511b3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class AdditionToArrayConflictSample {
public void m() {
List<String> validParameterAnnotations = new ArrayList<String>();
validParameterAnnotations.add("LEFT"); // LEFT
System.out.println(validParameterAnnotations.toString());
validParameterAnnotations.add("RIGHT"); // RIGHT
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package br.unb.cic.analysis.samples.ioa;

// Conflict: [left, foo():15] --> [right, bar():19]
public class ArrayConstantSample {

private int[] arr;

public static void main(String[] args) {
ArrayConstantSample m = new ArrayConstantSample();
m.arr = new int[]{0, 0, 0, 0, 0};
m.foo(3); // LEFT
m.bar(2); // RIGHT
}

private void foo(int i) {
arr[i] = 1;
}

private void bar(int i) {
arr[i] = 2;
}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package br.unb.cic.analysis.samples.ioa;

// Conflict: [left, foo():13] --> [right, bar():17]
// Conflict: [left, foo():14] --> [right, bar():18]
public class ArraysClassFieldConflictSample {
public static int[] y;
public int[] y;

public ArraysClassFieldConflictSample() {
this.y = new int[]{0};
}

public static void main(String[] args) {
foo(); //left
bar(); //right
ArraysClassFieldConflictSample m = new ArraysClassFieldConflictSample();
m.foo(); //left
m.bar(); //right
}

private static void foo() {
private void foo() {
y[0] = 3;
}

private static void bar() {
private void bar() {
y[0] = 4;
}
}

0 comments on commit e8511b3

Please sign in to comment.