auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void cancelJob(GerritTriggeredEvent event) { if (!(job instanceof Queue.Task)) { logger.error("Error canceling job. The job is not of type Task."); <START> } <END> List<hudson.model.Queue.Item> itemsInQueue = Queue.getInstance().getItems((Queue.Task)job); for (hudson.model.Queue.Item item : itemsInQueue) { if (checkCausedByGerrit(event, item.getCauses())) { Queue.getInstance().cancel(item); } } String workaround = System.getProperty(JOB_ABORT); if ((workaround != null) && workaround.equals("false")) { return; } Jenkins jenkins = Jenkins.getInstance(); assert jenkins != null; for (Computer c : jenkins.getComputers()) { List<Executor> executors = new ArrayList<Executor>(); executors.addAll(c.getOneOffExecutors()); executors.addAll(c.getExecutors()); for (Executor e : executors) { Queue.Executable currentExecutable = e.getCurrentExecutable(); if (currentExecutable != null && currentExecutable instanceof Run<?, ?>) { Run<?, ?> run = (Run<?, ?>)currentExecutable; if (checkCausedByGerrit(event, run.getCauses())) { e.interrupt( Result.ABORTED, new NewPatchSetInterruption() ); } } } } }</code><technical_language>I guess return logging? please log task well, admin of 10k jobs log is talking :)</technical_language>

Target:
private void cancelJob(GerritTriggeredEvent event) { if (!(job instanceof Queue.Task)) { logger.error("Error canceling job. The job is not of type Task. Job name: " + job.getName()); return; } List<hudson.model.Queue.Item> itemsInQueue = Queue.getInstance().getItems((Queue.Task)job); for (hudson.model.Queue.Item item : itemsInQueue) { if (checkCausedByGerrit(event, item.getCauses())) { Queue.getInstance().cancel(item); } } String workaround = System.getProperty(JOB_ABORT); if ((workaround != null) && workaround.equals("false")) { return; } Jenkins jenkins = Jenkins.getInstance(); assert jenkins != null; for (Computer c : jenkins.getComputers()) { List<Executor> executors = new ArrayList<Executor>(); executors.addAll(c.getOneOffExecutors()); executors.addAll(c.getExecutors()); for (Executor e : executors) { Queue.Executable currentExecutable = e.getCurrentExecutable(); if (currentExecutable != null && currentExecutable instanceof Run<?, ?>) { Run<?, ?> run = (Run<?, ?>)currentExecutable; if (checkCausedByGerrit(event, run.getCauses())) { e.interrupt( Result.ABORTED, new NewPatchSetInterruption() ); } } } } }
Source:
<code>private void showContentView(@Content int content) { switch (content) { case FRAGMENT: <START> findViewById(R.id.main_menu_buttons_container).setVisibility(View.VISIBLE); <END> findViewById(R.id.runtime_permission_error_view).setVisibility(View.GONE); findViewById(R.id.progress_bar).setVisibility(View.GONE); break; case ERROR: findViewById(R.id.main_menu_buttons_container).setVisibility(View.GONE); findViewById(R.id.runtime_permission_error_view).setVisibility(View.VISIBLE); findViewById(R.id.progress_bar).setVisibility(View.GONE); break; case PROGRESS_BAR: findViewById(R.id.main_menu_buttons_container).setVisibility(View.GONE); findViewById(R.id.runtime_permission_error_view).setVisibility(View.GONE); findViewById(R.id.progress_bar).setVisibility(View.VISIBLE); break; } }</code><technical_language>put calls findViewById(...) switch store views variables, block more readable</technical_language>

Target:
private void showContentView(@Content int content) { View fragment = findViewById(R.id.main_menu_buttons_container); View errorView = findViewById(R.id.runtime_permission_error_view); View progressBar = findViewById(R.id.progress_bar); switch (content) { case FRAGMENT: fragment.setVisibility(View.VISIBLE); errorView.setVisibility(View.GONE); progressBar.setVisibility(View.GONE); break; case ERROR: fragment.setVisibility(View.GONE); errorView.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); break; case PROGRESS_BAR: fragment.setVisibility(View.GONE); errorView.setVisibility(View.GONE); progressBar.setVisibility(View.VISIBLE); break; } }
Source:
<code>@Test public void stringArray() throws Exception { JavaFileObject source = JavaFileObjects.forSourceString("test.Test", Joiner.on('\n').join( "package test;", "import android.app.Activity;", "import butterknife.BindArray;", "public class Test extends Activity {", " @BindArray(1) String[] one;", "}" )); JavaFileObject expectedSource = JavaFileObjects.forSourceString("test/Test$$ViewBinder", "" + "package test;\n" + "import android.content.res.Resources;\n" + "import butterknife.ButterKnife;\n" + "import butterknife.Unbinder;\n" + "import butterknife.internal.Finder;\n" + "import butterknife.internal.ViewBinder;\n" + "import java.lang.Object;\n" + "import java.lang.Override;\n" + "import java.lang.SuppressWarnings;\n" + "public class Test$$ViewBinder<T extends Test> implements ViewBinder<T> {\n" + " @Override\n" + " @SuppressWarnings(\"ResourceType\")\n" + " public Unbinder bind(final Finder finder, final T target, Object source) {\n" + " Resources res = finder.getContext(source).getResources();\n" + " target.one = res.getStringArray(1);\n" <START> + " return ButterKnife.NOP_UNBINDER;\n" <END> + " }\n" + "}"); assertAbout(javaSource()).that(source) .processedWith(new ButterKnifeProcessor()) .compilesWithoutError() .and() .generatesSources(expectedSource); }</code><technical_language>put this implementation Unbinder call EMPTY</technical_language>

