From 81169ae7217fb3d19c1d344365b60fa785c75144 Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 10 Jan 2011 19:39:50 +0000 Subject: [PATCH] make reach graph visualizations tractable --- Robust/src/Analysis/Disjoint/RefEdge.java | 2 +- Robust/src/Analysis/Disjoint/TaintSet.java | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Robust/src/Analysis/Disjoint/RefEdge.java b/Robust/src/Analysis/Disjoint/RefEdge.java index 46572086..ef94365d 100644 --- a/Robust/src/Analysis/Disjoint/RefEdge.java +++ b/Robust/src/Analysis/Disjoint/RefEdge.java @@ -275,7 +275,7 @@ public class RefEdge { if( !hideEdgeTaints ) { if( !taints.isEmpty() ) { - s += "\\nt: "+taints.toString(); + s += "\\n"+taints.toStringEscNewline(); } } diff --git a/Robust/src/Analysis/Disjoint/TaintSet.java b/Robust/src/Analysis/Disjoint/TaintSet.java index b0005b3b..49319c50 100644 --- a/Robust/src/Analysis/Disjoint/TaintSet.java +++ b/Robust/src/Analysis/Disjoint/TaintSet.java @@ -111,6 +111,22 @@ public class TaintSet extends Canonical { public int hashCodeSpecific() { return taints.hashCode(); } + + public String toStringEscNewline() { + String s = "taints["; + + Iterator tItr = taints.iterator(); + while( tItr.hasNext() ) { + Taint t = tItr.next(); + + s += t.toString(); + if( tItr.hasNext() ) { + s += ",\\n"; + } + } + s += "]"; + return s; + } public String toString() { return taints.toString(); -- 2.34.1