auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static void enableModernTLS(OkHttpClient.Builder builder) { try { TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init((KeyStore) null); TrustManager[] trustManagers = trustManagerFactory.getTrustManagers(); if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) { throw new IllegalStateException("Unexpected default trust managers:" + Arrays.toString(trustManagers)); } X509TrustManager trustManager = (X509TrustManager) trustManagers[0]; SSLSocketFactory sslSocketFactory = TLSSocketFactoryCompat.getInstance(); builder.sslSocketFactory(sslSocketFactory, trustManager); List<CipherSuite> cipherSuites = new ArrayList<>(); cipherSuites.addAll(ConnectionSpec.MODERN_TLS.cipherSuites()); cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA); cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); ConnectionSpec legacyTLS = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .cipherSuites(cipherSuites.toArray(new CipherSuite[0])) .build(); builder.connectionSpecs(Arrays.asList(legacyTLS, ConnectionSpec.CLEARTEXT)); } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>Please print console, debug mode is enabled. _import_ DEBUG constant <LINK_1></technical_language>

Target:
private static void enableModernTLS(OkHttpClient.Builder builder) { try { TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init((KeyStore) null); TrustManager[] trustManagers = trustManagerFactory.getTrustManagers(); if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) { throw new IllegalStateException("Unexpected default trust managers:" + Arrays.toString(trustManagers)); } X509TrustManager trustManager = (X509TrustManager) trustManagers[0]; SSLSocketFactory sslSocketFactory = TLSSocketFactoryCompat.getInstance(); builder.sslSocketFactory(sslSocketFactory, trustManager); List<CipherSuite> cipherSuites = new ArrayList<>(); cipherSuites.addAll(ConnectionSpec.MODERN_TLS.cipherSuites()); cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA); cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); ConnectionSpec legacyTLS = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .cipherSuites(cipherSuites.toArray(new CipherSuite[0])) .build(); builder.connectionSpecs(Arrays.asList(legacyTLS, ConnectionSpec.CLEARTEXT)); } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) { if (DEBUG) e.printStackTrace(); } }
Source:
<code>private Vector calculateDistributedGradient(SparseDistributedMatrix data, Vector weights) { SparseDistributedMatrixMapReducer mapReducer = new SparseDistributedMatrixMapReducer(data); return mapReducer.mapReduce( (matrix, args) -> { Matrix inputs = extractInputs(matrix); Vector groundTruth = extractGroundTruth(matrix); return lossGradient.compute(inputs, groundTruth, args); }, gradients -> { <START> Vector resultGradient = new DenseLocalOnHeapVector(data.columnSize()); <END> int count = 0; for (Vector gradient : gradients) { if (gradient != null) { resultGradient = resultGradient.plus(gradient); count++; } } return resultGradient.divide(count); }, weights); }</code><technical_language>if is crashed Local Heap</technical_language>

Target:
private Vector calculateDistributedGradient(SparseDistributedMatrix data, Vector weights) { SparseDistributedMatrixMapReducer mapReducer = new SparseDistributedMatrixMapReducer(data); return mapReducer.mapReduce( (matrix, args) -> { Matrix inputs = extractInputs(matrix); Vector groundTruth = extractGroundTruth(matrix); return lossGradient.compute(inputs, groundTruth, args); }, gradients -> { int cnt = 0; Vector resGradient = new DenseLocalOnHeapVector(data.columnSize()); for (Vector gradient : gradients) { if (gradient != null) { resGradient = resGradient.plus(gradient); cnt++; } } return resGradient.divide(cnt); }, weights); }
Source:
<code>private void collectStatementsFromUrl(URI uri, StatementCollector collector) throws RetryableException { RDFParser parser = Rio.createParser(RDFFormat.TURTLE); parser.setRDFHandler(new NormalizingRdfHandler(collector)); HttpGet request = new HttpGet(uri); request.setConfig(configWithTimeout); log.debug("Fetching rdf from {}", uri); try { try (CloseableHttpResponse response = client.execute(request)) { if (response.getStatusLine().getStatusCode() == 404) { return; } if (response.getStatusLine().getStatusCode() == 204) { log.debug("No content, we're done"); return; } if (response.getStatusLine().getStatusCode() >= 300) { throw new ContainedException("Unexpected status code fetching RDF for " + uri + ": " + response.getStatusLine().getStatusCode()); } InputStream in = getInputStream(response); if (in == null) { log.debug("Empty response, we're done"); return; } parser.parse(new InputStreamReader(in, Charsets.UTF_8), uri.toString()); <START> in.close(); <END> } } catch (UnknownHostException | SocketException | SSLHandshakeException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RetryableException("Error fetching RDF for " + uri, e); } catch (RDFParseException | RDFHandlerException e) { throw new ContainedException("RDF parsing error for " + uri, e); } }</code><technical_language>This closed in a finally block</technical_language>

Target:
private void collectStatementsFromUrl(URI uri, StatementCollector collector) throws RetryableException { RDFParser parser = Rio.createParser(RDFFormat.TURTLE); parser.setRDFHandler(new NormalizingRdfHandler(collector)); HttpGet request = new HttpGet(uri); request.setConfig(configWithTimeout); log.debug("Fetching rdf from {}", uri); try { try (CloseableHttpResponse response = client.execute(request)) { if (response.getStatusLine().getStatusCode() == 404) { return; } if (response.getStatusLine().getStatusCode() == 204) { log.debug("No content, we're done"); return; } if (response.getStatusLine().getStatusCode() >= 300) { throw new ContainedException("Unexpected status code fetching RDF for " + uri + ": " + response.getStatusLine().getStatusCode()); } try(InputStream in = getInputStream(response)) { if (in == null) { log.debug("Empty response, we're done"); return; } parser.parse(new InputStreamReader(in, Charsets.UTF_8), uri.toString()); } } } catch (UnknownHostException | SocketException | SSLHandshakeException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RetryableException("Error fetching RDF for " + uri, e); } catch (RDFParseException | RDFHandlerException e) { throw new ContainedException("RDF parsing error for " + uri, e); } }
Source:
<code>public CommonProtos.ContentGroup serialize(T contentGroup) { CommonProtos.ContentGroup.Builder builder = CommonProtos.ContentGroup.newBuilder(); <START> builder.setDescribed(new DescribedSerializer<ContentGroup>().serialize(contentGroup)); <END> if (contentGroup.getType() != null) { builder.setType(contentGroup.getType().toString()); } if (contentGroup.getContents() != null) { builder.addAllContent(contentGroup.getContents().stream() .map(content -> new ContentRefSerializer(null).serialize(content).build()) .collect(Collectors.toList())); } return builder.build(); }</code><technical_language>class member DescribedSerializer</technical_language>

