auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static List<Unit> generateWorkload() { ImmutableList.Builder<Unit> builder = new ImmutableList.Builder<>(); for (int i = 0; i < 10; i++) { <START> byte[] srcBytes = getAlphaNumericString(sourceLength).getBytes(); <END> byte[] compressedBytes = new byte[sourceLength * 32]; int size = compressor.compress(srcBytes, 0, srcBytes.length, compressedBytes, 0, compressedBytes.length); builder.add(new Unit(srcBytes, sourceLength, compressedBytes, size)); } return builder.build(); }</code><technical_language>spell out src</technical_language>

Target:
private static List<Unit> generateWorkload() { ImmutableList.Builder<Unit> builder = new ImmutableList.Builder<>(); for (int i = 0; i < 10; i++) { byte[] sourceBytes = getAlphaNumericString(sourceLength).getBytes(); byte[] compressedBytes = new byte[sourceLength * 32]; int size = compressor.compress(sourceBytes, 0, sourceBytes.length, compressedBytes, 0, compressedBytes.length); builder.add(new Unit(sourceBytes, sourceLength, compressedBytes, size)); } return builder.build(); }
Source:
<code>public BehaviorState modify(Actor oreon, BehaviorState result) { OreonAttributeComponent oreonAttributeComponent = oreon.getComponent(OreonAttributeComponent.class); if (oreonAttributeComponent.hunger > 50) { if (taskManagementSystem.assignAdvancedTaskToOreon(oreon, AssignedTaskType.Eat)) { return BehaviorState.SUCCESS; } else { <START> String message = "We are hungry, build a diner!"; <END> lastNotification = delayedNotificationSystem.sendNotification(message, notificationMessageEntity, lastNotification); oreonHealthSystem.reduceHealth(oreon, "hunger"); } } return BehaviorState.FAILURE; }</code><technical_language>Punctuation: "We hungry. Build a diner!"</technical_language>

Target:
public BehaviorState modify(Actor oreon, BehaviorState result) { OreonAttributeComponent oreonAttributeComponent = oreon.getComponent(OreonAttributeComponent.class); if (oreonAttributeComponent.hunger > 50) { if (taskManagementSystem.assignAdvancedTaskToOreon(oreon, AssignedTaskType.Eat)) { return BehaviorState.SUCCESS; } else { String message = "We are hungry. Build a diner!"; lastNotification = delayedNotificationSystem.sendNotification(message, notificationMessageEntity, lastNotification); oreonHealthSystem.reduceHealth(oreon, "hunger"); } } return BehaviorState.FAILURE; }
Source:
<code><START> default void beforeDataProviderExecution(IDataProviderMethod dataProviderMethod, ITestNGMethod method, ITestContext iTestContext) { <END> throw new UnsupportedOperationException("Method is not implemented"); }</code><technical_language>here. I dont throwing exceptions.We instead empty implementations</technical_language>

Target:
default void beforeDataProviderExecution(IDataProviderMethod dataProviderMethod, ITestNGMethod method, ITestContext iTestContext) { }
Source:
<code>public List<String> getValues() { <START> return new ArrayList<>(fValues.keySet()); <END> }</code><technical_language>if want this threadsafe synchronize this copy fValues. synchronized(fValues){return new ArrayList<>(fValues.keySet());}</technical_language>

Target:
public Set<String> getValues() { synchronized (fValues) { return fValues.keySet(); } }
Source:
<code>public void getPublicIPAddress() { final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup); PublicIPAddress ip = ipApi.get(publicIpAddressName); while (ip.properties().provisioningState().equals("Updating")) { try { Thread.sleep(10 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } ip = ipApi.get(publicIpAddressName); <START> } <END> assertNotNull(ip); assertEquals(ip.name(), publicIpAddressName); assertEquals(ip.location(), LOCATION); assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourcegroup, publicIpAddressName)); assertEquals(ip.tags().get("testkey"), "testvalue"); assertNotNull(ip.properties()); assertEquals(ip.properties().provisioningState(), "Succeeded"); assertNotNull(ip.properties().ipAddress()); assertEquals(ip.properties().publicIPAllocationMethod(), "Static"); assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4); }</code><technical_language>jclouds predicates2.retry construct. If this is a common done, consider creating predicate injectable other classes benefit it</technical_language>

Target:
public void getPublicIPAddress() { final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup); boolean jobDone = Predicates2.retry(new Predicate<String>() { @Override public boolean apply(String name) { return ipApi.get(name).properties().provisioningState().equals("Succeeded"); } }, 10 * 1000).apply(publicIpAddressName); assertTrue(jobDone, "get operation did not complete in the configured timeout"); PublicIPAddress ip = ipApi.get(publicIpAddressName); assertNotNull(ip); assertEquals(ip.name(), publicIpAddressName); assertEquals(ip.location(), LOCATION); assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourcegroup, publicIpAddressName)); assertEquals(ip.tags().get("testkey"), "testvalue"); assertNotNull(ip.properties()); assertEquals(ip.properties().provisioningState(), "Succeeded"); assertNotNull(ip.properties().ipAddress()); assertEquals(ip.properties().publicIPAllocationMethod(), "Static"); assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4); }
Source:
<code>public void beforeStageStarts() { Preferences prefs = Preferences.create(TestController.TEST_DIRECTORY, TestController.TEST_SESSION_CONFIG_FILENAME, <START> TestController.TEST_USER_CONFIG_FILENAME); <END> prefs.setLastLoginCredentials("test", "test"); prefs.setLastViewedRepository("dummy/dummy"); }</code><technical_language>is a method do this in TestController</technical_language>

Target:
public void beforeStageStarts() { Preferences prefs = TestController.createTestPreferences(); prefs.setLastLoginCredentials("test", "test"); prefs.setLastViewedRepository("dummy/dummy"); }
Source:
<code>public void runTest(List<Integer> ints) throws IOException { int[] inputArray = ints.stream().mapToInt(Integer::intValue).toArray(); <START> ByteArrayOutputStream baos = new ByteArrayOutputStream(); <END> CramIntArray.write(inputArray, baos); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); int[] outputArray = CramIntArray.array(bais); Assert.assertEquals(inputArray, outputArray, "Arrays did not match"); baos.close(); bais.close(); }</code><technical_language>try-with-resources for ensure closed if exception is thrown</technical_language>