Target:
@Test public void stringArray() throws Exception { JavaFileObject source = JavaFileObjects.forSourceString("test.Test", Joiner.on('\n').join( "package test;", "import android.app.Activity;", "import butterknife.BindArray;", "public class Test extends Activity {", " @BindArray(1) String[] one;", "}" )); JavaFileObject expectedSource = JavaFileObjects.forSourceString("test/Test$$ViewBinder", "" + "package test;\n" + "import android.content.res.Resources;\n" + "import butterknife.Unbinder;\n" + "import butterknife.internal.Finder;\n" + "import butterknife.internal.ViewBinder;\n" + "import java.lang.Object;\n" + "import java.lang.Override;\n" + "import java.lang.SuppressWarnings;\n" + "public class Test$$ViewBinder<T extends Test> implements ViewBinder<T> {\n" + " @Override\n" + " @SuppressWarnings(\"ResourceType\")\n" + " public Unbinder bind(final Finder finder, final T target, Object source) {\n" + " Resources res = finder.getContext(source).getResources();\n" + " target.one = res.getStringArray(1);\n" + " return Unbinder.EMPTY;\n" + " }\n" + "}"); assertAbout(javaSource()).that(source) .processedWith(new ButterKnifeProcessor()) .compilesWithoutError() .and() .generatesSources(expectedSource); }
Source:
<code>protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) { Object credential = null; <START> if (token instanceof SAMLAuthenticationToken) { <END> try { samlAssertionValidator.validate((SAMLAuthenticationToken) token); credential = token.getCredentials(); } catch (AuthenticationFailureException e) { String msg = "Unable to validate request's authentication."; LOGGER.info(msg); throw new AuthenticationException(msg, e); } } if (credential == null) { String msg = "Unable to authenticate credential. A NULL credential was provided in the supplied authentication token. This may be due to an error with the SSO server that created the token."; LOGGER.info(msg); throw new AuthenticationException(msg); } else { LOGGER.debug("Received credentials."); } LOGGER.debug("Creating token authentication information with SAML."); SimpleAuthenticationInfo simpleAuthenticationInfo = new SimpleAuthenticationInfo(); SecurityToken securityToken = checkForSecurityToken(credential); SimplePrincipalCollection principals = createPrincipalFromToken(securityToken); simpleAuthenticationInfo.setPrincipals(principals); simpleAuthenticationInfo.setCredentials(credential); return simpleAuthenticationInfo; }</code><technical_language>this test unnecessary? supports method called this invoked if returned true, correct</technical_language>

Target:
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) { Object credential = null; if (token instanceof SAMLAuthenticationToken) { try { samlAssertionValidator.validate((SAMLAuthenticationToken) token); credential = token.getCredentials(); } catch (AuthenticationFailureException e) { String msg = "Unable to validate request's authentication."; LOGGER.info(msg); throw new AuthenticationException(msg, e); } } if (credential == null) { String msg = "Unable to authenticate credential. A NULL credential was provided in the supplied authentication token. This may be due to an error with the SSO server that created the token."; LOGGER.info(msg); throw new AuthenticationException(msg); } LOGGER.debug("Received credentials."); LOGGER.debug("Creating token authentication information with SAML."); SimpleAuthenticationInfo simpleAuthenticationInfo = new SimpleAuthenticationInfo(); SecurityToken securityToken = checkForSecurityToken(credential); SimplePrincipalCollection principals = createPrincipalFromToken(securityToken); simpleAuthenticationInfo.setPrincipals(principals); simpleAuthenticationInfo.setCredentials(credential); return simpleAuthenticationInfo; }
Source:
<code>private boolean updateDcConfiguration() { final String username = emailAddressTextField.getText(); final String password = new String(passwordTextField.getPassword()); try { RemoteServersUtils.checkServerWithCredentials(DATACLOUD_URL, username, password); } catch (Exception ex) { <START> invalidCredentialsLabel.setForeground(new Color(170,10,10)); <END> invalidCredentialsLabel.setText("Sign in to DataCloud failed: " + ex.getMessage()); logger.warn("Sign in to DataCloud failed for user '{}'", username, ex); return false; } invalidCredentialsLabel.setForeground(new Color(10,170,10)); invalidCredentialsLabel.setText("Sign in to DataCloud succeeded."); logger.debug("Sign in to DataCloud succeeded. User name: {}", username); final RemoteServerConfiguration remoteServerConfig = _configuration.getEnvironment().getRemoteServerConfiguration(); final RemoteServerData existingServerData = remoteServerConfig.getServerConfig(DATACLOUD_SERVER_NAME); if (existingServerData == null) { RemoteServersUtils.addRemoteServer(_configuration.getEnvironment(), DATACLOUD_SERVER_NAME, null, username, password); } else { RemoteServersUtils.updateRemoteServerCredentials(_configuration.getEnvironment(), DATACLOUD_SERVER_NAME, username, password); } return true; }</code><technical_language>this normal color scheme in WidgetUtils (the apparently either, new)</technical_language>

