Program: 62054
Project: 62054
Buggy source:
private static String convertFrame(boolean shapeTween,HashMap<Integer,CharacterTag> characters,List<Tag> tags,SoundStreamHeadTypeTag soundStreamHead,StartSoundTag startSound,int frame,String frameName,boolean isAnchor,int duration,String actionScript,String elements){
  String ret="String_Node_Str";
  DefineSoundTag sound=null;
  if (startSound != null) {
    for (    Tag t : tags) {
      if (t instanceof DefineSoundTag) {
        DefineSoundTag s=(DefineSoundTag)t;
        if (s.soundId == startSound.soundId) {
          sound=s;
          break;
        }
      }
    }
  }
  ret+="String_Node_Str" + (frame) + "String_Node_Str";
  if (duration > 1) {
    ret+="String_Node_Str" + duration + "String_Node_Str";
  }
  if (frameName != null) {
    ret+="String_Node_Str" + frameName + "String_Node_Str";
    if (isAnchor) {
      ret+="String_Node_Str";
    }
 else {
      ret+="String_Node_Str";
    }
    isAnchor=false;
    frameName=null;
  }
  if (shapeTween) {
    ret+="String_Node_Str" + KEY_MODE_SHAPE_TWEEN + "String_Node_Str";
  }
 else {
    ret+="String_Node_Str" + KEY_MODE_NORMAL + "String_Node_Str";
  }
  String soundEnvelopeStr="String_Node_Str";
  if (soundStreamHead != null) {
    ret+="String_Node_Str" + soundStreamHead.getCharacterId() + "String_Node_Str"+ soundStreamHead.getExportFormat()+ "String_Node_Str";
    ret+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
  }
  if (startSound != null && sound != null) {
    ret+="String_Node_Str" + sound.soundId + "String_Node_Str"+ sound.getExportFormat()+ "String_Node_Str";
    if (startSound.soundInfo.hasInPoint) {
      ret+="String_Node_Str" + startSound.soundInfo.inPoint + "String_Node_Str";
    }
    if (startSound.soundInfo.hasOutPoint) {
      ret+="String_Node_Str" + startSound.soundInfo.outPoint + "String_Node_Str";
    }
    if (startSound.soundInfo.hasLoops) {
      if (startSound.soundInfo.loopCount == 32767) {
        ret+="String_Node_Str";
      }
      ret+="String_Node_Str" + startSound.soundInfo.loopCount + "String_Node_Str";
    }
    if (startSound.soundInfo.syncStop) {
      ret+="String_Node_Str";
    }
 else     if (startSound.soundInfo.syncNoMultiple) {
      ret+="String_Node_Str";
    }
    ;
    soundEnvelopeStr+="String_Node_Str";
    if (startSound.soundInfo.hasEnvelope) {
      for (      SOUNDENVELOPE env : startSound.soundInfo.envelopeRecords) {
        soundEnvelopeStr+="String_Node_Str" + env.pos44 + "String_Node_Str"+ env.leftLevel+ "String_Node_Str"+ env.rightLevel+ "String_Node_Str";
      }
      if (startSound.soundInfo.envelopeRecords.length == 1 && startSound.soundInfo.envelopeRecords[0].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 0) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 1 && startSound.soundInfo.envelopeRecords[0].leftLevel == 0 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 32768) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 2 && startSound.soundInfo.envelopeRecords[0].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 0 && startSound.soundInfo.envelopeRecords[1].leftLevel == 0 && startSound.soundInfo.envelopeRecords[1].pos44 == sound.soundSampleCount && startSound.soundInfo.envelopeRecords[1].rightLevel == 32768) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 2 && startSound.soundInfo.envelopeRecords[0].leftLevel == 0 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 32768 && startSound.soundInfo.envelopeRecords[1].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[1].pos44 == sound.soundSampleCount && startSound.soundInfo.envelopeRecords[1].rightLevel == 0) {
        ret+="String_Node_Str";
      }
 else {
        ret+="String_Node_Str";
      }
    }
 else {
      soundEnvelopeStr+="String_Node_Str";
    }
    soundEnvelopeStr+="String_Node_Str";
  }
  ret+="String_Node_Str";
  ret+=soundEnvelopeStr;
  if (!actionScript.equals("String_Node_Str")) {
    ret+="String_Node_Str";
    ret+=actionScript;
    ret+="String_Node_Str";
  }
  ret+="String_Node_Str";
  ret+=elements;
  ret+="String_Node_Str";
  ret+="String_Node_Str";
  return ret;
}

