All ImageJ commands are listed in Plugins>Utilities>List Commands...
Despeckling is in ij.plugin.filter.RankFilters. In this class, Despeckling
becomes a Median filter with a radius of 1. Specifically, the method you'd
be interested in is rankFloat(ip, 1.0, MEDIAN) and findMedian(float a) in
the RankFilters class at