Source:
<code>public void run(ITestInvocationListener listener) throws DeviceNotAvailableException { <START> CLog.i("Starting the ui conductor tests:\n"); <END> String runId = UUID.randomUUID().toString(); baseFilePath = Paths.get(baseFilePath, runId).toString(); String jarFileDir = Paths.get(baseFilePath, BINARY_RELATIVE_PATH).toString(); String testFilesDir = Paths.get(baseFilePath, TESTS_RELATIVE_PATH).toString(); String binaryFilesDir = Paths.get(baseFilePath).toString(); File jarFile; MultiMap<String, File> copiedTestFileMap = new MultiMap<>(); if (cliJar == null || !cliJar.exists()) { CLog.i("Unable to fetch provided binary.\n"); return; } try { jarFile = copyFile(cliJar.getAbsolutePath(), jarFileDir); FileUtil.chmod(jarFile, EXECUTABLE); for (Map.Entry<String, File> testFileOrDirEntry : uicdTest.entries()) { copiedTestFileMap.putAll( copyFile( testFileOrDirEntry.getKey(), testFileOrDirEntry.getValue().getAbsolutePath(), testFilesDir)); } for (File binaryFile : binaries) { File binary = copyFile(binaryFile.getAbsolutePath(), binaryFilesDir); FileUtil.chmod(binary, EXECUTABLE); } } catch (IOException ex) { throw new DeviceNotAvailableException(ex.getMessage()); } RunUtil rUtil = new RunUtil(); rUtil.setWorkingDir(new File(baseFilePath)); long runStartTime = System.currentTimeMillis(); listener.testRunStarted(testName, copiedTestFileMap.values().size()); for (Map.Entry<String, File> testFileEntry : copiedTestFileMap.entries()) { runTest( listener, rUtil, jarFile, testFileEntry.getKey(), testFileEntry.getValue().getName()); } listener.testRunEnded( System.currentTimeMillis() - runStartTime, new HashMap<String, String>()); deleteTmpFiles(baseFilePath); CLog.i("Finishing the ui conductor tests\n"); }</code><technical_language>UIConductor</technical_language>

Target:
public void run(ITestInvocationListener listener) throws DeviceNotAvailableException { CLog.i("Starting the UIConductor tests:\n"); String runId = UUID.randomUUID().toString(); baseFilePath = Paths.get(baseFilePath, runId).toString(); String jarFileDir = Paths.get(baseFilePath, BINARY_RELATIVE_PATH).toString(); String testFilesDir = Paths.get(baseFilePath, TESTS_RELATIVE_PATH).toString(); String binaryFilesDir = Paths.get(baseFilePath).toString(); File jarFile; MultiMap<String, File> copiedTestFileMap = new MultiMap<>(); if (cliJar == null || !cliJar.exists()) { CLog.e("Unable to fetch provided binary.\n"); return; } try { jarFile = copyFile(cliJar.getAbsolutePath(), jarFileDir); FileUtil.chmod(jarFile, EXECUTABLE); for (Map.Entry<String, File> testFileOrDirEntry : uicdTest.entries()) { copiedTestFileMap.putAll( copyFile( testFileOrDirEntry.getKey(), testFileOrDirEntry.getValue().getAbsolutePath(), testFilesDir)); } for (File binaryFile : binaries) { File binary = copyFile(binaryFile.getAbsolutePath(), binaryFilesDir); FileUtil.chmod(binary, EXECUTABLE); } } catch (IOException ex) { throw new DeviceNotAvailableException(ex.getMessage()); } RunUtil rUtil = new RunUtil(); rUtil.setWorkingDir(new File(baseFilePath)); long runStartTime = System.currentTimeMillis(); listener.testRunStarted(testName, copiedTestFileMap.values().size()); for (Map.Entry<String, File> testFileEntry : copiedTestFileMap.entries()) { runTest( listener, rUtil, jarFile, testFileEntry.getKey(), testFileEntry.getValue().getName()); } listener.testRunEnded( System.currentTimeMillis() - runStartTime, new HashMap<String, String>()); FileUtil.recursiveDelete(new File(baseFilePath)); CLog.i("Finishing the ui conductor tests\n"); }