auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testGetCache() throws Exception { Map<String, String> ieCache = WininetUtil.getCache(); assertTrue("WinInet cache should have some items in it.", ieCache.size() > 1); boolean historyEntryFound = false; boolean googleLogoOrOtherImageFound = false; for (String URL : ieCache.keySet()) { if (URL.startsWith("Visited:") && URL.contains("www.google.com")) { historyEntryFound = true; } else if (URL.contains("google.com") && (URL.endsWith("png") || URL.endsWith("jpg"))) { googleLogoOrOtherImageFound = true; } } assertTrue("Google logo (or other image) should have been found in the browser cache.", googleLogoOrOtherImageFound); assertTrue("History entry for google.com should have been found in the browser cache.", historyEntryFound); <START> Runtime.getRuntime().exec("taskkill.exe /f /im iexplore.exe"); <END> }</code><technical_language>this kill anyone's internet explorer writing JNA code in development running this test? a great idea</technical_language>

Target:
public void testGetCache() throws Exception { Map<String, String> ieCache = WininetUtil.getCache(); assertNotNull("WinInet cache should have some items in it.", ieCache.size() > 1); boolean historyEntryFound = false; boolean googleLogoOrOtherImageFound = false; for (String URL : ieCache.keySet()) { if (URL.startsWith("Visited:") && URL.contains("www.google.com")) { historyEntryFound = true; } else if (URL.contains("google.com") && (URL.endsWith("png") || URL.endsWith("jpg"))) { googleLogoOrOtherImageFound = true; } } assertTrue("Google logo (or other image) should have been found in the browser cache.", googleLogoOrOtherImageFound); assertTrue("History entry for google.com should have been found in the browser cache.", historyEntryFound); }
Source:
<code>public void registerProvider(final InputStream stream) { final Type type = new TypeToken<TaskDataProvider>() .getType(); final TaskDataProvider provider = (TaskDataProvider) motechJsonReader.readFromStream(stream, type); <START> LOGGER.info("Registering the provider with name: {}", provider.getName()); <END> Set<TaskError> errors = TaskDataProviderValidator.validate(provider); if (!isEmpty(errors)) { throw new ValidationException(TaskDataProviderValidator.TASK_DATA_PROVIDER, errors); } addProvider(provider); }</code><technical_language>Registering a task data provider name</technical_language>

Target:
public void registerProvider(final InputStream stream) { final Type type = new TypeToken<TaskDataProvider>() .getType(); final TaskDataProvider provider = (TaskDataProvider) motechJsonReader.readFromStream(stream, type); LOGGER.info("Registering a task data provider with name: {}", provider.getName()); Set<TaskError> errors = TaskDataProviderValidator.validate(provider); if (!isEmpty(errors)) { throw new ValidationException(TaskDataProviderValidator.TASK_DATA_PROVIDER, errors); } addProvider(provider); }
Source:
<code>public boolean addAll(Collection<? extends XWikiAttachment> c) { <START> onUpdate(); <END> for (XWikiAttachment x : c) { map.put(x.getFilename(), x); added(x); } this.list.clear(); this.list.addAll(map.values()); return true; }</code><technical_language>list is updated yet, this moved change</technical_language>

Target:
public boolean addAll(Collection<? extends XWikiAttachment> c) { boolean changed = false; for (XWikiAttachment x : c) { XWikiAttachment put = map.put(x.getFilename(), x); if (put != x) { changed = true; added(x); } } if (changed) { updatedMap(); } return changed; }
Source:
<code>public void resilientToLargeNumberOfRequests() throws InterruptedException, ExecutionException { MultiplexingCompletionService<String, Integer> boundedService = MultiplexingCompletionService.create( ImmutableMap.of(KEY_1, createBoundedExecutor(2), KEY_2, createBoundedExecutor(2))); <START> for (int i = 0; i < 50_000; i++) { <END> try { boundedService.submit(KEY_1, getSleepCallable(5_000)); } catch (RejectedExecutionException e) { } } boundedService.submit(KEY_2, getSleepCallable(1)); assertThat(boundedService.poll(1, TimeUnit.SECONDS).get()).isEqualTo(1); }</code><technical_language>unfold this? need 50,000 requests prove alright, fine 3 4</technical_language>

Target:
public void resilientToLargeNumberOfRequests() throws InterruptedException, ExecutionException { MultiplexingCompletionService<String, Integer> boundedService = MultiplexingCompletionService.create( ImmutableMap.of(KEY_1, createBoundedExecutor(2), KEY_2, createBoundedExecutor(2))); for (int i = 0; i < 4; i++) { try { boundedService.submit(KEY_1, getSleepCallable(5_000)); } catch (RejectedExecutionException e) { e.printStackTrace(); } } boundedService.submit(KEY_2, getSleepCallable(1)); assertThat(boundedService.poll(1, TimeUnit.SECONDS).get()).isEqualTo(1); }
Source:
<code>public void addReplicators(Replicator... replicators) { synchronized (this.replicators) { <START> if (this.replicators == null) { <END> this.replicators = new ArrayList<Replicator>(); } this.replicators.addAll(Arrays.asList(replicators)); } }</code><technical_language>is this block necessary? Line 77 in constructor replicators = new ArrayList<Replicator>(); I object set null else. do private final List<Replicator> replicators = new ArrayList<Replicator>(); if expected change. concerns this list growing, I removal of Replicator elements, if wants change Replicators a policy approach is create a new ReplicationPolicyManager instance</technical_language>

Target:
public void addReplicators(Replicator... replicators) { synchronized (this.replicators) { this.replicators.addAll(Arrays.asList(replicators)); } }
Source:
<code>public void onExecute(CommandSender sender, String[] args) { if (sender instanceof Player) { if (sender.hasPermission("slimefun.charge.command")) { Player p = ((Player) sender).getPlayer(); <START> final ItemStack item = p.getInventory().getItemInMainHand(); final SlimefunItem slimefunItem = SlimefunItem.getByItem(item); <END> if (slimefunItem instanceof Rechargeable){ ((Rechargeable) slimefunItem).addItemCharge(item, ((Rechargeable) slimefunItem).getMaxItemCharge(item)); SlimefunPlugin.getLocalization().sendMessage(sender, "commands.charge.charge-success", true); } else { SlimefunPlugin.getLocalization().sendMessage(sender, "commands.charge.not-rechargeable", true); } } else { SlimefunPlugin.getLocalization().sendMessage(sender, "messages.no-permission", true); } } else { SlimefunPlugin.getLocalization().sendMessage(sender, "messages.only-players", true); } }</code><technical_language>need mark final here</technical_language>

