Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @NullUnmarked on classes #134

Merged
merged 47 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d465eda
init
nimakarimipour Feb 10, 2023
2e8e65f
update
nimakarimipour Feb 10, 2023
46d84ac
undo unwanted change
nimakarimipour Feb 11, 2023
1fba197
update
nimakarimipour Feb 11, 2023
3e2e8b4
update
nimakarimipour Feb 11, 2023
2bf6459
update
nimakarimipour Feb 11, 2023
70bf1ef
move to proper position
nimakarimipour Feb 11, 2023
6046ebf
update
nimakarimipour Feb 11, 2023
f98fc55
update
nimakarimipour Feb 11, 2023
fc41c67
undo deleted comment
nimakarimipour Feb 11, 2023
c201245
Update annotator-core/src/main/java/edu/ucr/cs/riple/core/Annotator.java
nimakarimipour Feb 12, 2023
da8c98a
reformat
nimakarimipour Feb 12, 2023
64d8c57
keep file path info for class with no fields as well
nimakarimipour Feb 12, 2023
47998c0
update unit test
nimakarimipour Feb 12, 2023
01c679a
remove print statement
nimakarimipour Feb 13, 2023
8a517d0
prevent constructor @NullUnmarked for constructors
nimakarimipour Feb 13, 2023
8c2c3ae
Merge branch 'nimak/resolve-remaining' into nimak/nullunmarked-class
nimakarimipour Feb 13, 2023
6b49f66
merge with nimak/force-resolve
nimakarimipour Feb 13, 2023
fcd2fe6
add comment
nimakarimipour Feb 13, 2023
ab8d201
Merge branch 'nimak/resolve-remaining' into nimak/nullunmarked-class
nimakarimipour Feb 13, 2023
5f25f1b
update unit test
nimakarimipour Feb 13, 2023
27a2535
update nullaway test version
nimakarimipour Feb 14, 2023
0d630c6
Merge branch 'nimak/resolve-remaining' into nimak/update-nullaway
nimakarimipour Feb 14, 2023
b27c14a
Merge branch 'master' into nimak/resolve-remaining
nimakarimipour Feb 14, 2023
79b11b1
Merge branch 'nimak/resolve-remaining' into nimak/update-nullaway
nimakarimipour Feb 14, 2023
2b13142
Merge branch 'master' into nimak/update-nullaway
nimakarimipour Feb 15, 2023
4f18e80
fix bug
nimakarimipour Feb 15, 2023
9b729e8
bug fix
nimakarimipour Feb 15, 2023
dcf81b4
reformat
nimakarimipour Feb 15, 2023
0550bb5
update unit test expected values
nimakarimipour Feb 15, 2023
15fbbd4
Merge branch 'master' into nimak/nullunmarked-class
nimakarimipour Feb 15, 2023
9798ca4
Merge branch 'nimak/update-nullaway' into nimak/nullunmarked-class
nimakarimipour Feb 15, 2023
084e9e6
update
nimakarimipour Feb 15, 2023
cafef18
rename to init block
nimakarimipour Feb 15, 2023
139c19a
remove import from unit test input
nimakarimipour Feb 15, 2023
1f39e96
Merge branch 'master' into nimak/nullunmarked-class
nimakarimipour Feb 15, 2023
a811889
remove import from unit test input
nimakarimipour Feb 15, 2023
71b998b
add unit test for named inner classes
nimakarimipour Feb 15, 2023
4fb60f1
add unit test for named inner classes
nimakarimipour Feb 15, 2023
344007b
rename test
nimakarimipour Feb 15, 2023
45374b8
Merge branch 'master' into nimak/update-nullaway
nimakarimipour Feb 15, 2023
3e1bb7c
Update annotator-core/src/main/java/edu/ucr/cs/riple/core/metadata/tr…
nimakarimipour Feb 15, 2023
3a43655
Update annotator-core/src/main/java/edu/ucr/cs/riple/core/metadata/tr…
nimakarimipour Feb 15, 2023
ca510cc
Merge branch 'nimak/update-nullaway' into nimak/nullunmarked-class
nimakarimipour Feb 15, 2023
95429c8
merge master
nimakarimipour Feb 16, 2023
4eb1bbe
Merge branch 'master' into nimak/nullunmarked-class
nimakarimipour Feb 16, 2023
74e44b9
update comment
nimakarimipour Feb 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bug fix
  • Loading branch information
nimakarimipour committed Feb 15, 2023
commit 9b729e87f8728cfedc9fb69d657bcdadd2b59766
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public void publicMethodWithDownstreamDependencyDisabled() {
public void lowerBoundComputationTest() {
coreTestHelper
.addExpectedReports(
// Only returnNullableBad triggers new errors in this fix chain (+9), lower bound is 9.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableBad(int)"), 9),
// Only returnNullableBad triggers new errors in this fix chain (+9), lower bound is 10.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableBad(int)"), 10),
// Only returnNullableGood triggers new errors in this fix chain (+1), lower bound is 1.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableGood(int)"), 1),
// Root fix triggers 1 error on downstream dependency but returnNullableBad is
// present in the fix tree, therefore the lower bound effect for the tree should be 9.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "bar()"), 9))
// present in the fix tree, therefore the lower bound effect for the tree should be 10.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "bar()"), 10))
.setPredicate(
(expected, found) ->
expected.root.equals(found.root)
Expand All @@ -100,16 +100,16 @@ public void lowerBoundComputationTest() {
public void upperBoundComputationTest() {
coreTestHelper
.addExpectedReports(
// Only returnNullableBad triggers new errors in this fix chain (+9) and upper bound
// should be 9
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableBad(int)"), 9),
// Only returnNullableBad triggers new errors in this fix chain (+10) and upper bound
// should be 10
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableBad(int)"), 10),
// Only returnNullableGood triggers new errors in this fix chain (+1) and upper bound
// should be 1
new TReport(new OnMethod("Foo.java", "test.target.Foo", "returnNullableGood(int)"), 1),
// Root fix triggers 1 error on downstream dependency and returnNullableBad is
// present in the fix tree and triggers 9 errors on downstream dependency, therefore the
// upper bound effect for the tree should be 10.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "bar()"), 10))
// present in the fix tree and triggers 10 errors on downstream dependency, therefore the
// upper bound effect for the tree should be 11.
new TReport(new OnMethod("Foo.java", "test.target.Foo", "bar()"), 11))
.setPredicate(
(expected, found) ->
expected.root.equals(found.root)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
public class Foo {
Object field = new Object();

// Making this method will resolve 5 errors here and will introduce 1 new error here and 8 new
// Making this method will resolve 5 errors here and will introduce 1 new error here and 10 new
// errors on downstream dependencies.
// dependencies.
public Object returnNullableBad(int i) {
// Just to create 5 places where it returns nullable, so making this method @Nullable will
// resolve 5 NullAway errors
Expand Down