Source:
<code>public static IDeploymentConfig getDeploymentConfig(IServerAttributes attributes) throws CoreException { Connection connection = getConnection(attributes); if (connection == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find the connection for server {0}" + "Your server adapter might refer to an inexistant service." , attributes.getName()))); } IService service = getService(attributes, connection); if (service == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find the service for server {0}" + "Your server adapter might refer to an inexistant service.", attributes.getName()))); } List<IPod> pods = connection.getResources(ResourceKind.POD, service.getProject().getName()); List<IPod> servicePods = ResourceUtils.getPodsForService(service, pods); if (pods == null || pods.isEmpty()) { <START> throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( <END> NLS.bind("Could not find any pods for service {0} in connection {1}. " + "OpenShift might be still building the pods fod service {0}.", service.getName(), connection.getHost()))); } String dcName = ResourceUtils.getDeploymentConfigNameForPods(servicePods); if (dcName == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find deployment config for {0}. " + "Your build might be still running and pods not created yet or " + "there might be no labels on your pods pointing to the wanted deployment config.", attributes.getName()))); } return connection.getResource(ResourceKind.DEPLOYMENT_CONFIG, service.getNamespace(), dcName); }</code><technical_language>exception thrown if specifically servicePods.isEmpty()</technical_language>

Target:
public static IDeploymentConfig getDeploymentConfig(IServerAttributes attributes) throws CoreException { Connection connection = getConnection(attributes); if (connection == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find the connection for server {0}" + "Your server adapter might refer to an inexistant connection." , attributes.getName()))); } IService service = getService(attributes, connection); if (service == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find the service for server {0}" + "Your server adapter might refer to an inexistant service.", attributes.getName()))); } List<IPod> pods = connection.getResources(ResourceKind.POD, service.getProject().getName()); List<IPod> servicePods = ResourceUtils.getPodsForService(service, pods); if (servicePods == null || servicePods.isEmpty()) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find pods for service {0} in connection {1}. " + "OpenShift might be still building the pods for service {0}.", service.getName(), connection.getHost()))); } String dcName = ResourceUtils.getDeploymentConfigNameForPods(servicePods); if (dcName == null) { throw new CoreException(OpenShiftCoreActivator.statusFactory().errorStatus( NLS.bind("Could not find deployment config for {0}. " + "Your build might be still running and pods not created yet or " + "there might be no labels on your pods pointing to the wanted deployment config.", attributes.getName()))); } return connection.getResource(ResourceKind.DEPLOYMENT_CONFIG, service.getNamespace(), dcName); }