Target:
public void onExecute(CommandSender sender, String[] args) { if (sender instanceof Player) { if (sender.hasPermission("slimefun.charge.command")) { Player p = (Player) sender; ItemStack item = p.getInventory().getItemInMainHand(); SlimefunItem slimefunItem = SlimefunItem.getByItem(item); if (slimefunItem instanceof Rechargeable) { Rechargeable rechargeableItem = (Rechargeable) slimefunItem; rechargeableItem.setItemCharge(item, rechargeableItem.getMaxItemCharge(item)); SlimefunPlugin.getLocalization().sendMessage(sender, "commands.charge.charge-success", true); } else { SlimefunPlugin.getLocalization().sendMessage(sender, "commands.charge.not-rechargeable", true); } } else { SlimefunPlugin.getLocalization().sendMessage(sender, "messages.no-permission", true); } } else { SlimefunPlugin.getLocalization().sendMessage(sender, "messages.only-players", true); } }
Source:
<code>private static byte[] getPngBytes(MultipartFile file) { try { <START> BufferedImage image = ImageIO.read(file.getInputStream()); <END> if (image == null) { throw InvalidDataException.notSupportedPhotoFileType(); } ByteArrayOutputStream pngBytes = new ByteArrayOutputStream(); ImageIO.write(image, "png", pngBytes); return pngBytes.toByteArray(); } catch (IOException e) { throw YonaException.unexpected(e); } }</code><technical_language>input stream needs closed. do changing lines this: try (InputStream inStream = file.getInputStream()) { BufferedImage image = ImageIO.read(inStream);</technical_language>

Target:
private static byte[] getPngBytes(MultipartFile file) { try (InputStream inStream = file.getInputStream()) { BufferedImage image = ImageIO.read(inStream); if (image == null) { throw InvalidDataException.unsupportedPhotoFileType(); } ByteArrayOutputStream pngBytes = new ByteArrayOutputStream(); ImageIO.write(image, "png", pngBytes); return pngBytes.toByteArray(); } catch (IOException e) { throw YonaException.unexpected(e); } }
Source:
<code>public static FirewallType valueOf(int value) { <START> return map.get(value); <END> }</code><technical_language>throw IllegalArgumentException if is illegal ? This fetching data DB, enforce it</technical_language>

Target:
public static FirewallType valueOf(int value) { FirewallType firewallType = valuesById.get(value); if (firewallType != null) { return firewallType; } throw new IllegalArgumentException("FirewallType does not have any mapping for value: " + value); }
Source:
<code>public void preparePartitions( final Map config, final int totalTasks, final int taskIndex, final SpoutOutputCollector collector) throws Exception { this.collector = collector; if (stateStore == null) { String zkEndpointAddress = eventHubConfig.getZkConnectionString(); if (StringUtils.isBlank(zkEndpointAddress)) { @SuppressWarnings("unchecked") List<String> zkServers = (List<String>) config.get(Config.STORM_ZOOKEEPER_SERVERS); Integer zkPort = ((Number) config.get(Config.STORM_ZOOKEEPER_PORT)).intValue(); <START> zkEndpointAddress = String.join(",", <END> zkServers.stream().map(x -> x + ":" + zkPort).collect(Collectors.toList())); } stateStore = new ZookeeperStateStore(zkEndpointAddress, Integer.parseInt(config.get(Config.STORM_ZOOKEEPER_RETRY_TIMES).toString()), Integer.parseInt(config.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL).toString())); } stateStore.open(); LOGGER.info("TaskIndex: " + taskIndex + ", TotalTasks: " + totalTasks + ", Total Partitions:" + eventHubConfig.getPartitionCount()); partitionCoordinator = new StaticPartitionCoordinator(eventHubConfig, taskIndex, totalTasks, stateStore, pmFactory, recvFactory); for (IPartitionManager partitionManager : partitionCoordinator.getMyPartitionManagers()) { partitionManager.open(); } }</code><technical_language>Nit: I simplify this <LINK_0></technical_language>

Target:
public void preparePartitions( final Map config, final int totalTasks, final int taskIndex, final SpoutOutputCollector collector) throws Exception { this.collector = collector; if (this.stateStore == null) { final String zkEndpointAddress = !StringUtils.isBlank(this.eventHubConfig.getZkConnectionString()) ? this.eventHubConfig.getZkConnectionString() : this.getZooKeeperEndpointAddress(config); this.stateStore = new ZookeeperStateStore(zkEndpointAddress, Integer.parseInt(config.get(Config.STORM_ZOOKEEPER_RETRY_TIMES).toString()), Integer.parseInt(config.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL).toString())); } this.stateStore.open(); LOGGER.info("EventHub: " + this.eventHubPath+ ", TaskIndex: " + taskIndex + ", TotalTasks: " + totalTasks + ", Total Partitions:" + this.eventHubConfig.getPartitionCount()); this.partitionCoordinator = new StaticPartitionCoordinator( this.eventHubConfig, taskIndex, totalTasks, this.stateStore, this.pmFactory, this.recvFactory); for (final IPartitionManager partitionManager : partitionCoordinator.getMyPartitionManagers()) { partitionManager.open(); } }
Source:
<code>protected void executeCommand() { VDS vds = getVds(); VDSGroup cluster = getVdsGroup(); <START> boolean vdsmVersionSupportedByEngine = false; <END> Version partialVdcVersion = new Version(new Version(Config.<String> GetValue(ConfigValues.VdcVersion)).toString(2)); RpmVersion vdsVersion = vds.getVersion(); Version vdsmVersion = new Version(vdsVersion.getMajor(),vdsVersion.getMinor()); if (!StringUtils.isEmpty(vds.getSupportedEngines())) { vdsmVersionSupportedByEngine = vds.getSupportedENGINESVersionsSet().contains(partialVdcVersion); } if (!vdsmVersionSupportedByEngine && !Config.<HashSet<Version>> GetValue(ConfigValues.SupportedVDSMVersions).contains(vdsmVersion)) { reportNonOperationReason(NonOperationalReason.VERSION_INCOMPATIBLE_WITH_CLUSTER, Config.<HashSet<Version>> GetValue(ConfigValues.SupportedVDSMVersions).toString(), vdsmVersion.toString()); } else if (!VersionSupport.checkClusterVersionSupported(cluster.getcompatibility_version(), vds)) { reportNonOperationReason(NonOperationalReason.CLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER, cluster.getcompatibility_version().toString(), vds.getSupportedClusterLevels().toString()); } setSucceeded(true); }</code><technical_language>i name isEngineSupportedByVdsm , not</technical_language>