Target:
public CommonProtos.ContentGroup serialize(T contentGroup) { CommonProtos.ContentGroup.Builder builder = CommonProtos.ContentGroup.newBuilder(); builder.setDescribed(describedSerializer.serialize(contentGroup)); if (contentGroup.getType() != null) { builder.setType(contentGroup.getType().toString()); } if (contentGroup.getContents() != null) { builder.addAllContent(contentGroup.getContents().stream() .map(content -> contentRefSerializer.serialize(content).build()) .collect(Collectors.toList())); } return builder.build(); }
Source:
<code>private SolShip cloneAndModifyShip(SolShip originalShip, String newShipID) { HullConfig newHullConfig; try { newHullConfig = game.getHullConfigManager().getConfig(newShipID); } catch (RuntimeException e) { <START> return null; <END> } SolShip newShip = game.getShipBuilder().build(game, originalShip.getPosition(), originalShip.getVelocity(), originalShip.getAngle(), originalShip.getRotationSpeed(), originalShip.getPilot(), originalShip.getItemContainer(), newHullConfig, newHullConfig.getMaxLife(), originalShip.getHull().getGun(false), originalShip.getHull().getGun(true), null, newHullConfig.getEngineConfig().exampleEngine.copy(), new ShipRepairer(), originalShip.getMoney(), null, originalShip.getShield(), originalShip.getArmor()); return newShip; }</code><technical_language>Optional<SolShip> instead</technical_language>

Target:
private Optional<SolShip> cloneAndModifyShip(SolShip originalShip, String newShipID) { boolean isARealShip = false; for (ResourceUrn urn : Assets.getAssetHelper().list(Json.class)) { if((urn.getModuleName() + ":" + urn.getResourceName()).equals(newShipID)) { isARealShip = true; break; } } if(!isARealShip) { return Optional.empty(); } HullConfig newHullConfig = game.getHullConfigManager().getConfig(newShipID); SolShip newShip = game.getShipBuilder().build(game, originalShip.getPosition(), originalShip.getVelocity(), originalShip.getAngle(), originalShip.getRotationSpeed(), originalShip.getPilot(), originalShip.getItemContainer(), newHullConfig, newHullConfig.getMaxLife(), originalShip.getHull().getGun(false), originalShip.getHull().getGun(true), null, newHullConfig.getEngineConfig().exampleEngine.copy(), new ShipRepairer(), originalShip.getMoney(), null, originalShip.getShield(), originalShip.getArmor()); return Optional.of(newShip); }
Source:
<code>public static void executeBuild() throws Exception { preparer = new InstallIntoLocalRepoAndCollectFromThereTest().getVerifier("p2Repository.localrepo.source", false); preparer.getSystemProperties().put("e352-repo", P2Repositories.ECLIPSE_352.toString()); preparer.executeGoal("install"); preparer.verifyErrorFreeLog(); verifier = new InstallIntoLocalRepoAndCollectFromThereTest().getVerifier("p2Repository.localrepo", false); <START> verifier.executeGoal("verify"); <END> verifier.verifyErrorFreeLog(); p2Repository = P2RepositoryTool.forEclipseRepositoryModule(new File(verifier.getBasedir())); }</code><technical_language>If project needs p2 repository "test-data-repo", need set this a system property here</technical_language>

Target:
public static void executeBuild() throws Exception { preparer = new InstallIntoLocalRepoAndCollectFromThereTest().getVerifier("p2Repository.localrepo.source", false); preparer.getSystemProperties().put("e352-repo", P2Repositories.ECLIPSE_352.toString()); preparer.executeGoal("install"); preparer.verifyErrorFreeLog(); verifier = new InstallIntoLocalRepoAndCollectFromThereTest().getVerifier("p2Repository.localrepo", false, false); verifier.getSystemProperties().put("e352-repo", P2Repositories.ECLIPSE_352.toString()); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); p2Repository = P2RepositoryTool.forEclipseRepositoryModule(new File(verifier.getBasedir())); }
Source:
<code>private void addResponseHeaders() { RequestContext context = RequestContext.getCurrentContext(); HttpServletResponse servletResponse = context.getResponse(); List<Pair<String, String>> zuulResponseHeaders = context.getZuulResponseHeaders(); @SuppressWarnings("unchecked") List<String> rd = (List<String>) RequestContext.getCurrentContext() .get("routingDebug"); if (rd != null) { StringBuilder debugHeader = new StringBuilder(); for (String it : rd) { debugHeader.append("[[[" + it + "]]]"); } if (INCLUDE_DEBUG_HEADER.get()) { servletResponse.addHeader("X-Zuul-Debug-Header", debugHeader.toString()); } } if (zuulResponseHeaders != null) { for (Pair<String, String> it : zuulResponseHeaders) { servletResponse.addHeader(it.first(), it.second()); } } RequestContext ctx = RequestContext.getCurrentContext(); Long contentLength = ctx.getOriginContentLength(); if (SET_CONTENT_LENGTH.get()) { if ( contentLength != null && !ctx.getResponseGZipped()) { try { <START> HttpServletResponse.class.getMethod("setContentLengthLong"); <END> servletResponse.setContentLengthLong(contentLength); } catch (NoSuchMethodException e) { if(isLongSafe(contentLength)) { servletResponse.setContentLength(contentLength.intValue()); } } } } }</code><technical_language>potential performance problems reflection here</technical_language>

