auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setTheme(String themeId, boolean restore) { String osVersion = System.getProperty("os.version"); if (osVersion != null) { boolean found = false; for (Theme t : themes) { String osVersionList = t.getOsVersion(); if (osVersionList != null) { String[] osVersions = osVersionList.split(","); <START> for (String osVersion2 : osVersions) { <END> if (osVersion2 != null && osVersion.contains(osVersion2)) { String themeVersion = themeId + osVersionList; if (t.getId().equals(themeVersion)) { setTheme(t, restore); found = true; break; } } } } } if (found) { return; } } for (Theme t : themes) { if (t.getId().equals(themeId)) { setTheme(t, restore); break; } } }</code><technical_language>bad variable name (osVersion2), "osVersionFromTheme"</technical_language>

Target:
public void setTheme(String themeId, boolean restore) { String osVersion = System.getProperty("os.version"); if (osVersion != null) { boolean found = false; for (Theme t : themes) { String osVersionList = t.getOsVersion(); if (osVersionList != null) { String[] osVersions = osVersionList.split(","); for (String osVersionFromTheme : osVersions) { if (osVersionFromTheme != null && osVersion.contains(osVersionFromTheme)) { String themeVersion = themeId + osVersionList; if (t.getId().equals(themeVersion)) { setTheme(t, restore); found = true; break; } } } } } if (found) { return; } } for (Theme t : themes) { if (t.getId().equals(themeId)) { setTheme(t, restore); break; } } }
Source:
<code>public synchronized void close( PagedIndexInput input ) throws IOException { assert input.resources == this : String.format( "Closing input with unrelated resource tracker: " + "%s closed by %s", input, this ); if ( clones == null ) { return; } <START> LinkedList<PagedIndexInput> localClones = this.clones; <END> this.clones = null; IOException errorOnClose = null; for ( PagedIndexInput clone : localClones ) { try { clone.close(); } catch ( IOException e ) { if ( errorOnClose == null ) { errorOnClose = e; } else { errorOnClose.addSuppressed( e ); } } } try { input.cursor.close(); } finally { input.cursor = null; } pagedFile.close(); if ( errorOnClose != null ) { throw errorOnClose; } }</code><technical_language>a proper closed flag avoid this</technical_language>

