Program: 79540
Project: 79540
Buggy source:
protected String getActiveTaskStatusString(int verbosity){
  String rv="String_Node_Str";
  Thread t=getThread();
  if (t == null) {
    if (isDone()) {
      return getStatusString(verbosity);
    }
 else {
      return "String_Node_Str";
    }
  }
  ThreadInfo ti=ManagementFactory.getThreadMXBean().getThreadInfo(t.getId(),(verbosity <= 0 ? 0 : verbosity == 1 ? 1 : Integer.MAX_VALUE));
  if (getThread() == null)   return getStatusString(verbosity);
  if (verbosity >= 1 && GroovyJavaMethods.truth(blockingDetails)) {
    if (verbosity == 1)     return blockingDetails;
    rv=blockingDetails + "String_Node_Str";
  }
  if (verbosity >= 1 && GroovyJavaMethods.truth(blockingTask)) {
    if (verbosity == 1)     return "String_Node_Str" + blockingTask;
    rv="String_Node_Str" + blockingTask + "String_Node_Str";
  }
  if (verbosity >= 2) {
    if (getExtraStatusText() != null) {
      rv+=getExtraStatusText() + "String_Node_Str";
    }
    rv+="String_Node_Str" + toString() + "String_Node_Str";
    if (submittedByTask != null) {
      rv+="String_Node_Str" + submittedByTask + "String_Node_Str";
    }
    if (this instanceof HasTaskChildren) {
      try {
        Iterable<Task<?>> childrenTasks=((HasTaskChildren)this).getChildren();
        if (childrenTasks.iterator().hasNext()) {
          rv+="String_Node_Str";
          for (          Task<?> child : childrenTasks) {
            rv+="String_Node_Str" + child + "String_Node_Str"+ child.getStatusDetail(false)+ "String_Node_Str";
          }
        }
      }
 catch (      ConcurrentModificationException exc) {
        rv+="String_Node_Str";
      }
    }
    rv+="String_Node_Str";
  }
  LockInfo lock=ti.getLockInfo();
  if (!GroovyJavaMethods.truth(lock) && ti.getThreadState() == Thread.State.RUNNABLE) {
    if (ti.isSuspended()) {
      rv+="String_Node_Str";
      if (verbosity >= 1)       rv+="String_Node_Str";
    }
 else {
      rv+="String_Node_Str";
      if (verbosity >= 1)       rv+="String_Node_Str" + ti.getThreadState() + "String_Node_Str";
    }
  }
 else {
    rv+="String_Node_Str";
    if (verbosity >= 1) {
      if (ti.getThreadState() == Thread.State.BLOCKED) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else       if (ti.getThreadState() == Thread.State.WAITING) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else       if (ti.getThreadState() == Thread.State.TIMED_WAITING) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else {
        rv="String_Node_Str" + ti.getThreadState() + "String_Node_Str"+ lookup(lock);
      }
    }
  }
  if (verbosity >= 2) {
    StackTraceElement[] st=ti.getStackTrace();
    st=brooklyn.util.javalang.StackTraceSimplifier.cleanStackTrace(st);
    if (st != null && st.length > 0)     rv+="String_Node_Str" + "String_Node_Str" + st[0];
    for (int ii=1; ii < st.length; ii++) {
      rv+="String_Node_Str" + "String_Node_Str" + st[ii];
    }
  }
  return rv;
}

Fixed version (ground truth):
protected String getActiveTaskStatusString(int verbosity){
  String rv="String_Node_Str";
  Thread t=getThread();
  if (t == null) {
    if (isDone()) {
      return getStatusString(verbosity);
    }
 else {
      return "String_Node_Str";
    }
  }
  ThreadInfo ti=ManagementFactory.getThreadMXBean().getThreadInfo(t.getId(),(verbosity <= 0 ? 0 : verbosity == 1 ? 1 : Integer.MAX_VALUE));
  if (getThread() == null)   return getStatusString(verbosity);
  if (verbosity >= 1 && Strings.isNonBlank(blockingDetails)) {
    if (verbosity == 1)     return blockingDetails;
    rv=blockingDetails + "String_Node_Str";
  }
  if (verbosity >= 1 && blockingTask != null) {
    if (verbosity == 1)     return "String_Node_Str" + blockingTask;
    rv="String_Node_Str" + blockingTask + "String_Node_Str";
  }
  if (verbosity >= 2) {
    if (getExtraStatusText() != null) {
      rv+=getExtraStatusText() + "String_Node_Str";
    }
    rv+="String_Node_Str" + toString() + "String_Node_Str";
    if (submittedByTask != null) {
      rv+="String_Node_Str" + submittedByTask + "String_Node_Str";
    }
    if (this instanceof HasTaskChildren) {
      try {
        Iterable<Task<?>> childrenTasks=((HasTaskChildren)this).getChildren();
        if (childrenTasks.iterator().hasNext()) {
          rv+="String_Node_Str";
          for (          Task<?> child : childrenTasks) {
            rv+="String_Node_Str" + child + "String_Node_Str"+ child.getStatusDetail(false)+ "String_Node_Str";
          }
        }
      }
 catch (      ConcurrentModificationException exc) {
        rv+="String_Node_Str";
      }
    }
    rv+="String_Node_Str";
  }
  LockInfo lock=ti.getLockInfo();
  rv+="String_Node_Str";
  if (verbosity >= 1) {
    if (lock == null && ti.getThreadState() == Thread.State.RUNNABLE) {
      if (ti.isSuspended()) {
        rv+="String_Node_Str";
      }
 else {
        if (verbosity >= 2)         rv+="String_Node_Str" + ti.getThreadState() + "String_Node_Str";
      }
    }
 else {
      rv+="String_Node_Str";
      if (ti.getThreadState() == Thread.State.BLOCKED) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else       if (ti.getThreadState() == Thread.State.WAITING) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else       if (ti.getThreadState() == Thread.State.TIMED_WAITING) {
        rv+="String_Node_Str" + lookup(lock);
      }
 else {
        rv="String_Node_Str" + ti.getThreadState() + "String_Node_Str"+ lookup(lock);
      }
    }
  }
  if (verbosity >= 2) {
    StackTraceElement[] st=ti.getStackTrace();
    st=brooklyn.util.javalang.StackTraceSimplifier.cleanStackTrace(st);
    if (st != null && st.length > 0)     rv+="String_Node_Str" + "String_Node_Str" + st[0];
    for (int ii=1; ii < st.length; ii++) {
      rv+="String_Node_Str" + "String_Node_Str" + st[ii];
    }
  }
  return rv;
}