Target:
public void runTest(List<Integer> ints) throws IOException { int[] inputArray = ints.stream().mapToInt(Integer::intValue).toArray(); try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { CramIntArray.write(inputArray, baos); try (ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray())) { int[] outputArray = CramIntArray.array(bais); Assert.assertEquals(inputArray, outputArray, "Arrays did not match"); } } }
Source:
<code>private FilePath createWindowsGitSSH(FilePath key, String user) throws IOException, InterruptedException { <START> FilePath ssh = workspace.createTempFile("ssh", ".bat"); <END> FilePath sshexe = getSSHExecutable(); ssh.write("@echo off\n" + "\"" + sshexe.getRemote() + "\" -i \"" + key.getRemote() +"\" -l \"" + user + "\" -o StrictHostKeyChecking=no %* ", null); ssh.chmod(0700); return ssh; }</code><technical_language>insecure - need clutter workspace. [WorkspaceList.tmpDir(workspace)](<LINK_0> If bump a version write a helper thing</technical_language>

Target:
private FilePath createWindowsGitSSH(FilePath key, String user) throws IOException, InterruptedException { FilePath sshexe = getSSHExecutable(); FilePath ssh = workspace.createTextTempFile("ssh", ".bat", "@echo off\r\n" + "\"" + sshexe.getRemote() + "\" -i \"" + key.getRemote() +"\" -l \"" + user + "\" -o StrictHostKeyChecking=no %* ", false); return ssh; }
Source:
<code>public ChatComponent setBold(boolean bold) { <START> $lock.writeLock().lock(); <END> if (this.bold == null) this.bold = new AtomicBoolean(bold); else this.bold.set(bold); $lock.writeLock().unlock(); return this; }</code><technical_language>THREAD-SAFETY This is a poor construct for a thread-safe class. save (that much) memory, solved a volatile boolean set false a default instead</technical_language>

Target:
public ChatComponent setBold(boolean bold) { if (this.bold == null) this.bold = new AtomicBoolean(bold); else this.bold.set(bold); return this; }
Source:
<code>private void receive(String msg, InetSocketAddress remoteAddress) { if (logger.isInfoEnabled()) { logger.info("Receive multicast message: " + msg + " from " + remoteAddress); } if (msg.startsWith(Constants.REGISTER)) { URL url = URL.valueOf(msg.substring(Constants.REGISTER.length()).trim()); registered(url); } else if (msg.startsWith(Constants.UNREGISTER)) { URL url = URL.valueOf(msg.substring(Constants.UNREGISTER.length()).trim()); unregistered(url); } else if (msg.startsWith(Constants.SUBSCRIBE)) { URL url = URL.valueOf(msg.substring(Constants.SUBSCRIBE.length()).trim()); Set<URL> urls = getRegistered(); if (CollectionUtils.isNotEmpty(urls)) { for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { boolean isLocalhost = false; String host = null; <START> if (remoteAddress != null && remoteAddress.getAddress() != null && NetUtils.getLocalHost().equals(remoteAddress.getAddress().getHostAddress())) { <END> isLocalhost = true; host = remoteAddress.getAddress().getHostAddress(); } if (!isLocalhost && NetUtils.getLocalHost().equals(url.getIp())) { isLocalhost = true; host = url.getIp(); } if (url.getParameter("unicast", true) && !isLocalhost) { unicast(Constants.REGISTER + " " + u.toFullString(), host); } else { multicast(Constants.REGISTER + " " + u.toFullString()); } } } } } }</code><technical_language>This judgment a method called isLocalhost</technical_language>

Target:
private void receive(String msg, InetSocketAddress remoteAddress) { if (logger.isInfoEnabled()) { logger.info("Receive multicast message: " + msg + " from " + remoteAddress); } if (msg.startsWith(Constants.REGISTER)) { URL url = URL.valueOf(msg.substring(Constants.REGISTER.length()).trim()); registered(url); } else if (msg.startsWith(Constants.UNREGISTER)) { URL url = URL.valueOf(msg.substring(Constants.UNREGISTER.length()).trim()); unregistered(url); } else if (msg.startsWith(Constants.SUBSCRIBE)) { URL url = URL.valueOf(msg.substring(Constants.SUBSCRIBE.length()).trim()); Set<URL> urls = getRegistered(); if (CollectionUtils.isNotEmpty(urls)) { for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { boolean isLocalhost = false; if (remoteAddress != null && remoteAddress.getAddress() != null && NetUtils.getLocalHost().equals(remoteAddress.getAddress().getHostAddress())) { isLocalhost = true; } if (!isLocalhost && NetUtils.getLocalHost().equals(url.getIp())) { isLocalhost = true; } String host = remoteAddress != null && remoteAddress.getAddress() != null ? remoteAddress.getAddress().getHostAddress() : url.getIp(); if (url.getParameter("unicast", true) && !isLocalhost) { unicast(Constants.REGISTER + " " + u.toFullString(), host); } else { multicast(Constants.REGISTER + " " + u.toFullString()); } } } } } }
Source:
<code>protected static void saveResponseToPage(Long page_id, Listing listing, Map<String,String> responses){ Page page = null; try { <START> Logger.info("Try to find response page with page id: " + page_id); <END> page = listing.getResponsePageByPageId(page_id); } catch (Exception e) { Logger.error(e.getMessage()); error(); } if(page == null){ Logger.info("Page does not exist, creating new page"); page = new Page(listing.id, page_id); saveResponseToNewPage(page, responses); } else { Logger.info("Page does exist, updating current page"); saveResponseToExistingPage(page, responses); } listing.addResponsePage(page, page_id, supplierDetailsFromCookie.get("supplierEmail")); }</code><technical_language>good remove some, if all, of log messages merging</technical_language>

Target:
protected static void saveResponseToPage(Long page_id, Listing listing, Map<String,String> responses){ Page page = null; try { page = listing.getResponsePageByPageId(page_id); } catch (Exception e) { Logger.error(e.getMessage()); error(); } if(page == null){ page = new Page(listing.id, page_id); saveResponseToNewPage(page, responses); } else { saveResponseToExistingPage(page, responses); } listing.addResponsePage(page, page_id, getEmail()); }
Source:
<code>public String toString() { return throwable == null ? "Processed: " + processedCount + ", Active: " + activeCount + ", Put: " + putCount + ", TTL update count: " + ttlUpdateCount + ", Delete: " + deleteCount + ", Crafted ID count: " + craftedIdCount + ", Duplicate Puts: " + duplicatePuts + ", Put After Update: " + putAfterUpdates + ", Duplicate Delete: " + duplicateDeletes + ", Duplicate Update: " + duplicateUpdates <START> + ", Update After Delete: " + updateAfterDeletes : "Exception Msg: " + throwable.getMessage(); <END> }</code><technical_language>I thinking if this more readable StringBuilder append. this: sb.append("Processed: ").append(processedCount) .append(", Active: ").append(activeCount) ..</technical_language>