Target:
public synchronized void close( PagedIndexInput input ) throws IOException { assert input.resources == this : String.format( "Closing input with unrelated resource tracker: " + "%s closed by %s", input, this ); if ( closed ) { return; } closed = true; try { Throwable error; error = IOUtils.chainedClose( null, input.cursor ); error = IOUtils.chainedClose( error, pagedFile ); IOUtils.chainedCloseFinish( IOException.class, error ); } finally { input.cursor = null; } }
Source:
<code>private void handleUri(Uri uri) { final Intent intent; final XmppUri xmppUri = new XmppUri(uri); final List<Jid> accounts = DatabaseBackend.getInstance(this).getAccountJids(); if (accounts.size() == 0) { intent = new Intent(getApplicationContext(), WelcomeActivity.class); WelcomeActivity.addInvitee(intent, xmppUri); startActivity(intent); return; } if (xmppUri.isAction(XmppUri.ACTION_MESSAGE)) { final Jid jid = xmppUri.getJid(); final String body = xmppUri.getBody(); if (jid != null) { intent = new Intent(getApplicationContext(), ShareViaAccountActivity.class); intent.putExtra(ShareViaAccountActivity.EXTRA_CONTACT, jid.toString()); intent.putExtra(ShareViaAccountActivity.EXTRA_BODY, body); } else { intent = new Intent(getApplicationContext(), ShareWithActivity.class); intent.setAction(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, body); } } else if (accounts.contains(xmppUri.getJid())) { final String name = xmppUri.getName(); intent = new Intent(getApplicationContext(), EditAccountActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.putExtra("jid", xmppUri.getJid().toBareJid().toString()); <START> if (name != null) <END> intent.putExtra("name", xmppUri.getName().toString()); intent.setData(uri); } else { intent = new Intent(getApplicationContext(), StartConversationActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); intent.setData(uri); } startActivity(intent); }</code><technical_language>redirecting name EditAccountActivity. activity is name anyway</technical_language>

Target:
private void handleUri(Uri uri) { final Intent intent; final XmppUri xmppUri = new XmppUri(uri); final List<Jid> accounts = DatabaseBackend.getInstance(this).getAccountJids(); if (accounts.size() == 0) { intent = new Intent(getApplicationContext(), WelcomeActivity.class); WelcomeActivity.addInvitee(intent, xmppUri); startActivity(intent); return; } if (xmppUri.isAction(XmppUri.ACTION_MESSAGE)) { final Jid jid = xmppUri.getJid(); final String body = xmppUri.getBody(); if (jid != null) { intent = new Intent(getApplicationContext(), ShareViaAccountActivity.class); intent.putExtra(ShareViaAccountActivity.EXTRA_CONTACT, jid.toString()); intent.putExtra(ShareViaAccountActivity.EXTRA_BODY, body); } else { intent = new Intent(getApplicationContext(), ShareWithActivity.class); intent.setAction(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, body); } } else if (accounts.contains(xmppUri.getJid())) { intent = new Intent(getApplicationContext(), EditAccountActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.putExtra("jid", xmppUri.getJid().toBareJid().toString()); intent.setData(uri); } else { intent = new Intent(getApplicationContext(), StartConversationActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); intent.setData(uri); } startActivity(intent); }
Source:
<code>public int execute(StratosCommandContext context, String[] args) throws CommandException { if (logger.isDebugEnabled()) { logger.debug("Executing command...", getName()); <START> logger.info("Get name" + getName()); <END> } if (args != null && args.length > 0) { String resourcePath = null; String partitionJson = null; final CommandLineParser parser = new GnuParser(); CommandLine commandLine; try { commandLine = parser.parse(options, args); if (logger.isDebugEnabled()) { logger.debug("Network Partition deployment"); } if (commandLine.hasOption(CliConstants.RESOURCE_PATH)) { if (logger.isTraceEnabled()) { logger.trace("Resource path option is passed"); } resourcePath = commandLine.getOptionValue(CliConstants.RESOURCE_PATH); partitionJson = readResource(resourcePath); } if (resourcePath == null) { System.out.println("usage: " + getName() + " [-p <resource path>]"); return CliConstants.COMMAND_FAILED; } RestCommandLineService.getInstance().addNetworkPartition(partitionJson); return CliConstants.COMMAND_SUCCESSFULL; } catch (ParseException e) { if (logger.isErrorEnabled()) { logger.error("Error parsing arguments", e); } System.out.println(e.getMessage()); return CliConstants.COMMAND_FAILED; } catch (IOException e) { System.out.println("Invalid resource path"); return CliConstants.COMMAND_FAILED; } } else { context.getStratosApplication().printUsage(getName()); return CliConstants.COMMAND_FAILED; } }</code><technical_language>Info log isDebugEnabled() condition.Better change info log</technical_language>

Target:
public int execute(StratosCommandContext context, String[] args) throws CommandException { if (logger.isDebugEnabled()) { logger.debug("Executing command...", getName()); logger.debug("Get name" + getName()); } if (args != null && args.length > 0) { String resourcePath = null; String partitionJson = null; final CommandLineParser parser = new GnuParser(); CommandLine commandLine; try { commandLine = parser.parse(options, args); if (logger.isDebugEnabled()) { logger.debug("Network Partition deployment"); } if (commandLine.hasOption(CliConstants.RESOURCE_PATH)) { if (logger.isTraceEnabled()) { logger.trace("Resource path option is passed"); } resourcePath = commandLine.getOptionValue(CliConstants.RESOURCE_PATH); partitionJson = readResource(resourcePath); } if (resourcePath == null) { System.out.println("usage: " + getName() + " [-p <resource path>]"); return CliConstants.COMMAND_FAILED; } RestCommandLineService.getInstance().addNetworkPartition(partitionJson); return CliConstants.COMMAND_SUCCESSFULL; } catch (ParseException e) { if (logger.isErrorEnabled()) { logger.error("Error parsing arguments", e); } System.out.println(e.getMessage()); return CliConstants.COMMAND_FAILED; } catch (IOException e) { System.out.println("Invalid resource path"); return CliConstants.COMMAND_FAILED; } } else { context.getStratosApplication().printUsage(getName()); return CliConstants.COMMAND_FAILED; } }
Source:
<code>public NodeValue exec(List<NodeValue> args) { if ( args == null ) throw new ARQInternalErrorException("FunctionBase1: Null args list") ; <START> int size = args.size(); <END> switch(args.size()) { case 0: throw new ExprEvalException(); case 1: { NodeValue nv = args.get(0); String str = NodeFunctions.str(nv.asNode()); throw new ExprEvalException(str); } default: throw new ExprEvalException("fn:error: Wrong number of arguments: Wanted 0 or 1, got "+args.size()) ; } }</code><technical_language>this size var below? get all..</technical_language>

Target:
public NodeValue exec(List<NodeValue> args) { if ( args == null ) throw new ARQInternalErrorException("FunctionBase1: Null args list") ; switch(args.size()) { case 0: throw new ExprEvalException(); case 1: { NodeValue nv = args.get(0); String str = NodeFunctions.str(nv.asNode()); throw new ExprEvalException(str); } default: throw new ExprEvalException("fn:error: Wrong number of arguments: Wanted 0 or 1, got "+args.size()) ; } }
Source:
<code>private VdcActionType getSnapshotActionType() { if (getVm().isQualifiedForLiveSnapshotMerge()) { return VdcActionType.RemoveSnapshotSingleDiskLive; } <START> if (FeatureSupported.isQemuimgCommitSupported(getStoragePool().getCompatibilityVersion())) { <END> return VdcActionType.ColdMergeSnapshotSingleDisk; } return VdcActionType.RemoveSnapshotSingleDisk; }</code><technical_language>please added method isQemuimgCommitSupported()</technical_language>

Target:
private VdcActionType getSnapshotActionType() { if (getVm().isQualifiedForLiveSnapshotMerge()) { return VdcActionType.RemoveSnapshotSingleDiskLive; } if (isQemuimgCommitSupported()) { return VdcActionType.ColdMergeSnapshotSingleDisk; } return VdcActionType.RemoveSnapshotSingleDisk; }
Source:
<code>public static SpecificHaxeClassReference convertGenericType(HaxeMethodModel model, SpecificHaxeClassReference classReference) { <START> if (nonNull(model.getGenericParams())) { <END> List<HaxeGenericParamModel> genericParams = model.getGenericParams(); ResultHolder[] specifics = classReference.getGenericResolver().getSpecifics(); if (genericParams != null) { Map<String, ResultHolder> nameAndConstraints = getGenericTypeParametersByName(genericParams); ResultHolder[] newSpecifics = new ResultHolder[specifics.length]; for (int i = 0; i < specifics.length; i++) { String name = specifics[i].getClassType().getClassName(); boolean nameFound = genericParams.stream().anyMatch(m -> m.getName().equals(name)); if (nameFound) { if (nameAndConstraints.containsKey(name)) { newSpecifics[i] = nameAndConstraints.get(name); continue; } } newSpecifics[i] = specifics[i]; } return SpecificHaxeClassReference.withGenerics(classReference.getHaxeClassReference(), newSpecifics); } } return classReference; }</code><technical_language>model.getGenericParams() is expensive call (makes a List walks PSI tree). Please capture value, test it</technical_language>

Target:
public static SpecificHaxeClassReference convertGenericType(HaxeMethodModel model, SpecificHaxeClassReference classReference) { List<HaxeGenericParamModel> genericParams = model.getGenericParams(); if (nonNull(genericParams)) { ResultHolder[] specifics = classReference.getGenericResolver().getSpecifics(); Map<String, ResultHolder> nameAndConstraints = getGenericTypeParametersByName(genericParams); ResultHolder[] newSpecifics = new ResultHolder[specifics.length]; for (int i = 0; i < specifics.length; i++) { String name = specifics[i].getClassType().getClassName(); boolean nameFound = genericParams.stream().anyMatch(m -> m.getName().equals(name)); if (nameFound) { if (nameAndConstraints.containsKey(name)) { newSpecifics[i] = nameAndConstraints.get(name); continue; } } newSpecifics[i] = specifics[i]; } return SpecificHaxeClassReference.withGenerics(classReference.getHaxeClassReference(), newSpecifics); } return classReference; }
Source:
<code>public void setI18n(ResourceBundleLocator resourceBundleLocator) { try { ResourceBundle resourceBundle = resourceBundleLocator.getBundle(INTRIGUE_BASE_NAME); if (resourceBundle != null) { Enumeration bundleKeys = resourceBundle.getKeys(); <START> i18n = new HashMap<>(); <END> while (bundleKeys.hasMoreElements()) { String key = (String) bundleKeys.nextElement(); String value = resourceBundle.getString(key); i18n.put(key, value); } } } catch (IOException e) { LOGGER.debug( "An error occurred while creating class loader to URL for ResourceBundle: {}, {}", INTRIGUE_BASE_NAME, Locale.getDefault(), e); } }</code><technical_language>change volatile reference done building map</technical_language>

Target:
public void setI18n(ResourceBundleLocator resourceBundleLocator) { try { ResourceBundle resourceBundle = resourceBundleLocator.getBundle(INTRIGUE_BASE_NAME); if (resourceBundle != null) { Enumeration bundleKeys = resourceBundle.getKeys(); Map<String, String> keywords = new HashMap<>(); while (bundleKeys.hasMoreElements()) { String key = (String) bundleKeys.nextElement(); String value = resourceBundle.getString(key); keywords.put(key, value); } i18n = keywords; } } catch (IOException e) { LOGGER.debug( "An error occurred while creating class loader to URL for ResourceBundle: {}, {}", INTRIGUE_BASE_NAME, Locale.getDefault(), e); } }
Source:
<code>NavigationState2.NavigationStateProto toProto() { <START> NavigationState2.NavigationStateProto.Builder <END> builder = NavigationState2.NavigationStateProto.newBuilder(); if (mSteps != null) { for (Step step : mSteps) { if (step != null) { builder.addSteps(step.toProto()); } } } if (mDestinations != null) { for (Destination destination : mDestinations) { if (destination != null) { builder.addDestinations(destination.toProto()); } } } return builder.build(); }</code><technical_language>import this</technical_language>

Target:
NavigationState2.NavigationStateProto toProto() { NavigationState2.NavigationStateProto.Builder builder = NavigationState2.NavigationStateProto.newBuilder(); if (mSteps != null) { for (Step step : mSteps) { if (step != null) { builder.addSteps(step.toProto()); } } } if (mDestinations != null) { for (Destination destination : mDestinations) { if (destination != null) { builder.addDestinations(destination.toProto()); } } } if (mCurrentSegment != null) { builder.setCurrentSegment(mCurrentSegment.toProto()); } if (mServiceStatus != null) { builder.addServiceStatuses(getServiceStatusProto()); } return builder.build(); }
Source:
<code><START> public ControllerTenantBrokerResponse getBrokersFromController(String controllerAddress, String tenant) { <END> try { String url = "http://" + controllerAddress + "/brokers/tenants/" + tenant; AsyncHttpClient.BoundRequestBuilder requestBuilder = _httpClient.prepareGet(url); if (_headers != null) { _headers.forEach((k, v) -> requestBuilder.addHeader(k, v)); } final Future<Response> response = requestBuilder.addHeader("Content-Type", "application/json; charset=utf-8").execute(); ControllerTenantBrokerResponse.ControllerTenantBrokerResponseFuture controllerTableBrokerResponseFuture = new ControllerTenantBrokerResponse.ControllerTenantBrokerResponseFuture(response, url); return controllerTableBrokerResponseFuture.get(); } catch (ExecutionException e) { throw new PinotClientException(e); } }</code><technical_language>is this called for connection creation query</technical_language>

Target:
public ControllerTenantBrokerResponse getBrokersFromController(String controllerAddress, String tenant) { try { String url = "http://" + controllerAddress + "/v2/brokers/tenants/" + tenant; AsyncHttpClient.BoundRequestBuilder requestBuilder = _httpClient.prepareGet(url); if (_headers != null) { _headers.forEach((k, v) -> requestBuilder.addHeader(k, v)); } final Future<Response> response = requestBuilder.addHeader("Content-Type", "application/json; charset=utf-8").execute(); ControllerTenantBrokerResponse.ControllerTenantBrokerResponseFuture controllerTableBrokerResponseFuture = new ControllerTenantBrokerResponse.ControllerTenantBrokerResponseFuture(response, url); return controllerTableBrokerResponseFuture.get(); } catch (ExecutionException e) { throw new PinotClientException(e); } }
Source:
<code><START> public Category<? super Integer> getKeys() { <END> return $ceylon$language$Correspondence$this.getKeys(); }</code><technical_language>I qualified avoids import mistake java.lang.Integer</technical_language>

Target:
public Category<? super ceylon.language.Integer> getKeys() { return $ceylon$language$Correspondence$this.getKeys(); }
Source:
<code>protected void addVmStatic() { VmStatic vmStatic = getParameters().getVmStaticData(); if (vmStatic.getOrigin() == null) { vmStatic.setOrigin(OriginType.valueOf(Config.<String> getValue(ConfigValues.OriginType))); } vmStatic.setId(getVmId()); vmStatic.setQuotaId(getQuotaId()); vmStatic.setCreationDate(new Date()); vmStatic.setCreatedByUserId(getUserId()); VmPropertiesUtils.getInstance().separeteCustomPropertiesToUserAndPredefined( <START> ClusterUtils.getCompatibilityVersion(getParameters().getVm()), <END> vmStatic); updateOriginalTemplate(vmStatic); getVmStaticDao().save(vmStatic); getCompensationContext().snapshotNewEntity(vmStatic); }</code><technical_language>need work hard, im pretty cluster cached in command getVdsGroup()</technical_language>

Target:
protected void addVmStatic() { VmStatic vmStatic = getParameters().getVmStaticData(); if (vmStatic.getOrigin() == null) { vmStatic.setOrigin(OriginType.valueOf(Config.<String> getValue(ConfigValues.OriginType))); } vmStatic.setId(getVmId()); vmStatic.setQuotaId(getQuotaId()); vmStatic.setCreationDate(new Date()); vmStatic.setCreatedByUserId(getUserId()); VmPropertiesUtils.getInstance().separeteCustomPropertiesToUserAndPredefined( getVdsGroup().getcompatibility_version(), vmStatic); updateOriginalTemplate(vmStatic); getVmStaticDao().save(vmStatic); getCompensationContext().snapshotNewEntity(vmStatic); }
Source:
<code>private void showServices() { serviceArrow.setImageResource(R.drawable.ic_arrow_up_white); for(StreamingService s : NewPipe.getServices()) { final String title = s.getServiceInfo().getName() + (ServiceHelper.isBeta(s) ? " (beta)" : ""); drawerItems.getMenu() .add(R.id.menu_services_group, s.getServiceId(), ORDER, title) .setIcon(ServiceHelper.getIcon(s.getServiceId())); <START> <END> } drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true); }</code><technical_language>empty line</technical_language>

Target:
private void showServices() { serviceArrow.setImageResource(R.drawable.ic_arrow_up_white); for(StreamingService s : NewPipe.getServices()) { final String title = s.getServiceInfo().getName() + (ServiceHelper.isBeta(s) ? " (beta)" : ""); MenuItem menuItem = drawerItems.getMenu() .add(R.id.menu_services_group, s.getServiceId(), ORDER, title) .setIcon(ServiceHelper.getIcon(s.getServiceId())); if(s.getServiceId() == 3){ enhancePeertubeMenu(s, menuItem); } } drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true); }
Source:
<code>public void testLinkImplicitParagraph() { builder.beginDocument(); builder.beginBlock(BlockType.PARAGRAPH, new Attributes()); builder.characters("A "); <START> builder.link("<LINK_1>", "link"); <END> builder.characters(" in a paragraph."); builder.endBlock(); builder.link("<LINK_1>", "A link"); builder.characters(" opens an implicit paragraph."); builder.endDocument(); assertMarkup("A [link](<LINK_0> in a paragraph.\n\n[A link](<LINK_0> opens an implicit paragraph.\n\n"); }</code><technical_language>2 lines removed (they're unnecessary for this test)</technical_language>

Target:
public void testLinkImplicitParagraph() { builder.beginDocument(); builder.beginBlock(BlockType.PARAGRAPH, new Attributes()); builder.characters("A paragraph."); builder.endBlock(); builder.link("<LINK_1>", "A link"); builder.characters(" opens an implicit paragraph."); builder.endDocument(); assertMarkup("A paragraph.\n\n[A link](<LINK_0> opens an implicit paragraph.\n\n"); }
Source:
<code>private void writeFromOsgiConfig(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException { PrintWriter writer = response.getWriter(); rules.getGroups().forEach(group -> writeGroup(group, request, writer)); rules.getSitemaps().stream().map(sitemap -> buildSitemapString(sitemap, request.getResourceResolver())).forEach(writer::println); if(!rules.getSitemapProperties().isEmpty()) { PageManager pageManager = request.getResourceResolver().adaptTo(PageManager.class); <START> Page page = pageManager.getContainingPage(request.getResource()); <END> addRulesFromPages(page, request.getResourceResolver(), rules.getSitemapProperties(), writer, this::buildSitemapString); } }</code><technical_language>do this a page? Isnt this simply bound some selectors/extension</technical_language>

Target:
private void writeFromOsgiConfig(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException { PrintWriter writer = response.getWriter(); PageManager pageManager = request.getResourceResolver().adaptTo(PageManager.class); Page page = pageManager.getContainingPage(request.getResource()); if (page != null) { rules.getGroups().forEach(group -> writeGroup(group, request.getResourceResolver(), page, writer)); rules.getSitemaps().stream().map(sitemap -> buildSitemapString(sitemap, request.getResourceResolver())).forEach(writer::println); if (!rules.getSitemapProperties().isEmpty()) { addRulesFromPages(page, request.getResourceResolver(), rules.getSitemapProperties(), writer, this::buildSitemapString); } } else { response.sendError(HttpServletResponse.SC_BAD_REQUEST); } }
Source:
<code>public void testOverridesWithAsgEnabledThenDisabled() { InstanceInfo myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.UP); <START> ((AwsInstanceRegistry) registry).getAwsAsgUtil().setStatus("ASG-YO-HO", false); <END> myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.OUT_OF_SERVICE); ((AwsInstanceRegistry) registry).getAwsAsgUtil().setStatus("ASG-YO-HO", true); myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.UP); }</code><technical_language>myInstance.getASGName() here? magic strings</technical_language>

