Buggy code:
@ NotAllowedException , AccessRightException , EntityNotFoundException , UserNotActiveException { } @ PUT @ Path ( "//acl" ) @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) public Response updateACL ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion , ACLDTO acl ) throws AccessRightException , EntityNotFoundException , UserNotActiveException { } @ PUT @ Path ( "//newVersion" ) @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) public Response createNewVersion ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion , PartCreationDTO partCreationDTO ) throws NotAllowedException , AccessRightException , CreationException , EntityAlreadyExistsException , EntityNotFoundException { } @ PUT @ Path ( "//release" ) @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) public Response releasePartRevision ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion ) throws NotAllowedException , AccessRightException , EntityNotFoundException , UserNotActiveException { } @ DELETE @ Produces ( MediaType . APPLICATION_JSON ) public Response deletePartRevision ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion ) throws ESServerException , EntityConstraintException , EntityNotFoundException , UserNotActiveException { } @ DELETE @ Consumes ( MediaType . APPLICATION_JSON ) @ Path ( "//iterations//{partIteration}//files//{fileName}" ) public Response removeAttachedFile ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion , @ PathParam ( "partIteration" ) int partIteration , @ PathParam ( "fileName" ) String fileName ) throws EntityNotFoundException , UserNotActiveException { } @ POST @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) @ Path ( "//share" ) public Response createSharedPart ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion , SharedPartDTO pSharedPartDTO ) throws AccessRightException , EntityNotFoundException , UserNotActiveException { } @ PUT @ Consumes ( MediaType . APPLICATION_JSON ) @ Path ( "//publish" ) public Response publishPartRevision ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion ) throws AccessRightException , EntityNotFoundException , UserNotActiveException { } @ PUT @ Consumes ( MediaType . APPLICATION_JSON ) @ Path ( "//unpublish" ) public Response unPublishPartRevision ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion ) throws AccessRightException , EntityNotFoundException , UserNotActiveException { } @ GET @ Path ( "//aborted-workflows" ) @ Produces ( MediaType . APPLICATION_JSON ) public List < WorkflowDTO > getAbortedWorkflows ( @ PathParam ( "workspaceId" ) String workspaceId , @ PathParam ( "partNumber" ) String partNumber , @ PathParam ( "partVersion" ) String partVersion ) throws AccessRightException , EntityNotFoundException , UserNotActiveException { } private List < InstanceAttribute > createInstanceAttributes ( List < InstanceAttributeDTO > dtos ) { } private InstanceAttribute createInstanceAttribute ( InstanceAttributeDTO dto ) { } private List < PartUsageLink > createComponents ( String workspaceId , List < PartUsageLinkDTO > pComponents ) throws NotAllowedException , AccessRightException , CreationException , EntityAlreadyExistsException , EntityNotFoundException , UserNotActiveException { List < PartUsageLink > components = new ArrayList < > ( ) ; for ( PartUsageLinkDTO partUsageLinkDTO : pComponents ) { PartMaster component = findOrCreatePartMaster ( workspaceId , partUsageLinkDTO . getComponent ( ) ) ; if ( component != null ) { PartUsageLink partUsageLink = new PartUsageLink ( ) ; List < CADInstance > cadInstances = new ArrayList < > ( ) ; List < PartSubstituteLink > partSubstituteLinks = new ArrayList < > ( ) ; if ( ( partUsageLinkDTO . getCadInstances ( ) ) != null ) { for ( CADInstanceDTO cadInstanceDTO : partUsageLinkDTO . getCadInstances ( ) ) { cadInstances . add ( new CADInstance ( cadInstanceDTO . getTx ( ) , cadInstanceDTO . getTy ( ) , cadInstanceDTO . getTz ( ) , cadInstanceDTO . getRx ( ) , cadInstanceDTO . getRy ( ) , cadInstanceDTO . getRz ( ) ) ) ; } } else if ( ( ( partUsageLinkDTO . getUnit ( ) ) == null ) || ( partUsageLinkDTO . getUnit ( ) . isEmpty ( ) ) ) { for ( double i = 0 ; i < ( partUsageLinkDTO . getAmount ( ) ) ; i ++ ) { cadInstances . add ( new CADInstance ( 0 , 0 , 0 , 0 , 0 , 0 ) ) ; } } else { cadInstances . add ( new CADInstance ( 0 , 0 , 0 , 0 , 0 , 0 ) ) ; } for ( PartSubstituteLinkDTO substituteLinkDTO : partUsageLinkDTO . getSubstitutes ( ) ) { PartMaster substitute = findOrCreatePartMaster ( workspaceId , substituteLinkDTO . getSubstitute ( ) ) ; if ( substitute != null ) { PartSubstituteLink partSubstituteLink = mapper . map ( substituteLinkDTO , PartSubstituteLink . class ) ; List < CADInstance > subCADInstances = new ArrayList < > ( ) ; if ( ( substituteLinkDTO . getCadInstances ( ) ) != null ) { for ( CADInstanceDTO cadInstanceDTO : substituteLinkDTO . getCadInstances ( ) ) { subCADInstances . add ( new CADInstance ( cadInstanceDTO . getTx ( ) , cadInstanceDTO . getTy ( ) , cadInstanceDTO . getTz ( ) , cadInstanceDTO . getRx ( ) , cadInstanceDTO . getRy ( ) , cadInstanceDTO . getRz ( ) ) ) ; } } else if ( ( ( substituteLinkDTO . getUnit ( ) ) == null ) || ( substituteLinkDTO . getUnit ( ) . isEmpty ( ) ) ) { for ( double i = 0 ; i < ( substituteLinkDTO . getAmount ( ) ) ; i ++ ) { subCADInstances . add ( new CADInstance ( 0 , 0 , 0 , 0 , 0 , 0 ) ) ; } } else { <START_BUG> cadInstances . add ( new CADInstance ( 0 , 0 , 0 , 0 , 0 , 0 ) ) ; <END_BUG>

Fix:
subCADInstances . add ( new CADInstance ( 0 , 0 , 0 , 0 , 0 , 0 ) ) ;