Target:
private void addResponseHeaders() { RequestContext context = RequestContext.getCurrentContext(); HttpServletResponse servletResponse = context.getResponse(); List<Pair<String, String>> zuulResponseHeaders = context.getZuulResponseHeaders(); @SuppressWarnings("unchecked") List<String> rd = (List<String>) RequestContext.getCurrentContext() .get("routingDebug"); if (rd != null) { StringBuilder debugHeader = new StringBuilder(); for (String it : rd) { debugHeader.append("[[[" + it + "]]]"); } if (INCLUDE_DEBUG_HEADER.get()) { servletResponse.addHeader("X-Zuul-Debug-Header", debugHeader.toString()); } } if (zuulResponseHeaders != null) { for (Pair<String, String> it : zuulResponseHeaders) { servletResponse.addHeader(it.first(), it.second()); } } RequestContext ctx = RequestContext.getCurrentContext(); Long contentLength = ctx.getOriginContentLength(); if (SET_CONTENT_LENGTH.get()) { if ( contentLength != null && !ctx.getResponseGZipped()) { if(useServlet31) { servletResponse.setContentLengthLong(contentLength); } else { if (isLongSafe(contentLength)) { servletResponse.setContentLength(contentLength.intValue()); } } } } }
Source:
<code>public void writeAdditionalItemData(NBTTagCompound nbt) { <START> nbt.setTag("spells", NBTExtras.listToNBT(getSpells(), spell -> new NBTTagString(spell.getRegistryName().toString()))); <END> super.writeAdditionalItemData(nbt); }</code><technical_language>NBTExtras.listToNBT > NBTHelper.getTagList</technical_language>

Target:
public void writeAdditionalItemData(NBTTagCompound nbt) { nbt.setTag("spells", NBTHelper.getTagList(getSpells(), spell -> new NBTTagString(spell.getRegistryName().toString()))); super.writeAdditionalItemData(nbt); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } StorageDomainStatic other = (StorageDomainStatic) obj; return (ObjectUtils.objectsEqual(id, other.id) && autoRecoverable == other.autoRecoverable && containsUnregisteredEntities == other.containsUnregisteredEntities && ObjectUtils.objectsEqual(connection, other.connection) && ObjectUtils.objectsEqual(name, other.name) && ObjectUtils.objectsEqual(storage, other.storage) && storageFormat == other.storageFormat && storagePoolType == other.storagePoolType && storageType == other.storageType <START> && sanState != other.sanState <END> && ObjectUtils.objectsEqual(description, other.description)); }</code><technical_language>? this sanState==other.sanState</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } StorageDomainStatic other = (StorageDomainStatic) obj; return (ObjectUtils.objectsEqual(id, other.id) && autoRecoverable == other.autoRecoverable && containsUnregisteredEntities == other.containsUnregisteredEntities && ObjectUtils.objectsEqual(connection, other.connection) && ObjectUtils.objectsEqual(name, other.name) && ObjectUtils.objectsEqual(storage, other.storage) && storageFormat == other.storageFormat && storagePoolType == other.storagePoolType && storageType == other.storageType && sanState == other.sanState && ObjectUtils.objectsEqual(description, other.description)); }
Source:
<code>private void getRandomPage() { new RandomSummaryClient().request(WikipediaApp.getInstance().getWikiSite(), new RandomSummaryClient.Callback() { @Override public void onSuccess(@NonNull Call<RbPageSummary> call, @NonNull RbPageSummary pageSummary) { loadComplete = true; if (getActivity() != null) { <START> parent().onChildLoaded(); <END> } if (!isAdded()) { return; } setContents(pageSummary); } @Override public void onError(@NonNull Call<RbPageSummary> call, @NonNull Throwable t) { if (!isAdded()) { return; } setErrorState(t); } }); }</code><technical_language>Good catch, put this line isAdded() check below</technical_language>

Target:
private void getRandomPage() { new RandomSummaryClient().request(WikipediaApp.getInstance().getWikiSite(), new RandomSummaryClient.Callback() { @Override public void onSuccess(@NonNull Call<RbPageSummary> call, @NonNull RbPageSummary pageSummary) { loadComplete = true; if (!isAdded()) { return; } setContents(pageSummary); parent().onChildLoaded(); } @Override public void onError(@NonNull Call<RbPageSummary> call, @NonNull Throwable t) { if (!isAdded()) { return; } setErrorState(t); } }); }
Source:
<code>public String getUrl() { <START> return "<LINK_0>" + spreadsheetId + "/edit#gid=0"; <END> }</code><technical_language>@jackyq2015 wrap this URL encode a practice</technical_language>

Target:
public String getUrl() throws UnsupportedEncodingException { String urlString= "<LINK_0>" + spreadsheetId + "/edit#gid=0"; return URLEncoder.encode(urlString, "UTF-8"); }
Source:
<code>public final void write(final int major, final OutputStream outputStream) throws IOException { <START> if (major >= CramVersions.CRAM_v3.major) { <END> final CRC32OutputStream crc32OutputStream = new CRC32OutputStream(outputStream); doWrite(crc32OutputStream); outputStream.write(crc32OutputStream.getCrc32_LittleEndian()); } else { doWrite(outputStream); } }</code><technical_language>this renamed readFromInputStream symmetric names companions ? Although, question if 'block-type' preserving</technical_language>

Target:
public final void write(final int major, final OutputStream outputStream) { try { if (major >= CramVersions.CRAM_v3.major) { final CRC32OutputStream crc32OutputStream = new CRC32OutputStream(outputStream); doWrite(crc32OutputStream); outputStream.write(crc32OutputStream.getCrc32_LittleEndian()); } else { doWrite(outputStream); } } catch (final IOException e) { throw new RuntimeIOException(e); } }
Source:
<code>private <T> List<Page<SearchHit<T>>> doMultiSearch(List<? extends Query> queries, Class<T> clazz, MultiSearchRequest request) { MultiSearchResponse.Item[] items = getMultiSearchResult(request); List<Page<SearchHit<T>>> res = new ArrayList<>(queries.size()); <START> int c = 0; <END> for (Query query : queries) { res.add(elasticsearchConverter.mapResults(SearchDocumentResponse.from(items[c++].getResponse()), clazz, query.getPageable())); } return res; }</code><technical_language>a new ticket introduces a MultiResult<T> type? List<Page<SearchHit<T>>> is hard read</technical_language>