Target:
public void testOverridesWithAsgEnabledThenDisabled() { InstanceInfo myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.UP); ((AwsInstanceRegistry) registry).getAwsAsgUtil().setStatus(myInstance.getASGName(), false); myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.OUT_OF_SERVICE); ((AwsInstanceRegistry) registry).getAwsAsgUtil().setStatus(myInstance.getASGName(), true); myInstance = createLocalUpInstanceWithAsg(LOCAL_REGION_INSTANCE_1_HOSTNAME); registerInstanceLocally(myInstance); verifyLocalInstanceStatus(myInstance.getId(), InstanceStatus.UP); }
Source:
<code>private void RemoveVdsFromCollection() { VDSReturnValue returnValue = Backend.getInstance().getResourceManager() <START> .RunVdsCommand(VDSCommandType.RemoveVds, new RemoveVdsVDSCommandParameters(getVdsId())); <END> }</code><technical_language>next rebase, returnValue is needed more, point</technical_language>

Target:
private void RemoveVdsFromCollection() { Backend.getInstance().getResourceManager() .RunVdsCommand(VDSCommandType.RemoveVds, new RemoveVdsVDSCommandParameters(getVdsId())); }
Source:
<code>protected Poller(Context context, int size) { <START> this.context = context; <END> selector = context.selector(); items = new PollItem[size]; timeout = -1L; next = 0; freeSlots = new LinkedList<Integer>(); }</code><technical_language>Add assert(context != null) nice checking fit current code</technical_language>

