Source:
<code>protected String getTopologyConf(PackingPlan packing) { <START> Config marathonConfig = Config.newBuilder() <END> .putAll(config) .put(Keys.topologyBinaryFile(), FileUtils.getBaseName(Context.topologyBinaryFile(config))) .build(); ObjectMapper mapper = new ObjectMapper(); PackingPlan updatedPackingPlan = packing.cloneWithHomogeneousScheduledResource(); SchedulerUtils.persistUpdatedPackingPlan(Runtime.topologyName(runtime), updatedPackingPlan, Runtime.schedulerStateManagerAdaptor(runtime)); Resource containerResource = updatedPackingPlan.getContainers() .iterator().next().getRequiredResource(); ArrayNode instances = mapper.createArrayNode(); for (int i = 0; i < Runtime.numContainers(runtime); i++) { ObjectNode instance = mapper.createObjectNode(); instance.put(MarathonConstants.ID, Integer.toString(i)); instance.put(MarathonConstants.COMMAND, getExecutorCommand(marathonConfig, i)); instance.put(MarathonConstants.CPU, containerResource.getCpu()); instance.set(MarathonConstants.CONTAINER, getContainer(mapper)); instance.put(MarathonConstants.MEMORY, containerResource.getRam().asMegabytes()); instance.put(MarathonConstants.DISK, containerResource.getDisk().asMegabytes()); instance.put(MarathonConstants.INSTANCES, 1); instance.set(MarathonConstants.LABELS, getLabels(mapper)); instance.set(MarathonConstants.FETCH, getFetchList(mapper)); instances.add(instance); } ObjectNode appConf = mapper.createObjectNode(); appConf.put(MarathonConstants.ID, Runtime.topologyName(runtime)); appConf.set(MarathonConstants.APPS, instances); return appConf.toString(); }</code><technical_language>this a class member replacing config if</technical_language>

Target:
protected String getTopologyConf(PackingPlan packing) { config = Config.newBuilder() .putAll(config) .put(Key.TOPOLOGY_BINARY_FILE, FileUtils.getBaseName(Context.topologyBinaryFile(config))) .build(); ObjectMapper mapper = new ObjectMapper(); PackingPlan updatedPackingPlan = packing.cloneWithHomogeneousScheduledResource(); SchedulerUtils.persistUpdatedPackingPlan(Runtime.topologyName(runtime), updatedPackingPlan, Runtime.schedulerStateManagerAdaptor(runtime)); Resource containerResource = updatedPackingPlan.getContainers() .iterator().next().getRequiredResource(); ArrayNode instances = mapper.createArrayNode(); for (int i = 0; i < Runtime.numContainers(runtime); i++) { ObjectNode instance = mapper.createObjectNode(); instance.put(MarathonConstants.ID, Integer.toString(i)); instance.put(MarathonConstants.COMMAND, getExecutorCommand(i)); instance.put(MarathonConstants.CPU, containerResource.getCpu()); instance.set(MarathonConstants.CONTAINER, getContainer(mapper)); instance.put(MarathonConstants.MEMORY, containerResource.getRam().asMegabytes()); instance.put(MarathonConstants.DISK, containerResource.getDisk().asMegabytes()); instance.put(MarathonConstants.INSTANCES, 1); instance.set(MarathonConstants.LABELS, getLabels(mapper)); instance.set(MarathonConstants.FETCH, getFetchList(mapper)); instances.add(instance); } ObjectNode appConf = mapper.createObjectNode(); appConf.put(MarathonConstants.ID, Runtime.topologyName(runtime)); appConf.set(MarathonConstants.APPS, instances); return appConf.toString(); }