Source:
<code>public AppPackage(File file, File contentFolder, boolean processAppDirectory) throws IOException, ZipException { super(file); <START> if (contentFolder==null || !contentFolder.exists() || !contentFolder.isDirectory()) { <END> contentFolder = new File("/tmp/dt-appPackage-" + Long.toString(System.nanoTime())); this.cleanOnClose = true; } else { this.cleanOnClose = false; } Manifest manifest = getManifest(); if (manifest == null) { throw new IOException("Not a valid app package. MANIFEST.MF is not present."); } Attributes attr = manifest.getMainAttributes(); appPackageName = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_NAME); appPackageVersion = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_VERSION); dtEngineVersion = attr.getValue(ATTRIBUTE_DT_ENGINE_VERSION); appPackageDisplayName = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_DISPLAY_NAME); appPackageDescription = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_DESCRIPTION); String classPathString = attr.getValue(ATTRIBUTE_CLASS_PATH); if (appPackageName == null || appPackageVersion == null || classPathString == null) { throw new IOException("Not a valid app package. Class-Path is missing from MANIFEST.MF"); } classPath.addAll(Arrays.asList(StringUtils.split(classPathString, " "))); directory = contentFolder; extractToDirectory(directory, file); if (processAppDirectory) { processAppDirectory(new File(directory, "app")); } File confDirectory = new File(directory, "conf"); if (confDirectory.exists()) { processConfDirectory(confDirectory); } resourcesDirectory = new File(directory, "resources"); File propertiesXml = new File(directory, "META-INF/properties.xml"); if (propertiesXml.exists()) { processPropertiesXml(propertiesXml, null); } if (processAppDirectory) { for (AppInfo app : applications) { app.requiredProperties.addAll(requiredProperties); app.defaultProperties.putAll(defaultProperties); File appPropertiesXml = new File(directory, "META-INF/properties-" + app.name + ".xml"); if (appPropertiesXml.exists()) { processPropertiesXml(appPropertiesXml, app); } } } }</code><technical_language>spaces ==</technical_language>

Target:
public AppPackage(File file, File contentFolder, boolean processAppDirectory) throws IOException, ZipException { super(file); if (contentFolder != null) { FileUtils.forceMkdir(contentFolder); cleanOnClose = false; } else { cleanOnClose = true; contentFolder = new File("/tmp/dt-appPackage-" + Long.toString(System.nanoTime())); } Manifest manifest = getManifest(); if (manifest == null) { throw new IOException("Not a valid app package. MANIFEST.MF is not present."); } Attributes attr = manifest.getMainAttributes(); appPackageName = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_NAME); appPackageVersion = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_VERSION); dtEngineVersion = attr.getValue(ATTRIBUTE_DT_ENGINE_VERSION); appPackageDisplayName = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_DISPLAY_NAME); appPackageDescription = attr.getValue(ATTRIBUTE_DT_APP_PACKAGE_DESCRIPTION); String classPathString = attr.getValue(ATTRIBUTE_CLASS_PATH); if (appPackageName == null || appPackageVersion == null || classPathString == null) { throw new IOException("Not a valid app package. Class-Path is missing from MANIFEST.MF"); } classPath.addAll(Arrays.asList(StringUtils.split(classPathString, " "))); directory = contentFolder; extractToDirectory(directory, file); if (processAppDirectory) { processAppDirectory(new File(directory, "app")); } File confDirectory = new File(directory, "conf"); if (confDirectory.exists()) { processConfDirectory(confDirectory); } resourcesDirectory = new File(directory, "resources"); File propertiesXml = new File(directory, "META-INF/properties.xml"); if (propertiesXml.exists()) { processPropertiesXml(propertiesXml, null); } if (processAppDirectory) { for (AppInfo app : applications) { app.requiredProperties.addAll(requiredProperties); app.defaultProperties.putAll(defaultProperties); File appPropertiesXml = new File(directory, "META-INF/properties-" + app.name + ".xml"); if (appPropertiesXml.exists()) { processPropertiesXml(appPropertiesXml, app); } } } }