Target:
private boolean updateDcConfiguration() { final String username = emailAddressTextField.getText(); final String password = new String(passwordTextField.getPassword()); try { RemoteServersUtils.checkServerWithCredentials(DATACLOUD_URL, username, password); } catch (Exception ex) { invalidCredentialsLabel.setForeground(WidgetUtils.ADDITIONAL_COLOR_RED_BRIGHT); invalidCredentialsLabel.setText("Sign in to DataCloud failed: " + ex.getMessage()); logger.warn("Sign in to DataCloud failed for user '{}'", username, ex); return false; } invalidCredentialsLabel.setForeground(WidgetUtils.BG_COLOR_GREEN_MEDIUM); invalidCredentialsLabel.setText("Sign in to DataCloud succeeded."); logger.debug("Sign in to DataCloud succeeded. User name: {}", username); final RemoteServerConfiguration remoteServerConfig = _configuration.getEnvironment().getRemoteServerConfiguration(); final RemoteServerData existingServerData = remoteServerConfig.getServerConfig(DATACLOUD_SERVER_NAME); if (existingServerData == null) { RemoteServersUtils.addRemoteServer(_configuration.getEnvironment(), DATACLOUD_SERVER_NAME, null, username, password); } else { RemoteServersUtils.updateRemoteServerCredentials(_configuration.getEnvironment(), DATACLOUD_SERVER_NAME, username, password); } return true; }
Source:
<code>public String identifyMainMode( final List<? extends PlanElement> tripElements) { String mode = ((Leg) tripElements.get( 0 )).getMode(); if ( mode.equals( TransportMode.transit_walk ) ) { return TransportMode.pt ; } if ( mode.endsWith( "_fallback" ) ) { <START> return mode.split( "_fallback" )[0] ; <END> } for ( PlanElement pe : tripElements ) { if ( pe instanceof Leg ) { Leg leg = (Leg) pe ; String mode2 = leg.getMode() ; if ( !mode2.contains( TransportMode.non_network_walk ) && !mode2.contains( TransportMode.non_network_walk ) && !mode2.contains( TransportMode.transit_walk ) ) { return mode2 ; } } } throw new RuntimeException( "could not identify main mode "+ tripElements) ; }</code><technical_language>I mode.substring(0, mode.length() - 9) instead of split, split is (a) a more expensive method, (b) while works counter-intuitive (we're splitting, want cut a part)</technical_language>

Target:
public String identifyMainMode( final List<? extends PlanElement> tripElements) { String mode = ((Leg) tripElements.get( 0 )).getMode(); if ( mode.equals( TransportMode.transit_walk ) ) { return TransportMode.pt ; } if ( mode.endsWith( "_fallback" ) ) { return mode.substring(0, mode.length() - 9) ; } for ( PlanElement pe : tripElements ) { if ( pe instanceof Leg ) { Leg leg = (Leg) pe ; String mode2 = leg.getMode() ; if ( !mode2.contains( TransportMode.non_network_walk ) && !mode2.contains( TransportMode.non_network_walk ) && !mode2.contains( TransportMode.transit_walk ) ) { return mode2 ; } } } throw new RuntimeException( "could not identify main mode "+ tripElements) ; }
Source:
<code>private AbstractMap.SimpleEntry<String, Boolean> cookieDomain(String cookieDomain, String requestDomain) { if (cookieDomain != null) { if (!cookieDomain.isEmpty() && cookieDomain.charAt(0) == '.') return new AbstractMap.SimpleEntry<>(cookieDomain.substring(1).toLowerCase(), false); else <START> return new AbstractMap.SimpleEntry<>(cookieDomain.toLowerCase(), false); <END> } else return new AbstractMap.SimpleEntry<>(requestDomain, true); }</code><technical_language>Compute normalized cookie domain a ternary operator single return statement</technical_language>

Target:
private AbstractMap.SimpleEntry<String, Boolean> cookieDomain(String cookieDomain, String requestDomain) { if (cookieDomain != null) { String normalizedCookieDomain = cookieDomain.toLowerCase(); return new AbstractMap.SimpleEntry<>( (!cookieDomain.isEmpty() && cookieDomain.charAt(0) == '.') ? normalizedCookieDomain.substring(1) : normalizedCookieDomain, false); } else return new AbstractMap.SimpleEntry<>(requestDomain, true); }
Source:
<code>private void change(SyncInfo[] collected) { Subscriber subscriber = getSubscriber(); for (SyncInfo c : collected) { try { <START> SyncInfo info = c; <END> SyncInfo newInfo = subscriber.getSyncInfo(info.getLocal()); if (newInfo == null || !newInfo.equals(info)) { remove(info); } }catch (TeamException e) { CVSUIPlugin.log(e); } } }</code><technical_language>moved in loop</technical_language>

Target:
private void change(SyncInfo[] collected) { Subscriber subscriber = getSubscriber(); for (SyncInfo info : collected) { try { SyncInfo newInfo = subscriber.getSyncInfo(info.getLocal()); if (newInfo == null || !newInfo.equals(info)) { remove(info); } } catch (TeamException e) { CVSUIPlugin.log(e); } } }
Source:
<code>public void testCreate() throws StripeException { Map<String, Object> attributes = new HashMap<String, Object>(); attributes.put("attr1", "val1"); attributes.put("attr2", "val2"); Map<String, Object> inventory = new HashMap<String, Object>(); inventory.put("type", "bucket"); inventory.put("value", "limited"); Map<String, Object> params = new HashMap<String, Object>(); params.put("active", true); params.put("attributes", attributes); params.put("price", 499); params.put("currency", "usd"); params.put("inventory", inventory); params.put("product", "prod_123"); params.put("image", "<LINK_0>"); <START> SKU sku = SKU.create(params); <END> assertNotNull(sku); verifyRequest( APIResource.RequestMethod.POST, "/v1/skus", params ); }</code><technical_language>called resource</technical_language>

Target:
public void testCreate() throws StripeException { final Map<String, Object> attributes = new HashMap<String, Object>(); attributes.put("attr1", "val1"); attributes.put("attr2", "val2"); final Map<String, Object> inventory = new HashMap<String, Object>(); inventory.put("type", "bucket"); inventory.put("value", "limited"); final Map<String, Object> params = new HashMap<String, Object>(); params.put("active", true); params.put("attributes", attributes); params.put("price", 499); params.put("currency", "usd"); params.put("inventory", inventory); params.put("product", "prod_123"); params.put("image", "<LINK_0>"); final SKU sku = SKU.create(params); assertNotNull(sku); verifyRequest( APIResource.RequestMethod.POST, "/v1/skus", params ); }
Source:
<code>public List<QueryResult<CohortAclEntry>> getAcl(String studyStr, List<String> cohortList, String member, boolean silent, String sessionId) throws CatalogException { ParamUtils.checkObj(member, "member"); MyResourceIds resource = getIds(cohortList, studyStr, sessionId); checkMembers(resource.getStudyId(), Arrays.asList(member)); List<QueryResult<CohortAclEntry>> cohortAclList = new ArrayList<>(resource.getResourceIds().size()); for (Long cohortId : resource.getResourceIds()) { try { QueryResult<CohortAclEntry> allCohortAcls = authorizationManager.getCohortAcl(resource.getStudyId(), cohortId, resource.getUser(), member); allCohortAcls.setId(String.valueOf(cohortId)); cohortAclList.add(allCohortAcls); } catch (CatalogException e) { if (silent) { <START> cohortAclList.add(new QueryResult<>(studyStr, 0, 0, 0, "", e.toString(), new ArrayList<>(0))); <END> } else { throw e; } } } return cohortAclList; }</code><technical_language>Here, returning id explained before. In case, methods similar, I try merge this signature. if member is empty call getAllCohortAcls, getCohortAcl</technical_language>

Target:
public List<QueryResult<CohortAclEntry>> getAcl(String studyStr, List<String> cohortList, String member, boolean silent, String sessionId) throws CatalogException { ParamUtils.checkObj(member, "member"); MyResourceIds resource = getIds(cohortList, studyStr, sessionId); checkMembers(resource.getStudyId(), Arrays.asList(member)); List<QueryResult<CohortAclEntry>> cohortAclList = new ArrayList<>(resource.getResourceIds().size()); List<Long> resourceIds = resource.getResourceIds(); for (int i = 0; i < resourceIds.size(); i++) { Long cohortId = resourceIds.get(i); try { QueryResult<CohortAclEntry> allCohortAcls = authorizationManager.getCohortAcl(resource.getStudyId(), cohortId, resource.getUser(), member); allCohortAcls.setId(String.valueOf(cohortId)); cohortAclList.add(allCohortAcls); } catch (CatalogException e) { if (silent) { cohortAclList.add(new QueryResult<>(cohortList.get(i), 0, 0, 0, "", e.toString(), new ArrayList<>(0))); } else { throw e; } } } return cohortAclList; }
Source:
<code>public StoredBlock get(Sha256Hash hash) throws BlockStoreException { <START> lock.lock(); <END> final MappedByteBuffer buffer = this.buffer; if (buffer == null) throw new BlockStoreException("Store closed"); ChainMap map = chainMaps.get(hash); if (map == null) return null; byte[] hashdat = new byte[32]; buffer.position(map.start); buffer.get(hashdat); lock.unlock(); return StoredBlock.deserializeCompact(params, buffer); }</code><technical_language>error handling right here. need lock.unlock(); in finally blocks risk leaking lock</technical_language>

Target:
public StoredBlock get(Sha256Hash hash) throws BlockStoreException { lock.lock(); StoredBlock block; try { final MappedByteBuffer buffer = this.buffer; if (buffer == null) throw new BlockStoreException("Store closed"); ChainMap map = chainMaps.get(hash); if (map == null) return null; byte[] hashdat = new byte[32]; buffer.position(map.start); buffer.get(hashdat); block = StoredBlock.deserializeCompact(params, buffer); } finally { lock.unlock(); } return block; }
Source:
<code>public void highlightElement(Object element, int color) { verifyThreadAccess(); HighlightableDescriptor highlightableDescriptor = getHighlightableDescriptor(element); if (highlightableDescriptor == null) { mHighlighter.clearHighlight(); } else { mHighlightBoundsRect.setEmpty(); <START> highlightableDescriptor.getBoundsForHighlighting(element, mHighlightBoundsRect); <END> mHighlighter.setHighlightedView( highlightableDescriptor.getViewForHighlighting(element), mHighlightBoundsRect, color); } }</code><technical_language>worried a bug hazard here. asking descriptor for highlighting bounds for element, relative to. apparent later, call getViewForHighlighting, bounds relative to. calls disjoint; protocol confusing clumsy for implementor. merge methods? e.g. @Nullable View getViewAndBoundsForHighlighting(Object element, Rect bounds) ... basically rename getViewForHighlighting add Rect parameter</technical_language>

Target:
public void highlightElement(Object element, int color) { verifyThreadAccess(); mHighlightingBoundsRect.setEmpty(); final View highlightingView = getHighlightingView(element, mHighlightingBoundsRect); if (highlightingView == null) { mHighlighter.clearHighlight(); } else { mHighlighter.setHighlightedView( highlightingView, mHighlightingBoundsRect, color); } }
Source:
<code>private AuthenticateResponse(String serverResponse) { ObjectServerError error; Token accessToken; Token refreshToken; String message; try { JSONObject obj = new JSONObject(serverResponse); accessToken = obj.has(JSON_FIELD_ACCESS_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_ACCESS_TOKEN)) : null; refreshToken = obj.has(JSON_FIELD_REFRESH_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_REFRESH_TOKEN)) : null; error = null; if (accessToken == null) { message = "accessToken = null"; } else { <START> message = String.format(Locale.ENGLISH, "Identity %s; Path %s", accessToken.identity(), accessToken.path()); <END> } } catch (JSONException ex) { accessToken = null; refreshToken = null; error = new ObjectServerError(ErrorCode.JSON_EXCEPTION, ex); message = String.format(Locale.ENGLISH, "Error %s", error.getErrorMessage()); } RealmLog.debug("AuthenticateResponse. " + message); setError(error); this.accessToken = accessToken; this.refreshToken = refreshToken; }</code><technical_language>this work if accessToken.path() returns a non-english string? CJK</technical_language>

