Buggy code:
public class InvoiceService { private static final Logger log = LoggerFactory . getLogger ( InvoiceService . class ) ; private SendRegningService sendRegningService ; private UserService userService ; private ClubService clubService ; private Storage storage ; public InvoiceService ( Storage storage , UserService userService , ClubService clubService , SendRegningService sendRegningService ) { } public ServiceResponse createInvoiceForTeam ( Team team , int year ) { Map < Principal , TeamMembership > memberships = clubService . getTeamMembershipsForTeam ( team ) ; for ( Principal principal : memberships . keySet ( ) ) { TeamMembership membership = memberships . get ( principal ) ; if ( ! ( membership . isEnrolled ( ) ) ) { continue ; } if ( isPrincipalAlreadyInvoicedTeamParticipation ( principal , team , year ) ) { <START_BUG> return new ServiceResponse ( true , "Allerede<seq2seq4repair_space>fakturert." ) ; <END_BUG> } int feeCount = getTeamFeeInvoicedCountForPrincipal ( principal , year ) ; Family family = principal . getFamily ( ) ; Invoice invoice = ensureOpenInvoiceForFamily ( family ) ; InvoiceLine line = new InvoiceLine ( ) ; Product product = ProductResolver . getTeamParticipationProduct ( principal , team , feeCount , year ) ; line . setCreated ( new Date ( ) ) ; line . setTeamMembership ( membership ) ; membership . getInvoiceLines ( ) . add ( line ) ; line . setUnitPrice ( product . getUnitPrice ( ) ) ; line . setDescription ( product . getDescription ( ) ) ; line . setProductCode ( product . getProductCode ( ) ) ; line . setDiscountInPercent ( product . getDiscountInPercent ( ) ) ; line . setPrincipal ( principal ) ; principal . getInvoiceLines ( ) . add ( line ) ; line . setValidYear ( year ) ; line . setTaxPercent ( 0 ) ; line . setQuantity ( 1 ) ; line . setInvoice ( invoice ) ; invoice . getInvoiceLines ( ) . add ( line ) ; storage . begin ( ) ; try { storage . persist ( line ) ; storage . commit ( ) ; } catch ( RuntimeException e ) { storage . rollback ( ) ; InvoiceService . log . warn ( "Error<seq2seq4repair_space>during<seq2seq4repair_space>invoicing<seq2seq4repair_space>of<seq2seq4repair_space>team<seq2seq4repair_space>participation" , e ) ; return new ServiceResponse ( false , "Det<seq2seq4repair_space>oppstod<seq2seq4repair_space>en<seq2seq4repair_space>feil<seq2seq4repair_space>under<seq2seq4repair_space>fakturering." ) ; } } return new ServiceResponse ( true , ( ( "Aktivitetsavgift<seq2seq4repair_space>for<seq2seq4repair_space>" + ( team . getName ( ) ) ) + "<seq2seq4repair_space>fakturert." ) ) ; } private int getTeamFeeInvoicedCountForPrincipal ( Principal principal , int year ) { } private boolean isPrincipalAlreadyInvoicedTeamParticipation ( Principal principal , Team team , int year ) { } public ServiceResponse createClubMembershipInvoice ( int year ) { } public ServiceResponse createClubMembershipInvoiceForFamily ( Family family , int year ) { } private ServiceResponse createCombinedClubMembershipInvoiceForFamily ( Family family , int year ) { } private ServiceResponse createNoCombinedClubMembershipInvoiceForFamily ( Family family , int year ) { } private boolean isAlreadyInvoicedPrincipalClubMembership ( Principal principal , int year ) { } private boolean isAlreadyInvoicedFamilyClubMembership ( Family family , int year ) { } private Invoice ensureOpenInvoiceForFamily ( Family family ) { } public static boolean isThisYear ( Date date ) { } public static int getCurrentYear ( ) { } public Map < String , Long > getInvoiceCountPerStatusReport ( ) { } public List < Invoice > getInvoicesWithStatus ( Status status ) { } public String formatDate ( Date date ) { } public static boolean isStatusDeletable ( Invoice . Status status ) { } public static boolean isStatusSendable ( Invoice . Status status ) { } public ServiceResponse deleteInvoice ( long invoiceId ) { } public Invoice getInvoiceById ( long invoiceId ) { } public static int getInvoiceDueAmount ( Invoice invoice ) { } public static int getInvoiceLineSum ( InvoiceLine invoiceLine ) { } public ServiceResponse deleteAllInvoicesWithStatus ( Status status ) { } public ServiceResponse sendInvoice ( long invoiceId ) { } public ServiceResponse sendAllInvoicesWithStatus ( Status status ) { } public int getInvoiceCountForFamilyWithStatus ( Family family , Status status , int goBackMonths ) { } public List < Invoice > getInvoicesForFamilyWithStatus ( Family family , Status status , int goBackMonths ) { } }

Fix:
continue ;