Program: 28837
Project: 28837
Buggy source:
@Override public synchronized void onAdminCommandEvent(String name,GfSseInboundEvent event){
  try {
    if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
      ProgressStatusDTO dto=event.getData(ProgressStatusDTO.class,MediaType.APPLICATION_JSON_TYPE);
      client.mirror(dto);
      commandProgress=(CommandProgress)client.getProgressStatus();
      if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
        commandProgress.progress(strings.getString("String_Node_Str","String_Node_Str"));
      }
    }
 else     if (CommandProgress.EVENT_PROGRESSSTATUS_CHANGE.equals(name)) {
      if (commandProgress == null) {
        logger.log(Level.WARNING,strings.get("String_Node_Str","String_Node_Str"));
        return;
      }
      ProgressStatusEvent pse=event.getData(ProgressStatusEvent.class,MediaType.APPLICATION_JSON_TYPE);
      client.mirror(pse);
    }
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,strings.get("String_Node_Str","String_Node_Str"),ex);
  }
  if (commandProgress != null) {
    outMsg.setLength(0);
    boolean printIt=false;
    int percentage=Math.round(commandProgress.computeCompletePortion() * 100);
    if (percentage >= 0) {
      outMsg.append(percentage);
switch (outMsg.length()) {
case 1:
        outMsg.insert(0,"String_Node_Str");
      break;
case 2:
    outMsg.insert(0,' ');
  break;
default :
break;
}
outMsg.append('%');
if (percentage != lastPercentage) {
printIt=true;
lastPercentage=percentage;
}
}
 else {
int sumSteps=commandProgress.computeSumSteps();
outMsg.append(sumSteps);
if (sumSteps > lastSumSteps) {
printIt=true;
lastSumSteps=sumSteps;
}
}
String message=commandProgress.getLastMessage();
if (message != null && message.length() > 0) {
outMsg.append("String_Node_Str");
outMsg.append(message);
if (!message.equals(lastMessage)) {
printIt=true;
lastMessage=message;
}
}
if (printIt) {
if (disableAnimation || debugOutput) {
if (!firstPrint && !debugOutput) {
System.out.println();
}
firstPrint=false;
System.out.print(outMsg);
this.lastMsgLength=outMsg.length();
if (debugOutput) {
System.out.println();
}
}
 else {
if (!firstPrint) {
System.out.print('\r');
}
 else {
firstPrint=false;
}
System.out.print(outMsg);
System.out.print(' ');
int spaceCount=lastMsgLength - outMsg.length();
for (int i=0; i < spaceCount; i++) {
System.out.print(' ');
}
for (int i=0; i < spaceCount; i++) {
System.out.print('\b');
}
lastMsgLength=outMsg.length();
spinnerIndex=-1;
}
}
if (!debugOutput && commandProgress != null) {
if (commandProgress.isSpinnerActive()) {
if (this.ticker == null) {
this.ticker=new Ticker(disableAnimation ? 1500L : 500L);
this.ticker.start();
}
}
 else {
if (this.ticker != null) {
this.ticker.stopit();
this.ticker=null;
}
}
}
}
}

Fixed version (ground truth):
@Override public synchronized void onAdminCommandEvent(String name,GfSseInboundEvent event){
  try {
    if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
      ProgressStatusDTO dto=event.getData(ProgressStatusDTO.class,MediaType.APPLICATION_JSON_TYPE);
      client.mirror(dto);
      commandProgress=(CommandProgress)client.getProgressStatus();
      if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
        commandProgress.progress(strings.getString("String_Node_Str","String_Node_Str"));
      }
    }
 else     if (CommandProgress.EVENT_PROGRESSSTATUS_CHANGE.equals(name)) {
      if (commandProgress == null) {
        logger.log(Level.WARNING,strings.get("String_Node_Str","String_Node_Str"));
        return;
      }
      ProgressStatusEvent pse=event.getData(ProgressStatusEvent.class,MediaType.APPLICATION_JSON_TYPE);
      client.mirror(pse);
    }
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,strings.get("String_Node_Str","String_Node_Str"),ex);
  }
  if (commandProgress != null) {
    outMsg.setLength(0);
    boolean printIt=false;
    int percentage=Math.round(commandProgress.computeCompletePortion() * 100);
    if (percentage >= 0) {
      outMsg.append(percentage);
switch (outMsg.length()) {
case 1:
        outMsg.insert(0,"String_Node_Str");
      break;
case 2:
    outMsg.insert(0,' ');
  break;
default :
break;
}
outMsg.append('%');
if (percentage != lastPercentage) {
printIt=true;
lastPercentage=percentage;
}
}
 else {
int sumSteps=commandProgress.computeSumSteps();
outMsg.append(sumSteps);
if (sumSteps > lastSumSteps) {
printIt=true;
lastSumSteps=sumSteps;
}
}
String message=commandProgress.getLastMessage();
if (message != null && message.length() > 0) {
outMsg.append("String_Node_Str");
outMsg.append(message);
if (!message.equals(lastMessage)) {
printIt=true;
lastMessage=message;
}
}
if (printIt) {
if (disableAnimation || debugOutput) {
if (!firstPrint && !debugOutput) {
System.out.println();
}
firstPrint=false;
System.out.print(outMsg);
this.lastMsgLength=outMsg.length();
if (debugOutput) {
System.out.println();
}
}
 else {
if (!firstPrint) {
System.out.print('\r');
}
 else {
firstPrint=false;
}
System.out.print(outMsg);
System.out.print(' ');
int spaceCount=lastMsgLength - outMsg.length();
for (int i=0; i < spaceCount; i++) {
System.out.print(' ');
}
for (int i=0; i < spaceCount; i++) {
System.out.print('\b');
}
lastMsgLength=outMsg.length();
spinnerIndex=-1;
}
}
if (!debugOutput) {
if (commandProgress.isSpinnerActive()) {
if (this.ticker == null) {
this.ticker=new Ticker(disableAnimation ? 1500L : 500L);
this.ticker.start();
}
}
 else {
if (this.ticker != null) {
this.ticker.stopit();
this.ticker=null;
}
}
}
}
}