Target:
private AuthenticateResponse(String serverResponse) { ObjectServerError error; Token accessToken; Token refreshToken; String message; try { JSONObject obj = new JSONObject(serverResponse); accessToken = obj.has(JSON_FIELD_ACCESS_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_ACCESS_TOKEN)) : null; refreshToken = obj.has(JSON_FIELD_REFRESH_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_REFRESH_TOKEN)) : null; error = null; if (accessToken == null) { message = "accessToken = null"; } else { message = String.format(Locale.US, "Identity %s; Path %s", accessToken.identity(), accessToken.path()); } } catch (JSONException ex) { accessToken = null; refreshToken = null; error = new ObjectServerError(ErrorCode.JSON_EXCEPTION, ex); message = String.format(Locale.US, "Error %s", error.getErrorMessage()); } RealmLog.debug("AuthenticateResponse. " + message); setError(error); this.accessToken = accessToken; this.refreshToken = refreshToken; }
Source:
<code>protected TenantStatus getTenantStatus(String tenantDomain) throws LazyLoadingTestException { TenantStatus tenantStatus; String requestUrl = webAppURL + "/" + IS_TENANT_LOADED_METHOD_URL + "/" + tenantDomain; try { HttpResponse response = HttpURLConnectionClient.sendGetRequest(requestUrl, null); JSONObject tenantStatusJSON = new JSONObject(response.getData()); tenantStatus = new TenantStatus(tenantStatusJSON.getJSONObject("TenantStatus"). getBoolean("tenantContextLoaded")); } catch (IOException ioException) { String customErrorMessage = "IOException when sending the Get request to:" + requestUrl + "\n" + ioException.getMessage(); <START> log.error(customErrorMessage); <END> throw new LazyLoadingTestException(customErrorMessage, ioException); } catch (JSONException jsonException) { String customErrorMessage = "JSONException when retrieving the values from json object TenantStatus" + requestUrl + "\n" + jsonException.getMessage(); log.error(customErrorMessage); throw new LazyLoadingTestException(customErrorMessage, jsonException); } return tenantStatus; }</code><technical_language>add exception object log - e.g log.error(customErrorMessage, e);</technical_language>

