Source:
<code>private List<SimpleInterval> performSNPSegmentationStep(final String sampleName, final Genome genome) { logger.info("Performing initial SNP segmentation (assuming no allelic bias)..."); final File snpSegmentFile; try { snpSegmentFile = File.createTempFile(outputPrefix + "-" + SNP_MAF_SEG_FILE_TAG + "-tmp", ".seg"); <START> <END> } catch (final IOException e) { throw new UserException.CouldNotCreateOutputFile("Could not create temporary SNP segmentation file.", e); } List<SimpleInterval> snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, snpSegmentFile, 1.); logger.info("Initial number of SNP segments: " + snpSegments.size()); final Set<List<SimpleInterval>> snpSegmentationsFound = new HashSet<>(); for (int numIterations = 1; numIterations <= maxNumSNPSegmentationIterations; numIterations++) { logger.info("SNP-segmentation iteration: " + numIterations); snpSegmentationsFound.add(snpSegments); final double allelicBias = calculateAllelicBias(genome, snpSegmentFile); logger.info(String.format("Mean allelic bias: %.3f", allelicBias)); snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, snpSegmentFile, allelicBias); logger.info("Number of SNP segments: " + snpSegments.size()); if (snpSegmentationsFound.contains(snpSegments)) { logger.info("Final number of SNP segments: " + snpSegments.size()); final File finalSNPSegmentFile = new File(outputPrefix + "-" + SNP_MAF_SEG_FILE_TAG + ".seg"); snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, finalSNPSegmentFile, allelicBias); break; } } return snpSegments; }</code><technical_language>whitespace</technical_language>

Target:
private List<SimpleInterval> performSNPSegmentationStep(final String sampleName, final Genome genome) { logger.info("Performing initial SNP segmentation (assuming no allelic bias)..."); final File snpSegmentFile; try { snpSegmentFile = File.createTempFile(outputPrefix + "-" + SNP_MAF_SEG_FILE_TAG + "-tmp", ".seg"); } catch (final IOException e) { throw new UserException.CouldNotCreateOutputFile("Could not create temporary SNP segmentation file.", e); } List<SimpleInterval> snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, snpSegmentFile, INITIAL_ALLELIC_BIAS_GUESS); logger.info("Initial number of SNP segments: " + snpSegments.size()); final Set<List<SimpleInterval>> snpSegmentationsFound = new HashSet<>(); for (int numIterations = 1; numIterations <= maxNumSNPSegmentationIterations; numIterations++) { logger.info("SNP-segmentation iteration: " + numIterations); snpSegmentationsFound.add(snpSegments); final double allelicBias = calculateAllelicBias(genome, snpSegmentFile); logger.info(String.format("Mean allelic bias: %.3f", allelicBias)); snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, snpSegmentFile, allelicBias); logger.info("Number of SNP segments: " + snpSegments.size()); if (snpSegmentationsFound.contains(snpSegments)) { logger.info("Final number of SNP segments: " + snpSegments.size()); final File finalSNPSegmentFile = new File(outputPrefix + "-" + SNP_MAF_SEG_FILE_TAG + ".seg"); snpSegments = calculateAndWriteSNPSegmentation(sampleName, genome, finalSNPSegmentFile, allelicBias); break; } } return snpSegments; }