Target:
public String toString() { return throwable == null ? "Processed: " + processedCount + ", Active: " + activeCount + ", Put: " + putCount + ", TTL update count: " + ttlUpdateCount + ", Delete: " + deleteCount + ", Crafted ID count: " + craftedIdCount + ", Duplicate Puts: " + duplicatePuts + ", Put After Update: " + putAfterUpdates + ", Duplicate Delete: " + duplicateDeletes + ", Duplicate Update: " + duplicateUpdates + ", Update After Delete: " + updateAfterDeletes + ", Duplicate Keys: " + duplicateKeys : "Exception Msg: " + throwable.getMessage(); }
Source:
<code>public boolean isGatewayExist(AuthzToken authzToken, String gatewayId) throws TenantProfileServiceException, AuthorizationException, TException { try { <START> Gateway gateway = tenantProfileRepository.getGateway(gatewayId); <END> boolean checkStatus = gateway.getGatewayApprovalStatus().equals(GatewayApprovalStatus.APPROVED); return (gateway != null && checkStatus); } catch (Exception ex) { logger.error("Error checking if gateway-profile exists, reason: " + ex.getMessage(), ex); TenantProfileServiceException exception = new TenantProfileServiceException(); exception.setMessage("Error checking if gateway-profile exists, reason: " + ex.getMessage()); throw exception; } }</code><technical_language>This work is. getGateway() query gatewayId status is APPROVED. This if is APPROVED gateway gatewayId getGateway() return it. means checks lines 188-189 unnecessary</technical_language>

Target:
public boolean isGatewayExist(AuthzToken authzToken, String gatewayId) throws TenantProfileServiceException, AuthorizationException, TException { try { Gateway gateway = tenantProfileRepository.getGateway(gatewayId); return (gateway != null); } catch (Exception ex) { logger.error("Error checking if gateway-profile exists, reason: " + ex.getMessage(), ex); TenantProfileServiceException exception = new TenantProfileServiceException(); exception.setMessage("Error checking if gateway-profile exists, reason: " + ex.getMessage()); throw exception; } }
Source:
<code>private void updateGeoRepStatus(GlusterVolumeEntity volume, GlusterGeoRepSession session) { List<Set<GeoRepSessionStatus>> list = new ArrayList<>(); int replicaCount = volume.getReplicaCount() == 0 ? 1 : volume.getReplicaCount(); if (replicaCount > volume.getBricks().size()) { throw new EngineException(EngineError.GlusterVolumeGeoRepSyncFailed, <START> "Not all bricks are up for this volume"); <END> } for (int i = 0; i < volume.getBricks().size(); i = i + replicaCount) { Set<GeoRepSessionStatus> subVolumeStatusSet = new HashSet<>(); int j = 0; while (j < replicaCount) { Guid brickId = volume.getBricks().get(i + j).getId(); subVolumeStatusSet.add(getStatusForBrickFromSession(session, brickId)); j++; } list.add(subVolumeStatusSet); } session.setStatus(GeoRepSessionStatus.ACTIVE); for (Set<GeoRepSessionStatus> subVolumeStatusValues : list) { if (subVolumeStatusValues.contains(GeoRepSessionStatus.ACTIVE)) { continue; } else if (subVolumeStatusValues.contains(GeoRepSessionStatus.FAULTY)) { session.setStatus(GeoRepSessionStatus.FAULTY); return; } if (ArrayUtils.contains(overridableStatuses, session.getStatus())) { if (subVolumeStatusValues.size() == 1) { session.setStatus((GeoRepSessionStatus) subVolumeStatusValues.toArray()[0]); } else { log.info("Multiple status values found in volume '{}'", session.getMasterVolumeName()); } } } }</code><technical_language>change message - "Not bricks for this volume"</technical_language>

Target:
private void updateGeoRepStatus(GlusterVolumeEntity volume, GlusterGeoRepSession session) { List<Set<GeoRepSessionStatus>> list = new ArrayList<>(); int replicaCount = volume.getReplicaCount() == 0 ? 1 : volume.getReplicaCount(); if (replicaCount > volume.getBricks().size()) { throw new EngineException(EngineError.GlusterVolumeGeoRepSyncFailed, "Not all bricks are available for this volume"); } for (int i = 0; i < volume.getBricks().size(); i = i + replicaCount) { Set<GeoRepSessionStatus> subVolumeStatusSet = new HashSet<>(); int j = 0; while (j < replicaCount) { Guid brickId = volume.getBricks().get(i + j).getId(); subVolumeStatusSet.add(getStatusForBrickFromSession(session, brickId)); j++; } list.add(subVolumeStatusSet); } session.setStatus(GeoRepSessionStatus.ACTIVE); for (Set<GeoRepSessionStatus> subVolumeStatusValues : list) { if (subVolumeStatusValues.contains(GeoRepSessionStatus.ACTIVE)) { continue; } else if (subVolumeStatusValues.contains(GeoRepSessionStatus.FAULTY)) { session.setStatus(GeoRepSessionStatus.FAULTY); return; } if (ArrayUtils.contains(overridableStatuses, session.getStatus())) { if (subVolumeStatusValues.size() == 1) { session.setStatus((GeoRepSessionStatus) subVolumeStatusValues.toArray()[0]); } else { log.info("Multiple status values found in volume '{}'", session.getMasterVolumeName()); } } } }
Source:
<code>public RedisMetadataReport(URL url) { super(url); <START> if (url.getParameter(Constants.CLUSTER_KEY, false)) { <END> jedisClusterNodes = new HashSet<HostAndPort>(); List<URL> urls = url.getBackupUrls(); for (URL tmpUrl : urls) { jedisClusterNodes.add(new HostAndPort(tmpUrl.getHost(), tmpUrl.getPort())); } } else { pool = new JedisPool(new JedisPoolConfig(), url.getHost(), url.getPort()); } }</code><technical_language>CLUSTER_KEY is for other purposes <LINK_0> need add a prefix for CLUSTER_KEY key in this module avoid overridden key other modules</technical_language>