Target:
private <T> List<AggregatedPage<SearchHit<T>>> doMultiSearch(List<? extends Query> queries, Class<T> clazz, MultiSearchRequest request) { MultiSearchResponse.Item[] items = getMultiSearchResult(request); List<AggregatedPage<SearchHit<T>>> res = new ArrayList<>(queries.size()); int c = 0; for (Query query : queries) { res.add(elasticsearchConverter.mapResults(SearchDocumentResponse.from(items[c++].getResponse()), clazz, query.getPageable())); } return res; }
Source:
<code>public FilterRegistrationBean flowIdRequestFilter() { <START> return createFilterRegistrationBean(new FlowIdRequestFilter(), Ordered.HIGHEST_PRECEDENCE + 2); <END> }</code><technical_language>Me, personally, I I execute FlowIdRequestFilter GzipBodyRequestFilter afterwards. If decompression wrong, FlowId in logs</technical_language>

Target:
public FilterRegistrationBean flowIdRequestFilter() { return createFilterRegistrationBean(new FlowIdRequestFilter(), Ordered.HIGHEST_PRECEDENCE + 1); }
Source:
<code><START> public boolean set(@Nullable V value) <END> { return super.set(value); }</code><technical_language>I this private package protected</technical_language>

Target:
protected boolean set(@Nullable V value) { return super.set(value); }
Source:
<code><START> public static List<List<ImapResponse>> createMultipleImapResponses(List<String>... responses) throws IOException { <END> List<List<ImapResponse>> imapResponses = new ArrayList<>(); for (List<String> response : responses) { imapResponses.add(createImapResponse(response)); } return imapResponses; }</code><technical_language>is a list of lists, a list</technical_language>

Target:
public static List<List<ImapResponse>> createMultipleImapResponses(List<String>... responses) throws IOException { List<List<ImapResponse>> imapResponses = new ArrayList<>(); for (List<String> response : responses) { imapResponses.add(createImapResponseList(response)); } return imapResponses; }
Source:
<code>public void testTxTimeoutOnSuspend() throws Exception { executeTestForAllCaches(new CI2Exc<Ignite, IgniteCache<Integer, Integer>>() { @Override public void applyx(Ignite ignite, final IgniteCache<Integer, Integer> cache) throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { final Transaction tx = ignite.transactions().txStart(transactionConcurrency(), isolation, TX_TIMEOUT, 0); cache.put(1, 1); tx.suspend(); GridTestUtils.runAsync(() -> { tx.resume(); cache.put(1, 1); cache.put(2, 2); tx.suspend(); }).get(FUT_TIMEOUT); tx.resume(); cache.put(1, 1); cache.put(2, 2); cache.put(3, 3); U.sleep(TX_TIMEOUT + 100L); GridTestUtils.assertThrowsWithCause(new Callable<Object>() { @Override public Object call() throws Exception { tx.suspend(); return null; } }, TransactionTimeoutException.class); <START> assertTrue(GridTestUtils.waitForCondition(new PA() { <END> @Override public boolean apply() { return tx.state() == ROLLED_BACK; } }, getTestTimeout())); assertEquals(ROLLED_BACK, tx.state()); tx.close(); assertNull(cache.get(1)); assertNull(cache.get(2)); assertNull(cache.get(3)); } } }); }</code><technical_language>replaced lambda</technical_language>

Target:
public void testTxTimeoutOnSuspend() throws Exception { executeTestForAllCaches(new CI2Exc<Ignite, IgniteCache<Integer, Integer>>() { @Override public void applyx(Ignite ignite, final IgniteCache<Integer, Integer> cache) throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { final Transaction tx = initTxWithTimeout(ignite, cache, isolation, false); while (tx.startTime() + TX_TIMEOUT >= U.currentTimeMillis()) U.sleep(100L); GridTestUtils.assertThrowsWithCause(tx::suspend, TransactionTimeoutException.class); assertTrue(GridTestUtils.waitForCondition(() -> tx.state() == ROLLED_BACK, getTestTimeout())); assertEquals(ROLLED_BACK, tx.state()); tx.close(); assertNull(cache.get(1)); assertNull(cache.get(2)); assertNull(cache.get(3)); } } }); }
Source:
<code>private ModelAndView setupForm(SequencerPartitionContainer container, ModelMap model) throws IOException { model.put("container", container); model.put("containerPartitions", <START> container.getPartitions().stream().map(parition -> Dtos.asDto(parition, true)).collect(Collectors.toList())); <END> model.put("containerRuns", runService.listByContainerId(container.getId()).stream().map(Dtos::asDto).collect(Collectors.toList())); model.put("clusteringKits", kitService.listKitDescriptorsByType(KitType.CLUSTERING).stream() .filter(descriptor -> descriptor.getPlatformType() == container.getModel().getPlatformType()) .sorted(KitDescriptor::sortByName).collect(Collectors.toList())); model.put("multiplexingKits", kitService.listKitDescriptorsByType(KitType.MULTIPLEXING).stream() .filter(descriptor -> descriptor.getPlatformType() == container.getModel().getPlatformType()) .sorted(KitDescriptor::sortByName).collect(Collectors.toList())); model.put("flowCellVersions", containerService.listFlowCellVersions()); model.put("poreVersions", containerService.listPoreVersions()); return new ModelAndView("/pages/editSequencerPartitionContainer.jsp", model); }</code><technical_language>typo partition</technical_language>