Fixed version (ground truth):
private static String convertFrame(boolean shapeTween,HashMap<Integer,CharacterTag> characters,List<Tag> tags,SoundStreamHeadTypeTag soundStreamHead,StartSoundTag startSound,int frame,int duration,String actionScript,String elements){
  String ret="String_Node_Str";
  DefineSoundTag sound=null;
  if (startSound != null) {
    for (    Tag t : tags) {
      if (t instanceof DefineSoundTag) {
        DefineSoundTag s=(DefineSoundTag)t;
        if (s.soundId == startSound.soundId) {
          sound=s;
          break;
        }
      }
    }
  }
  ret+="String_Node_Str" + (frame) + "String_Node_Str";
  if (duration > 1) {
    ret+="String_Node_Str" + duration + "String_Node_Str";
  }
  if (shapeTween) {
    ret+="String_Node_Str" + KEY_MODE_SHAPE_TWEEN + "String_Node_Str";
  }
 else {
    ret+="String_Node_Str" + KEY_MODE_NORMAL + "String_Node_Str";
  }
  String soundEnvelopeStr="String_Node_Str";
  if (soundStreamHead != null) {
    ret+="String_Node_Str" + soundStreamHead.getCharacterId() + "String_Node_Str"+ soundStreamHead.getExportFormat()+ "String_Node_Str";
    ret+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
    soundEnvelopeStr+="String_Node_Str";
  }
  if (startSound != null && sound != null) {
    ret+="String_Node_Str" + sound.soundId + "String_Node_Str"+ sound.getExportFormat()+ "String_Node_Str";
    if (startSound.soundInfo.hasInPoint) {
      ret+="String_Node_Str" + startSound.soundInfo.inPoint + "String_Node_Str";
    }
    if (startSound.soundInfo.hasOutPoint) {
      ret+="String_Node_Str" + startSound.soundInfo.outPoint + "String_Node_Str";
    }
    if (startSound.soundInfo.hasLoops) {
      if (startSound.soundInfo.loopCount == 32767) {
        ret+="String_Node_Str";
      }
      ret+="String_Node_Str" + startSound.soundInfo.loopCount + "String_Node_Str";
    }
    if (startSound.soundInfo.syncStop) {
      ret+="String_Node_Str";
    }
 else     if (startSound.soundInfo.syncNoMultiple) {
      ret+="String_Node_Str";
    }
    ;
    soundEnvelopeStr+="String_Node_Str";
    if (startSound.soundInfo.hasEnvelope) {
      for (      SOUNDENVELOPE env : startSound.soundInfo.envelopeRecords) {
        soundEnvelopeStr+="String_Node_Str" + env.pos44 + "String_Node_Str"+ env.leftLevel+ "String_Node_Str"+ env.rightLevel+ "String_Node_Str";
      }
      if (startSound.soundInfo.envelopeRecords.length == 1 && startSound.soundInfo.envelopeRecords[0].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 0) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 1 && startSound.soundInfo.envelopeRecords[0].leftLevel == 0 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 32768) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 2 && startSound.soundInfo.envelopeRecords[0].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 0 && startSound.soundInfo.envelopeRecords[1].leftLevel == 0 && startSound.soundInfo.envelopeRecords[1].pos44 == sound.soundSampleCount && startSound.soundInfo.envelopeRecords[1].rightLevel == 32768) {
        ret+="String_Node_Str";
      }
 else       if (startSound.soundInfo.envelopeRecords.length == 2 && startSound.soundInfo.envelopeRecords[0].leftLevel == 0 && startSound.soundInfo.envelopeRecords[0].pos44 == 0 && startSound.soundInfo.envelopeRecords[0].rightLevel == 32768 && startSound.soundInfo.envelopeRecords[1].leftLevel == 32768 && startSound.soundInfo.envelopeRecords[1].pos44 == sound.soundSampleCount && startSound.soundInfo.envelopeRecords[1].rightLevel == 0) {
        ret+="String_Node_Str";
      }
 else {
        ret+="String_Node_Str";
      }
    }
 else {
      soundEnvelopeStr+="String_Node_Str";
    }
    soundEnvelopeStr+="String_Node_Str";
  }
  ret+="String_Node_Str";
  ret+=soundEnvelopeStr;
  if (!actionScript.equals("String_Node_Str")) {
    ret+="String_Node_Str";
    ret+=actionScript;
    ret+="String_Node_Str";
  }
  ret+="String_Node_Str";
  ret+=elements;
  ret+="String_Node_Str";
  ret+="String_Node_Str";
  return ret;
}