Target:
public RedisMetadataReport(URL url) { super(url); timeout = url.getParameter(TIMEOUT_KEY, DEFAULT_TIMEOUT); if (url.getParameter(CLUSTER_KEY, false)) { jedisClusterNodes = new HashSet<HostAndPort>(); List<URL> urls = url.getBackupUrls(); for (URL tmpUrl : urls) { jedisClusterNodes.add(new HostAndPort(tmpUrl.getHost(), tmpUrl.getPort())); } } else { pool = new JedisPool(new JedisPoolConfig(), url.getHost(), url.getPort(), timeout, url.getPassword()); } }
Source:
<code><START> public Boolean stop(final String id, final boolean publish) <END> { log.debug("Stop task[%s] publish[%s]", id, publish); try { final FullResponseHolder response = submitRequest( id, HttpMethod.POST, "stop", publish ? "publish=true" : null, true ); return response.getStatus().getCode() / 100 == 2; } catch (NoTaskLocationException e) { return false; } catch (TaskNotRunnableException e) { log.info("Task [%s] couldn't be stopped because it is no longer running", id); return true; } catch (Exception e) { log.warn(e, "Exception while stopping task [%s]", id); return false; } }</code><technical_language>This boolean, need for return nullable</technical_language>

Target:
public boolean stop(final String id, final boolean publish) { log.debug("Stop task[%s] publish[%s]", id, publish); try { final FullResponseHolder response = submitRequest( id, HttpMethod.POST, "stop", publish ? "publish=true" : null, true ); return response.getStatus().getCode() / 100 == 2; } catch (NoTaskLocationException e) { return false; } catch (TaskNotRunnableException e) { log.info("Task [%s] couldn't be stopped because it is no longer running", id); return true; } catch (Exception e) { log.warn(e, "Exception while stopping task [%s]", id); return false; } }
Source:
<code>private static void canonicalizeForPath(Buffer out, String input, int pos, int limit, boolean alreadyEncoded) { Buffer utf8Buffer = null; int codePoint; for (int i = pos; i < limit; i += Character.charCount(codePoint)) { codePoint = input.codePointAt(i); if (alreadyEncoded && shouldSkipCodePoint(codePoint)) { <START> } else if (!alreadyEncoded && shouldEncodeCodePoint(codePoint)) { <END> if (utf8Buffer == null) { utf8Buffer = new Buffer(); } utf8Buffer.writeUtf8CodePoint(codePoint); while (!utf8Buffer.exhausted()) { int b = utf8Buffer.readByte() & 0xff; out.writeByte('%'); out.writeByte(HEX_DIGITS[(b >> 4) & 0xf]); out.writeByte(HEX_DIGITS[b & 0xf]); } } else { out.writeUtf8CodePoint(codePoint); } } }</code><technical_language>This is incorrect alreadyEncoded is true characters is out of range, \u0000</technical_language>

Target:
private static void canonicalizeForPath(Buffer out, String input, int pos, int limit, boolean alreadyEncoded) { Buffer utf8Buffer = null; int codePoint; for (int i = pos; i < limit; i += Character.charCount(codePoint)) { codePoint = input.codePointAt(i); if (alreadyEncoded && (codePoint == '\t' || codePoint == '\n' || codePoint == '\f' || codePoint == '\r')) { } else if (codePoint < 0x20 || codePoint >= 0x7f || PATH_SEGMENT_ALWAYS_ENCODE_SET.indexOf(codePoint) != -1 || (!alreadyEncoded && (codePoint == '/' || codePoint == '%'))) { if (utf8Buffer == null) { utf8Buffer = new Buffer(); } utf8Buffer.writeUtf8CodePoint(codePoint); while (!utf8Buffer.exhausted()) { int b = utf8Buffer.readByte() & 0xff; out.writeByte('%'); out.writeByte(HEX_DIGITS[(b >> 4) & 0xf]); out.writeByte(HEX_DIGITS[b & 0xf]); } } else { out.writeUtf8CodePoint(codePoint); } } }
Source:
<code>public PersistentHostSetupNetworksParameters(Guid hostId) { <START> super(hostId); <END> }</code><technical_language>Do consider this(hostId, 1, 1); nicer here</technical_language>

Target:
public PersistentHostSetupNetworksParameters(Guid hostId) { this(hostId, 1, 1); }
Source:
<code>private HttpRequestHeadersProvider getHttpRequestHeadersProvider(Subscription subscription) { Optional<HttpAuthorizationProvider> authorizationProvider = authorizationProviderFactory.create(subscription); Http1RequestHeadersProvider http1RequestHeadersProvider = new Http1RequestHeadersProvider(authorizationProvider); <START> return subscription.isHttp2Enabled() ? new Http2RequestHeadersProvider(http1RequestHeadersProvider) : http1RequestHeadersProvider; <END> }</code><technical_language>split lines, please</technical_language>

Target:
private HttpHeadersProvider getHttpRequestHeadersProvider(Subscription subscription) { Optional<HttpAuthorizationProvider> authorizationProvider = authorizationProviderFactory.create(subscription); HttpHeadersProvider httpHeadersProvider = subscription.isHttp2Enabled() ? http2HeadersProvider : http1HeadersProvider; return new HermesHeadersProvider( new AuthHeadersProvider( httpHeadersProvider, authorizationProvider.orElse(null) ) ); }
Source:
<code>public void cancelQuery(UUID queryId) { synchronized (this) { <START> startTime.remove(queryId); <END> } log.info("Canceling Query with RequestId: " + queryId); }</code><technical_language>remove syncrhonized block</technical_language>