Target:
protected void executeCommand() { VDS vds = getVds(); VDSGroup cluster = getVdsGroup(); boolean isEngineSupportedByVdsm = false; Version partialVdcVersion = new Version(new Version(Config.<String> GetValue(ConfigValues.VdcVersion)).toString(2)); RpmVersion vdsVersion = vds.getVersion(); Version vdsmVersion = new Version(vdsVersion.getMajor(), vdsVersion.getMinor()); if (!StringUtils.isEmpty(vds.getSupportedEngines())) { isEngineSupportedByVdsm = vds.getSupportedENGINESVersionsSet().contains(partialVdcVersion); } if (!isEngineSupportedByVdsm && !Config.<HashSet<Version>> GetValue(ConfigValues.SupportedVDSMVersions).contains(vdsmVersion)) { reportNonOperationReason(NonOperationalReason.VERSION_INCOMPATIBLE_WITH_CLUSTER, Config.<HashSet<Version>> GetValue(ConfigValues.SupportedVDSMVersions).toString(), vdsmVersion.toString()); } else if (!VersionSupport.checkClusterVersionSupported(cluster.getcompatibility_version(), vds)) { reportNonOperationReason(NonOperationalReason.CLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER, cluster.getcompatibility_version().toString(), vds.getSupportedClusterLevels().toString()); } setSucceeded(true); }
Source:
<code>public void testNonBlockingJobSubmission() throws Exception { dispatcher = createAndStartDispatcher(heartbeatServices, haServices, new ExpectedJobIdJobManagerRunnerFactory(TEST_JOB_ID, createdJobManagerRunnerLatch)); jobMasterLeaderElectionService.isLeader(UUID.randomUUID()); DispatcherGateway dispatcherGateway = dispatcher.getSelfGateway(DispatcherGateway.class); final BlockingJobVertex blockingJobVertex = new BlockingJobVertex("testVertex"); blockingJobVertex.setInvokableClass(NoOpInvokable.class); JobGraph blockingJobGraph = new JobGraph(TEST_JOB_ID, "blockingTestJob", blockingJobVertex); dispatcherGateway.submitJob(blockingJobGraph, TIMEOUT).get(); CompletableFuture<JobStatus> jobStatusFuture = dispatcherGateway.requestJobStatus(blockingJobGraph.getJobID(), TIMEOUT); Assert.assertEquals(JobStatus.INITIALIZING, jobStatusFuture.get()); MultipleJobsDetails multiDetails = dispatcherGateway.requestMultipleJobDetails(TIMEOUT).get(); Assert.assertEquals(1, multiDetails.getJobs().size()); Assert.assertEquals(blockingJobGraph.getJobID(), multiDetails.getJobs().iterator().next().getJobId()); blockingJobVertex.unblock(); CommonTestUtils.waitUntilJobManagerIsInitialized(() -> dispatcherGateway.requestJobStatus(blockingJobGraph.getJobID(), TIMEOUT).get()); <START> dispatcherGateway.cancelJob(blockingJobGraph.getJobID(), TIMEOUT).get(); <END> }</code><technical_language>this call test</technical_language>

Target:
public void testNonBlockingJobSubmission() throws Exception { dispatcher = createAndStartDispatcher(heartbeatServices, haServices, new ExpectedJobIdJobManagerRunnerFactory(TEST_JOB_ID, createdJobManagerRunnerLatch)); jobMasterLeaderElectionService.isLeader(UUID.randomUUID()); DispatcherGateway dispatcherGateway = dispatcher.getSelfGateway(DispatcherGateway.class); Tuple2<JobGraph, BlockingJobVertex> blockingJobGraph = getBlockingJobGraphAndVertex(); JobID jobID = blockingJobGraph.f0.getJobID(); dispatcherGateway.submitJob(blockingJobGraph.f0, TIMEOUT).get(); assertThat(dispatcherGateway.requestJobStatus(jobID, TIMEOUT).get(), is(JobStatus.INITIALIZING)); MultipleJobsDetails multiDetails = dispatcherGateway.requestMultipleJobDetails(TIMEOUT).get(); assertEquals(1, multiDetails.getJobs().size()); assertEquals(jobID, multiDetails.getJobs().iterator().next().getJobId()); blockingJobGraph.f1.unblock(); CommonTestUtils.waitUntilCondition(() -> dispatcherGateway.requestJobStatus(jobGraph.getJobID(), TIMEOUT).get() == JobStatus.RUNNING, Deadline.fromNow(Duration.of(10, ChronoUnit.SECONDS)), 5L); }
Source:
<code>public String toCheckUrl() { <START> String checkUrl = super.toCheckUrl(); <END> try { JellyContext jelly = Functions.getCurrentJellyContext(); Object it = jelly.findVariable("it"); if (it instanceof CredentialsStore) { ModelObject context = ((CredentialsStore) it).getContext(); for (CredentialsSelectHelper.ContextResolver r : ExtensionList .lookup(CredentialsSelectHelper.ContextResolver.class)) { String token = r.getToken(context); if (token != null) { if (checkUrl.endsWith(".toString()")) { checkUrl = StringUtils.removeEnd(checkUrl, ".toString()"); } else { checkUrl = checkUrl + "+qs(this).addThis()"; } return checkUrl + ".append('$provider=" + r.getClass().getName() + "')" + ".append('$token=" + Functions.jsStringEscape( URLEncoder.encode(token, "UTF-8")) + "')" + ".toString()"; } } } } catch (AssertionError e) { } catch (UnsupportedEncodingException e) { } return checkUrl; }</code><technical_language>This method in Jenkins return null. gonna NPE in code</technical_language>

