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 inference support for UCRTaint checker #194

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ae85f9b
add visitor architecture
nimakarimipour Apr 4, 2023
ed7bda6
update visitibility to public
nimakarimipour Apr 4, 2023
e64c754
use visitor for json creation of locations
nimakarimipour Apr 4, 2023
d695841
add visit method for visitor
nimakarimipour Apr 4, 2023
8eb6614
make singleton
nimakarimipour Apr 4, 2023
4204867
move KEYS to LocationToJsonVisitor
nimakarimipour Apr 5, 2023
3d4cd7a
Merge branch 'master' into nimak/add-visitor-loc
nimakarimipour Apr 8, 2023
548a392
Merge branch 'master' into nimak/visitor-for-json
nimakarimipour Apr 8, 2023
22a1a65
Merge branch 'nimak/add-visitor-loc' into nimak/visitor-for-json
nimakarimipour Apr 8, 2023
29ef390
merged latest master into this
nimakarimipour Apr 20, 2023
add1b53
Merge branch 'master' into nimak/local-var
nimakarimipour Apr 21, 2023
7d0a2ce
use stack instead
nimakarimipour Apr 21, 2023
e122344
add comment
nimakarimipour Apr 21, 2023
6d3f3e4
add a new line for field
nimakarimipour Apr 21, 2023
fb7e8a7
use OnMethod instance for local variable location:
nimakarimipour Apr 21, 2023
1e8b402
add javadoc
nimakarimipour Apr 21, 2023
cc86959
update
nimakarimipour May 2, 2023
a3c4b1d
update
nimakarimipour May 9, 2023
4592d93
Merge branch 'master' into nimak/local-var
nimakarimipour May 9, 2023
0e8483c
update
nimakarimipour May 9, 2023
6503403
intial impl
nimakarimipour May 9, 2023
2f4ac1e
update
nimakarimipour May 9, 2023
7999b56
Merge branch 'master' into nimak/local-var
nimakarimipour May 10, 2023
dcb9e78
merged master into this
nimakarimipour May 10, 2023
97a9ea4
add javadoc
nimakarimipour May 10, 2023
68316e9
add javadoc
nimakarimipour May 10, 2023
62fe352
Merge branch 'nimak/type-use' of github.com:ucr-riple/NullAwayAnnotat…
nimakarimipour May 10, 2023
53a0a69
Merge branch 'master' into nimak/local-var
nimakarimipour May 16, 2023
c972b6f
Merge branch 'nimak/local-var' into nimak/type-use
nimakarimipour May 16, 2023
4170c9d
init
nimakarimipour May 17, 2023
94bfbda
fix test
nimakarimipour May 17, 2023
07a6d3b
remove unused classes
nimakarimipour May 17, 2023
0947c5d
use prepare for build
nimakarimipour May 17, 2023
42543a2
delete write nullaway config as xml in utility
nimakarimipour May 17, 2023
f2e2a1e
fix bug
nimakarimipour May 17, 2023
9c56a43
rename checker name
nimakarimipour May 17, 2023
8c38412
update
nimakarimipour May 17, 2023
c2da72f
fix bug
nimakarimipour May 17, 2023
155aaca
fix up interface names
nimakarimipour May 17, 2023
42d3ee2
Merge branch 'nimak/local-var' into nimak/add-taint
nimakarimipour May 17, 2023
99271b6
Merge branch 'nimak/type-use' into nimak/add-taint
nimakarimipour May 17, 2023
37b09fd
initial
nimakarimipour May 17, 2023
da01475
rename and refactor
nimakarimipour May 18, 2023
9dd87ad
rename
nimakarimipour May 18, 2023
277173d
Merge branch 'nimak/generalize' into nimak/add-taint
nimakarimipour May 18, 2023
10e7098
update
nimakarimipour May 18, 2023
bc8b43f
update
nimakarimipour May 18, 2023
079f304
add UCRTaint to get checker by name
nimakarimipour May 18, 2023
7ffa8e0
update
nimakarimipour May 24, 2023
70402e8
merged master into this
nimakarimipour May 31, 2023
2c85855
remove unwanted changes
nimakarimipour May 31, 2023
8e6a2df
Merge branch 'master' into nimak/add-taint
nimakarimipour May 31, 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
use OnMethod instance for local variable location:
  • Loading branch information
nimakarimipour committed Apr 21, 2023
commit fb7e8a72819decab5175ab6da6f532ac4222e597
Original file line number Diff line number Diff line change
@@ -183,7 +183,7 @@ public Modification visitLocalVariable(
// already found the member.
return;
}
if (onLocalVariable.matchesCallableDeclaration(callableDeclaration)) {
if (onLocalVariable.encMethod.matchesCallableDeclaration(callableDeclaration)) {
// Find variable declaration in the callable declaration with the variable name.
VariableDeclarationExpr variableDeclarationExpr =
Helper.locateVariableDeclarationExpr(
Original file line number Diff line number Diff line change
@@ -24,9 +24,7 @@

package edu.ucr.cs.riple.injector.location;

import com.github.javaparser.ast.body.CallableDeclaration;
import edu.ucr.cs.riple.injector.Helper;
import edu.ucr.cs.riple.injector.SignatureMatcher;
import java.nio.file.Path;
import java.util.Objects;
import java.util.function.Consumer;
@@ -42,20 +40,14 @@
*/
public class OnLocalVariable extends Location {

/** Enclosing method signature of the target local variable. */
public final String encMethod;
/**
* Matcher for the method signature. Method signature is given as a string, this matcher is used
* to match the target.
*/
public final SignatureMatcher matcher;
/** Enclosing method of the target local variable. */
public final OnMethod encMethod;
/** Name of the local variable. */
public final String varName;

public OnLocalVariable(Path path, String clazz, String encMethod, String varName) {
super(LocationKind.LOCAL_VARIABLE, path, clazz);
this.encMethod = encMethod;
this.matcher = new SignatureMatcher(encMethod);
this.encMethod = new OnMethod(path, clazz, encMethod);
this.varName = varName;
}

@@ -106,14 +98,4 @@ public String toString() {
+ varName
+ '}';
}

/**
* Checks if the given method matches the method signature of this location.
*
* @param method method to check.
* @return true, if the given method matches the method signature of this location.
*/
public boolean matchesCallableDeclaration(CallableDeclaration<?> method) {
return this.matcher.matchesCallableDeclaration(method);
}
}