Target:
protected TenantStatusBean getTenantStatus(String tenantDomain) throws LazyLoadingTestException { TenantStatusBean tenantStatus; String requestUrl = supperTenantWebAppURL + "/" + IS_TENANT_LOADED_METHOD_URL + "/" + tenantDomain; try { HttpResponse response = HttpURLConnectionClient.sendGetRequest(requestUrl, null); JSONObject tenantStatusJSON = new JSONObject(response.getData()); tenantStatus = new TenantStatusBean(tenantStatusJSON.getJSONObject("TenantStatus").getBoolean("tenantContextLoaded")); } catch (IOException ioException) { String customErrorMessage = "IOException when sending the Get request to:" + requestUrl; log.error(customErrorMessage, ioException); throw new LazyLoadingTestException(customErrorMessage, ioException); } catch (JSONException jsonException) { String customErrorMessage = "JSONException when retrieving the values from json object TenantStatus" + requestUrl; log.error(customErrorMessage, jsonException); throw new LazyLoadingTestException(customErrorMessage, jsonException); } return tenantStatus; }
Source:
<code>private void testCrudCachePermissions(boolean isClient) throws Exception { String login = isClient ? "client" : "server"; Ignite node = startGrid(login + "_test_node", getSecurityPermissionSet(JOIN_AS_SERVER), isClient); <START> node.createCache(NEW_CACHE); END> node.createCache(ALL_PERM_TEST_CACHE); node.createCache(CREATE_TEST_CACHE); assertThrowsWithCause(() -> node.createCache(EMPTY_PERM_TEST_CACHE), SecurityException.class); checkOperations(node); assertThrowsWithCause(() -> node.cache(CREATE_TEST_CACHE).destroy(), SecurityException.class); }</code><technical_language>I propose change a bit: "This fail defaultAllowAll is true."</technical_language>

Target:
private void testCrudCachePermissions(boolean isClient) throws Exception { Ignite node = startGrid(loginPrefix(isClient) + "_test_node", SecurityPermissionSetBuilder.create() .appendCachePermissions(CACHE_NAME, CACHE_READ, CACHE_PUT, CACHE_REMOVE) .appendCachePermissions(FORBIDDEN_CACHE, EMPTY_PERMS).build(), isClient); for (Consumer<IgniteCache<String, String>> c : operations()) { c.accept(node.cache(CACHE_NAME)); assertThrowsWithCause(() -> c.accept(node.cache(FORBIDDEN_CACHE)), SecurityException.class); } }
Source:
<code>protected void configure() { super.configure(); bind(new TypeLiteral<ComputeServiceAdapter<Droplet, Size, Image, Region>>() { }).to(DigitalOceanComputeServiceAdapter.class); <START> bind(new TypeLiteral<Function<Droplet, NodeMetadata>>() { <END> }).to(DropletToNodeMetadata.class); bind(new TypeLiteral<Function<Image, org.jclouds.compute.domain.Image>>() { }).to(ImageToImage.class); bind(new TypeLiteral<Function<Region, Location>>() { }).to(RegionToLocation.class); bind(new TypeLiteral<Function<Size, Hardware>>() { }).to(SizeToHardware.class); bind(new TypeLiteral<Function<Droplet.Status, Status>>() { }).to(DropletStatusToStatus.class); install(new LocationsFromComputeServiceAdapterModule<Droplet, Size, Image, Region>() { }); bind(TemplateOptions.class).to(DigitalOceanTemplateOptions.class); bind(TemplateOptionsToStatement.class).to(TemplateOptionsToStatementWithoutPublicKey.class); bind(PopulateDefaultLoginCredentialsForImageStrategy.class).to(PopulateDefaultCredentialsToImage.class); bind(new TypeLiteral<ImageExtension>() { }).to(DigitalOceanImageExtension.class); }</code><technical_language>[minor] reason for blank lines in some places, in others</technical_language>

Target:
protected void configure() { super.configure(); bind(new TypeLiteral<ComputeServiceAdapter<Droplet, Size, Image, Region>>() { }).to(DigitalOceanComputeServiceAdapter.class); bind(new TypeLiteral<Function<Droplet, NodeMetadata>>() { }).to(DropletToNodeMetadata.class); bind(new TypeLiteral<Function<Image, org.jclouds.compute.domain.Image>>() { }).to(ImageToImage.class); bind(new TypeLiteral<Function<Region, Location>>() { }).to(RegionToLocation.class); bind(new TypeLiteral<Function<Size, Hardware>>() { }).to(SizeToHardware.class); bind(new TypeLiteral<Function<Droplet.Status, Status>>() { }).to(DropletStatusToStatus.class); install(new LocationsFromComputeServiceAdapterModule<Droplet, Size, Image, Region>() { }); bind(TemplateOptions.class).to(DigitalOceanTemplateOptions.class); bind(TemplateOptionsToStatement.class).to(TemplateOptionsToStatementWithoutPublicKey.class); bind(new TypeLiteral<ImageExtension>() { }).to(DigitalOceanImageExtension.class); }
Source:
<code>public static PreReceiveHook newChain(List<? extends PreReceiveHook> hooks) { PreReceiveHook[] newHooks = new PreReceiveHook[hooks.size()]; int i = 0; for (PreReceiveHook hook : hooks) { <START> if (hook != PreReceiveHook.NULL) <END> newHooks[i++] = hook; } if (i == 0) return PreReceiveHook.NULL; else if (i == 1) return newHooks[0]; else return new PreReceiveHookChain(newHooks); }</code><technical_language>bug</technical_language>

Target:
public static PreReceiveHook newChain(List<? extends PreReceiveHook> hooks) { PreReceiveHook[] newHooks = new PreReceiveHook[hooks.size()]; int i = 0; for (PreReceiveHook hook : hooks) if (hook != PreReceiveHook.NULL) newHooks[i++] = hook; if (i == 0) return PreReceiveHook.NULL; else if (i == 1) return newHooks[0]; else return new PreReceiveHookChain(newHooks, i); }
Source:
<code>public static File makeDimFile(File dir, String dimension) { <START> return new File(dir, StringUtils.safeFormat("dim_%s.drd", dimension)); <END> }</code><technical_language>crash if bad format string</technical_language>

