function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Admin DNAAdmin DNA 

findDuplicates "The list of results isn't the same size as the input list"

I receive this error " The list of results isn't the same size as the input list" when I run this class:
public static void findDuplicates() {
        Lead ld = new Lead(LastName='aaa', MobilePhone='11', Phone='11', Email='', LeadSource='Passaparola');
        Lead ld1 = new Lead(LastName='aaa', MobilePhone='111', Phone='111', Email='', LeadSource='Passaparola');
        List<Lead> leadList = new List<Lead>();
        Datacloud.FindDuplicatesResult[] results = Datacloud.FindDuplicates.findDuplicates(leadList);
        for (Datacloud.FindDuplicatesResult findDupeResult : results) {
          for (Datacloud.DuplicateResult dupeResult : findDupeResult.getDuplicateResults()) {
            for (Datacloud.MatchResult matchResult : dupeResult.getMatchResults()) {
              for (Datacloud.MatchRecord matchRecord : matchResult.getMatchRecords()) {
                  System.debug('Duplicate Record: ' + matchRecord.getRecord());
Any Ideas?
thanks in advance