Target:
public void cancelQuery(UUID queryId) { log.debug("Canceling Query with RequestId: " + queryId); }
Source:
<code>public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) { final String homeDir = getActivity().getApplicationInfo().dataDir; databasesDir = new File(homeDir + "/databases"); newpipeDb = new File(homeDir + "/databases/newpipe.db"); newpipeDbJournal = new File(homeDir + "/databases/newpipe.db-journal"); newpipeDbShm = new File(homeDir + "/databases/newpipe.db-shm"); newpipeDbWal = new File(homeDir + "/databases/newpipe.db-wal"); newpipeSettings = new File(homeDir + "/databases/newpipe.settings"); newpipeSettings.delete(); addPreferencesFromResource(R.xml.content_settings); final Preference importDataPreference = findPreference(getString(R.string.import_data)); importDataPreference.setOnPreferenceClickListener((Preference p) -> { <START> final Intent i = StoredFileHelper.getPicker(getContext()); startActivityForResult(i, REQUEST_IMPORT_PATH); <END> return true; }); final Preference exportDataPreference = findPreference(getString(R.string.export_data)); exportDataPreference.setOnPreferenceClickListener((final Preference p) -> { startActivityForResult(StoredDirectoryHelper.getPicker(getContext()), REQUEST_EXPORT_PATH); return true; }); }</code><technical_language>For consistency suggestion startActivityForResult(StoredFileHelper.getPicker(getContext()), REQUEST_IMPORT_PATH);</technical_language>

Target:
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) { final String homeDir = getActivity().getApplicationInfo().dataDir; databasesDir = new File(homeDir + "/databases"); newpipeDb = new File(homeDir + "/databases/newpipe.db"); newpipeDbJournal = new File(homeDir + "/databases/newpipe.db-journal"); newpipeDbShm = new File(homeDir + "/databases/newpipe.db-shm"); newpipeDbWal = new File(homeDir + "/databases/newpipe.db-wal"); newpipeSettings = new File(homeDir + "/databases/newpipe.settings"); newpipeSettings.delete(); addPreferencesFromResource(R.xml.content_settings); final Preference importDataPreference = findPreference(getString(R.string.import_data)); importDataPreference.setOnPreferenceClickListener((Preference p) -> { startActivityForResult(StoredFileHelper.getPicker(getContext()), REQUEST_IMPORT_PATH); return true; }); final Preference exportDataPreference = findPreference(getString(R.string.export_data)); exportDataPreference.setOnPreferenceClickListener((final Preference p) -> { final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US); startActivityForResult(StoredFileHelper.getNewPicker(getContext(), null, "NewPipeData-" + sdf.format(new Date()) + ".zip"), REQUEST_EXPORT_PATH); return true; }); }
Source:
<code>public String getCategory() { <START> return "core"; <END> }</code><technical_language>please constants for getType</technical_language>

Target:
public String getCategory() { return CATEGORY; }
Source:
<code>private static BoundingBox toBoundingBox(List<Float> serviceBoundingBox) { <START> if (CoreUtils.isNullOrEmpty(serviceBoundingBox)) { <END> return null; } Point topLeft = new Point(serviceBoundingBox.get(0), serviceBoundingBox.get(1)); Point topRight = new Point(serviceBoundingBox.get(2), serviceBoundingBox.get(3)); Point bottomLeft = new Point(serviceBoundingBox.get(4), serviceBoundingBox.get(5)); Point bottomRight = new Point(serviceBoundingBox.get(6), serviceBoundingBox.get(7)); return new BoundingBox(Arrays.asList(topLeft, topRight, bottomLeft, bottomRight)); }</code><technical_language>this check for null, empty, elements</technical_language>

Target:
private static BoundingBox toBoundingBox(List<Float> serviceBoundingBox) { if (CoreUtils.isNullOrEmpty(serviceBoundingBox) || (serviceBoundingBox.size() % 2) != 0) { return null; } List<Point> pointList = new ArrayList<>(); for (int i = 0; i < serviceBoundingBox.size(); i++) { pointList.add(new Point(serviceBoundingBox.get(i), serviceBoundingBox.get(++i))); } return new BoundingBox(pointList); }
Source:
<code>public ConfigurationInstance get(Event event) { return withContextClassLoader(getExtensionClassLoader(), () -> { try (ValueResolvingContext resolvingContext = ValueResolvingContext.builder(((CoreEvent) event)) .withExpressionManager(expressionManager).build()) { ResolverSetResult result = resolverSet.resolve(resolvingContext); ResolverSetResult providerResult = null; if (connectionProviderResolver.getResolverSet().isPresent()) { providerResult = ((ResolverSet) connectionProviderResolver.getResolverSet().get()).resolve(resolvingContext); } <START> if (muleContext.isStopping() || muleContext.isStopped()) { <END> return getConfiguration(new Pair<>(result, providerResult), (CoreEvent) event); } else { return computeConfiguration(new Pair<>(result, providerResult), (CoreEvent) event); } } }); }</code><technical_language>this if inverted, conceptually wrong.. if context is stopping, need do getConfiguration() usual cache is used. If context IS stopping, new config created. Also, compute method added explicitly called. If a dynamic config is added cache, stopped generate a leak</technical_language>

Target:
public ConfigurationInstance get(Event event) { return withContextClassLoader(getExtensionClassLoader(), () -> { try (ValueResolvingContext resolvingContext = ValueResolvingContext.builder(((CoreEvent) event)) .withExpressionManager(expressionManager).build()) { ResolverSetResult result = resolverSet.resolve(resolvingContext); ResolverSetResult providerResult = null; if (connectionProviderResolver.getResolverSet().isPresent()) { providerResult = ((ResolverSet) connectionProviderResolver.getResolverSet().get()).resolve(resolvingContext); } return getConfiguration(new Pair<>(result, providerResult), (CoreEvent) event); } }); }
Source:
<code>public void delete(final String eventTypeName, final String timelineId, final Client client) throws ForbiddenAccessException, UnableProcessException, TimelineException { if (!client.getClientId().equals(securitySettings.getAdminClientId())) { throw new ForbiddenAccessException("Request is forbidden for user " + client.getClientId()); } final UUID uuid = uuidGenerator.fromString(timelineId); final List<Timeline> timelines = timelineDbRepository.listTimelines(eventTypeName); <START> if (timelines.size() != DELETE_ONLY_FIRST_TIMELINE) { <END> throw new UnableProcessException("Timeline with timelineId: " + uuid + " could not be deleted"); } final Timeline activeTimeline = timelines.get(0); if (activeTimeline.getId().equals(uuid)) { switchToFakeTimeline(uuid, activeTimeline); } else { throw new UnableProcessException("Timeline with timelineId: " + uuid + " not found"); } }</code><technical_language>I constant for a lot of sense</technical_language>