Target:
public String toCheckUrl() { String checkUrl = super.toCheckUrl(); if (checkUrl == null) { return null; } try { JellyContext jelly = Functions.getCurrentJellyContext(); Object it = jelly.findVariable("it"); if (it instanceof CredentialsStore) { ModelObject context = ((CredentialsStore) it).getContext(); for (CredentialsSelectHelper.ContextResolver r : ExtensionList .lookup(CredentialsSelectHelper.ContextResolver.class)) { String token = r.getToken(context); if (token != null) { if (checkUrl.endsWith(".toString()")) { checkUrl = StringUtils.removeEnd(checkUrl, ".toString()"); } else { checkUrl = checkUrl + "+qs(this).addThis()"; } return checkUrl + ".append('$provider=" + Functions.jsStringEscape(URLEncoder.encode(r.getClass().getName(), "UTF-8")) + "')" + ".append('$token=" + Functions.jsStringEscape(URLEncoder.encode(token, "UTF-8")) + "')" + ".toString()"; } } } } catch (AssertionError e) { } catch (UnsupportedEncodingException e) { } return checkUrl; }
Source:
<code>public Collection<Map.Entry<Window.SessionWindow<K>, V>> getSessionEntries(K key, long timestamp, long gap) { List<Map.Entry<Window.SessionWindow<K>, V>> results = new ArrayList<>(); TreeSet<Window.SessionWindow<K>> sessionWindows = keyToWindows.get(key); if (sessionWindows != null) { <START> for (Window.SessionWindow<K> window : sessionWindows) { <END> if (timestamp > window.getBeginTimestamp()) { if (window.getBeginTimestamp() + window.getDurationMillis() + gap > timestamp) { results.add(new AbstractMap.SimpleEntry<>(window, map.get(window).get(key))); } } else if (timestamp < window.getBeginTimestamp()) { if (window.getBeginTimestamp() - gap <= timestamp) { results.add(new AbstractMap.SimpleEntry<>(window, map.get(window).get(key))); } } else { results.add(new AbstractMap.SimpleEntry<>(window, map.get(window).get(key))); } } } return results; }</code><technical_language>This resolved in O(logn) time</technical_language>

Target:
public Collection<Map.Entry<Window.SessionWindow<K>, V>> getSessionEntries(K key, long timestamp, long gap) { List<Map.Entry<Window.SessionWindow<K>, V>> results = new ArrayList<>(); TreeSet<Window.SessionWindow<K>> sessionWindows = keyToWindows.get(key); if (sessionWindows != null) { Window.SessionWindow<K> refWindow = new Window.SessionWindow<>(key, timestamp, 1); Window.SessionWindow<K> floor = sessionWindows.floor(refWindow); if (floor != null) { if (floor.getBeginTimestamp() + floor.getDurationMillis() + gap > timestamp) { results.add(new AbstractMap.SimpleEntry<>(floor, map.get(floor).get(key))); } } Window.SessionWindow<K> higher = sessionWindows.higher(refWindow); if (higher != null) { if (higher.getBeginTimestamp() - gap <= timestamp) { results.add(new AbstractMap.SimpleEntry<>(higher, map.get(higher).get(key))); } } } return results; }
Source:
<code>public final Container getNextContainer(final SAMRecord samRecord, final long containerByteOffset) { Container container = null; if (samRecord.getHeader() == null) { <START> samRecord.setHeader(samFileHeader); <END> } final int nextRecordIndex = samRecord.getReferenceIndex(); final int updatedReferenceContextID = sliceFactory.shouldEmitSlice( currentReferenceContextID, nextRecordIndex, sliceSAMRecords.size()); if (updatedReferenceContextID == ReferenceContext.UNINITIALIZED_REFERENCE_ID) { sliceFactory.createNewSliceEntry(currentReferenceContextID, sliceSAMRecords); sliceSAMRecords.clear(); if (shouldEmitContainer( currentReferenceContextID, nextRecordIndex, sliceFactory.getNumberOfSliceEntries())) { container = makeContainer(containerByteOffset); } currentReferenceContextID = nextRecordIndex; } else { currentReferenceContextID = updatedReferenceContextID; } sliceSAMRecords.add(samRecord); return container; }</code><technical_language>if samRecord passed in a header, *different* header stored factory? a related note, setHeaderStrict() instead of setHeader()</technical_language>

Target:
public final Container getNextContainer(final SAMRecord samRecord, final long containerByteOffset) { Container container = null; if (samRecord.getHeader() == null) { samRecord.setHeaderStrict(samFileHeader); } final int nextRecordIndex = samRecord.getReferenceIndex(); final int updatedReferenceContextID = sliceFactory.getUpdatedReferenceContext( currentReferenceContextID, nextRecordIndex, sliceSAMRecords.size()); if (shouldEmitSlice(updatedReferenceContextID)) { sliceFactory.createNewSliceEntry(currentReferenceContextID, sliceSAMRecords); sliceSAMRecords.clear(); if (shouldEmitContainer( currentReferenceContextID, nextRecordIndex, sliceFactory.getNumberOfSliceEntries())) { container = makeContainer(containerByteOffset); } currentReferenceContextID = nextRecordIndex; } else { currentReferenceContextID = updatedReferenceContextID; } sliceSAMRecords.add(samRecord); return container; }
Source:
<code>private AuthorizationManager<HttpServletRequest> createAuthorizationManager() { Assert.state(this.unmappedMatchers == null, <START> () -> "An incomplete mapping was found for " + this.unmappedMatchers <END> + ". Try completing it with something like requestUrls().<something>.hasRole('USER')"); return postProcess(this.managerBuilder.build()); }</code><technical_language>This feels odd if application is DelegatingAuthorizationManager independently DSL, error message describe a remedy apply</technical_language>

