The Gilbert and Sullivan comic operetta that Data had been rehearsing in 2375, a song from which Picard and Worf sing over a comm channel to distract the malfunctioning android in Star Trek: Insurrection.
HMS Pinafore is a nineteenth-century English operetta by W. S. Gilbert and Arthur Sullivan. In Star Trek: Insurrection, Data had been rehearsing a part in a production aboard the Enterprise-E before he was lent to the Federation and Son'a observation team on the Ba'ku planet.
When Data, damaged and running on his ethical subroutines, attacks the observers and takes to a scoutship, Picard and Worf pursue him in a shuttle. Unable to reason with him, Picard starts singing A British Tar, one of the numbers Data had been practising, and orders a reluctant Worf to join in.
Data cannot help taking up his part, and the moment's distraction lets the shuttle lock on and dock with his ship so that he can be shut down and repaired.