Target:
public static File makeDimFile(File dir, String dimension) { return new File(dir, StringUtils.format("dim_%s.drd", dimension)); }
Source:
<code>public void testPollAndResponseHandling() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobIdStr, options, null, routerCallback, kms, cryptoService, cryptoJobHandler, time); ArrayList<RequestInfo> requestListToFill = new ArrayList<>(); requestRegistrationCallback.requestListToFill = requestListToFill; op.poll(requestRegistrationCallback); Assert.assertEquals("There should only be as many requests at this point as requestParallelism", requestParallelism, correlationIdToGetOperation.size()); CountDownLatch onPollLatch = new CountDownLatch(1); if (testEncryption) { routerCallback.setOnPollLatch(onPollLatch); } List<ResponseInfo> responses = sendAndWaitForResponses(requestListToFill); for (ResponseInfo responseInfo : responses) { GetResponse getResponse = responseInfo.getError() == null ? GetResponse.readFrom( new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), mockClusterMap) : null; op.handleResponse(responseInfo, getResponse); if (op.isOperationComplete()) { break; } } if (testEncryption) { <START> Assert.assertTrue("Latch should have been zeroed ", onPollLatch.await(5000, TimeUnit.MILLISECONDS)); <END> op.poll(requestRegistrationCallback); } Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete()); assertSuccess(op); }</code><technical_language>remove this change</technical_language>

Target:
public void testPollAndResponseHandling() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobId, options, null, routerCallback, kms, cryptoService, cryptoJobHandler, time); ArrayList<RequestInfo> requestListToFill = new ArrayList<>(); requestRegistrationCallback.requestListToFill = requestListToFill; op.poll(requestRegistrationCallback); Assert.assertEquals("There should only be as many requests at this point as requestParallelism", requestParallelism, correlationIdToGetOperation.size()); CountDownLatch onPollLatch = new CountDownLatch(1); if (testEncryption) { routerCallback.setOnPollLatch(onPollLatch); } List<ResponseInfo> responses = sendAndWaitForResponses(requestListToFill); for (ResponseInfo responseInfo : responses) { GetResponse getResponse = responseInfo.getError() == null ? GetResponse.readFrom( new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), mockClusterMap) : null; op.handleResponse(responseInfo, getResponse); if (op.isOperationComplete()) { break; } } if (testEncryption) { Assert.assertTrue("Latch should have been zeroed ", onPollLatch.await(500, TimeUnit.MILLISECONDS)); op.poll(requestRegistrationCallback); } Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete()); assertSuccess(op); }
Source:
<code>protected int resolveParallelBenchmarkCount() { int availableProcessorCount = Runtime.getRuntime().availableProcessors(); int resolvedParallelBenchmarkCount; if (parallelBenchmarkCount == null) { resolvedParallelBenchmarkCount = 1; } else if (parallelBenchmarkCount.equals(PARALLEL_BENCHMARK_COUNT_AUTO)) { resolvedParallelBenchmarkCount = resolveParallelBenchmarkCountAutomatically(availableProcessorCount); } else { <START> resolvedParallelBenchmarkCount = resolveParallelBenchmarkCountFromFormula(availableProcessorCount); <END> } if (resolvedParallelBenchmarkCount < 1) { throw new IllegalArgumentException("The parallelBenchmarkCount (" + parallelBenchmarkCount + ") resulted in a resolvedParallelBenchmarkCount (" + resolvedParallelBenchmarkCount + ") that is lower than 1."); } if (resolvedParallelBenchmarkCount > availableProcessorCount) { logger.warn("Because the resolvedParallelBenchmarkCount (" + resolvedParallelBenchmarkCount + ") is higher than the availableProcessorCount (" + availableProcessorCount + "), it is reduced to availableProcessorCount."); resolvedParallelBenchmarkCount = availableProcessorCount; } return resolvedParallelBenchmarkCount; }</code><technical_language>changing this code Partionted Search fork in weeks, I need do figure this out. I try get teh Partitioned Search fork in a masked-out appraoch I merge in master handle this PR, I presume long for this PR get merged</technical_language>

Target:
protected int resolveParallelBenchmarkCount() { int availableProcessorCount = Runtime.getRuntime().availableProcessors(); int resolvedParallelBenchmarkCount; if (parallelBenchmarkCount == null) { resolvedParallelBenchmarkCount = 1; } else if (parallelBenchmarkCount.equals(PARALLEL_BENCHMARK_COUNT_AUTO)) { resolvedParallelBenchmarkCount = resolveParallelBenchmarkCountAutomatically(availableProcessorCount); } else { resolvedParallelBenchmarkCount = ConfigUtils.resolveThreadPoolSizeScript( "parallelBenchmarkCount", parallelBenchmarkCount, PARALLEL_BENCHMARK_COUNT_AUTO); } if (resolvedParallelBenchmarkCount < 1) { throw new IllegalArgumentException("The parallelBenchmarkCount (" + parallelBenchmarkCount + ") resulted in a resolvedParallelBenchmarkCount (" + resolvedParallelBenchmarkCount + ") that is lower than 1."); } if (resolvedParallelBenchmarkCount > availableProcessorCount) { logger.warn("Because the resolvedParallelBenchmarkCount (" + resolvedParallelBenchmarkCount + ") is higher than the availableProcessorCount (" + availableProcessorCount + "), it is reduced to availableProcessorCount."); resolvedParallelBenchmarkCount = availableProcessorCount; } return resolvedParallelBenchmarkCount; }
Source:
<code>public void addWhiteListPatterns(String... patterns) { <START> this.whiteListPatterns.addAll(Arrays.asList(patterns)); <END> }</code><technical_language>Collections.addAll(whiteListPatterns, patterns) here</technical_language>

Target:
public void addWhiteListPatterns(String... patterns) { Collections.addAll(this.whiteListPatterns, patterns); }
Source:
<code>public boolean isFailed(SdxClusterStatusResponse datalakeStatus) { <START> Collection<SdxClusterStatusResponse> failedStatuses = List.of(PROVISIONING_FAILED, REPAIR_FAILED, UPGRADE_FAILED, DATALAKE_UPGRADE_FAILED, <END> DELETE_FAILED, START_FAILED, STOP_FAILED, SYNC_FAILED); return failedStatuses.contains(datalakeStatus); }</code><technical_language>Please a Set</technical_language>