Target:
private AuthorizationManager<HttpServletRequest> createAuthorizationManager() { Assert.state(this.unmappedMatchers == null, () -> "An incomplete mapping was found for " + this.unmappedMatchers + ". Try completing it with something like requestUrls().<something>.hasRole('USER')"); Assert.state(this.mappingCount > 0, "At least one mapping is required (for example, authorizeHttpRequests().anyRequest().authenticated())"); return postProcess(this.managerBuilder.build()); }
Source:
<code>void handleBody(InputStream payload, MessageMetadata messageMetadata, MessageInfo messageInfo) throws IOException, MessageFormatException { if (!successfullyDeserialized) { BlobData blobData = MessageFormatRecord.deserializeBlob(payload); ByteBuffer encryptionKey = messageMetadata == null ? null : messageMetadata.getEncryptionKey(); ByteBuf chunkBuffer = blobData.getAndRelease(); try { boolean launchedJob = maybeLaunchCryptoJob(chunkBuffer, null, encryptionKey, chunkBlobId); if (!launchedJob) { chunkBuffer = filterChunkToRange(chunkBuffer); chunkIndexToBuf.put(chunkIndex, chunkBuffer.retainedDuplicate()); numChunksRetrieved++; } <START> successfullyDeserialized = true; <END> } finally { chunkBuffer.release(); } } else { } }</code><technical_language>nit: call chunkBuf</technical_language>

Target:
void handleBody(InputStream payload, MessageMetadata messageMetadata, MessageInfo messageInfo) throws IOException, MessageFormatException { if (!successfullyDeserialized) { BlobData blobData = MessageFormatRecord.deserializeBlob(payload); ByteBuffer encryptionKey = messageMetadata == null ? null : messageMetadata.getEncryptionKey(); ByteBuf chunkBuf = blobData.getAndRelease(); try { boolean launchedJob = maybeLaunchCryptoJob(chunkBuf, null, encryptionKey, chunkBlobId); if (!launchedJob) { chunkBuf = filterChunkToRange(chunkBuf); chunkIndexToBuf.put(chunkIndex, chunkBuf.retainedDuplicate()); numChunksRetrieved++; } successfullyDeserialized = true; } finally { chunkBuf.release(); } } else { } }
Source:
<code>public String currencyDefaultPlural() { <START> return "Dollars"; <END> }</code><technical_language>This feels Ess is localizing / localizing</technical_language>

Target:
public String currencyDefaultPlural() { return ess.getSettings().getCurrencyPlural(); }
Source:
<code>public boolean equals(Object o){ if(o instanceof SpatialRuleContainer){ <START> if(this.represents(((SpatialRuleContainer) o).getRules())) <END> return true; } return false; }</code><technical_language>This is correct. X rules of Y i.e. necessarily equal. this is important</technical_language>

Target:
public boolean equals(Object o) { if (o instanceof SpatialRuleContainer) { if (this.rules.equals(((SpatialRuleContainer) o).getRules())) return true; } return false; }
Source:
<code>public Layer beforeLayer(WMSMapContent mapContent, Layer layer) { Geometry wktGeom = getClipGeometry(mapContent.getRequest()); if (wktGeom == null) return layer; Geometry bboxGeom = JTS.toGeometry(mapContent.getRequest().getBbox()); <START> if (wktGeom.covers(bboxGeom)) return layer; <END> try { if (layer instanceof FeatureLayer) { FeatureLayer fl = (FeatureLayer) layer; ClippedFeatureSource clippedFS = new ClippedFeatureSource(layer.getFeatureSource(), wktGeom); FeatureLayer clippedLayer = new FeatureLayer(clippedFS, fl.getStyle(), fl.getTitle()); BeanUtilsBean2.getInstance().copyProperties(clippedLayer, fl); fl.getUserData().putAll(layer.getUserData()); return clippedLayer; } else if (layer instanceof GridReaderLayer) { GridReaderLayer gr = (GridReaderLayer) layer; CroppedGridCoverage2DReader croppedGridReader = new CroppedGridCoverage2DReader(gr.getReader(), wktGeom); GridReaderLayer croppedGridLayer = new GridReaderLayer(croppedGridReader, layer.getStyle()); BeanUtilsBean2.getInstance().copyProperties(croppedGridLayer, gr); croppedGridLayer.getUserData().putAll(layer.getUserData()); return croppedGridLayer; } } catch (Exception e) { LOGGER.severe("Error occurred while clipping layer " + layer.getTitle()); LOGGER.log(Level.SEVERE, e.getMessage(), e); return layer; } return layer; }</code><technical_language>work fine if request is a WMS 1.3, typically a flipped bbox? I tests covering this case (clip fully map area). Please choose a bbox a match for clip if flipped version is used. (e.g., 20,20,40,40 :-D )</technical_language>

Target:
public Layer beforeLayer(WMSMapContent mapContent, Layer layer) { Geometry wktGeom = mapContent.getRequest().getClip(); if (wktGeom == null) return layer; Geometry bboxGeom = JTS.toGeometry(mapContent.getRequest().getBbox()); if (wktGeom.covers(bboxGeom)) return layer; try { if (layer instanceof FeatureLayer) { FeatureLayer fl = (FeatureLayer) layer; ClippedFeatureSource clippedFS = new ClippedFeatureSource(layer.getFeatureSource(), wktGeom); FeatureLayer clippedLayer = new FeatureLayer(clippedFS, fl.getStyle(), fl.getTitle()); BeanUtilsBean2.getInstance().copyProperties(clippedLayer, fl); fl.getUserData().putAll(layer.getUserData()); return clippedLayer; } else if (layer instanceof GridReaderLayer) { GridReaderLayer gr = (GridReaderLayer) layer; CroppedGridCoverage2DReader croppedGridReader = new CroppedGridCoverage2DReader(gr.getReader(), wktGeom); GridReaderLayer croppedGridLayer = new GridReaderLayer(croppedGridReader, layer.getStyle()); BeanUtilsBean2.getInstance().copyProperties(croppedGridLayer, gr); croppedGridLayer.getUserData().putAll(layer.getUserData()); return croppedGridLayer; } } catch (Exception e) { LOGGER.severe("Error occurred while clipping layer " + layer.getTitle()); LOGGER.log(Level.SEVERE, e.getMessage(), e); return layer; } return layer; }
Source:
<code>private void setDarkReviewScreen(boolean enabled) { if (invokeSource == SUGGESTED_EDITS_ADD_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_TRANSLATE_IMAGE_CAPTION || invokeSource == SUGGESTED_EDITS_TRANSLATE_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_IMAGE_CAPTION) { int whiteRes = getResources().getColor(android.R.color.white); toolbarContainer.setBackgroundResource(enabled ? android.R.color.black : ResourceUtil.getThemedAttributeId(getContext(), R.attr.main_toolbar_color)); saveButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.themed_icon_color), PorterDuff.Mode.SRC_IN); cancelButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_icon_color), PorterDuff.Mode.SRC_IN); headerText.setTextColor(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_title_color)); <START> ((DescriptionEditActivity) activity).updateStatusBarColor(enabled ? ContextCompat.getColor(activity, android.R.color.black) : ResourceUtil.getThemedColor(getContext(), R.attr.main_status_bar_color)); <END> DeviceUtil.updateStatusBarTheme(activity, null, enabled); ((DescriptionEditActivity) activity).updateNavigationBarColor(enabled ? ContextCompat.getColor(activity, android.R.color.black) : ResourceUtil.getThemedColor(getContext(), R.attr.paper_color)); } }</code><technical_language>Color.BLACK constant, instead of ContextCompat resource id of android.R.color.black</technical_language>