Target:
protected Poller(Context context, int size) { assert (context != null); this.context = context; selector = context.selector(); assert (selector != null); items = new PollItem[size]; timeout = -1L; next = 0; freeSlots = new LinkedList<Integer>(); }
Source:
<code>ByteBuffer wrap(ByteBuffer buffer) throws IOException; ByteBuffer unwrap(ByteBuffer wrappedBuffer) throws IOException; ByteBuffer ensureWrappedCapacity(int amount, ByteBuffer wrappedBuffer, BufferPool.BufferType bufferType); <START> ByteBuffer readAtLeast(int amount, ByteBuffer wrappedBuffer, Socket socket) <END> throws IOException; default void doneReadingDirectAck(ByteBuffer unwrappedBuffer) { doneReading(unwrappedBuffer); }</code><technical_language>This PR eliminates of NioFilter (interface) implementations: NioPlainEngine, NioSslEngine Geode. changes necessary classes tests</technical_language>

Target:
ByteBuffer wrap(ByteBuffer buffer) throws IOException; ByteBuffer unwrap(ByteBuffer wrappedBuffer) throws IOException; ByteBuffer ensureWrappedCapacity(int amount, ByteBuffer wrappedBuffer, BufferPool.BufferType bufferType); ByteBuffer readAtLeast(SocketChannel channel, int amount, ByteBuffer wrappedBuffer) throws IOException; default void doneReadingDirectAck(ByteBuffer unwrappedBuffer) { doneReading(unwrappedBuffer); }
Source:
<code>protected void executeCommand() { try { addVmToDb(); <START> VM vm = getVm(); <END> processImages(); if (getReturnValue().getTaskIdList().isEmpty()) { endVmRelatedOps(); } } catch (RuntimeException e) { MacPoolManager.getInstance().freeMacs(macsAdded); throw e; } setSucceeded(true); }</code><technical_language>removed vm.getImages() tasks check remove vm variable is</technical_language>

