code: private Collection<DuplicateCode> convert(final List<Set> duplications, final String moduleName) {
          List<DuplicateCode> annotations = new ArrayList<DuplicateCode>();
  
          for (Set duplication : duplications) {
              List<DuplicateCode> codeBlocks = new ArrayList<DuplicateCode>();
              boolean isDerived = false;
              for (Block file : duplication.getBlocks()) {
                  DuplicateCode annotation = new DuplicateCode(getPriority(duplication.getLineCount()), file.getStartLineNumber(), duplication.getLineCount(), file.getSourceFile(), isDerived);
                  annotation.setModuleName(moduleName);
                  codeBlocks.add(annotation);
                  isDerived = true;
              }
              for (DuplicateCode block : codeBlocks) {
                  block.linkTo(codeBlocks);
  
                  String packageName = PackageDetectors.detectPackageName(block.getFileName());
                  block.setPackageName(packageName);
              }
              annotations.addAll(codeBlocks);
          }
          return annotations;
      }
docs: Converts the internal structure to the annotations API.
  
  @param duplications
  the internal maven module
  @param moduleName
  name of the maven module
  @return a maven module of the annotations API