Target:
private void setDarkReviewScreen(boolean enabled) { if (action == ADD_CAPTION || action == TRANSLATE_CAPTION) { int whiteRes = getResources().getColor(android.R.color.white); toolbarContainer.setBackgroundResource(enabled ? android.R.color.black : ResourceUtil.getThemedAttributeId(getContext(), R.attr.main_toolbar_color)); saveButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.themed_icon_color), PorterDuff.Mode.SRC_IN); cancelButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_icon_color), PorterDuff.Mode.SRC_IN); headerText.setTextColor(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_title_color)); ((DescriptionEditActivity) activity).updateStatusBarColor(enabled ? Color.BLACK : ResourceUtil.getThemedColor(getContext(), R.attr.main_status_bar_color)); DeviceUtil.updateStatusBarTheme(activity, null, enabled); ((DescriptionEditActivity) activity).updateNavigationBarColor(enabled ? Color.BLACK : ResourceUtil.getThemedColor(getContext(), R.attr.paper_color)); } }
Source:
<code>private File createExtractionMarkerFile() { try { <START> final File extractionIsProcessing = Paths.get(destinationDir.getPath(), "extractionIsProcessing.tmp").toFile(); <END> extractionIsProcessing.createNewFile(); extractionIsProcessing.deleteOnExit(); return extractionIsProcessing; } catch (IOException e) { throw new RuntimeException(e); } }</code><technical_language>Actually, File object instance a constant: Paths.get(destinationDir.getPath(), "extractionIsProcessing.tmp").toFile()</technical_language>

Target:
private File createExtractionMarkerFile() { try { final File extractionIsProcessing = markerFile(); extractionIsProcessing.createNewFile(); extractionIsProcessing.deleteOnExit(); return extractionIsProcessing; } catch (IOException e) { throw new RuntimeException(e); } }
Source:
<code>private LogoutResponse() { <START> RealmLog.debug("Logout response: "); <END> setError(null); }</code><technical_language>Logout response: 'null'</technical_language>

Target:
private LogoutResponse() { RealmLog.debug("Logout response - Success"); setError(null); }
Source:
<code>public void testConstructorWithStruct() { OffsetCommitResponseData data = new OffsetCommitResponseData() <START> .setTopics(Arrays.asList( <END> new OffsetCommitResponseTopic().setPartitions( Collections.singletonList(new OffsetCommitResponsePartition() .setPartitionIndex(partitionOne) .setErrorCode(errorOne.code()))), new OffsetCommitResponseTopic().setPartitions( Collections.singletonList(new OffsetCommitResponsePartition() .setPartitionIndex(partitionTwo) .setErrorCode(errorTwo.code())) ) )); for (short version = 0; version <= ApiKeys.OFFSET_COMMIT.latestVersion(); version++) { OffsetCommitResponse response = new OffsetCommitResponse(data.toStruct(version), version); assertEquals(expectedErrorCounts, response.errorCounts()); if (version >= 3) { assertEquals(throttleTimeMs, response.throttleTimeMs()); } else { assertEquals(DEFAULT_THROTTLE_TIME, response.throttleTimeMs()); } assertEquals(version >= 4, response.shouldClientThrottle(version)); } }</code><technical_language>nit: change default indentation in intellij? requirement fix, I find a bit harder read wide indentation. a bit of this in MessageTest well</technical_language>

Target:
public void testConstructorWithStruct() { OffsetCommitResponseData data = new OffsetCommitResponseData() .setTopics(Arrays.asList( new OffsetCommitResponseTopic().setPartitions( Collections.singletonList(new OffsetCommitResponsePartition() .setPartitionIndex(partitionOne) .setErrorCode(errorOne.code()))), new OffsetCommitResponseTopic().setPartitions( Collections.singletonList(new OffsetCommitResponsePartition() .setPartitionIndex(partitionTwo) .setErrorCode(errorTwo.code()))) )) .setThrottleTimeMs(throttleTimeMs); for (short version = 0; version <= ApiKeys.OFFSET_COMMIT.latestVersion(); version++) { OffsetCommitResponse response = new OffsetCommitResponse(data.toStruct(version), version); assertEquals(expectedErrorCounts, response.errorCounts()); if (version >= 3) { assertEquals(throttleTimeMs, response.throttleTimeMs()); } else { assertEquals(DEFAULT_THROTTLE_TIME, response.throttleTimeMs()); } assertEquals(version >= 4, response.shouldClientThrottle(version)); } }
Source:
<code>protected AbstractElement() { this.name = "/"; this.parent = null; <START> this.id = (long) -1; <END> }</code><technical_language>reason casting instead of doing: suggestion this.id = -1L; this in a other places in PR</technical_language>

Target:
protected AbstractElement() { this.name = "/"; this.parent = null; this.id = -1L; }
Source:
<code>public String evaluate(String referer) { <START> String families = {"wikibooks","wikinews","wikimedia","wikipedia","wikiquote","wikisource","wikiversity","wikivoyage","wiktionary"}; <END> HashSet<String> familySet = new HashSet<String>(Arrays.asList(families)); if (referer == null || referer.equals("-")) return null; PageviewDefinition pageviewDefInst = PageviewDefinition.getInstance(); referer = referer.replaceFirst("http[s]?://", ""); String project = pageviewDefInst.getProjectFromHost(referer); if (pageviewDefInst.isWikimediaHost(project + ".org")) { return project; } else { return null; } }</code><technical_language>global constants</technical_language>

