Source:
public boolean isCompatible(ServerStoreConfiguration otherConfiguration, StringBuilder sb) { boolean isCompatible; PoolAllocation otherPoolAllocation = otherConfiguration.getPoolAllocation(); isCompatible = comparePoolAllocationType(sb, otherPoolAllocation); if(isCompatible) { if( !(otherPoolAllocation instanceof PoolAllocation.Unknown) ) { if (poolAllocation instanceof PoolAllocation.Dedicated) { PoolAllocation.Dedicated serverDedicatedAllocation = (PoolAllocation.Dedicated)poolAllocation; PoolAllocation.Dedicated clientDedicatedAllocation = (PoolAllocation.Dedicated)otherPoolAllocation; if (compareField(sb, "resourcePoolDedicatedResourceName", serverDedicatedAllocation.getResourceName(), clientDedicatedAllocation.getResourceName())) { if (clientDedicatedAllocation.getSize() != serverDedicatedAllocation.getSize()) { appendFault(sb, "resourcePoolDedicatedSize", serverDedicatedAllocation.getSize(), clientDedicatedAllocation.getSize()); isCompatible &= false; } } else { isCompatible &= false; } } else if (poolAllocation instanceof PoolAllocation.Shared) { isCompatible &= compareField(sb, "resourcePoolSharedPoolName", ((PoolAllocation.Shared)poolAllocation).getResourcePoolName(), ((PoolAllocation.Shared)otherPoolAllocation).getResourcePoolName()); } } } isCompatible &= compareField(sb, "storedKeyType", storedKeyType, otherConfiguration.getStoredKeyType()); isCompatible &= compareField(sb, "storedValueType", storedValueType, otherConfiguration.getStoredValueType()); isCompatible &= compareField(sb, "actualKeyType", actualKeyType, otherConfiguration.getActualKeyType()); isCompatible &= compareField(sb, "actualValueType", actualValueType, otherConfiguration.getActualValueType()); isCompatible &= compareField(sb, "keySerializerType", keySerializerType, otherConfiguration.getKeySerializerType()); isCompatible &= compareField(sb, "valueSerializerType", valueSerializerType, otherConfiguration.getValueSerializerType()); isCompatible &= compareField(sb, "consistencyType", consistency, otherConfiguration.getConsistency()); return isCompatible; }

Target:
public boolean isCompatible(ServerStoreConfiguration otherConfiguration, StringBuilder sb) { boolean isCompatible; PoolAllocation otherPoolAllocation = otherConfiguration.getPoolAllocation(); isCompatible = comparePoolAllocationType(sb, otherPoolAllocation); if(isCompatible) { if( !(otherPoolAllocation instanceof PoolAllocation.Unknown) ) { if (poolAllocation instanceof PoolAllocation.Dedicated) { PoolAllocation.Dedicated serverDedicatedAllocation = (PoolAllocation.Dedicated)poolAllocation; PoolAllocation.Dedicated clientDedicatedAllocation = (PoolAllocation.Dedicated)otherPoolAllocation; if (compareField(sb, "resourcePoolDedicatedResourceName", serverDedicatedAllocation.getResourceName(), clientDedicatedAllocation.getResourceName())) { if (clientDedicatedAllocation.getSize() != serverDedicatedAllocation.getSize()) { appendFault(sb, "resourcePoolDedicatedSize", serverDedicatedAllocation.getSize(), clientDedicatedAllocation.getSize()); isCompatible &= false; } } else { isCompatible &= false; } } else if (poolAllocation instanceof PoolAllocation.Shared) { isCompatible &= compareField(sb, "resourcePoolSharedPoolName", ((PoolAllocation.Shared)poolAllocation).getResourcePoolName(), ((PoolAllocation.Shared)otherPoolAllocation).getResourcePoolName()); } } } isCompatible &= compareField(sb, "storedKeyType", storedKeyType, otherConfiguration.getStoredKeyType()); isCompatible &= compareField(sb, "storedValueType", storedValueType, otherConfiguration.getStoredValueType()); isCompatible &= compareField(sb, "actualKeyType", actualKeyType, otherConfiguration.getActualKeyType()); isCompatible &= compareField(sb, "actualValueType", actualValueType, otherConfiguration.getActualValueType()); isCompatible &= compareField(sb, "keySerializerType", keySerializerType, otherConfiguration.getKeySerializerType()); isCompatible &= compareField(sb, "valueSerializerType", valueSerializerType, otherConfiguration.getValueSerializerType()); isCompatible &= compareConsistencyField(sb, consistency, otherConfiguration.getConsistency()); return isCompatible; }