|
13 | 13 | import java.util.Arrays; |
14 | 14 |
|
15 | 15 | import com.google.common.base.Joiner; |
16 | | -import soot.*; |
| 16 | + |
| 17 | +import soot.Local; |
| 18 | +import soot.NullType; |
| 19 | +import soot.SootField; |
| 20 | +import soot.Type; |
| 21 | +import soot.Value; |
17 | 22 | import soot.jimple.ArrayRef; |
18 | 23 | import soot.jimple.InstanceFieldRef; |
19 | 24 | import soot.jimple.Jimple; |
@@ -66,18 +71,18 @@ private AccessPath() { |
66 | 71 |
|
67 | 72 | AccessPath(Local val, SootField[] appendingFields, Type valType, Type[] appendingFieldTypes, boolean taintSubFields, |
68 | 73 | boolean isCutOffApproximation, ArrayTaintType arrayTaintType, boolean canHaveImmutableAliases) { |
69 | | - this(val, valType, null, |
70 | | - AccessPathFragment.createFragmentArray(appendingFields, appendingFieldTypes, null), |
71 | | - taintSubFields, isCutOffApproximation, arrayTaintType, canHaveImmutableAliases); |
| 74 | + this(val, valType, null, AccessPathFragment.createFragmentArray(appendingFields, appendingFieldTypes, null), |
| 75 | + taintSubFields, isCutOffApproximation, arrayTaintType, canHaveImmutableAliases); |
72 | 76 | } |
73 | 77 |
|
74 | 78 | AccessPath(Local val, Type valType, AccessPathFragment[] fragments, boolean taintSubFields, |
75 | 79 | boolean isCutOffApproximation, ArrayTaintType arrayTaintType, boolean canHaveImmutableAliases) { |
76 | | - this(val, valType, null, fragments, taintSubFields, isCutOffApproximation, arrayTaintType, canHaveImmutableAliases); |
| 80 | + this(val, valType, null, fragments, taintSubFields, isCutOffApproximation, arrayTaintType, |
| 81 | + canHaveImmutableAliases); |
77 | 82 | } |
78 | 83 |
|
79 | 84 | AccessPath(Local val, Type valType, ContainerContext[] ctxt, AccessPathFragment[] fragments, boolean taintSubFields, |
80 | | - boolean isCutOffApproximation, ArrayTaintType arrayTaintType, boolean canHaveImmutableAliases) { |
| 85 | + boolean isCutOffApproximation, ArrayTaintType arrayTaintType, boolean canHaveImmutableAliases) { |
81 | 86 | this.value = val; |
82 | 87 | this.baseType = valType; |
83 | 88 | this.baseContext = ctxt; |
@@ -238,6 +243,7 @@ public int hashCode() { |
238 | 243 | } |
239 | 244 |
|
240 | 245 | private int hashCodeWOContext = 0; |
| 246 | + |
241 | 247 | public int hashCodeWithoutContext() { |
242 | 248 | if (hashCodeWOContext != 0) |
243 | 249 | return hashCodeWOContext; |
@@ -311,7 +317,8 @@ public boolean equalsWithoutContext(Object obj) { |
311 | 317 |
|
312 | 318 | AccessPath other = (AccessPath) obj; |
313 | 319 |
|
314 | | - if (this.hashCodeWOContext != 0 && other.hashCodeWOContext != 0 && this.hashCodeWOContext != other.hashCodeWOContext) |
| 320 | + if (this.hashCodeWOContext != 0 && other.hashCodeWOContext != 0 |
| 321 | + && this.hashCodeWOContext != other.hashCodeWOContext) |
315 | 322 | return false; |
316 | 323 |
|
317 | 324 | if (value == null) { |
@@ -500,7 +507,6 @@ public ContainerContext[] getBaseContext() { |
500 | 507 | return this.baseContext; |
501 | 508 | } |
502 | 509 |
|
503 | | - |
504 | 510 | /** |
505 | 511 | * Gets whether sub-fields shall be tainted. If this access path is e.g. a.b.*, |
506 | 512 | * the result is true, whereas it is false for a.b. |
@@ -573,7 +579,7 @@ public boolean getCanHaveImmutableAliases() { |
573 | 579 | * |
574 | 580 | * @return The access path that is used in the zero abstraction |
575 | 581 | */ |
576 | | - static AccessPath getZeroAccessPath() { |
| 582 | + public static AccessPath getZeroAccessPath() { |
577 | 583 | if (zeroAccessPath == null) |
578 | 584 | zeroAccessPath = new AccessPath(Jimple.v().newLocal("zero", NullType.v()), null, NullType.v(), null, false, |
579 | 585 | false, ArrayTaintType.ContentsAndLength, false); |
|
0 commit comments