File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
soot-infoflow/src/soot/jimple/infoflow/problems Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -127,4 +127,44 @@ public int size() {
127127 return results == null ? 0 : results .size ();
128128 }
129129
130+ @ Override
131+ public int hashCode () {
132+ final int prime = 31 ;
133+ int result = 1 ;
134+ result = prime * result + ((results == null ) ? 0 : results .hashCode ());
135+ return result ;
136+ }
137+
138+ @ Override
139+ public boolean equals (Object obj ) {
140+ if (this == obj )
141+ return true ;
142+ if (obj == null )
143+ return false ;
144+ if (getClass () != obj .getClass ())
145+ return false ;
146+ TaintPropagationResults other = (TaintPropagationResults ) obj ;
147+ if (results == null ) {
148+ if (other .results != null )
149+ return false ;
150+ } else if (!results .equals (other .results ))
151+ return false ;
152+ return true ;
153+ }
154+
155+ @ Override
156+ public String toString () {
157+ StringBuilder sb = new StringBuilder ();
158+ if (results != null && !results .isEmpty ()) {
159+ for (AbstractionAtSink aas : results .keySet ()) {
160+ sb .append ("Abstraction: " );
161+ sb .append (aas .getAbstraction ());
162+ sb .append (" at " );
163+ sb .append (aas .getSinkStmt ());
164+ sb .append ("\n " );
165+ }
166+ }
167+ return sb .toString ();
168+ }
169+
130170}
You can’t perform that action at this time.
0 commit comments