Source:
<code>public void Execute() { SourceUnit unit = null; try { Reader r; if (!StringUtils.isEmpty(debugUnitFile)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Reading source unit JSON data from {}", debugUnitFile); } r = Files.newBufferedReader(FileSystems.getDefault().getPath(debugUnitFile)); } else { r = new InputStreamReader(System.in); } unit = new Gson().fromJson(r, SourceUnit.class); r.close(); } catch (IOException e) { LOGGER.error("Failed to read source unit data", e); System.exit(1); } LOGGER.info("Resolving dependencies of {}", unit.Name); Resolver rs = new Resolver(unit.getProject(), unit); <START> if (LOGGER.isDebugEnabled()) { <END> LOGGER.debug("Resolving deps"); } final ArrayList<DepResolution> resolutions = new ArrayList<>(); for (RawDependency rawDep : unit.Dependencies) { DepResolution res = rs.resolveRawDep(rawDep); resolutions.add(res); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("Deps resolved"); } if (!(unit.getProject() instanceof JDKProject)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Adding JDK dep"); } if (unit.Repo.equals(ScanCommand.ANDROID_CORE_REPO)) { } else if (unit.Repo.equals(ScanCommand.ANDROID_SDK_REPO)) { resolutions.add(new DepResolution(null, ResolvedTarget.androidCore())); }else if (unit.Data.containsKey("Android")) { resolutions.add(new DepResolution(null, ResolvedTarget.androidCore())); resolutions.add(new DepResolution(null, ResolvedTarget.androidSDK())); } else { resolutions.add(new DepResolution(null, ResolvedTarget.jdk())); } } else { if (!unit.Repo.equals(JDKProject.JDK_REPO)) { resolutions.add(new DepResolution(null, ResolvedTarget.jdk())); } } JSONUtil.writeJSON(resolutions); }</code><technical_language>- conditional unnecessary here</technical_language>

Target:
public void Execute() { SourceUnit unit = null; try { Reader r; if (!StringUtils.isEmpty(debugUnitFile)) { LOGGER.debug("Reading source unit JSON data from {}", debugUnitFile); r = Files.newBufferedReader(FileSystems.getDefault().getPath(debugUnitFile)); } else { r = new InputStreamReader(System.in); } unit = new Gson().fromJson(r, SourceUnit.class); r.close(); } catch (IOException e) { LOGGER.error("Failed to read source unit data", e); System.exit(1); } LOGGER.info("Resolving dependencies of {}", unit.Name); Resolver rs = new Resolver(unit.getProject(), unit); LOGGER.debug("Resolving deps"); final ArrayList<DepResolution> resolutions = new ArrayList<>(); for (RawDependency rawDep : unit.Dependencies) { DepResolution res = rs.resolveRawDep(rawDep); resolutions.add(res); } LOGGER.debug("Deps resolved"); if (!(unit.getProject() instanceof JDKProject)) { LOGGER.debug("Adding JDK dep"); if (unit.Repo.equals(ScanCommand.ANDROID_CORE_REPO)) { } else if (unit.Repo.equals(ScanCommand.ANDROID_SDK_REPO)) { resolutions.add(new DepResolution(null, ResolvedTarget.androidCore())); } else if (unit.Data.containsKey("Android")) { resolutions.add(new DepResolution(null, ResolvedTarget.androidCore())); resolutions.add(new DepResolution(null, ResolvedTarget.androidSDK())); } else { resolutions.add(new DepResolution(null, ResolvedTarget.jdk())); } } else { if (!unit.Repo.equals(JDKProject.JDK_REPO)) { resolutions.add(new DepResolution(null, ResolvedTarget.jdk())); } } JSONUtil.writeJSON(resolutions); }