Buggy code:
public class CampaignStatisticsDialogContent implements DialogContent { private JPanel m_content ; private final CampaignDataManager m_cdm ; private final CampaignStatisticsDialogContent . CampaignStatistics m_stats ; public CampaignStatisticsDialogContent ( CampaignDataManager cdm ) { } @ Override public Component getContent ( ) { } @ Override public void setDialogEditListener ( EditListener el ) { } @ Override public boolean isDataCommittable ( ) { } @ Override public boolean isCommitPermitted ( ) { } private JLabel buildLabel ( String text ) { } private JLabel buildValueLabel ( Object value ) { } private void initialize ( ) { } private CampaignStatisticsDialogContent . CampaignStatistics processData ( ) { CampaignStatisticsDialogContent . CampaignStatistics cs = new CampaignStatisticsDialogContent . CampaignStatistics ( ) ; Campaign campaign = m_cdm . getData ( ) ; Set < UUID > secretEntityIds = new HashSet < > ( ) ; for ( Entity entity : campaign . getEntities ( ) ) { cs . entities += 1 ; if ( entity . isSecret ( ) ) { cs . secretEntities += 1 ; secretEntityIds . add ( entity . getId ( ) ) ; } switch ( entity . getType ( ) ) { case EVENT : cs . events += 1 ; break ; case ITEM : cs . items += 1 ; break ; case NON_PLAYER_CHARACTER : cs . npcs += 1 ; break ; case ORGANIZATION : cs . organizations += 1 ; break ; case PLACE : cs . places += 1 ; break ; case PLAYER_CHARACTER : cs . pcs += 1 ; break ; } String description = entity . getPublicData ( ) . getDescription ( ) . trim ( ) ; String secretDescription = entity . getSecretData ( ) . getDescription ( ) . trim ( ) ; if ( ! ( secretDescription . isEmpty ( ) ) ) { cs . secretDescriptionWords += secretDescription . split ( "<seq2seq4repair_space>" ) . length ; cs . descriptionWords += secretDescription . split ( "<seq2seq4repair_space>" ) . length ; } if ( ! ( description . isEmpty ( ) ) ) { cs . descriptionWords += description . split ( "<seq2seq4repair_space>" ) . length ; } int secretTags = entity . getSecretData ( ) . getTags ( ) . size ( ) ; cs . secretTags += secretTags ; cs . tags += ( entity . getPublicData ( ) . getTags ( ) . size ( ) ) + secretTags ; cs . secretRelationships += entity . getSecretData ( ) . getRelationships ( ) . size ( ) ; <START_BUG> cs . relationships += ( entity . getPublicData ( ) . getRelationships ( ) . size ( ) ) + ( cs . secretRelationships ) ; <END_BUG> } Set < TimelineEntry > timelineEntries = campaign . getTimelineEntries ( ) ; cs . timelineEntries = timelineEntries . size ( ) ; for ( TimelineEntry tle : timelineEntries ) { if ( secretEntityIds . contains ( tle . getAssociatedId ( ) ) ) { cs . timelineEntriesLinkingToSecretEntities += 1 ; } } cs . configuredMonths = campaign . getCalendar ( ) . getMonths ( ) . size ( ) ; return cs ; } private class CampaignStatistics { private int entities = 0 ; private int secretEntities = 0 ; private int events = 0 ; private int pcs = 0 ; private int npcs = 0 ; private int places = 0 ; private int organizations = 0 ; private int items = 0 ; private int descriptionWords = 0 ; private int secretDescriptionWords = 0 ; private int tags = 0 ; private int secretTags = 0 ; private int relationships = 0 ; private int secretRelationships = 0 ; private int timelineEntries = 0 ; private int timelineEntriesLinkingToSecretEntities = 0 ; private int configuredMonths = 0 ; private DecimalFormat df = new DecimalFormat ( "0.00" ) ; private String getDescriptionWordsPerEntity ( ) { } private String getSecretDescriptionWordsPerEntity ( ) { } private String getTagsPerEntity ( ) { } private String getSecretTagsPerEntity ( ) { } } No newline ; at end ; of file ; }

Fix:
cs . relationships += ( entity . getPublicData ( ) . getRelationships ( ) . size ( ) ) + ( entity . getSecretData ( ) . getRelationships ( ) . size ( ) ) ;