This question is about standing waves, the bar of chocolate melts only in the positions where antinodes are formed on the standing wave as they transfer the most energy as they have the greatest amplitude of vibration, the unmelted parts are where nodes were formed along the standing wave, points of zero amplitude.