Target:
private ModelAndView setupForm(SequencerPartitionContainer container, ModelMap model) throws IOException { model.put("container", container); model.put("containerPartitions", container.getPartitions().stream().map(partition -> Dtos.asDto(partition, true)).collect(Collectors.toList())); model.put("containerRuns", runService.listByContainerId(container.getId()).stream().map(Dtos::asDto).collect(Collectors.toList())); model.put("clusteringKits", kitService.listKitDescriptorsByType(KitType.CLUSTERING).stream() .filter(descriptor -> descriptor.getPlatformType() == container.getModel().getPlatformType()) .sorted(KitDescriptor::sortByName).collect(Collectors.toList())); model.put("multiplexingKits", kitService.listKitDescriptorsByType(KitType.MULTIPLEXING).stream() .filter(descriptor -> descriptor.getPlatformType() == container.getModel().getPlatformType()) .sorted(KitDescriptor::sortByName).collect(Collectors.toList())); model.put("flowCellVersions", containerService.listFlowCellVersions()); model.put("poreVersions", containerService.listPoreVersions()); return new ModelAndView("/pages/editSequencerPartitionContainer.jsp", model); }
Source:
<code><START> public void setup() { <END> ITmfTimestamp requestedTraceCutEnd = fRequestedTraceCutRange.getEndTime(); ITmfTimestamp requestedTraceCutStart = fRequestedTraceCutRange.getStartTime(); assertTrue(fOriginalExperiment.getTimeRange().contains(fRequestedTraceCutRange)); TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(this, requestedTraceCutStart, requestedTraceCutEnd, fOriginalExperiment)); fexperimentItem.contextMenu("Export Time Selection as New Trace...").click(); SWTBotShell shell = fBot.shell("Export trace section to...").activate(); SWTBot dialogBot = shell.bot(); assertEquals("Experiment", dialogBot.text().getText()); dialogBot.text().setText("Experiment-trimmed"); dialogBot.button("OK").click(); SWTBotEditor newExperiment = fBot.editorByTitle("Experiment-trimmed"); newExperiment.setFocus(); fNewExperiment = ftraceManager.getActiveTrace(); assertNotNull("No active trace", fNewExperiment); assertEquals("Incorrect active trace", "Experiment-trimmed", fNewExperiment.getName()); WaitUtils.waitForJobs(); }</code><technical_language>happened ? call setup is ideal solution split setup(). I previous setup() code in setup()</technical_language>

Target:
public void setup() { WaitUtils.waitForJobs(); SWTBotTreeItem tracesFolder = SWTBotUtils.selectTracesFolder(fBot, PROJECT_NAME); tracesFolder.contextMenu().menu("Open As Experiment...", "Generic Experiment").click(); SWTBotUtils.activateEditor(fBot, "Experiment"); SWTBotTreeItem project = SWTBotUtils.selectProject(fBot, PROJECT_NAME); SWTBotTreeItem experimentItem = SWTBotUtils.getTraceProjectItem(fBot, project, "Experiments", "Experiment"); experimentItem.select(); TmfTraceManager traceManager = TmfTraceManager.getInstance(); ITmfTrace trace = traceManager.getActiveTrace(); assertTrue(String.valueOf(trace), trace instanceof TmfExperiment); TmfExperiment experiment = (TmfExperiment) trace; assertNotNull(experiment); ITmfProjectModelElement elem = TmfProjectRegistry.findElement(experiment.getResource(), true); assertTrue(elem instanceof TmfExperimentElement); fOriginalExperiment = experiment; TmfTimeRange traceCutRange = getTraceCutRange(experiment); assertNotNull(traceCutRange); fRequestedTraceCutRange = traceCutRange; ITmfTimestamp requestedTraceCutEnd = traceCutRange.getEndTime(); ITmfTimestamp requestedTraceCutStart = traceCutRange.getStartTime(); assertTrue(experiment.getTimeRange().contains(traceCutRange)); TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(this, requestedTraceCutStart, requestedTraceCutEnd, experiment)); experimentItem.contextMenu("Export Time Selection as New Trace...").click(); SWTBotShell shell = fBot.shell("Export trace section to...").activate(); SWTBot dialogBot = shell.bot(); assertEquals("Experiment", dialogBot.text().getText()); dialogBot.text().setText("Experiment-trimmed"); dialogBot.button("OK").click(); SWTBotEditor newExperiment = fBot.editorByTitle("Experiment-trimmed"); newExperiment.setFocus(); fNewExperiment = traceManager.getActiveTrace(); assertNotNull("No active trace", fNewExperiment); assertEquals("Incorrect active trace", "Experiment-trimmed", fNewExperiment.getName()); WaitUtils.waitForJobs(); }
Source:
<code>public void visitIdentifier(IdentifierTree tree) { <START> if (tree.name().equals(exceptionIdentifier.name())) { <END> isExceptionIdentifierUsed = true; } }</code><technical_language>is need recheck equality if isExceptionIdentifierUsed is true</technical_language>

Target:
public void visitIdentifier(IdentifierTree tree) { if (!isExceptionIdentifierUsed && tree.name().equals(exceptionIdentifier.name())) { isExceptionIdentifierUsed = true; } }
Source:
<code>public void convertProject( IProject project , IProgressMonitor monitor) throws CoreException{ Assert.isNotNull(project, "Project is null"); if(monitor == null ) monitor = new NullProgressMonitor(); HybridProject hp= HybridProject.getHybridProject(project); if(hp != null ) return; if(!CanConvertToHybridTester.canConvert(project)){ throw new CoreException(new Status(IStatus.ERROR, HybridCore.PLUGIN_ID, NLS.bind("Project {0} can not be converted to a hybrid mobile project" , project.getName(),null))); } addCommonPaths(project, monitor); addPlatformPaths(project, monitor); addNature(project, monitor); setUpJavaScriptProject(project, monitor); HybridProject newHybridProject = HybridProject.getHybridProject(project); <START> if(newHybridProject.getEngineManager().getActiveEngines().length > 0){ <END> newHybridProject.prepare(monitor); } }</code><technical_language>here.. a utility</technical_language>

Target:
public void convertProject( IProject project , IProgressMonitor monitor) throws CoreException{ Assert.isNotNull(project, "Project is null"); if(monitor == null ) monitor = new NullProgressMonitor(); HybridProject hp= HybridProject.getHybridProject(project); if(hp != null ) return; if(!CanConvertToHybridTester.canConvert(project)){ throw new CoreException(new Status(IStatus.ERROR, HybridCore.PLUGIN_ID, NLS.bind("Project {0} can not be converted to a hybrid mobile project" , project.getName(),null))); } addCommonPaths(project, monitor); addPlatformPaths(project, monitor); addNature(project, monitor); setUpJavaScriptProject(project, monitor); HybridProject newHybridProject = HybridProject.getHybridProject(project); if(newHybridProject.getEngineManager().hasActiveEngine()){ newHybridProject.prepare(monitor); } }
Source:
<code>public ChannelFuture close(final ChannelPromise promise) { if (isNotValidPromise(promise, false)) { return promise; } EventExecutor executor = executor(); if (executor.inEventLoop()) { findAndInvokeClose(promise); } else { <START> executor.execute(() -> findAndInvokeClose(promise)); <END> } return promise; }</code><technical_language>safeExecute here</technical_language>

