Buggy code:
public class PolicyManager { private static final Log log = LogFactory . getLog ( PolicyManager . class ) ; private static final String AS_POLICY_ID_TO_AUTOSCALE_POLICY_MAP = "AS_POLICY_ID_TO_AUTOSCALE_POLICY_MAP" ; private static final String APPLICATION_ID_TO_APPLICATION_POLICY_MAP = "APPLICATION_ID_TO_APPLICATION_POLICY_MAP" ; private static final String DEPLOYMENT_POLICY_ID_TO_DEPLOYMENT_POLICY_MAP = "DEPLOYMENT_POLICY_ID_TO_DEPLOYMENT_POLICY_MAP" ; private static Map < String , AutoscalePolicy > autoscalePolicyListMap ; private static Map < String , DeploymentPolicy > deploymentPolicyListMap ; private static Map < String , ApplicationPolicy > applicationPolicyListMap ; public Collection < DeploymentPolicy > getDeploymentPolicies ( ) { } private static class InstanceHolder { private static final PolicyManager INSTANCE = new PolicyManager ( ) ; } public static PolicyManager getInstance ( ) { } private PolicyManager ( ) { } public boolean addAutoscalePolicy ( AutoscalePolicy policy ) throws InvalidPolicyException { } public boolean updateAutoscalePolicy ( AutoscalePolicy policy ) throws InvalidPolicyException { } public boolean removeAutoscalePolicy ( String policyID ) throws InvalidPolicyException { } public void addDeploymentPolicy ( DeploymentPolicy policy ) { } public boolean updateDeploymentPolicy ( DeploymentPolicy policy ) throws InvalidPolicyException { } public void removeDeploymentPolicy ( String deploymentPolicyID ) { } public void addASPolicyToInformationModel ( AutoscalePolicy asPolicy ) throws InvalidPolicyException { } public void updateASPolicyInInformationModel ( AutoscalePolicy asPolicy ) throws InvalidPolicyException { } public void updateDeploymentPolicyInInformationModel ( DeploymentPolicy deploymentPolicy ) throws InvalidPolicyException { <START_BUG> if ( PolicyManager . autoscalePolicyListMap . containsKey ( deploymentPolicy . getDeploymentPolicyID ( ) ) ) { <END_BUG> if ( PolicyManager . log . isDebugEnabled ( ) ) { PolicyManager . log . debug ( ( "Updating<seq2seq4repair_space>deployment<seq2seq4repair_space>policy:<seq2seq4repair_space>" + ( deploymentPolicy . getDeploymentPolicyID ( ) ) ) ) ; } PolicyManager . deploymentPolicyListMap . put ( deploymentPolicy . getDeploymentPolicyID ( ) , deploymentPolicy ) ; } } public void removeASPolicyInInformationModel ( String policyID ) throws InvalidPolicyException { } public void removeApplicationPolicyInInformationModel ( String applicationId ) throws InvalidPolicyException { } public void undeployAutoscalePolicy ( String policyId ) throws InvalidPolicyException { } public AutoscalePolicy [ ] getAutoscalePolicyList ( ) { } public AutoscalePolicy getAutoscalePolicy ( String id ) { } private void addDeploymentPolicyToPolicyListMap ( DeploymentPolicy policy ) { } private void removeDeploymentPolicyFromMap ( String applicationId ) { } public void updateDeploymentPolicyToInformationModel ( DeploymentPolicy policy ) throws InvalidPolicyException { } public void undeployDeploymentPolicy ( String policy ) throws InvalidPolicyException { } public DeploymentPolicy [ ] getDeploymentPolicyList ( ) { } public DeploymentPolicy getDeploymentPolicy ( String id ) { } public void addApplicationPolicy ( ApplicationPolicy applicationPolicy ) throws InvalidPolicyException { } public boolean removeApplicationPolicy ( String applicationPolicyId ) throws InvalidPolicyException { } public void addApplicationPolicyToInformationModel ( ApplicationPolicy applicationPolicy ) throws InvalidPolicyException { } public ApplicationPolicy getApplicationPolicy ( String applicationPolicyId ) { } public void updateApplicationPolicyInInformationModel ( ApplicationPolicy applicationPolicy ) { } public boolean updateApplicationPolicy ( ApplicationPolicy applicationPolicy ) { } public ApplicationPolicy [ ] getApplicationPolicies ( ) { } }

Fix:
if ( PolicyManager . deploymentPolicyListMap . containsKey ( deploymentPolicy . getDeploymentPolicyID ( ) ) ) {