Buggy code:
public class ApplicationDeploymentUpdateOperation extends CloudApplicationOperation { private final CloudApplicationDeploymentProperties deploymentProperties ; public ApplicationDeploymentUpdateOperation ( CloudApplicationDeploymentProperties deploymentProperties , CloudFoundryBootDashModel model ) { } @ Override protected void doCloudOp ( IProgressMonitor monitor ) throws Exception , OperationCanceledException { } protected boolean updateExistingApplicationInCloud ( CloudApplicationDeploymentProperties properties , IProgressMonitor monitor ) throws Exception { CloudApplication app = getCloudApplication ( ) ; SubMonitor subMonitor = SubMonitor . convert ( monitor , 5 ) ; boolean updated = false ; if ( app != null ) { String appName = properties . getAppName ( ) ; if ( ( ( properties . getEnvironmentVariables ( ) ) != null ) && ( ! ( properties . getEnvironmentVariables ( ) . equals ( app . getEnvAsMap ( ) ) ) ) ) { subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>environment<seq2seq4repair_space>variables." ) ) ; getClient ( ) . updateApplicationEnv ( appName , properties . getEnvironmentVariables ( ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } if ( ( ( ( properties . getBuildpackUrl ( ) ) != null ) && ( ( app . getStaging ( ) ) != null ) ) && ( ! ( properties . getBuildpackUrl ( ) . equals ( app . getStaging ( ) . getDetectedBuildpack ( ) ) ) ) ) { subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>buildpack." ) ) ; getClient ( ) . updateApplicationStaging ( appName , new org . cloudfoundry . client . lib . domain . Staging ( null , properties . getBuildpackUrl ( ) ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } if ( ( ( properties . getServices ( ) ) != null ) && ( ! ( properties . getServices ( ) . equals ( app . getServices ( ) ) ) ) ) { subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>bound<seq2seq4repair_space>services." ) ) ; getClient ( ) . updateApplicationServices ( appName , properties . getServices ( ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } if ( ( ( properties . getMemory ( ) ) > 0 ) && ( ( properties . getMemory ( ) ) != ( app . getMemory ( ) ) ) ) { subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>memory." ) ) ; getClient ( ) . updateApplicationMemory ( appName , properties . getMemory ( ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } <START_BUG> if ( ( ( properties . getInstances ( ) ) > 1 ) && ( ( properties . getInstances ( ) ) != ( app . getInstances ( ) ) ) ) { <END_BUG> subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>instances." ) ) ; getClient ( ) . updateApplicationInstances ( appName , properties . getInstances ( ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } if ( ( ( properties . getUrls ( ) ) != null ) && ( ! ( properties . getUrls ( ) . equals ( app . getUris ( ) ) ) ) ) { subMonitor . setTaskName ( ( ( "Updating<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>mapped<seq2seq4repair_space>URLs." ) ) ; getClient ( ) . updateApplicationUris ( appName , properties . getUrls ( ) ) ; updated = true ; subMonitor . worked ( 1 ) ; } } return updated ; } }

Fix:
if ( ( ( properties . getInstances ( ) ) > 0 ) && ( ( properties . getInstances ( ) ) != ( app . getInstances ( ) ) ) ) {