Target:
public void delete(final String eventTypeName, final String timelineId, final Client client) throws ForbiddenAccessException, UnableProcessException, TimelineException { if (!client.getClientId().equals(securitySettings.getAdminClientId())) { throw new ForbiddenAccessException("Request is forbidden for user " + client.getClientId()); } final EventType eventType; try { eventType = eventTypeCache.getEventType(eventTypeName); } catch (NoSuchEventTypeException e) { throw new NotFoundException("EventType \"" + eventTypeName + "\" does not exist", e); } catch (InternalNakadiException e) { throw new TimelineException("Internal service error", e); } final UUID uuid = uuidGenerator.fromString(timelineId); final List<Timeline> timelines = timelineDbRepository.listTimelines(eventType.getName()); if (timelines.size() == 1) { final Timeline activeTimeline = timelines.get(0); if (activeTimeline.getId().equals(uuid)) { switchToFakeTimeline(uuid, activeTimeline); } else { throw new NotFoundException("Timeline with id: " + uuid + " not found"); } } else { throw new UnableProcessException("Timeline with id: " + uuid + " could not be deleted. " + "It is possible to delete a timeline if there is only one timeline"); } }
Source:
<code>public boolean addAll(final Collection<? extends E> c) { boolean ret = false; <START> for(E elem : c) { <END> boolean currentRet = add(elem); if(currentRet) { ret = true; } } return ret; }</code><technical_language>Add final keyword</technical_language>

Target:
public boolean addAll(final Collection<? extends E> c) { boolean ret = false; for(final E elem : c) { boolean currentRet = add(elem); if(currentRet) { ret = true; } } return ret; }
Source:
<code>public static List<Alteration> getPositionedAlterations(Alteration alteration, Set<Alteration> fullAlterations) { if (alteration.getGene().getHugoSymbol().equals("ABL1") && alteration.getAlteration().equals("T315I")) { return new ArrayList<>(); } if (alteration.getConsequence() != null && alteration.getConsequence().equals(VariantConsequenceUtils.findVariantConsequenceByTerm("missense_variant")) <START> && !alteration.getProteinStart().equals(-1) && !alteration.getProteinStart().equals(100000)) { <END> VariantConsequence variantConsequence = new VariantConsequence(); variantConsequence.setTerm("NA"); return ApplicationContextSingleton.getAlterationBo().findMutationsByConsequenceAndPositionOnSamePosition(alteration.getGene(), variantConsequence, alteration.getProteinStart(), alteration.getProteinEnd(), fullAlterations); } return new ArrayList<>(); }</code><technical_language>meaning of -1 100000 in here</technical_language>

Target:
public static List<Alteration> getPositionedAlterations(Alteration alteration, Set<Alteration> fullAlterations) { if (alteration.getGene().getHugoSymbol().equals("ABL1") && alteration.getAlteration().equals("T315I")) { return new ArrayList<>(); } if (alteration.getConsequence() != null && alteration.getConsequence().equals(VariantConsequenceUtils.findVariantConsequenceByTerm("missense_variant")) && alteration.getProteinStart().intValue() != AlterationPositionBoundary.START.getValue() && alteration.getProteinStart().intValue() != AlterationPositionBoundary.END.getValue()) { VariantConsequence variantConsequence = new VariantConsequence(); variantConsequence.setTerm("NA"); return ApplicationContextSingleton.getAlterationBo().findMutationsByConsequenceAndPositionOnSamePosition(alteration.getGene(), variantConsequence, alteration.getProteinStart(), alteration.getProteinEnd(), fullAlterations); } return new ArrayList<>(); }
Source:
<code>private void executeLoginUseCase(final Credentials credentials) { mLoginUseCase.execute(credentials, new ALoginUseCase.Callback() { @Override public void onLoginSuccess() { Log.d(TAG, "onLoginSuccess"); mLoginActivityStrategy.onLoginSuccess(credentials); } @Override public void onServerURLNotValid() { Log.d(TAG, "onServerURLNotValid"); onFinishLoading(null); serverText.setError( translate(R.string.login_invalid_server_url)); showError(translate(R.string.login_invalid_server_url)); } @Override public void onInvalidCredentials() { Log.d(TAG, "onInvalidCredentials"); mLoginActivityStrategy.onBadCredentials(); } @Override public void onServerPinChanged() { Log.d(TAG, "onServerPinChanged"); mLoginActivityStrategy.onBadCredentials(); } @Override public void onNetworkError() { Log.d(TAG, "onNetworkError"); mLoginActivityStrategy.onLoginNetworkError(credentials); } @Override public void onConfigJsonInvalid() { Log.d(TAG, "onConfigJsonInvalid"); onFinishLoading(null); showError(translate(R.string.login_error_json)); } @Override public void onUnexpectedError() { Log.d(TAG, "onUnexpectedError"); hideProgressBar(); showError(translate(R.string.login_unexpected_error)); } @Override public void onMaxLoginAttemptsReachedError() { Log.d(TAG, "onMaxLoginAttemptsReachedError"); mLoginActivityStrategy.disableLogin(); } @Override public void onServerNotAvailable() { Log.d(TAG, "onServerNotAvailable"); <START> mLoginActivityStrategy.onServerNotAvailable(); <END> } }); }</code><technical_language>In this case, show API Status message user</technical_language>

Target:
private void executeLoginUseCase(final Credentials credentials) { mLoginUseCase.execute(credentials, new ALoginUseCase.Callback() { @Override public void onLoginSuccess() { Log.d(TAG, "onLoginSuccess"); mLoginActivityStrategy.onLoginSuccess(credentials); } @Override public void onServerURLNotValid() { Log.d(TAG, "onServerURLNotValid"); onFinishLoading(null); serverText.setError( translate(R.string.login_invalid_server_url)); showError(translate(R.string.login_invalid_server_url)); } @Override public void onInvalidCredentials() { Log.d(TAG, "onInvalidCredentials"); mLoginActivityStrategy.onBadCredentials(); } @Override public void onServerPinChanged() { Log.d(TAG, "onServerPinChanged"); mLoginActivityStrategy.onBadCredentials(); } @Override public void onNetworkError() { Log.d(TAG, "onNetworkError"); mLoginActivityStrategy.onLoginNetworkError(credentials); } @Override public void onConfigJsonInvalid() { Log.d(TAG, "onConfigJsonInvalid"); onFinishLoading(null); showError(translate(R.string.login_error_json)); } @Override public void onUnexpectedError() { Log.d(TAG, "onUnexpectedError"); hideProgressBar(); showError(translate(R.string.login_unexpected_error)); } @Override public void onMaxLoginAttemptsReachedError() { Log.d(TAG, "onMaxLoginAttemptsReachedError"); mLoginActivityStrategy.disableLogin(); } @Override public void onServerNotAvailable(String message) { Log.d(TAG, "onServerNotAvailable"); mLoginActivityStrategy.onServerNotAvailable(message); } }); }
Source:
<code>public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) { if (Boolean.parseBoolean(jobExecution.getJobParameters().getString(jobParameterName))) { <START> logger.info("Step skipped due to setting enabled", jobParameterName); <END> return new FlowExecutionStatus(SKIP_STEP); } return new FlowExecutionStatus(DO_STEP); }</code><technical_language>set [something] enabled is correct in English. following: Step skipped due enabled</technical_language>

