debug message bugfix on duplicate tree leaf names.
authorjprocter <Jim Procter>
Tue, 10 Oct 2006 15:31:41 +0000 (15:31 +0000)
committerjprocter <Jim Procter>
Tue, 10 Oct 2006 15:31:41 +0000 (15:31 +0000)
src/jalview/analysis/NJTree.java

index 3f5f442..4cd123f 100755 (executable)
@@ -133,7 +133,7 @@ public class NJTree
         SequenceI nam;
         String realnam;
         Vector one2many=new Vector();
-
+        int countOne2Many=0;
         while (i < leaves.size())
         {
             j = (SequenceNode) leaves.elementAt(i++);
@@ -149,6 +149,7 @@ public class NJTree
             {
                 j.setElement(nam);
                 if (one2many.contains(nam)) {
+                  countOne2Many++;
                   if (jalview.bin.Cache.log.isDebugEnabled())
                     jalview.bin.Cache.log.debug("One 2 many relationship for "+nam.getName());
                 } else {
@@ -162,8 +163,8 @@ public class NJTree
                 j.setPlaceholder(true);
             }
         }
-        if (jalview.bin.Cache.log.isDebugEnabled()) {
-          jalview.bin.Cache.log.debug("There were "+one2many.size()+" alignment sequences linked to two or more leaves.");
+        if (jalview.bin.Cache.log.isDebugEnabled() && countOne2Many>0) {
+          jalview.bin.Cache.log.debug("There were "+countOne2Many+" alignment sequence ids (out of "+one2many.size()+" unique ids) linked to two or more leaves.");
         }
         one2many.clear();
     }