Target:
protected void executeCommand() { try { addVmToDb(); processImages(); if (getReturnValue().getVdsmTaskIdList().isEmpty()) { endVmRelatedOps(); } } catch (RuntimeException e) { MacPoolManager.getInstance().freeMacs(macsAdded); throw e; } setSucceeded(true); }
Source:
<code>private boolean managementNetworkModifiedCorrectly(VdsNetworkInterface iface) { <START> if (!Config.<String> GetValue(ConfigValues.ManagementNetwork).equals(iface.getNetworkName())) { <END> return true; } if (iface.getBootProtocol() == NetworkBootProtocol.STATIC_IP && vds.getHostName().matches(ValidationUtils.IP_PATTERN)) { return StringUtils.equals(vds.getHostName(), iface.getAddress()); } return true; }</code><technical_language>I this check inside, in if is calling this method. Also, extracting this method in NetworkUtils (there is a similar method isManagementNetwork(Network) extract a method isManagementNetwork(String) method from)</technical_language>

Target:
private boolean managementNetworkModifiedCorrectly(VdsNetworkInterface iface) { if (iface.getBootProtocol() == NetworkBootProtocol.STATIC_IP && vds.getHostName().matches(ValidationUtils.IP_PATTERN)) { return StringUtils.equals(vds.getHostName(), iface.getAddress()); } return true; }
Source:
<code>public synchronized void addLocation(URI location, TaskId remoteSourceTaskId) { requireNonNull(location, "location is null"); if (closed.get()) { return; } if (allClients.containsKey(location)) { return; } if (removedRemoteSourceTaskIds.contains(remoteSourceTaskId)) { return; } checkState(!noMoreLocations, "No more locations already set"); TaskResultClient resultClient; if (location.getScheme().toLowerCase(Locale.ENGLISH).startsWith("http")) { resultClient = new HttpTaskResultClient(httpClient, location); } else if (location.getScheme().toLowerCase(Locale.ENGLISH).startsWith("thrift")) { <START> resultClient = new ThriftTaskResultClient(driftClient, location, pageBufferClientCallbackExecutor); <END> } else { throw new PrestoException(GENERIC_INTERNAL_ERROR, "unsupported task result client scheme " + location.getScheme()); } PageBufferClient client = new PageBufferClient( resultClient, maxErrorDuration, acknowledgePages, location, new ExchangeClientCallback(), scheduler, pageBufferClientCallbackExecutor); allClients.put(location, client); checkState(taskIdToLocationMap.put(remoteSourceTaskId, location) == null, "Duplicate remoteSourceTaskId: " + remoteSourceTaskId); queuedClients.add(client); scheduleRequestIfNecessary(); }</code><technical_language>This pageBufferClientCallbackExecutor is ThriftTaskResultClient#acknowledgeResults. Curious HttpTaskRresultClient need executor for acknowledge result? dedicator executor for this (instead of reusing pageBufferClientCallbackExecutor? ) cc @tdcmeehan</technical_language>

