@@ -2926,7 +2926,12 @@ public Vector allValuesUsedIn()
29262926 } // ->iterate, add accumulator expression
29272927
29282928public void findClones(java.util.Map clones, String rule, String op)
2929- { if (this.syntacticComplexity() < UCDArea.CLONE_LIMIT)
2929+ { /* System.out.println(">>> complexity of " + this + " = " +
2930+ this.syntacticComplexity());
2931+ System.out.println(">>> Clone limit = " +
2932+ UCDArea.CLONE_LIMIT); */
2933+
2934+ if (this.syntacticComplexity() < UCDArea.CLONE_LIMIT)
29302935 { return; }
29312936 String val = this + "";
29322937 Vector used = (Vector) clones.get(val);
@@ -2941,6 +2946,30 @@ else if (op != null)
29412946 right.findClones(clones,rule,op);
29422947}
29432948
2949+ public void findClones(java.util.Map clones,
2950+ java.util.Map cloneDefs,
2951+ String rule, String op)
2952+ { /* System.out.println(">>> complexity of " + this + " = " +
2953+ this.syntacticComplexity());
2954+ System.out.println(">>> Clone limit = " +
2955+ UCDArea.CLONE_LIMIT); */
2956+
2957+ if (this.syntacticComplexity() < UCDArea.CLONE_LIMIT)
2958+ { return; }
2959+ String val = this + "";
2960+ Vector used = (Vector) clones.get(val);
2961+ if (used == null)
2962+ { used = new Vector(); }
2963+ if (rule != null)
2964+ { used.add(rule); }
2965+ else if (op != null)
2966+ { used.add(op); }
2967+ clones.put(val,used);
2968+ cloneDefs.put(val, this);
2969+ left.findClones(clones,cloneDefs,rule,op);
2970+ right.findClones(clones,cloneDefs,rule,op);
2971+ }
2972+
29442973 public void findMagicNumbers(java.util.Map mgns, String rule, String op)
29452974 { left.findMagicNumbers(mgns,rule,op);
29462975 right.findMagicNumbers(mgns,rule,op);
0 commit comments