Target:
public String evaluate(String referer) { if (referer == null || referer.equals("-")) return null; referer = referer.replaceFirst("http[s]?://", ""); String project = Webrequest.getProjectFromHost(referer); if (Webrequest.isWikimediaHost(project + ".org")) { return project; } else { return null; } }
Source:
<code>public final void cleanExpiredUsersSessions() { Date now = new Date(); Iterator<Entry<String, SessionInfo>> iterator = sessionInfoMap.entrySet().iterator(); while (iterator.hasNext()) { ConcurrentMap<String, Object> sessionMap = iterator.next().getValue().contentOfSession; <START> Date hardLimit = sessionMap.containsKey(HARD_LIMIT_PARAMETER_NAME) ? (Date) sessionMap.get(HARD_LIMIT_PARAMETER_NAME) : null; <END> Date softLimit = (Date) sessionMap.get(SOFT_LIMIT_PARAMETER_NAME); if (hardLimit != null) { if (hardLimit.before(now)) { iterator.remove(); } } if (softLimit != null) { if (softLimit.before(now)) { iterator.remove(); } } } }</code><technical_language>get</technical_language>

Target:
public final void cleanExpiredUsersSessions() { Date now = new Date(); Iterator<Entry<String, SessionInfo>> iterator = sessionInfoMap.entrySet().iterator(); while (iterator.hasNext()) { ConcurrentMap<String, Object> sessionMap = iterator.next().getValue().contentOfSession; Date hardLimit = (Date) sessionMap.get(HARD_LIMIT_PARAMETER_NAME); Date softLimit = (Date) sessionMap.get(SOFT_LIMIT_PARAMETER_NAME); if (hardLimit != null) { if (hardLimit.before(now)) { iterator.remove(); } } if (softLimit != null) { if (softLimit.before(now)) { iterator.remove(); } } } }
Source:
<code>private void startConnect() throws IOException { if(!isFirstConnect){ try { Thread.sleep(r.nextInt(1000)); } catch (InterruptedException e) { LOG.warn("Unexpected exception", e); } } state = States.CONNECTING; InetSocketAddress addr; if (rwServerAddress != null) { addr = rwServerAddress; rwServerAddress = null; } else { addr = hostProvider.next(1000); } String hostPort = addr.getHostString() + ":" + addr.getPort(); MDC.put("myid", hostPort); setName(getName().replaceAll("\\(.*\\)", "(" + hostPort + ")")); if (clientConfig.isSaslClientEnabled()) { try { if (zooKeeperSaslClient != null) { zooKeeperSaslClient.shutdown(); } zooKeeperSaslClient = new ZooKeeperSaslClient(getServerPrincipal(addr), clientConfig); <START> saslLoginFailed = false; <END> } catch (LoginException e) { LOG.warn("SASL configuration failed: " + e + " Will continue connection to Zookeeper server without " + "SASL authentication, if Zookeeper server allows it."); eventThread.queueEvent(new WatchedEvent( Watcher.Event.EventType.None, Watcher.Event.KeeperState.AuthFailed, null)); saslLoginFailed = true; } } logStartConnect(addr); clientCnxnSocket.connect(addr); }</code><technical_language>I if this impact clientTunneledAuthenticationInProgress? revert this a new connection attempt starts</technical_language>

Target:
private void startConnect() throws IOException { saslLoginFailed = false; if(!isFirstConnect){ try { Thread.sleep(r.nextInt(1000)); } catch (InterruptedException e) { LOG.warn("Unexpected exception", e); } } state = States.CONNECTING; InetSocketAddress addr; if (rwServerAddress != null) { addr = rwServerAddress; rwServerAddress = null; } else { addr = hostProvider.next(1000); } String hostPort = addr.getHostString() + ":" + addr.getPort(); MDC.put("myid", hostPort); setName(getName().replaceAll("\\(.*\\)", "(" + hostPort + ")")); if (clientConfig.isSaslClientEnabled()) { try { if (zooKeeperSaslClient != null) { zooKeeperSaslClient.shutdown(); } zooKeeperSaslClient = new ZooKeeperSaslClient(getServerPrincipal(addr), clientConfig); } catch (LoginException e) { LOG.warn("SASL configuration failed: " + e + " Will continue connection to Zookeeper server without " + "SASL authentication, if Zookeeper server allows it."); eventThread.queueEvent(new WatchedEvent( Watcher.Event.EventType.None, Watcher.Event.KeeperState.AuthFailed, null)); saslLoginFailed = true; } } logStartConnect(addr); clientCnxnSocket.connect(addr); }
Source:
<code>public DiskProfileValidator(DiskProfile diskProfile) { <START> this(diskProfile.getId()); <END> this.diskProfile = diskProfile; }</code><technical_language>NPE in case diskProfile is null</technical_language>

Target:
public DiskProfileValidator(DiskProfile diskProfile) { this(diskProfile != null ? diskProfile.getId() : null); this.diskProfile = diskProfile; }
Source:
<code>public static org.ovirt.engine.core.common.job.Step map(Step step, org.ovirt.engine.core.common.job.Step entity) { org.ovirt.engine.core.common.job.Step target = entity != null ? entity : new org.ovirt.engine.core.common.job.Step(); target.setId(GuidUtils.asGuid(step.getId())); if (step.isSetParentStep()) { target.setParentStepId(GuidUtils.asGuid(step.getParentStep().getId())); } target.setJobId(GuidUtils.asGuid(step.getJob().getId())); if (step.isSetType()) { target.setStepType(map(step.getType())); } if (step.isSetDescription()) { target.setDescription(step.getDescription()); } if (step.isSetNumber()) { target.setStepNumber(step.getNumber()); } if (step.isSetStatus()) { target.setStatus(mapStepStatus(step.getStatus())); } <START> target.setProgress(step.getProgress()); <END> target.setStartTime(step.isSetStartTime() ? step.getStartTime().toGregorianCalendar().getTime() : new Date(Calendar.getInstance().getTimeInMillis())); target.setEndTime(step.isSetEndTime() ? step.getEndTime().toGregorianCalendar().getTime() : new Date(Calendar.getInstance().getTimeInMillis())); target.setExternal(step.isSetExternal() ? step.isExternal() : true); return target; }</code><technical_language>If I understand correctly progress is a read-only attribute, need map in inbound direction, in outbound direction. this needed</technical_language>