Target:
public synchronized void addLocation(URI location, TaskId remoteSourceTaskId) { requireNonNull(location, "location is null"); if (closed.get()) { return; } if (allClients.containsKey(location)) { return; } if (removedRemoteSourceTaskIds.contains(remoteSourceTaskId)) { return; } checkState(!noMoreLocations, "No more locations already set"); RpcShuffleClient resultClient; switch (location.getScheme().toLowerCase(Locale.ENGLISH)) { case "http": case "https": resultClient = new HttpRpcShuffleClient(httpClient, location); break; case "thrift": resultClient = new ThriftRpcShuffleClient(driftClient, location); break; default: throw new PrestoException(GENERIC_INTERNAL_ERROR, "unsupported task result client scheme " + location.getScheme()); } PageBufferClient client = new PageBufferClient( resultClient, maxErrorDuration, acknowledgePages, location, new ExchangeClientCallback(), scheduler, pageBufferClientCallbackExecutor); allClients.put(location, client); checkState(taskIdToLocationMap.put(remoteSourceTaskId, location) == null, "Duplicate remoteSourceTaskId: " + remoteSourceTaskId); queuedClients.add(client); scheduleRequestIfNecessary(); }
Source:
<code>public PlanNodeCostEstimate visitAssignUniqueId(AssignUniqueId node, Void context) { <START> return cpuCost(getStats(node.getSource()).getOutputRowCount() * BigintType.BIGINT.getFixedSize()); <END> }</code><technical_language>nit: getStats(node) sufficient (instead of getStats(node.getSource())) -- provided stats rule for AssignUniqueId, need anyway</technical_language>

Target:
public PlanNodeCostEstimate visitAssignUniqueId(AssignUniqueId node, Void context) { return cpuCost(getStats(node).getOutputSizeInBytes(ImmutableList.of(node.getIdColumn()))); }
Source:
<code>public Event(String tenantId, String id, long ctime, String dataId, String category, String text, Map<String, String> context, Map<String, String> tags) { this.tenantId = tenantId; this.id = id; <START> this.ctime = ctime; <END> this.dataId = dataId; this.category = category; this.text = text; this.context = context; this.tags = tags; }</code><technical_language>I treat this do in Data, assign currentTime if ctime <= 0. bogus ctimes passed in</technical_language>

Target:
public Event(String tenantId, String id, long ctime, String dataId, String category, String text, Map<String, String> context, Map<String, String> tags) { this.tenantId = tenantId; this.id = id; this.ctime = (ctime <= 0) ? System.currentTimeMillis() : ctime; this.dataId = dataId; this.category = category; this.text = text; this.context = context; this.tags = tags; }
Source:
<code>private InterpreterResult executeQuery(String sql) throws IOException { HttpResponse response = prepareRequest(sql); String result = IOUtils.toString(response.getEntity().getContent(), "UTF-8"); int code = response.getStatusLine().getStatusCode(); if (code != 200) { StringBuilder errorMessage = new StringBuilder("Failed : HTTP error code " + code); logger.error("failed to execute query: " + result); try { <START> JSONObject content = new JSONObject(result); <END> if (content.has("exception")) { errorMessage.append(". Error message: " + content.getString("exception")); } } catch (JSONException e) { logger.error("Cannot parse json string ", e); if (code == 401) { errorMessage.append(". Error message: Unauthorized. This request requires " + "HTTP authentication. Please make sure your have set your credentials correctly."); } else { errorMessage.append(". Error message: " + result); } } return new InterpreterResult(InterpreterResult.Code.ERROR, errorMessage.toString()); } return new InterpreterResult(InterpreterResult.Code.SUCCESS, formatResult(result)); }</code><technical_language>if result is empty string</technical_language>

Target:
private InterpreterResult executeQuery(String sql) throws IOException { HttpResponse response = prepareRequest(sql); String result; try { int code = response.getStatusLine().getStatusCode(); result = IOUtils.toString(response.getEntity().getContent(), "UTF-8"); if (code != 200) { StringBuilder errorMessage = new StringBuilder("Failed : HTTP error code " + code); logger.error("Failed to execute query: " + result); KylinErrorResponse kylinErrorResponse = KylinErrorResponse.fromJson(result); if (kylinErrorResponse == null) { logger.error("Cannot get json from string: " + result); if (code == 401) { errorMessage.append(". Error message: Unauthorized. This request requires " + "HTTP authentication. Please make sure your have set your credentials" + " correctly."); } else { errorMessage.append(". Error message: " + result); } } else { String exception = kylinErrorResponse.getException(); logger.error("The exception is " + exception); errorMessage.append(". Error message: " + exception); } return new InterpreterResult(InterpreterResult.Code.ERROR, errorMessage.toString()); } } catch (NullPointerException | IOException e) { throw new IOException(e); } return new InterpreterResult(InterpreterResult.Code.SUCCESS, formatResult(result)); }
Source:
<code>private void handleMap(Entry entry, SourceFile.FileType fileType, Version version, Map<String, SourceFile> imports, Map<String, ?> map) { for (Map.Entry<String, ?> e : map.entrySet()) { final Object mapValue = e.getValue(); if (e.getKey().equalsIgnoreCase("$import") || e.getKey().equalsIgnoreCase("$include") || e.getKey().equalsIgnoreCase("$mixin") || e.getKey().equalsIgnoreCase("import") || e.getKey().equalsIgnoreCase("include") || e.getKey() <START> .equalsIgnoreCase("mixin")) { <END> if (mapValue instanceof String) { handleImport(fileType, version, imports, (String)mapValue); } } else if (e.getKey().equalsIgnoreCase("run")) { if (mapValue instanceof String) { handleImport(fileType, version, imports, (String)mapValue); } else if (mapValue instanceof Map) { handleMap(entry, fileType, version, imports, (Map)mapValue); } } else { handleMapValue(entry, fileType, version, imports, mapValue); } } }</code><technical_language>Making array of terms array.contains(e.getKey().toLowercase()) prettier</technical_language>

Target:
private void handleMap(Entry entry, SourceFile.FileType fileType, Version version, Map<String, SourceFile> imports, Map<String, ?> map) { Set<String> importKeywords = Sets.newHashSet("$import", "$include", "$mixin", "import", "include", "mixin"); for (Map.Entry<String, ?> e : map.entrySet()) { final Object mapValue = e.getValue(); if (importKeywords.contains(e.getKey().toLowerCase())) { if (mapValue instanceof String) { handleImport(fileType, version, imports, (String)mapValue); } } else if (e.getKey().equalsIgnoreCase("run")) { if (mapValue instanceof String) { handleImport(fileType, version, imports, (String)mapValue); } else if (mapValue instanceof Map) { handleMap(entry, fileType, version, imports, (Map)mapValue); } } else { handleMapValue(entry, fileType, version, imports, mapValue); } } }
Source:
<code>protected boolean needsValue() { boolean isRequired = getTaskAttribute().getMetaData().isRequired(); <START> boolean isReadOnly = getTaskAttribute().getMetaData().isReadOnly(); <END> return isRequired && !isReadOnly; }</code><technical_language>override this method check if getText() is empty</technical_language>