Target:
public ChannelFuture close(final ChannelPromise promise) { if (isNotValidPromise(promise, false)) { return promise; } EventExecutor executor = executor(); if (executor.inEventLoop()) { findAndInvokeClose(promise); } else { safeExecute(executor, () -> findAndInvokeClose(promise), promise, null); } return promise; }
Source:
<code><START> public int enableSegments(final String dataSource, final Interval interval) <END> { VersionedIntervalTimeline<String, DataSegment> versionedIntervalTimeline = getVersionedIntervalTimeline(dataSource, interval); return enableSegments( segmentIdsForInterval(versionedIntervalTimeline, interval).collect(Collectors.toSet()), versionedIntervalTimeline ); }</code><technical_language>nit: I call this enableInterval</technical_language>

Target:
public int enableSegments(final String dataSource, final Interval interval) { List<Pair<DataSegment, Boolean>> segments = getDataSegmentsOverlappingInterval(dataSource, interval); List<DataSegment> segmentsToEnable = segments.stream() .filter(segment -> !segment.rhs && interval.contains(segment.lhs.getInterval())) .map(segment -> segment.lhs) .collect(Collectors.toList()); VersionedIntervalTimeline<String, DataSegment> versionedIntervalTimeline = VersionedIntervalTimeline.forSegments( segments.stream().filter(segment -> segment.rhs).map(segment -> segment.lhs).iterator() ); VersionedIntervalTimeline.addSegments(versionedIntervalTimeline, segmentsToEnable.iterator()); return enableSegments( segmentsToEnable, versionedIntervalTimeline ); }
Source:
<code>public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); ((WordPress) getActivity().getApplication()).component().inject(this); <START> if (!NetworkUtils.checkConnection(getActivity())) { <END> getActivity().finish(); return; } if (savedInstanceState == null) { mSite = (SiteModel) getArguments().getSerializable(WordPress.SITE); } else { mSite = (SiteModel) savedInstanceState.getSerializable(WordPress.SITE); } if (mSite == null) { ToastUtils.showToast(getActivity(), R.string.blog_not_found, ToastUtils.Duration.SHORT); getActivity().finish(); return; } mSiteSettings = SiteSettingsInterface.getInterface(getActivity(), mSite, this); }</code><technical_language>Fair point. So, yeah, get @nbradbury 's opinion removing setRetainInstance(true) there. @nbradbury , do think? removing fragment retainment side effects see? Thanks</technical_language>

Target:
public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); ((WordPress) getActivity().getApplication()).component().inject(this); setRetainInstance(true); if (!NetworkUtils.checkConnection(getActivity())) { getActivity().finish(); return; } if (savedInstanceState == null) { mSite = (SiteModel) getArguments().getSerializable(WordPress.SITE); } else { mSite = (SiteModel) savedInstanceState.getSerializable(WordPress.SITE); } if (mSite == null) { ToastUtils.showToast(getActivity(), R.string.blog_not_found, ToastUtils.Duration.SHORT); getActivity().finish(); return; } mSiteSettings = SiteSettingsInterface.getInterface(getActivity(), mSite, this); }
Source:
<code>private void doTestNoIntention(String prefix) { String testName = getTestName(true); myFixture.configureByFile(testName + ".erl"); List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions(prefix); IntentionAction action = ContainerUtil.getFirstItem(availableIntentions); <START> assertNull(action); <END> }</code><technical_language>a duplicate of existing code. Please extract common method if needed</technical_language>

Target:
private void doTestNoIntention(String prefix) { String testName = getTestName(true); myFixture.configureByFile(testName + ".erl"); assertNoIntentionsAvailable(prefix); }
Source:
<code>public <T> Flowable<T> method(String name, Entity<?> entity, Class<T> responseType) { if (sc == null) { <START> return Flowable.create(new FlowableOnSubscribe<T>() { <END> @Override public void subscribe(FlowableEmitter<T> emitter) throws Exception { try { T response = syncInvoker.method(name, entity, responseType); emitter.onNext(response); emitter.onComplete(); } catch (Throwable e) { emitter.onError(e); } } }, BackpressureStrategy.DROP); } return Flowable.create(new FlowableOnSubscribe<T>() { @Override public void subscribe(FlowableEmitter<T> emitter) throws Exception { try { T response = syncInvoker.method(name, entity, responseType); emitter.onNext(response); emitter.onComplete(); } catch (Throwable e) { emitter.onError(e); } } }, BackpressureStrategy.DROP).subscribeOn(sc).observeOn(sc); }</code><technical_language>If 2 objects difference is subscribeOn+observerOn sc != null, in opinion nicer create Flowable apply logic it</technical_language>

Target:
public <T> Flowable<T> method(String name, Entity<?> entity, Class<T> responseType) { return create(() -> syncInvoker.method(name, entity, responseType)); }
Source:
<code>private static String unescape(String s) throws URISyntaxException { if (s == null) return null; if (s.indexOf('%') < 0) return s; byte[] bytes; try { bytes = s.getBytes(Constants.CHARACTER_ENCODING); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } <START> ByteArrayOutputStream os = new ByteArrayOutputStream(bytes.length); <END> for (int i = 0; i < bytes.length; ++i) { byte c = bytes[i]; if (c == '%') { if (i + 2 > bytes.length) throw new URISyntaxException(s, JGitText.get().cannotParseGitURIish); int ascValue = Integer.parseInt(s.substring(i + 1, i + 3), 16); os.write(ascValue); i += 2; } else os.write(c); } return RawParseUtils.decode(os.toByteArray()); }</code><technical_language>suggestion ByteArrayOutputStream is adds here. result longer bytes.length. copy result right now, want output index counter. If loop a new-style for loop iterator, sense try a result buffer type hides result buffer pointer. not, heavily relying index direct array access this is more efficient a new substring call character position walk string. point easier follow code if source destination buffers approach, a direct pointer array. Whatever, ByteArrayOutputStream. I silly allocate that, a temporary byte array, copy temporary byte array a real byte array, call RawParseUtils.decode(), accepts array, a starting position, position, need temporary array</technical_language>