Target:
public static org.ovirt.engine.core.common.job.Step map(Step step, org.ovirt.engine.core.common.job.Step entity) { org.ovirt.engine.core.common.job.Step target = entity != null ? entity : new org.ovirt.engine.core.common.job.Step(); target.setId(GuidUtils.asGuid(step.getId())); if (step.isSetParentStep()) { target.setParentStepId(GuidUtils.asGuid(step.getParentStep().getId())); } target.setJobId(GuidUtils.asGuid(step.getJob().getId())); if (step.isSetType()) { target.setStepType(map(step.getType())); } if (step.isSetDescription()) { target.setDescription(step.getDescription()); } if (step.isSetNumber()) { target.setStepNumber(step.getNumber()); } if (step.isSetStatus()) { target.setStatus(mapStepStatus(step.getStatus())); } if (step.isSetProgress()) { target.setProgress(step.getProgress()); } target.setStartTime(step.isSetStartTime() ? step.getStartTime().toGregorianCalendar().getTime() : new Date(Calendar.getInstance().getTimeInMillis())); target.setEndTime(step.isSetEndTime() ? step.getEndTime().toGregorianCalendar().getTime() : new Date(Calendar.getInstance().getTimeInMillis())); target.setExternal(step.isSetExternal() ? step.isExternal() : true); return target; }
Source:
<code>public void testCreateSinkTableWithoutPK() { TableSchema illegalSchema = TableSchema.builder() .field("region", DataTypes.STRING()) .field("view_count", DataTypes.BIGINT()) .build(); ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); CatalogTable catalogTable = new CatalogTableImpl(illegalSchema, getFullSinkOptions(), "sinkTable"); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("PK constraints must be defined in the 'upsert-kafka' connector."))); <START> FactoryUtil.createTableSink(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader(), false); <END> }</code><technical_language>I reuse verbose create table sink/source code, e.g. java private static DynamicTableSink createTableSink(TableSchema schema, Map<String, String> options) { ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "testTable"); CatalogTable catalogTable = new CatalogTableImpl( schema, options, "testTable"); return FactoryUtil.createTableSink(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader(), false); }</technical_language>

Target:
public void testCreateSinkTableWithoutPK() { thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("'upsert-kafka' tables require to define a PRIMARY KEY constraint. " + "The PRIMARY KEY specifies which columns should be read from or write to the Kafka message key. " + "The PRIMARY KEY also defines records in the 'upsert-kafka' table should update or delete on which keys."))); TableSchema illegalSchema = TableSchema.builder() .field("region", DataTypes.STRING()) .field("view_count", DataTypes.BIGINT()) .build(); createActualSink(illegalSchema, getFullSinkOptions()); }
Source:
<code>protected void upgradeSystemTables() throws StandardException { sdd.createKeyColumnUseViewInSysIBM(tc); <START> SpliceLogUtils.info(LOG, "Catalog upgraded: updated syscolumns view in SYSIBM schema"); <END> }</code><technical_language>Please right view name in log message</technical_language>

Target:
protected void upgradeSystemTables() throws StandardException { sdd.createKeyColumnUseViewInSysIBM(tc); SpliceLogUtils.info(LOG, "Catalog upgraded: added syskeycoluse view in SYSIBM schema"); }
Source:
<code>protected void perform() { <START> log.infoFormat("Sending reboot command for VM {0}.", getVm().getName()); <END> final VDSReturnValue returnValue = runVdsCommand(VDSCommandType.RebootVm, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId())); setActionReturnValue(returnValue.getReturnValue()); setSucceeded(returnValue.getSucceeded()); }</code><technical_language>this log is needed, infrastructure print command is run, like: 2014-01-13 12:20:27,160 INFO [org.ovirt.engine.core.bll.StopVmCommand] (org.ovirt.thread.pool-6-thread-10) [5dfd99b1] Running command: StopVmCommand internal: false. Entities affected : ID: 1a6b9b46-f96b-4fb3-9260-cbab58e81da3 Type: VM i id, this is infra ok for other commands i ok</technical_language>

Target:
protected void perform() { final VDSReturnValue returnValue = runVdsCommand(VDSCommandType.RebootVm, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId())); setActionReturnValue(returnValue.getReturnValue()); setSucceeded(returnValue.getSucceeded()); }
Source:
<code>private Optional<CoordinationUtils> getCoordinationUtils(Config config) { boolean isAppModeBatch = new ApplicationConfig(appDesc.getConfig()).getAppMode() == ApplicationConfig.ApplicationMode.BATCH; if (!isAppModeBatch) { return Optional.empty(); } JobCoordinatorConfig jcConfig = new JobCoordinatorConfig(config); CoordinationUtils coordinationUtils = jcConfig.getCoordinationUtilsFactory().getCoordinationUtils(CoordinationConstants.APPLICATION_RUNNER_PATH_SUFFIX, PROCESSOR_ID, config); if (coordinationUtils != null) { return Optional.of(coordinationUtils); } <START> return Optional.empty(); <END> }</code><technical_language>simplified Optional.oNullable(coordinationUtils)</technical_language>

Target:
private Optional<CoordinationUtils> getCoordinationUtils(Config config) { if (!isAppModeBatch) { return Optional.empty(); } JobCoordinatorConfig jcConfig = new JobCoordinatorConfig(config); CoordinationUtils coordinationUtils = jcConfig.getCoordinationUtilsFactory().getCoordinationUtils(CoordinationConstants.APPLICATION_RUNNER_PATH_SUFFIX, PROCESSOR_ID, config); return Optional.ofNullable(coordinationUtils); }
Source:
<code>public void logout() { <START> if (mFacebookAuthHelper != null) mFacebookAuthHelper.logout(); <END> if (mGoogleAuthHelper != null) mGoogleAuthHelper.logout(); if (mTwitterAuthHelper != null) mTwitterAuthHelper.logout(); if (mPasswordAuthHelper != null) mPasswordAuthHelper.logout(); mRef.unauth(); }</code><technical_language>user of app authenticated provider. call logout() provider, of them</technical_language>

Target:
public void logout() { if (mTwitterAuthProvider != null) mTwitterAuthProvider.logout(); if (mFacebookAuthProvider != null) mFacebookAuthProvider.logout(); if (mGoogleAuthProvider != null) mGoogleAuthProvider.logout(); if (mPasswordAuthProvider != null) mPasswordAuthProvider.logout(); mRef.unauth(); }