Target:
protected boolean needsValue() { boolean isRequired = getTaskAttribute().getMetaData().isRequired(); boolean isReadOnly = getTaskAttribute().getMetaData().isReadOnly(); boolean textIsEmpty = getText().getText().isEmpty(); return isRequired && !isReadOnly && textIsEmpty; }
Source:
<code>public boolean isWriting() { <START> return writing == true || (!reading && isSimpleTargetType()); <END> }</code><technical_language>simplify to... return writing || (!reading && isSimpleTargetType());</technical_language>

Target:
public boolean isWriting() { return writing || (!reading && isSimpleTargetType()); }
Source:
<code>private void setError(Throwable error) { response.setStatusCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()); response.setStatusMessage(HttpResponseStatus.INTERNAL_SERVER_ERROR.reasonPhrase()); <START> response.headers().add("X-Exception", String.valueOf(error.getMessage())); END> response.headers().add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); EngineErrorResponse errorResponse = new EngineErrorResponse(); errorResponse.setResponseCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()); errorResponse.setMessage(error.getMessage()); errorResponse.setTrace(error); response.write(Json.encode(errorResponse)); log.debug("Finished setting error"); if (!response.ended()) response.end(); }</code><technical_language>this X-Gateway-Error instead of X-Exception</technical_language>

Target:
private void setError(Throwable error) { response.setStatusCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()); response.setStatusMessage(HttpResponseStatus.INTERNAL_SERVER_ERROR.reasonPhrase()); response.headers().add("X-Gateway-Error", String.valueOf(error.getMessage())); response.headers().add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); EngineErrorResponse errorResponse = new EngineErrorResponse(); errorResponse.setResponseCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()); errorResponse.setMessage(error.getMessage()); errorResponse.setTrace(error); response.write(Json.encode(errorResponse)); log.debug("Finished setting error"); if (!response.ended()) response.end(); }
Source:
<code>public void start() throws ResourceException { <START> if (started.get()) { <END> return; } final ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(classLoader); resourceAdapter.endpointActivation(endpointFactory, activationSpec); Thread.currentThread().setContextClassLoader(oldCl); logger.info("Activated endpoint for " + beanContext.getDeploymentID()); started.set(true); }</code><technical_language>compareAndSet no? 2 threads false call activation is want. wdyt? (indeed stop is consistent issue)</technical_language>

Target:
public void start() throws ResourceException { if (! started.compareAndSet(false, true)) { return; } final ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(classLoader); resourceAdapter.endpointActivation(endpointFactory, activationSpec); logger.info("Activated endpoint for " + beanContext.getDeploymentID()); } finally { Thread.currentThread().setContextClassLoader(oldCl); } }
Source:
<code>public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) { <START> max = truncator.truncateMax(Binary.fromReusedByteArray(maxBytes), truncateLength); <END> min = truncator.truncateMin(Binary.fromReusedByteArray(minBytes), truncateLength); this.markAsNotEmpty(); }</code><technical_language>This method is invoked read values a file. sense truncating values in read path</technical_language>

Target:
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) { max = Binary.fromReusedByteArray(maxBytes); min = Binary.fromReusedByteArray(minBytes); this.markAsNotEmpty(); }
Source:
<code>private List<CustomAction> customActions() { List<CustomAction> actions = new LinkedList<>(); <START> CustomAction tra = new CustomAction("org.finra.datagenerator", "positive", Transform.class); <END> actions.add(tra); CustomAction neg = new CustomAction("org.finra.datagenerator", "negative", NegativeAssign.class); actions.add(neg); CustomAction pos = new CustomAction("org.finra.datagenerator", "positive", Assign.class); actions.add(pos); return actions; }</code><technical_language>Action "tra" called "transform"</technical_language>

Target:
private List<CustomAction> customActions() { List<CustomAction> actions = new LinkedList<>(); CustomAction tra = new CustomAction("org.finra.datagenerator", "transform", Transform.class); actions.add(tra); CustomAction neg = new CustomAction("org.finra.datagenerator", "negative", NegativeAssign.class); actions.add(neg); return actions; }
Source:
<code>private void addGroupKey(int grpId, GroupKeyEncrypted key) { try { synchronized (metaStorageMux) { <START> withMasterKeyChangeReadLock(() -> grpKeys.changeActiveKey(grpId, key)); <END> writeToMetaStore(grpId, true, false); } } catch (IgniteCheckedException e) { throw new IgniteException("Failed to write cache group encryption key [grpId=" + grpId + ']', e); } }</code><technical_language>is deadlock doChangeMasterKey method in order of locks acquire</technical_language>

Target:
void addGroupKey(int grpId, GroupKeyEncrypted key) { synchronized (metaStorageMux) { try { grpKeys.addKey(grpId, key); writeGroupKeysToMetaStore(grpId, grpKeys.getAll(grpId)); } catch (IgniteCheckedException e) { throw new IgniteException("Failed to write cache group encryption key [grpId=" + grpId + ']', e); } } }
Source:
<code>public SummaryCollection processFiles(FileSystemResolver volMgr, Map<String,List<TRowRange>> files, BlockCache summaryCache, BlockCache indexCache, ExecutorService srp) { SummaryCollection fileSummaries = new SummaryCollection(); List<Future<SummaryCollection>> futures = new ArrayList<>(); for (Entry<String,List<TRowRange>> entry : files.entrySet()) { Future<SummaryCollection> future = srp.submit(() -> { List<RowRange> rrl = Lists.transform(entry.getValue(), RowRange::new); return getSummaries(volMgr, entry.getKey(), rrl, summaryCache, indexCache); }); futures.add(future); } for (Future<SummaryCollection> future : futures) { try { fileSummaries.merge(future.get(), factory); } catch (ExecutionException | InterruptedException e) { <START> throw new RuntimeException(e); <END> } } return fileSummaries; }</code><technical_language>a good citizen re-set interrupted state catching InterruptedExeption</technical_language>