Target:
private static String unescape(String s) throws URISyntaxException { if (s == null) return null; if (s.indexOf('%') < 0) return s; byte[] bytes; try { bytes = s.getBytes(Constants.CHARACTER_ENCODING); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } byte[] os = new byte[bytes.length]; int j = 0; for (int i = 0; i < bytes.length; ++i) { byte c = bytes[i]; if (c == '%') { if (i + 2 > bytes.length) throw new URISyntaxException(s, JGitText.get().cannotParseGitURIish); int val = (RawParseUtils.parseHexInt4(bytes[i + 1]) << 4) | RawParseUtils.parseHexInt4(bytes[i + 2]); os[j++] = (byte) val; i += 2; } else os[j++] = c; } return RawParseUtils.decode(os, 0, j); }
Source:
<code>private void update(MarshallerType type, Consumer<MarshallerContext> consumer) { if (type == GLOBAL) { synchronized (global) { consumer.accept(global); } <START> return; <END> } synchronized (persistence) { consumer.accept(persistence); } }</code><technical_language>I personally preferred else block, I fine it</technical_language>

Target:
private void update(MarshallerType type, Consumer<MarshallerContext> consumer) { if (type == GLOBAL) { synchronized (global) { consumer.accept(global); } } else { synchronized (persistence) { consumer.accept(persistence); } } }
Source:
<code>public UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException { IUser user; try { <START> logger.debug("UserService: arg0: "+arg0); <END> user = userManager.getUser(arg0); logger.debug("UserService: user: "+user); } catch (QuadrigaStorageException e) { e.printStackTrace(); throw new UsernameNotFoundException("Error getting user details.", e); } if (user == null) throw new UsernameNotFoundException("Couldn't find username."); List<QuadrigaGrantedAuthority> roles = new ArrayList<QuadrigaGrantedAuthority>(); for (IQuadrigaRole role : user.getQuadrigaRoles()) { roles.add(new QuadrigaGrantedAuthority(role.getId())); } UserDetails details = new QuadrigaUserDetails(user.getUserName(), user.getName(), user.getPassword(), roles, user.getEmail()); return details; }</code><technical_language>remove; useless debugger output</technical_language>

Target:
public UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException { IUser user; try { user = userManager.getUser(arg0); } catch (QuadrigaStorageException e) { logger.error("Error while retrieving user details", e); throw new UsernameNotFoundException("Error getting user details.", e); } if (user == null) { throw new UsernameNotFoundException("Couldn't find username."); } List<QuadrigaGrantedAuthority> roles = new ArrayList<QuadrigaGrantedAuthority>(); for (IQuadrigaRole role : user.getQuadrigaRoles()) { roles.add(new QuadrigaGrantedAuthority(role.getId())); } UserDetails details = new QuadrigaUserDetails(user.getUserName(), user.getName(), user.getPassword(), roles, user.getEmail()); return details; }
Source:
<code>public PhysicalOperation visitStatisticsWriterNode(StatisticsWriterNode node, LocalExecutionPlanContext context) { PhysicalOperation source = node.getSource().accept(this, context); StatisticAggregationsDescriptor<Integer> descriptor = node.getDescriptor().map(source.getLayout()::get); <START> AnalyzeTableHandle analyzeTableHandle = context.tableWriteInfo.getAnalyzeTableHandle().orElseThrow(() -> new IllegalStateException("analyzeTableHandle is absent")); <END> OperatorFactory operatorFactory = new StatisticsWriterOperatorFactory( context.getNextOperatorId(), node.getId(), computedStatistics -> metadata.finishStatisticsCollection(session, analyzeTableHandle, computedStatistics), node.isRowCountEnabled(), descriptor); return new PhysicalOperation(operatorFactory, makeLayout(node), context, source); }</code><technical_language>nit: IllegalStateException -> IllegalArgumentException/VerifyException</technical_language>

Target:
public PhysicalOperation visitStatisticsWriterNode(StatisticsWriterNode node, LocalExecutionPlanContext context) { PhysicalOperation source = node.getSource().accept(this, context); StatisticAggregationsDescriptor<Integer> descriptor = node.getDescriptor().map(source.getLayout()::get); AnalyzeTableHandle analyzeTableHandle = context.getTableWriteInfo().getAnalyzeTableHandle().orElseThrow(() -> new VerifyException("analyzeTableHandle is absent")); OperatorFactory operatorFactory = new StatisticsWriterOperatorFactory( context.getNextOperatorId(), node.getId(), computedStatistics -> metadata.finishStatisticsCollection(session, analyzeTableHandle, computedStatistics), node.isRowCountEnabled(), descriptor); return new PhysicalOperation(operatorFactory, makeLayout(node), context, source); }
Source:
<code>private boolean deQueueAction(ContainerPlacementRequestMessage requestMessage) { <START> if (hasActiveContainerPlacementAction(requestMessage.getProcessorId()) || checkStandbyOrActiveContainerHasActivePlacementAction(requestMessage.getProcessorId())) { if (standbyContainerManager.isPresent()) { <END> LOG.info("ContainerPlacement request: is en-queued because either active container or its standby replica has an in-progress placement action", requestMessage); } else { LOG.info("ContainerPlacement request: is en-queued because container has an in-progress placement action", requestMessage); } return false; } if (!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()) || samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())) { LOG.info("ContainerPlacement request: is en-queued because container is pending start", requestMessage); return false; } return true; }</code><technical_language>This logic twisted; making code unreadable, check if is active-action container-id, if is active-action active/standby counterparts, check if is a standby-container-manager present? a. check if a standby-container-manager is present? b. hasActiveContainerPlacementAction encapsulate logic of checking a checking if is active-action active/standby counterparts of processor-id</technical_language>