Target:
public boolean isFailed(SdxClusterStatusResponse datalakeStatus) { Set<SdxClusterStatusResponse> failedStatuses = Set.of(PROVISIONING_FAILED, REPAIR_FAILED, UPGRADE_FAILED, DATALAKE_UPGRADE_FAILED, DELETE_FAILED, START_FAILED, STOP_FAILED, SYNC_FAILED); return failedStatuses.contains(datalakeStatus); }
Source:
<code>public static FunctionInfo getFunctionByName(String functionName) { <START> return FUNCTION_INFO_MAP.get(functionName.toLowerCase()); <END> }</code><technical_language>a function canonicalize(functionName) in registerFunction method FUNCTION_INFO_MAP populated in future miss converting lowercase</technical_language>

Target:
public static FunctionInfo getFunctionByName(String functionName) { return FUNCTION_INFO_MAP.get(canonicalize(functionName)); }
Source:
<code>@Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); Bundle extras = intent.getExtras(); if (ACTION_AIRPLANE_MODE_CHANGED.equals(action)) { if (extras != null) { <START> dispatchAirplaneModeChange(extras.getBoolean(EXTRA_AIRPLANE_STATE, false)); <END> } } else if (CONNECTIVITY_ACTION.equals(action)) { dispatchNetworkStateChange(connectivityManager.getActiveNetworkInfo()); } }</code><technical_language>formatting is off</technical_language>

Target:
@Override public void onReceive(Context context, Intent intent) { if (null == intent) { return; } String action = intent.getAction(); Bundle extras = intent.getExtras(); if (ACTION_AIRPLANE_MODE_CHANGED.equals(action)) { dispatchAirplaneModeChange(extras.getBoolean(EXTRA_AIRPLANE_STATE, false)); } else if (CONNECTIVITY_ACTION.equals(action)) { dispatchNetworkStateChange(connectivityManager.getActiveNetworkInfo()); } }
Source:
<code>private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { if (getIsNew()) { labelList.setItems(allLabels); labelList.setSelectedItems(new ArrayList<>()); } else { AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(hostLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(hostLabelsList); }), getHostId()); } <START> labelList.setIsChangeable(true); <END> })); }</code><technical_language>I default is true, need explicitly set here</technical_language>

Target:
private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { if (getIsNew()) { labelList.setItems(allLabels); labelList.setSelectedItems(new ArrayList<>()); } else { AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(hostLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(hostLabelsList); }), getHostId()); } })); }
Source:
<code>public Plan optimize(final Map<String, List<EvaluatorParameters>> evalParamsMap, final int availableEvaluators) { if (callsSkipped < callsToSkip) { callsSkipped++; return PlanImpl.newBuilder().build(); } if (callsMade == maxCallsToMake || evalParamsMap.isEmpty()) { return PlanImpl.newBuilder().build(); } final String evaluatorToAdd = "new-" + callsMade; callsMade++; final PlanImpl.Builder planBuilder = PlanImpl.newBuilder(); for (final String namespace : evalParamsMap.keySet()) { EvaluatorParameters srcEvaluator = null; for (final EvaluatorParameters evaluator : evalParamsMap.get(namespace)) { if (!evaluator.getDataInfos().isEmpty()) { srcEvaluator = evaluator; break; } } if (srcEvaluator == null) { LOG.log(Level.WARNING, "Cannot choose source evaluator to move its data to new evaluator in {0}", namespace); <START> planBuilder.addEvaluatorToAdd(namespace, evaluatorToAdd); <END> continue; } final DataInfo srcDataInfo = srcEvaluator.getDataInfos().iterator().next(); final int numUnitsToMove = srcDataInfo.getNumUnits() / 2; final TransferStep transferStep = new TransferStepImpl( srcEvaluator.getId(), evaluatorToAdd, new DataInfoImpl(srcDataInfo.getDataType(), numUnitsToMove)); planBuilder.addEvaluatorToAdd(namespace, evaluatorToAdd); planBuilder.addTransferStep(namespace, transferStep); } return planBuilder.build(); }</code><technical_language>move commands in L78 L88 (planBuilder.addEvaluatorToAdd()), if statement in L76? command in if continue a bit fragile hard understand</technical_language>

Target:
public Plan optimize(final Map<String, List<EvaluatorParameters>> evalParamsMap, final int availableEvaluators) { if (callsSkipped < callsToSkip) { callsSkipped++; return PlanImpl.newBuilder().build(); } if (callsMade == maxCallsToMake || evalParamsMap.isEmpty()) { return PlanImpl.newBuilder().build(); } final String evaluatorToAdd = "new-" + callsMade; callsMade++; final PlanImpl.Builder planBuilder = PlanImpl.newBuilder(); for (final String namespace : evalParamsMap.keySet()) { planBuilder.addEvaluatorToAdd(namespace, evaluatorToAdd); EvaluatorParameters srcEvaluator = null; for (final EvaluatorParameters evaluator : evalParamsMap.get(namespace)) { if (!evaluator.getDataInfos().isEmpty()) { srcEvaluator = evaluator; break; } } if (srcEvaluator == null) { LOG.log(Level.WARNING, "Cannot choose source evaluator to move its data to new evaluator in {0}", namespace); continue; } final DataInfo srcDataInfo = srcEvaluator.getDataInfos().iterator().next(); final int numUnitsToMove = srcDataInfo.getNumUnits() / 2; final TransferStep transferStep = new TransferStepImpl( srcEvaluator.getId(), evaluatorToAdd, new DataInfoImpl(srcDataInfo.getDataType(), numUnitsToMove)); planBuilder.addTransferStep(namespace, transferStep); } return planBuilder.build(); }
Source:
<code><START> protected void serviceStart() throws UnknownHostException { <END> String localHostName = InetAddress.getLocalHost().getHostName(); LOG.debug("Local hostname is: {}", localHostName); for (String hostName : hostNames) { if (hostName.equalsIgnoreCase(localHostName)) { LOG.debug("Starting load generator process on: {}", localHostName); processors = Runtime.getRuntime().availableProcessors(); threads = new Thread[processors]; Random random = new Random(); for (int i = 0; i < processors; i++) { threads[i] = new Thread(new Runnable() { @Override public void run() { while (!Thread.interrupted()) { if (random.nextFloat() <= threshold) { long startTime = System.currentTimeMillis(); while (System.currentTimeMillis() - startTime < INTERVAL) { } } else { try { Thread.sleep(INTERVAL); } catch (InterruptedException e) { } } } } }); threads[i].start(); } } } }</code><technical_language>@Override annotation here</technical_language>

