Buggy code:
private OperationResult result ; private boolean protectedAccount ; private List < PrismProperty > associations ; private OperationResult fetchResult ; private PrismContainerDefinition objectDefinitionForEditing ; private RefinedObjectClassDefinition objectClassDefinitionForEditing ; public ObjectWrapper ( String displayName , String description , PrismObject object , PrismContainerDefinition objectDefinitionForEditing , ContainerStatus status , PageBase pageBase ) { } public ObjectWrapper ( String displayName , String description , PrismObject object , PrismContainerDefinition objectDefinitionForEditing , RefinedObjectClassDefinition objectClassDefinitionForEditing , ContainerStatus status , boolean delayContainerCreation , PageBase pageBase ) { } public void initializeContainers ( PageBase pageBase ) { } public void revive ( PrismContext prismContext ) throws SchemaException { } public List < PrismProperty > getAssociations ( ) { } public void setAssociations ( List < PrismProperty > associations ) { } public OperationResult getFetchResult ( ) { } public void setFetchResult ( OperationResult fetchResult ) { } public OperationResult getResult ( ) { } public void clearResult ( ) { } public HeaderStatus getHeaderStatus ( ) { } public ObjectDelta getOldDelta ( ) { } public void setOldDelta ( ObjectDelta oldDelta ) { } public void setHeaderStatus ( HeaderStatus headerStatus ) { } public PrismObject getObject ( ) { } public String getDisplayName ( ) { } public ContainerStatus getStatus ( ) { } public String getDescription ( ) { } public boolean isMinimalized ( ) { } public void setMinimalized ( boolean minimalized ) { } public boolean isShowEmpty ( ) { } public void setShowEmpty ( boolean showEmpty ) { } public boolean isSelectable ( ) { } public void setSelectable ( boolean selectable ) { } public boolean isSelected ( ) { } public void setSelected ( boolean selected ) { } public List < ContainerWrapper > getContainers ( ) { } public ContainerWrapper findContainerWrapper ( ItemPath path ) { } private List < ContainerWrapper > createCustomContainerWrapper ( PrismObject object , QName name , PageBase pageBase ) { } private void addSubresult ( OperationResult subResult ) { } private List < ContainerWrapper > createContainers ( PageBase pageBase ) { } private List < ContainerWrapper > createReportContainers ( PageBase pageBase ) throws SchemaException { } private List < ContainerWrapper > createResourceContainers ( PageBase pageBase ) throws SchemaException { } private PrismObject < ConnectorType > loadConnector ( ) { } private List < ContainerWrapper > createResourceContainerWrapper ( PrismObject < ConnectorType > connector , PageBase pageBase ) throws SchemaException { } private List < ContainerWrapper > createContainerWrapper ( PrismContainer parent , ItemPath path , PageBase pageBase ) { PrismContainerDefinition definition = parent . getDefinition ( ) ; List < ContainerWrapper > wrappers = new ArrayList < ContainerWrapper > ( ) ; List < ItemPathSegment > segments = new ArrayList < ItemPathSegment > ( ) ; if ( path != null ) { segments . addAll ( path . getSegments ( ) ) ; } ItemPath parentPath = new ItemPath ( segments ) ; for ( ItemDefinition def : ( ( Collection < ItemDefinition > ) ( definition . getDefinitions ( ) ) ) ) { if ( ! ( def instanceof PrismContainerDefinition ) ) { continue ; } if ( COMPLEX_TYPE . equals ( def . getTypeName ( ) ) ) { continue ; } if ( TriggerType . COMPLEX_TYPE . equals ( def . getTypeName ( ) ) ) { continue ; } ObjectWrapper . LOGGER . trace ( "ObjectWrapper.createContainerWrapper<seq2seq4repair_space>processing<seq2seq4repair_space>definition:<seq2seq4repair_space>{}" , def ) ; PrismContainerDefinition containerDef = ( ( PrismContainerDefinition ) ( def ) ) ; if ( ( ! ( showAssignments ) ) && ( AssignmentType . COMPLEX_TYPE . equals ( containerDef . getTypeName ( ) ) ) ) { continue ; } if ( ! ( showInheritedObjectAttributes ) ) { boolean result = ObjectWrapper . INHERITED_OBJECT_SUBCONTAINERS . contains ( containerDef . getName ( ) ) ; ObjectWrapper . LOGGER . info ( ( ( ( "checking<seq2seq4repair_space>" + ( containerDef . getName ( ) ) ) + ",<seq2seq4repair_space>result<seq2seq4repair_space>=<seq2seq4repair_space>" ) + result ) ) ; if ( result ) { continue ; } } ItemPath newPath = createPropertyPath ( parentPath , containerDef . getName ( ) ) ; <START_BUG> if ( ( parent . size ( ) ) != 1 ) { <END_BUG> PrismContainer prismContainer = null ; prismContainer = parent . findContainer ( def . getName ( ) ) ; ContainerWrapper container ; if ( ( prismContainer != null ) && ( ! ( prismContainer . getElementName ( ) . equals ( F_PASSWORD ) ) ) ) { container = new ContainerWrapper ( this , prismContainer , ContainerStatus . MODIFYING , newPath , pageBase ) ; } else { prismContainer = containerDef . instantiate ( ) ; container = new ContainerWrapper ( this , prismContainer , ContainerStatus . ADDING , newPath , pageBase ) ; } addSubresult ( container . getResult ( ) ) ; wrappers . add ( container ) ; if ( ( ! ( AssignmentType . COMPLEX_TYPE . equals ( containerDef . getTypeName ( ) ) ) ) || ( ! ( F_ASSOCIATION . equals ( parent . getElementName ( ) ) ) ) ) { wrappers . addAll ( createContainerWrapper ( prismContainer , newPath , pageBase ) ) ; } } } return wrappers ; } private ItemPath createPropertyPath ( ItemPath path , QName element ) { } public void normalize ( ) throws SchemaException { } public ObjectDelta getObjectDelta ( ) throws SchemaException { } private PrismPropertyValue clone ( PrismPropertyValue value ) { } private boolean hasResourceCapability ( ResourceType resource , Class < ? extends CapabilityType > capabilityClass ) { } private ObjectDelta createAddingObjectDelta ( ) throws SchemaException { } private void cleanupEmptyContainers ( PrismContainer container ) { } @ Override public String toString ( ) { } public boolean isProtectedAccount ( ) { } private static class PathSizeComparator implements Comparator < ContainerWrapper > { @ Override public int compare ( ContainerWrapper c1 , ContainerWrapper c2 ) { } } public boolean isShowAssignments ( ) { } public void setShowAssignments ( boolean showAssignments ) { } public boolean isReadonly ( ) { } public void setReadonly ( boolean readonly ) { }

Fix:
if ( ( parent . size ( ) ) <= 1 ) {