forked from spgroup/conflict-static-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
950cee2
commit 8121522
Showing
10 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...unb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
public class OverridingAssignmentClassFieldConflictInterProceduralSample { | ||
private int x; | ||
|
||
public void m() { | ||
x = 0; // LEFT | ||
foo(); // RIGHT | ||
} | ||
|
||
private void foo() { | ||
x = 1; | ||
} | ||
|
||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...nb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentClassFieldConflictInterProceduralSample2 { | ||
private int x; | ||
|
||
public void m() { | ||
foo(); // LEFT | ||
bar(); // RIGHT | ||
} | ||
|
||
private void foo() { | ||
x = 0; | ||
} | ||
|
||
private void bar() { | ||
x = 1; | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
.../cic/analysis/samples/OverridingAssignmentClassFieldNotConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentClassFieldNotConflictInterProceduralSample { | ||
private int x; | ||
|
||
public void m() { | ||
x = 0; // LEFT | ||
base(); | ||
foo(); // RIGHT | ||
} | ||
|
||
private void base() { | ||
x = 0; | ||
} | ||
|
||
private void foo() { | ||
x = 1; | ||
} | ||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...cic/analysis/samples/OverridingAssignmentClassFieldNotConflictInterProceduralSample2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentClassFieldNotConflictInterProceduralSample2 { | ||
private int x; | ||
|
||
public void m() { | ||
foo(); // LEFT | ||
base(); | ||
bar(); // RIGHT | ||
} | ||
|
||
private void base() { | ||
x = 0; | ||
} | ||
|
||
private void foo() { | ||
x = 1; | ||
} | ||
|
||
private void bar() { | ||
x = 2; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../samples/OverridingAssignmentClassFieldWithParameterNotConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentClassFieldWithParameterNotConflictInterProceduralSample { | ||
private int x; | ||
|
||
public void m() { | ||
x = 0; // LEFT | ||
foo(x); // RIGHT | ||
} | ||
|
||
private void foo(int a) { | ||
x = a; | ||
} | ||
|
||
|
||
} |
19 changes: 19 additions & 0 deletions
19
.../analysis/samples/OverridingAssignmentLocalVariablesNotConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentLocalVariablesNotConflictInterProceduralSample { | ||
public void m() { | ||
foo(); // LEFT | ||
bar(); // RIGHT | ||
} | ||
|
||
private void foo() { | ||
int x = 0; | ||
} | ||
|
||
private void bar() { | ||
int x = 1; | ||
} | ||
|
||
|
||
} |
16 changes: 16 additions & 0 deletions
16
...analysis/samples/OverridingAssignmentLocalVariablesNotConflictInterProceduralSample2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentLocalVariablesNotConflictInterProceduralSample2 { | ||
public void m() { | ||
int x = 0; // LEFT | ||
foo(x); // RIGHT | ||
|
||
} | ||
|
||
private void foo(int a) { | ||
a = 3; | ||
} | ||
|
||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...ples/OverridingAssignmentLocalVariablesWithParameterNotConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentLocalVariablesWithParameterNotConflictInterProceduralSample { | ||
public void m() { | ||
foo(0); // LEFT | ||
bar(1); // RIGHT | ||
} | ||
|
||
private void foo(int a) { | ||
int x = a; | ||
} | ||
|
||
private void bar(int a) { | ||
int x = a; | ||
} | ||
|
||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...nb/cic/analysis/samples/OverridingAssignmentObjectFieldConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentObjectFieldConflictInterProceduralSample { | ||
public void m() { | ||
ObjectFieldConflict c = new ObjectFieldConflict(); | ||
c.foo(1); // left | ||
ObjectFieldConflict d = c; | ||
d.bar(0); //right | ||
} | ||
} | ||
|
||
class ObjectFieldConflict { | ||
private int at; | ||
|
||
public void foo(int a) { | ||
this.at = a + 1; | ||
} | ||
|
||
public void bar(int a) { | ||
this.at = a; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...cic/analysis/samples/OverridingAssignmentObjectFieldNotConflictInterProceduralSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package br.unb.cic.analysis.samples; | ||
|
||
|
||
public class OverridingAssignmentObjectFieldNotConflictInterProceduralSample { | ||
public void m() { | ||
ObjectFieldNotConflict objectFieldNotConflict = new ObjectFieldNotConflict(); | ||
objectFieldNotConflict.foo(1); // left | ||
ObjectFieldNotConflict objectFieldNotConflict2 = new ObjectFieldNotConflict(); | ||
objectFieldNotConflict2.bar(0); //right | ||
} | ||
} | ||
|
||
class ObjectFieldNotConflict { | ||
private int at; | ||
|
||
public void foo(int a) { | ||
this.at = a + 1; | ||
} | ||
|
||
public void bar(int a) { | ||
this.at = a; | ||
} | ||
} |