Target:
protected void serviceStart() throws UnknownHostException { String localHostName = InetAddress.getLocalHost().getHostName(); LOG.debug("Local hostname is: {}", localHostName); for (String hostName : victimsHostName) { if (hostName.equalsIgnoreCase(localHostName)) { LOG.debug("Starting load generator process on: {}", localHostName); threads = new Thread[Runtime.getRuntime().availableProcessors()]; Random random = new Random(); for (int i = 0; i < threads.length; i++) { threads[i] = new Thread(new Runnable() { @Override public void run() { while (!Thread.interrupted()) { if (random.nextFloat() <= threshold) { long startTime = System.currentTimeMillis(); while (System.currentTimeMillis() - startTime < interval) { if (Thread.currentThread().isInterrupted()) { break; } } } else { try { Thread.sleep(interval); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } } }); threads[i].start(); } } } }
Source:
<code>private void build() { initRootPage(); initMessagesPart(); initButtonsPart(); this.window = new Window(); this.window.setTitle("Plan a job"); this.window.setShowMinimizeButton(false); this.window.setIsModal(true); this.window.setShowModalMask(true); this.window.addItem(rootPage); <START> this.window.setWidth(this.width); <END> this.window.setHeight(this.height); this.window.centerInPage(); this.window.setCanDragResize(true); }</code><technical_language>this of this.width removed width is a constant. for height below</technical_language>

Target:
private void build() { initRootPage(); initMessagesPart(); initButtonsPart(); this.window = new Window(); this.window.setTitle("Plan a job"); this.window.setShowMinimizeButton(false); this.window.setIsModal(true); this.window.setShowModalMask(true); this.window.addItem(rootPage); this.window.setWidth(WIDTH); this.window.setHeight(HEIGHT); this.window.centerInPage(); this.window.setCanDragResize(true); }
Source:
<code>public static void start(String... args) { JCommanderCommandProvider commandProvider = JCommanderCommandProvider.get(); final RemoteMainJCommanderCommand mainCommand = new RemoteMainJCommanderCommand(); LOGGER.debug("Registering commands with JCommanderCommandRepository"); JCommanderCommandRepository commandRepository = new JCommanderCommandRepository(); Set<JCommanderCommand> commands = commandProvider.getCommands(); commands.add(mainCommand); commandRepository.addAll(commands); LOGGER.debug("Parsing command-line arguments"); CustomJCommander jCommander = parseArguments(commandRepository, mainCommand, args); mainCommand.validate(); mainCommand.run(); <START> Collection<Object> services = ServiceProvider.get().createServices((RemoteMainCommand)mainCommand.getCommand()); <END> jCommander.getAskedCommand().map(command -> { if (command.isHelp()) { jCommander.printUsage(); return true; } else { LOGGER.debug("Injecting services in specified command"); Injector.inject(command.getCommand(), services); command.validate(); command.run(); return true; } }).orElseGet(() -> { jCommander.usage(); return false; }); }</code><technical_language>do need cast ? Cant't RemoteMainJCommanderCommand extend RemoteMainCommand</technical_language>

Target:
public static void start(String... args) { JCommanderCommandProvider commandProvider = JCommanderCommandProvider.get(); final RemoteMainJCommanderCommand mainCommand = new RemoteMainJCommanderCommand(); LOGGER.debug("Registering commands with JCommanderCommandRepository"); JCommanderCommandRepository commandRepository = new JCommanderCommandRepository(); Set<JCommanderCommand> commands = commandProvider.getCommands(); commands.add(mainCommand); commandRepository.addAll(commands); LOGGER.debug("Parsing command-line arguments"); CustomJCommander jCommander = parseArguments(commandRepository, mainCommand, args); mainCommand.validate(); mainCommand.run(); Collection<Object> services = ServiceProvider.get().createServices(mainCommand.getCommand()); jCommander.getAskedCommand().map(command -> { if (command.isHelp()) { jCommander.printUsage(); return true; } else { LOGGER.debug("Injecting services in specified command"); Injector.inject(command.getCommand(), services); command.validate(); command.run(); return true; } }).orElseGet(() -> { jCommander.usage(); return false; }); }
Source:
<code>private void setupTestService(String requestId, String serviceId, String basePath, Optional<String> replaceServiceId, Optional<Map<String, Object>> options, Optional<String> template) { <START> System.out.println("Requesting " + requestId + "..."); <END> UpstreamInfo upstream = new UpstreamInfo(UPSTREAM, Optional.<String>absent(), Optional.<String>absent()); BaragonService lbService = new BaragonService(serviceId, new ArrayList<String>(), basePath, new HashSet<String>(Arrays.asList(LOAD_BALANCER_GROUP)), options.isPresent() ? options.get() : new HashMap<String, Object>(), template); BaragonRequest request = new BaragonRequest(requestId, lbService, Arrays.asList(upstream), new ArrayList<UpstreamInfo>(), replaceServiceId); baragonServiceClient.enqueueRequest(request); }</code><technical_language>logger for rest of Baragon System.out, for example <LINK_0></technical_language>

Target:
private void setupTestService(String requestId, String serviceId, String basePath, Optional<String> replaceServiceId, Optional<Map<String, Object>> options, Optional<String> template) { UpstreamInfo upstream = new UpstreamInfo(UPSTREAM, Optional.<String>absent(), Optional.<String>absent()); BaragonService lbService = new BaragonService(serviceId, new ArrayList<String>(), basePath, new HashSet<String>(Arrays.asList(LOAD_BALANCER_GROUP)), options.isPresent() ? options.get() : new HashMap<String, Object>(), template); BaragonRequest request = new BaragonRequest(requestId, lbService, Arrays.asList(upstream), new ArrayList<UpstreamInfo>(), replaceServiceId); baragonServiceClient.enqueueRequest(request); }