Sorry, I can't reproduce it and the program code seems to be clear to me:
String action = (beingInNeedOfHelp.instance().isAlive()) ? "protect %i0 from" : "avenge %i0 who was killed by";
if (!being.you(Sense.SPEECH, "#scream: \"Help me to " + action + " %i1!\""
, new NoticeableBeing(beingInNeedOfHelp, beingInNeedOfHelpLabel)
, new NoticeableBeing(offender, offenderLabel)))
{
being.you(Sense.SIGHT, "#scream something!");
}