In the createSpdxPackage(), change return type to SPDXPackage.
Add simple clone().