Target:
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) { if (Boolean.parseBoolean(jobExecution.getJobParameters().getString(jobParameterName))) { logger.info("Step skipped due to enabled", jobParameterName); return new FlowExecutionStatus(SKIP_STEP); } return new FlowExecutionStatus(DO_STEP); }
Source:
<code>public void testService() { <START> CodecService service = Framework.getService(CodecService.class); <END> assertNotNull(service); }</code><technical_language>@Inject</technical_language>

Target:
public void testService() { assertNotNull(service); }
Source:
<code>public void selectUserAccount(final WebContext ctx, String id) { if ("main".equals(id)) { String originalUserId = tenants.getTenantUserManager().getOriginalUserId(); UserAccount<?, ?> account = tenants.getTenantUserManager().fetchAccount(originalUserId); auditLog.neutral("AuditLog.switchedToMainUser") .hideFromUser() .causedByUser(account.getUniqueName(), account.getUserAccountData().getLogin().getUsername()) .forCurrentUser() .log(); ctx.setSessionValue(UserContext.getCurrentScope().getScopeId() + TenantUserManager.SPY_ID_SUFFIX, null); ctx.respondWith().redirectTemporarily("/user-accounts/select"); return; } assertPermission(TenantUserManager.PERMISSION_SELECT_USER_ACCOUNT); U user = mixing.getDescriptor(getUserClass()).getMapper().find(getUserClass(), id).orElse(null); if (user == null) { UserContext.get().addMessage(Message.error(NLS.get("UserAccountController.cannotBecomeUser"))); selectUserAccounts(ctx); return; } if (!getUser().hasPermission(TenantUserManager.PERMISSION_SYSTEM_TENANT_AFFILIATE)) { assertTenant(user); } auditLog.neutral("AuditLog.selectedUser") .hideFromUser() .causedByCurrentUser() .forUser(user.getUniqueName(), user.getUserAccountData().getLogin().getUsername()) .forTenant(String.valueOf(user.getTenant().getId()), <START> user.getTenant().fetchValue().getTenantData().getName()) <END> .log(); ctx.setSessionValue(UserContext.getCurrentScope().getScopeId() + TenantUserManager.SPY_ID_SUFFIX, user.getUniqueName()); ctx.respondWith().redirectTemporarily(ctx.get("goto").asString(wondergemRoot)); }</code><technical_language>cache</technical_language>

Target:
public void selectUserAccount(final WebContext ctx, String id) { if ("main".equals(id)) { String originalUserId = tenants.getTenantUserManager().getOriginalUserId(); UserAccount<?, ?> account = tenants.getTenantUserManager().fetchAccount(originalUserId); auditLog.neutral("AuditLog.switchedToMainUser") .hideFromUser() .causedByUser(account.getUniqueName(), account.getUserAccountData().getLogin().getUsername()) .forCurrentUser() .log(); ctx.setSessionValue(UserContext.getCurrentScope().getScopeId() + TenantUserManager.SPY_ID_SUFFIX, null); ctx.respondWith().redirectTemporarily("/user-accounts/select"); return; } assertPermission(TenantUserManager.PERMISSION_SELECT_USER_ACCOUNT); U user = mixing.getDescriptor(getUserClass()).getMapper().find(getUserClass(), id).orElse(null); if (user == null) { UserContext.get().addMessage(Message.error(NLS.get("UserAccountController.cannotBecomeUser"))); selectUserAccounts(ctx); return; } if (!getUser().hasPermission(TenantUserManager.PERMISSION_SYSTEM_TENANT_AFFILIATE)) { assertTenant(user); } auditLog.neutral("AuditLog.selectedUser") .hideFromUser() .causedByCurrentUser() .forUser(user.getUniqueName(), user.getUserAccountData().getLogin().getUsername()) .forTenant(user.getTenant().getIdAsString(), matchingTenants.fetchCachedRequiredTenant(user.getTenant()).getTenantData().getName()) .log(); ctx.setSessionValue(UserContext.getCurrentScope().getScopeId() + TenantUserManager.SPY_ID_SUFFIX, user.getUniqueName()); ctx.respondWith().redirectTemporarily(ctx.get("goto").asString(wondergemRoot)); }
Source:
<code>public void testCreateEmptyBucketedPartition(HiveStorageFormat storageFormat) { String tableName = "test_insert_partitioned_bucketed_table"; createPartitionedBucketedTable(tableName, storageFormat); ImmutableList<String> orderStatusList = ImmutableList.of("F", "O", "P"); for (int i = 0; i < orderStatusList.size(); i++) { String sql = format("CALL system.create_empty_partition('%s', '%s', ARRAY['orderstatus'], ARRAY['%s'])", TPCH_SCHEMA, tableName, orderStatusList.get(i)); <START> getQueryRunner().execute(getSession(), sql); <END> assertQuery( "SELECT count(*) FROM \"test_insert_partitioned_bucketed_table$partitions\"", "SELECT " + (i + 1)); assertQueryFails(sql, "Partition already exists.*"); } assertUpdate("DROP TABLE " + tableName); assertFalse(getQueryRunner().tableExists(getSession(), tableName)); }</code><technical_language>this instead (simpler more checks) java assertUpdate(sql)</technical_language>