Target:
private boolean deQueueAction(ContainerPlacementRequestMessage requestMessage) { if (checkIfActiveOrStandbyContainerHasActivePlacementAction(requestMessage)) { return false; } if (!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()) || samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())) { LOG.info("ContainerPlacement request: is en-queued because container is pending start", requestMessage); return false; } return true; }
Source:
<code>public FullyQualifiedInfo getQualifiedInfo() { <START> if (qualifiedInfo == null) { <END> if (getExhibitor() != null && getExhibitor().getQualifiedInfo() != null) { FullyQualifiedInfo containerInfo = getExhibitor().getQualifiedInfo(); this.qualifiedInfo = new FullyQualifiedInfo(containerInfo.packagePath, containerInfo.fileName, getName(), null); } } return qualifiedInfo; }</code><technical_language>I do right now, I a lot more comfortable if Model lifetime connected PsiElement lifetime. In ideal world, models a veneer PSI. _right_ do -- a gut feeling. I worry local caches in model out of date PSI changes (the user types, and/or refactoring). concern is unwarranted. Do concerns match mine</technical_language>

Target:
public FullyQualifiedInfo getQualifiedInfo() { HaxeExposableModel exhibitor = getExhibitor(); if (exhibitor != null) { FullyQualifiedInfo containerInfo = exhibitor.getQualifiedInfo(); if (containerInfo != null) { return new FullyQualifiedInfo(containerInfo.packagePath, containerInfo.fileName, getName(), null); } } return null; }
Source:
<code>private Object getStorageDevicesVDSReturnVal(Guid hostId) { VDSReturnValue vdsRetValue = new VDSReturnValue(); vdsRetValue.setSucceeded(true); if (HOST_ID_WITH_NEW_DEVICES.equals(hostId)) { vdsRetValue.setReturnValue(Arrays.asList(getStorageDevice("sda", null), getStorageDevice("sdb", null), getStorageDevice("sdc", null))); } else if (HOST_ID_WITH_DEVICES_CHANGED.equals(hostId)) { List<StorageDevice> devices = new ArrayList<StorageDevice>(); devices.add(getStorageDevice("device-without-anychange", DEVICE_WITHOUT_ANYCHANGE)); devices.add(getStorageDevice("new-device-with-name-change", <START> DEVICE_WITHOUT_ANYCHANGE)); <END> StorageDevice device = getStorageDevice("device-with-change", DEVICE_WITH_CHANGE); device.setMountPoint("/temp-mount"); device.setFsType("XFS"); device.setSize(12345678L); devices.add(device); device = getStorageDevice("device-with-devuuid-but-name-changed-1", DEVICE_WITH_DEVUUID_BUT_NAME_CHANGED); device.setDevUuid("123456"); devices.add(device); devices.add(getStorageDevice("device-with-devuuid-but-name-changed", null)); vdsRetValue.setReturnValue(devices); } else { vdsRetValue.setReturnValue(Collections.EMPTY_LIST); } return vdsRetValue; }</code><technical_language>DEVICE_WITH_NAME_CHANGE</technical_language>

Target:
private Object getStorageDevicesVDSReturnVal(Guid hostId) { VDSReturnValue vdsRetValue = new VDSReturnValue(); vdsRetValue.setSucceeded(true); if (HOST_ID_WITH_NEW_DEVICES.equals(hostId)) { vdsRetValue.setReturnValue(Arrays.asList(getStorageDevice("sda", null), getStorageDevice("sdb", null), getStorageDevice("sdc", null))); } else if (HOST_ID_WITH_DEVICES_CHANGED.equals(hostId)) { List<StorageDevice> devices = new ArrayList<StorageDevice>(); devices.add(getStorageDevice("device-without-anychange", DEVICE_WITHOUT_ANYCHANGE)); devices.add(getStorageDevice("new-device-with-name-change", DEVICE_WITH_NAME_CHANGE)); StorageDevice device = getStorageDevice("device-with-change", DEVICE_WITH_CHANGE); device.setMountPoint("/temp-mount"); device.setFsType("XFS"); device.setSize(12345678L); devices.add(device); device = getStorageDevice("device-with-devuuid-but-name-changed-1", DEVICE_WITH_DEVUUID_BUT_NAME_CHANGED); device.setDevUuid("123456"); devices.add(device); devices.add(getStorageDevice("device-with-devuuid-but-name-changed", null)); vdsRetValue.setReturnValue(devices); } else { vdsRetValue.setReturnValue(Collections.EMPTY_LIST); } return vdsRetValue; }
Source:
<code>public void testVCFModeIsConcordantWithGATK3_5Results() throws Exception { Utils.resetRandomGenerator(); final File output = createTempFile("testVCFModeIsConcordantWithGATK3Results", ".vcf"); final File gatk3Output = new File(TEST_FILES_DIR + "expected.testVCFMode.gatk3.5.vcf"); final String[] args = new String[] { "-I", NA12878_20_21_WGS_bam, "-R", b37_reference_20_21, "-L", "20:10000000-10100000", "-O", output.getAbsolutePath(), "-pairHMM", "AVX_LOGLESS_CACHING" }; runCommandLine(args); final double concordance = calculateConcordance(output, gatk3Output); Assert.assertTrue(concordance >= 0.99, "Concordance with GATK 3.5 in VCF mode is < 99%"); <START> } <END></code><technical_language>left previous expected output expected.testGVCFMode.gatk3.4.g.vcf checked test directory -- delete it, is worth keeping for a while for troubleshooting purposes</technical_language>

Target:
public void testVCFModeIsConcordantWithGATK3_5Results() throws Exception { Utils.resetRandomGenerator(); final File output = createTempFile("testVCFModeIsConcordantWithGATK3Results", ".vcf"); final File gatk3Output = new File(TEST_FILES_DIR + "expected.testVCFMode.gatk3.5.vcf"); final String[] args = { "-I", NA12878_20_21_WGS_bam, "-R", b37_reference_20_21, "-L", "20:10000000-10100000", "-O", output.getAbsolutePath(), "-pairHMM", "AVX_LOGLESS_CACHING" }; runCommandLine(args); final double concordance = calculateConcordance(output, gatk3Output); Assert.assertTrue(concordance >= 0.99, "Concordance with GATK 3.5 in VCF mode is < 99%"); }