Target:
public Future<SummaryCollection> processFiles(FileSystemResolver volMgr, Map<String,List<TRowRange>> files, BlockCache summaryCache, BlockCache indexCache, ExecutorService srp) { List<CompletableFuture<SummaryCollection>> futures = new ArrayList<>(); for (Entry<String,List<TRowRange>> entry : files.entrySet()) { futures.add(CompletableFuture.supplyAsync(() -> { List<RowRange> rrl = Lists.transform(entry.getValue(), RowRange::new); return getSummaries(volMgr, entry.getKey(), rrl, summaryCache, indexCache); }, srp)); } return CompletableFutureUtil.merge(futures, (sc1, sc2) -> SummaryCollection.merge(sc1, sc2, factory), SummaryCollection::new); }
Source:
<code>public void loadVmFromOva() { clearForLoad(); if (!validateOvaConfiguration()) { return; } startProgress(); AsyncDataProvider.getInstance().getVmFromOva(new AsyncQuery<>(returnValue -> { if (returnValue.getSucceeded()) { Map<VM, String> vmToOva = returnValue.getReturnValue(); List<VM> vms = <START> new ArrayList<>(vmToOva.keySet()); <END> vmNameToOva = vms.stream().collect(Collectors.toMap(VM::getName, vm -> vmToOva.get(vm))); updateVms(vms); } else { setError(messages.failedToLoadOva(getOvaPath().getEntity())); } stopProgress(); }), getHosts().getSelectedItem().getId(), getOvaPath().getEntity()); }</code><technical_language>If change updateVms() parameter type Collection<T>, need create a list set</technical_language>

Target:
public void loadVmFromOva() { clearForLoad(); if (!validateOvaConfiguration()) { return; } startProgress(); AsyncDataProvider.getInstance().getVmFromOva(new AsyncQuery<>(returnValue -> { if (returnValue.getSucceeded()) { Map<VM, String> vmToOva = returnValue.getReturnValue(); vmNameToOva = vmToOva.entrySet().stream() .collect(Collectors.toMap(e -> e.getKey().getName(), Entry::getValue)); updateVms(vmToOva.keySet()); } else { setError(messages.failedToLoadOva(getOvaPath().getEntity())); } stopProgress(); }), getHosts().getSelectedItem().getId(), getOvaPath().getEntity()); }
Source:
<code>public void shouldReturnTaskInformation() throws IOException { String sourceIndex = "test_source_index"; String destIndex = "test_dest_index"; String documentType = "test_type"; String documentId = "test_id"; createIndex(sourceIndex); index(sourceIndex, documentType, documentId, "{}"); flushAndRefresh(sourceIndex); ImmutableMap<String, Object> source = ImmutableMap.of("index", sourceIndex); ImmutableMap<String, Object> dest = ImmutableMap.of("index", destIndex); Reindex reindex = new Reindex.Builder(source, dest).refresh(true).waitForCompletion(false).build(); JestResult result = client.execute(reindex); <START> Object task = result.getValue("task"); <END> assertNotNull(task); JestResult taskInformation = client.execute(new TasksInformation.Builder(String.valueOf(task)).build()); Object completed = taskInformation.getValue("completed"); assertNotNull(completed); }</code><technical_language>Object</technical_language>

Target:
public void shouldReturnTaskInformation() throws IOException { String sourceIndex = "test_source_index"; String destIndex = "test_dest_index"; String documentType = "test_type"; String documentId = "test_id"; createIndex(sourceIndex); index(sourceIndex, documentType, documentId, "{}"); flushAndRefresh(sourceIndex); ImmutableMap<String, Object> source = ImmutableMap.of("index", sourceIndex); ImmutableMap<String, Object> dest = ImmutableMap.of("index", destIndex); Reindex reindex = new Reindex.Builder(source, dest).refresh(true).waitForCompletion(false).build(); JestResult result = client.execute(reindex); String task = (String) result.getValue("task"); assertNotNull(task); JestResult taskInformation = client.execute(new TasksInformation.Builder().task(task).build()); Boolean completed = (Boolean) taskInformation.getValue("completed"); assertNotNull(completed); }
Source:
<code>public String[] formatProperties() { List<String> ret = new ArrayList<>(); ret.add("'format'='json'"); if (configure) { ret.add("'format.fail-on-missing-field'='true'"); <START> ret.add("'format.ignore-parse-errors'='false'"); <END> } return ret.toArray(new String[0]); }</code><technical_language>default of fail-on-missing-field is false, set true</technical_language>

Target:
public String[] formatProperties() { List<String> ret = new ArrayList<>(); ret.add("'format'='json'"); ret.add("'format.ignore-parse-errors'='true'"); return ret.toArray(new String[0]); }
Source:
<code>public void performEngineNicsHealthCheck() { List<NetworkInterface> nicsToCheck = networkInterfacesToCheck(); log.debug("Performing engine NICs health check on: " + nicsToString(nicsToCheck)); checkNicsAndUpdateEngineStatus(nicsToCheck); <START> log.debug("Health check done, engine NICs are {}.", (engineNicHealthCache.isAllNicHealthy() ? "healthy" : "unhealthy")); <END> }</code><technical_language>Please remove unnecessary bracket ternary operator</technical_language>

Target:
public void performEngineNicsHealthCheck() { List<NetworkInterface> nicsToCheck = networkInterfacesToCheck(); log.debug("Performing engine NICs health check on: " + StringUtils.join(toNicsDisplayNames(nicsToCheck), ", ")); checkNicsAndUpdateEngineStatus(nicsToCheck); log.debug("Health check done, engine NICs are {}.", engineNicHealthCache.isAllNicHealthy() ? "healthy" : "unhealthy"); }