Target:
public void testCreateEmptyBucketedPartition(HiveStorageFormat storageFormat) { String tableName = "test_insert_partitioned_bucketed_table"; createPartitionedBucketedTable(tableName, storageFormat); List<String> orderStatusList = ImmutableList.of("F", "O", "P"); for (int i = 0; i < orderStatusList.size(); i++) { String sql = format("CALL system.create_empty_partition('%s', '%s', ARRAY['orderstatus'], ARRAY['%s'])", TPCH_SCHEMA, tableName, orderStatusList.get(i)); assertUpdate(sql); assertQuery( "SELECT count(*) FROM \"test_insert_partitioned_bucketed_table$partitions\"", "SELECT " + (i + 1)); assertQueryFails(sql, "Partition already exists.*"); } assertUpdate("DROP TABLE " + tableName); assertFalse(getQueryRunner().tableExists(getSession(), tableName)); }
Source:
<code>public void testDeleteFromListColumnIndexTable_nullRowFilter() { ColumnModel multiValue = new ColumnModel(); multiValue.setId("886"); multiValue.setColumnType(ColumnType.STRING_LIST); multiValue.setName("multiValue"); multiValue.setMaximumSize(100L); String message = assertThrows(IllegalArgumentException.class, ()->{ <START> tableIndexDAO.deleteFromListColumnIndexTable(tableId, multiValue, null); <END> }).getMessage(); assertEquals("rowIds is required and must not be empty.", message); }</code><technical_language>member for null helps reader is null</technical_language>

Target:
public void testDeleteFromListColumnIndexTable_nullRowFilter() { ColumnModel multiValue = new ColumnModel(); multiValue.setId("886"); multiValue.setColumnType(ColumnType.STRING_LIST); multiValue.setName("multiValue"); multiValue.setMaximumSize(100L); Set<Long> rowIdFilter = null; String message = assertThrows(IllegalArgumentException.class, ()->{ tableIndexDAO.deleteFromListColumnIndexTable(tableId, multiValue, rowIdFilter); }).getMessage(); assertEquals("rowIds is required and must not be empty.", message); }
Source:
<code>public static int optimalNumOfBits(long n, double p) { Preconditions.checkArgument((p > 0.0 && p < 1.0), "FPP should be less than 1.0 and great than 0.0"); final double m = -8 * n / Math.log(1 - Math.pow(p, 1.0 / 8)); <START> final double MAX = DEFAULT_MAXIMUM_BYTES << 3; <END> int numBits = (int)m; if (m > MAX || m < 0) { numBits = (int)MAX; } numBits = (numBits + BITS_PER_BLOCK -1) & ~BITS_PER_BLOCK; if (numBits < (DEFAULT_MINIMUM_BYTES << 3)) { numBits = DEFAULT_MINIMUM_BYTES << 3; } return numBits; }</code><technical_language>Here, DEFAULT_MAXIMUM_BYTES un-configurable hard limit (as DEFAULT_MINIMUM_BYTES). Meanwhile, configurable fields minimumBytes maximumBytes. DEFAULT_* constants defaults, hard limits for configurating *Bytes fields. more clear is a default, is a hard limit is configurable</technical_language>

Target:
public static int optimalNumOfBits(long n, double p) { Preconditions.checkArgument((p > 0.0 && p < 1.0), "FPP should be less than 1.0 and great than 0.0"); final double m = -8 * n / Math.log(1 - Math.pow(p, 1.0 / 8)); int numBits = (int)m ; if (numBits > UPPER_BOUND_BYTES << 3 || m < 0) { numBits = UPPER_BOUND_BYTES << 3; } numBits = (numBits + BITS_PER_BLOCK -1) & ~BITS_PER_BLOCK; if (numBits < (LOWER_BOUND_BYTES << 3)) { numBits = LOWER_BOUND_BYTES << 3; } return numBits; }
Source:
<code>protected void tearDown() throws Exception { Job.getJobManager().removeJobChangeListener(jobChangeListener); PermissionService.removeExtension(permissionProviderDescriptor); <START> super.tearDown(); <END> }</code><technical_language>fields set in setUp() reset in tearDown()</technical_language>

Target:
protected void tearDown() throws Exception { Job.getJobManager().removeJobChangeListener(jobChangeListener); PermissionService.removeExtension(permissionProviderDescriptor); permissionProviderDescriptor = null; jobChangeListener = null; sessionAirdResource = null; modelExplorerView = null; super.tearDown(); }
Source:
<code>private void endAction(CommandBase<?> commandBase, List<Guid> childCmdIds, boolean succeeded) { if (shouldExecuteEndMethod(commandBase)) { commandBase.getReturnValue().setSucceeded(false); VdcReturnValueBase returnVal = commandBase.endAction(); <START> if (!returnVal.getSucceeded() && shouldRepeatEndMethodsOnFail(returnVal)) { <END> throw new EngineException(EngineError.ENGINE, String.format("Command %1$s id: '%2$s' endAction() " + "didn't complete successfully", commandBase.getActionType(), commandBase.getCommandId())); } if (commandBase.getParameters().getParentCommand() == VdcActionType.Unknown) { CommandCoordinatorUtil.removeAllCommandsInHierarchy(commandBase.getCommandId()); } ExecutionHandler.endJob(commandBase.getExecutionContext(), succeeded); } }</code><technical_language>THanks for fix, removed is part ("&& shouldRepeatEndMethodsOnFail(returnVal))") of if clause left mistakenly log in else added</technical_language>

Target:
private void endAction(CommandBase<?> commandBase, List<Guid> childCmdIds, boolean succeeded) { if (shouldExecuteEndMethod(commandBase)) { commandBase.getReturnValue().setSucceeded(false); VdcReturnValueBase returnVal = commandBase.endAction(); if (!returnVal.getSucceeded()) { if (shouldRepeatEndMethodsOnFail(returnVal)) { throw new EngineException(EngineError.ENGINE, String.format("Command %1$s id: '%2$s' endAction() " + "didn't complete successfully", commandBase.getActionType(), commandBase.getCommandId())); } else { log.warn("Command '{}' id: '{}' end method execution failed, as the command isn't marked for " + "endAction() retries silently ignoring", commandBase.getActionType(), commandBase.getCommandId()); } } if (commandBase.getParameters().getParentCommand() == VdcActionType.Unknown) { CommandCoordinatorUtil.removeAllCommandsInHierarchy(commandBase.getCommandId()); } ExecutionHandler.endJob(commandBase.getExecutionContext(), succeeded); } }