auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>} else if (TARGET_NAME.equals(KuraConstants.Reliagate_20_25.getTargetName())) { baseGpio = -1; try { baseGpio = getBaseGpio(); } catch (KuraException e) { logger.warn("BaseGpio fetch failed!", e); } if (baseGpio != -1) { String gpioIndex = Integer.toString(baseGpio + 30); <START> String gpioPath = BASE_GPIO_PATH + gpioIndex; <END> String gpioDirectionPath = gpioPath + GPIO_DIRECTION_SUFFIX_PATH; try { exportGpio(gpioIndex, gpioPath); setGpioDirection(gpioDirectionPath, GPIO_DIRECTION); } catch (IOException e) { logger.warn(FAILED_INITIALIZE_GPIO_MSG, gpioIndex, e); } gpioIndex = Integer.toString(baseGpio + 23); gpioPath = BASE_GPIO_PATH + gpioIndex; gpioDirectionPath = gpioPath + GPIO_DIRECTION_SUFFIX_PATH; try { exportGpio(gpioIndex, gpioPath); setGpioDirection(gpioDirectionPath, GPIO_DIRECTION); } catch (IOException e) { logger.warn(FAILED_INITIALIZE_GPIO_MSG, gpioIndex, e); } gpioIndex = Integer.toString(baseGpio + 35); gpioPath = BASE_GPIO_PATH + gpioIndex; gpioDirectionPath = gpioPath + GPIO_DIRECTION_SUFFIX_PATH; try { exportGpio(gpioIndex, gpioPath); setGpioDirection(gpioDirectionPath, GPIO_DIRECTION); } catch (IOException e) { logger.warn(FAILED_INITIALIZE_GPIO_MSG, gpioIndex, e); } } }</code><technical_language>Do try externalize block of codes start line 93 (96 of new code), 103 (106) 114 (117) a single method a parameter (the offset)</technical_language>

Target:
} else if (TARGET_NAME.equals(KuraConstants.Reliagate_20_25.getTargetName())) { baseGpio = -1; try { baseGpio = getBaseGpio(); } catch (KuraException e) { logger.warn("BaseGpio fetch failed!", e); } if (baseGpio != -1) { exportGpio(30); exportGpio(23); exportGpio(35); } }
Source:
<code>protected Map<String, ServerImpl> getServersWithFilledPorts(final String externalHostame, final String internalHostname, final Map<String, List<PortBinding>> exposedPorts) { final HashMap<String, ServerImpl> servers = new LinkedHashMap<>(); for (Map.Entry<String, List<PortBinding>> portEntry : exposedPorts.entrySet()) { String portProtocol = portEntry.getKey(); String externalPort = portEntry.getValue().get(0).getHostPort(); servers.put(portProtocol, new ServerImpl(null, null, externalHostame + ":" + externalPort, null, externalPort, <START> new ServerPropertiesImpl(null, internalHostname + ":" + externalPort, null))); <END> } return servers; }</code><technical_language>Please ensure null treated string "null"</technical_language>

Target:
protected Map<String, ServerImpl> getServersWithFilledPorts(final String externalHostame, final String internalHostname, final Map<String, List<PortBinding>> exposedPorts) { final HashMap<String, ServerImpl> servers = new LinkedHashMap<>(); for (Map.Entry<String, List<PortBinding>> portEntry : exposedPorts.entrySet()) { String portProtocol = portEntry.getKey(); String externalPort = portEntry.getValue().get(0).getHostPort(); servers.put(portProtocol, new ServerImpl(null, null, externalHostame + ":" + externalPort, null, new ServerPropertiesImpl(null, internalHostname + ":" + externalPort, null))); } return servers; }
Source:
<code>protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) { ITmfTrace trace = getTrace(); if (isSelection || (start == end) || trace == null) { return null; } <START> UstMemoryUsageDataProvider provider = DataProviderManager.getInstance().getDataProvider(trace, <END> UstMemoryUsageDataProvider.ID, UstMemoryUsageDataProvider.class); if (provider == null) { return null; } TmfModelResponse<@NonNull List<@NonNull MemoryUsageTreeModel>> response = provider.fetchTree(new TimeQueryFilter(start, end, 2), null); List<@NonNull MemoryUsageTreeModel> model = response.getModel(); if (model == null) { return null; } Map<Long, TmfTreeViewerEntry> map = new HashMap<>(); TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); map.put(-1L, root); for (MemoryUsageTreeModel m : model) { MemoryUsageEntry entry = new MemoryUsageEntry(m); map.put(m.getId(), entry); TmfTreeViewerEntry parent = map.get(m.getParentId()); if (parent != null) { parent.addChild(entry); } } return root; }</code><technical_language>ITmfTreeXYDataProvider<@NonNull MemoryUsageTreeModel> provider = DataProviderManager.getInstance().getDataProvider(trace, UstMemoryUsageDataProvider.ID, ITmfTreeXYDataProvider.class);</technical_language>

Target:
protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) { ITmfTrace trace = getTrace(); if (isSelection || (start == end) || trace == null) { return null; } ITmfTreeXYDataProvider<@NonNull MemoryUsageTreeModel> provider = DataProviderManager.getInstance().getDataProvider(trace, UstMemoryUsageDataProvider.ID, ITmfTreeXYDataProvider.class); if (provider == null) { return null; } TmfModelResponse<@NonNull List<@NonNull MemoryUsageTreeModel>> response = provider.fetchTree(new TimeQueryFilter(start, end, 2), null); List<@NonNull MemoryUsageTreeModel> model = response.getModel(); if (model == null) { return null; } Map<Long, TmfTreeViewerEntry> map = new HashMap<>(); TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); map.put(-1L, root); for (MemoryUsageTreeModel m : model) { MemoryUsageEntry entry = new MemoryUsageEntry(m); map.put(m.getId(), entry); TmfTreeViewerEntry parent = map.get(m.getParentId()); if (parent != null) { parent.addChild(entry); } } return root; }
Source:
<code>private void handleStandbyContainerStop(String standbyContainerID, String resourceID, String preferredHost, ContainerAllocator containerAllocator, Duration preferredHostRetryDelay) { Optional<StandbyContainerManager.FailoverMetadata> failoverMetadata = this.checkIfUsedForFailover(resourceID); if (failoverMetadata.isPresent()) { String activeContainerID = failoverMetadata.get().activeContainerID; String standbyContainerHostname = failoverMetadata.get().getStandbyContainerHostname(resourceID); log.info("Requesting resource for active container on host {}, and backup container on any host", activeContainerID, standbyContainerHostname, standbyContainerID); SamzaResourceRequest resourceRequestForActive = <START> containerAllocator.getResourceRequestWithDelay(activeContainerID, standbyContainerHostname, preferredHostRetryDelay); <END> failoverMetadata.get().recordResourceRequest(resourceRequestForActive); containerAllocator.issueResourceRequest(resourceRequestForActive); containerAllocator.requestResource(standbyContainerID, ResourceRequestState.ANY_HOST, faultDomainManager.getAllowedFaultDomainsForSchedulingContainer(standbyContainerHostname)); } else { log.info("Issuing request for standby container on host {}, since this is not for a failover", standbyContainerID, preferredHost); containerAllocator.requestResourceWithDelay(standbyContainerID, preferredHost, preferredHostRetryDelay); } }</code><technical_language>some new extra spaces sneaked in :)</technical_language>

Target:
private void handleStandbyContainerStop(String standbyContainerID, String resourceID, String preferredHost, ContainerAllocator containerAllocator, Duration preferredHostRetryDelay) { Optional<StandbyContainerManager.FailoverMetadata> failoverMetadata = this.checkIfUsedForFailover(resourceID); if (failoverMetadata.isPresent()) { String activeContainerID = failoverMetadata.get().activeContainerID; String standbyContainerHostname = failoverMetadata.get().getStandbyContainerHostname(resourceID); log.info("Requesting resource for active container on host {}, and backup container on any host", activeContainerID, standbyContainerHostname, standbyContainerID); SamzaResourceRequest resourceRequestForActive = containerAllocator.getResourceRequestWithDelay(activeContainerID, standbyContainerHostname, preferredHostRetryDelay); failoverMetadata.get().recordResourceRequest(resourceRequestForActive); containerAllocator.issueResourceRequest(resourceRequestForActive); requestResource(containerAllocator, standbyContainerID, ResourceRequestState.ANY_HOST, Duration.ZERO, standbyContainerHostname); } else { log.info("Issuing request for standby container on host {}, since this is not for a failover", standbyContainerID, preferredHost); String activeContainerHost = getActiveContainerHost(standbyContainerID) .orElse(null); requestResource(containerAllocator, standbyContainerID, preferredHost, preferredHostRetryDelay, activeContainerHost); } }
Source:
<code>private void writeObject(ObjectOutputStream oos) throws IOException { Channel target = getChannelForSerialization(); <START> if(channel!=target) { <END> throw new IllegalStateException("Can't send a remote FilePath to a different remote channel"); } oos.defaultWriteObject(); oos.writeBoolean(channel==null); }</code><technical_language>Note code serialize a FilePath for some other reason (basically saving remote) is start failing now. is a good thing. (Pipeline program.dat FilePathPickle instead.)</technical_language>

Target:
private void writeObject(ObjectOutputStream oos) throws IOException { Channel target = getChannelForSerialization(); if (channel != null && channel != target) { throw new IllegalStateException("Can't send a remote FilePath to a different remote channel (current=" + channel + ", target=" + target + ")"); } oos.defaultWriteObject(); oos.writeBoolean(channel==null); }
Source:
<code>private List<String> getAvailableContainerIds() { try { <START> CuratorFramework client = zkConnection.getClient(); <END> return client.getChildren().forPath(Paths.CONTAINERS); } catch (Exception e) { throw ZooKeeperUtils.wrapThrowable(e); } }</code><technical_language>need assign client a var once; collapse 2 lines 1 instead</technical_language>

Target:
private List<String> getAvailableContainerIds() { try { return zkConnection.getClient().getChildren().forPath(Paths.CONTAINERS); } catch (Exception e) { throw ZooKeeperUtils.wrapThrowable(e); } }
Source:
<code>public void testPreDestroySuppressedExceptionHandling() throws Exception { Injector injector = Guice.createInjector( Stage.PRODUCTION, new LifeCycleModule(), binder -> { binder.bind(DependentInstance.class).in(Scopes.SINGLETON); binder.bind(DestroyExceptionInstance.class).in(Scopes.SINGLETON); }); LifeCycleManager lifeCycleManager = injector.getInstance(LifeCycleManager.class); lifeCycleManager.start(); assertEquals(stateLog, ImmutableList.of("postDependentInstance")); try { lifeCycleManager.stopWithoutFailureLogging(); fail("Expected exception to be thrown"); } catch (LifeCycleStopException e) { assertEquals(e.getSuppressed().length, 2, "Expected two suppressed exceptions"); Set<String> suppressedMessages = Arrays.stream(e.getSuppressed()) .map(Throwable::getMessage) .collect(Collectors.toSet()); assertEquals(ImmutableSet.copyOf(suppressedMessages), ImmutableSet.of("preDestroyExceptionOne", "preDestroyExceptionTwo")); } <START> catch (Exception e) { <END> fail("Expected LifeCycleStopException to be thrown, found: " + e.getClass()); } assertEquals(ImmutableSet.copyOf(stateLog), ImmutableSet.of( "postDependentInstance", "preDestroyExceptionOne", "preDestroyExceptionTwo", "preDependentInstance")); }</code><technical_language>remove this catch block. exception propagate fail test, normal behavior, provide full stack trace of unexpected exception</technical_language>

Target:
public void testPreDestroySuppressedExceptionHandling() { Injector injector = Guice.createInjector( Stage.PRODUCTION, new LifeCycleModule(), binder -> { binder.bind(DependentInstance.class).in(Scopes.SINGLETON); binder.bind(DestroyExceptionInstance.class).in(Scopes.SINGLETON); }); LifeCycleManager lifeCycleManager = injector.getInstance(LifeCycleManager.class); lifeCycleManager.start(); assertEquals(stateLog, ImmutableList.of("postDependentInstance")); try { lifeCycleManager.stopWithoutFailureLogging(); fail("Expected exception to be thrown"); } catch (LifeCycleStopException e) { assertEquals(e.getSuppressed().length, 2, "Expected two suppressed exceptions"); Set<String> suppressedMessages = Arrays.stream(e.getSuppressed()) .map(Throwable::getMessage) .collect(Collectors.toSet()); assertEquals(ImmutableSet.copyOf(suppressedMessages), ImmutableSet.of("preDestroyExceptionOne", "preDestroyExceptionTwo")); } assertEquals(ImmutableSet.copyOf(stateLog), ImmutableSet.of( "postDependentInstance", "preDestroyExceptionOne", "preDestroyExceptionTwo", "preDependentInstance")); }
Source:
<code>public synchronized void clear() { <START> this.store.clear(); <END> this.storeKeys.clear(); }</code><technical_language>thing, while cleaning, other thread store other key</technical_language>

Target:
public void clear() { synchronized (store) { this.store.clear(); this.storeKeys.clear(); } }
Source:
<code>List<DateRange> findDates(WMS wms, CoverageInfo coverage, List<Object> times) throws IOException { TreeSet<Date> availableDates = new TreeSet<Date>(); final boolean isRange = times.get(0) instanceof DateRange; for (Object time : times) { TreeSet<Object> foundTimes = wms.queryCoverageTimes( coverage, getAsRange(time, isRange), Query.DEFAULT_MAX); foundTimes .stream() <START> .sequential() <END> .forEach( d -> { Date date = (Date) d; if (!availableDates.contains(date)) { availableDates.add(date); } }); } return availableDates .stream() .map(date -> new DateRange(date, date)) .collect(Collectors.toList()); }</code><technical_language>Give populating a treeset, sequential</technical_language>

Target:
List<DateRange> findDates(WMS wms, CoverageInfo coverage, List<Object> times) throws IOException { TreeSet<Date> availableDates = wms.queryCoverageNearestMatchTimes(coverage, times); return availableDates .stream() .map(date -> new DateRange(date, date)) .collect(Collectors.toList()); }
Source:
<code>public int getCount() { return (int) getValue(countStr); <START> } <END></code><technical_language>casting "int" ? is a "long" return a "long" handle overflow some</technical_language>

Target:
public long getCount() { return getValue(countStr); }
Source:
<code><START> protected abstract void setUnregisteredEntityAndImages(String ovfData) throws OvfReaderException; <END> @Override protected boolean validate() { if (!validate(entityExists())) { return false; } StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); if (!validate(validator.isDomainExistAndActive())) { return false; } if (getStorageDomain().getStorageDomainType() != StorageDomainType.Data) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); } return true; }</code><technical_language>Suggest gather 5 "protected abstract" methods top of file, data members, other methods</technical_language>

Target:
protected abstract void setUnregisteredEntityAndImages(String ovfData) throws OvfReaderException; protected abstract boolean isUnregisteredEntityExists(); protected abstract EngineMessage getEntityNotExistsMessage(); protected abstract EngineMessage getRemoveAction(); public RemoveUnregisteredEntityCommand(T parameters, CommandContext cmdContext) { super(parameters, cmdContext); setStorageDomainId(parameters.getStorageDomainId()); }
Source:
<code><START> public static String toAlleleString(final int copyNumberState) { <END> return "<" + String.valueOf(copyNumberState) + ">"; }</code><technical_language>This is called in constructor, consider a StringBuilder here</technical_language>

Target:
private static String toAlleleString(final int copyNumberState) { return "<" + String.valueOf(copyNumberState) + ">"; }
Source:
<code>private List<File> generateFindTileMetricsExpected(Path baseDir, List<Integer> populatedCycleDirs, boolean baseMetricsFile) { List<File> expected = new ArrayList<>(); if (baseMetricsFile) { expected.add(new File( baseDir .resolve(TileMetricsUtil.INTEROP_SUBDIRECTORY_NAME) <START> .resolve(TileMetricsUtil.TILE_METRICS_OUT_FILE_NAME).toUri()) <END> ); } if (populatedCycleDirs.size() > 0) { Path baseOpDir = getBaseOpDir(baseDir); populatedCycleDirs.stream().sorted(Comparator.reverseOrder()).forEach(i -> expected.add(new File( baseOpDir .resolve("C" + i + ".1") .resolve(TileMetricsUtil.TILE_METRICS_OUT_FILE_NAME) .toUri() )) ); } return expected; }</code><technical_language>new File(<path expression>.toUri() instead of <path expression>.toFile()</technical_language>

Target:
private List<File> generateFindTileMetricsExpected(Path baseDir, List<Integer> populatedCycleDirs, boolean baseMetricsFile) { List<File> expected = new ArrayList<>(); if (baseMetricsFile) { expected.add( baseDir .resolve(TileMetricsUtil.INTEROP_SUBDIRECTORY_NAME) .resolve(TileMetricsUtil.TILE_METRICS_OUT_FILE_NAME).toFile() ); } if (populatedCycleDirs.size() > 0) { Path baseOpDir = getBaseOpDir(baseDir); populatedCycleDirs.stream().sorted(Comparator.reverseOrder()).forEach(i -> expected.add( baseOpDir .resolve("C" + i + ".1") .resolve(TileMetricsUtil.TILE_METRICS_OUT_FILE_NAME) .toFile() ) ); } return expected; }
Source:
<code>public void testCompareEqualNames(final SAMRecord record1, final SAMRecord record2, final int sign) throws Exception { final int comparisonResult = COMPARATOR.compare(record1, record2); <START> switch (sign) { <END> case -1: Assert.assertTrue(comparisonResult < 0); break; case 0: Assert.assertEquals(comparisonResult, 0); break; case 1: Assert.assertTrue(comparisonResult > 0); break; default: throw new IllegalArgumentException("Invalid sign: " + sign); } }</code><technical_language>(clean switch)</technical_language>

Target:
public void testCompareEqualNames(final SAMRecord record1, final SAMRecord record2, final int sign) throws Exception { final int comparisonResult = COMPARATOR.compare(record1, record2); Assert.assertEquals(Integer.signum(comparisonResult),sign); }
Source:
<code>public Response act(final Request req) throws IOException { final String email = new RqForm.Smart( new RqForm.Base(req) ).single("email"); final Alias alias = new RqAlias(this.base, req).alias(); final Response res; if (this.local) { <START> alias.email(combinedEmails(alias, email)); <END> res = new RsForward( new RsFlash( String.format( "Email changed to \"%s\". Not verified yet.", email ) ) ); } else { final String code = URLEncoder.encode( TkSaveEmail.ENC.encrypt( String.format( "%s:%s:%s", new RqAuth(req).identity().urn(), alias.name(), email ) ), "UTF-8" ); final String link = String.format( "%semverify/%s", new RqHref.Smart(new RqHref.Base(req)).home().bare(), code ); try { alias.email(combinedEmails(alias, email), link); } catch (final IOException ex) { throw new RsFailure(ex); } res = new RsForward( new RsFlash( String.format( "Email changed to \"%s\". The verification " + "link sent to this address.", email ) ) ); } return res; }</code><technical_language>@CarlosGines Please address in a static TkSaveEmail.combinedEmails()</technical_language>

Target:
public Response act(final Request req) throws IOException { final String email = new RqForm.Smart( new RqForm.Base(req) ).single("email"); final Alias alias = new RqAlias(this.base, req).alias(); final Response res; if (this.local) { alias.email(email); res = new RsForward( new RsFlash( String.format("Email changed to \"%s\".", email) ) ); } else { final String code = URLEncoder.encode( TkSaveEmail.ENC.encrypt( String.format( "%s:%s:%s", new RqAuth(req).identity().urn(), alias.name(), email ) ), "UTF-8" ); final String link = String.format( "%semverify/%s", new RqHref.Smart(new RqHref.Base(req)).home().bare(), code ); final String old; if (alias.email().contains("!")) { old = alias.email().substring(0, alias.email().indexOf('!')); } else { old = alias.email(); } try { alias.email(String.format("%s!%s", old, email), link); } catch (final IOException ex) { throw new RsFailure(ex); } res = new RsForward( new RsFlash( String.format( "Email changed to \"%s\". The verification " + "link sent to this address.", email ) ) ); } return res; }
Source:
<code>public void testArrayConcat() { <START> ImmutableList.Builder<Integer> expectedArray = ImmutableList.builder(); <END> IntStream.range(0, 253).forEach(i -> expectedArray.add(1)); assertFunction("CONCAT(" + Joiner.on(", ").join(nCopies(253, "array[1]")) + ")", new ArrayType(INTEGER), expectedArray.build()); assertNotSupported( "CONCAT(" + Joiner.on(", ").join(nCopies(254, "array[1]")) + ")", "Too many arguments for vararg function"); }</code><technical_language>Remove replace nCopies(253, 1)</technical_language>

Target:
public void testArrayConcat() { assertFunction("CONCAT(" + Joiner.on(", ").join(nCopies(253, "array[1]")) + ")", new ArrayType(INTEGER), nCopies(253, 1)); assertNotSupported( "CONCAT(" + Joiner.on(", ").join(nCopies(254, "array[1]")) + ")", "Too many arguments for vararg function"); }
Source:
<code><START> public <T extends DistributedObject> T getDistributedObject(@Nonnull String serviceName, <END> @Nonnull String name, boolean remote) { return (T) proxyManager.getOrCreateProxy(serviceName, name, remote); }</code><technical_language>this method need public</technical_language>

Target:
private <T extends DistributedObject> T getDistributedObject(@Nonnull String serviceName, @Nonnull String name, boolean remote) { if (remote) { return (T) proxyManager.getOrCreateProxy(serviceName, name); } return (T) proxyManager.getOrCreateLocalProxy(serviceName, name); }
Source:
<code>public double rate( PricingEnvironment env, OvernightCompoundedRateObservation observation, LocalDate startDate, LocalDate endDate) { ObservationDetails details = new ObservationDetails(env, observation); <START> return details.calculateRate(); <END> }</code><technical_language>Suggest inlining local variable new ObservationDetails(env, observation).calculateRate()</technical_language>

Target:
public double rate( PricingEnvironment env, OvernightCompoundedRateObservation observation, LocalDate startDate, LocalDate endDate) { return new ObservationDetails(env, observation).calculateRate(); }
Source:
<code>public void createFeaturesSuccessiveTokensTest() throws IOException { final String[] testSentence = new String[] {"he", "went", "with", "you", "in", "town"}; ResourceAsStreamFactory stream = new ResourceAsStreamFactory( getClass(), "/opennlp/tools/formats/brown-cluster.txt"); <START> <END> BrownCluster brownCluster = new BrownCluster(stream.createInputStream()); AdaptiveFeatureGenerator generator = new BrownBigramFeatureGenerator(brownCluster); List<String> features = new ArrayList<>(); generator.createFeatures(features, testSentence, 3, null); Assert.assertEquals(3, features.size()); Assert.assertTrue(features.contains("pbrowncluster,browncluster=0101,0010")); Assert.assertTrue(features.contains("pbrowncluster,browncluster=01010,00101")); Assert.assertTrue(features.contains("browncluster,nbrowncluster=0010,0000")); }</code><technical_language>refactor a setUp() method repeat for test</technical_language>

Target:
public void createFeaturesSuccessiveTokensTest() throws IOException { final String[] testSentence = new String[] {"he", "went", "with", "you", "in", "town"}; List<String> features = new ArrayList<>(); generator.createFeatures(features, testSentence, 3, null); Assert.assertEquals(3, features.size()); Assert.assertTrue(features.contains("pbrowncluster,browncluster=0101,0010")); Assert.assertTrue(features.contains("pbrowncluster,browncluster=01010,00101")); Assert.assertTrue(features.contains("browncluster,nbrowncluster=0010,0000")); }
Source:
<code>public void clientValidated(ClientDescriptor clientDescriptor) { if (managementRegistry != null) { LOGGER.trace("clientValidated({})", clientDescriptor); ClusterTierClientStateBinding clientStateBinding = new ClusterTierClientStateBinding(clientDescriptor, new ClusterTierClientState(storeIdentifier, true)); managementRegistry.unregister(clientStateBinding); managementRegistry.registerAndRefresh(clientStateBinding); <START> managementRegistry.pushServerEntityNotification(clientStateBinding, EHCACHE_SERVER_STORE_ATTACHED.name()); <END> } }</code><technical_language>here: managementRegistry.registerAndRefresh(clientStateBinding) .thenRun(() -> managementRegistry.pushServerEntityNotification(clientStateBinding, EHCACHE_SERVER_STORE_ATTACHED.name())); }</technical_language>

Target:
public void clientValidated(ClientDescriptor clientDescriptor) { if (managementRegistry != null) { LOGGER.trace("clientValidated({})", clientDescriptor); ClusterTierClientStateBinding clientStateBinding = new ClusterTierClientStateBinding(clientDescriptor, new ClusterTierClientState(storeIdentifier, true)); managementRegistry.unregister(clientStateBinding); managementRegistry.registerAndRefresh(clientStateBinding).thenRun(() -> managementRegistry.pushServerEntityNotification(clientStateBinding, EHCACHE_SERVER_STORE_ATTACHED.name())); } }
Source:
<code>protected String[] getConfigurationStrings(Collection<IConfigAdvice> configAdvice) { String configurationData = ""; String unconfigurationData = ""; Set<String> properties = new HashSet<String>(); for (IConfigAdvice advice : configAdvice) { for (Entry<String, String> aProperty : advice.getProperties().entrySet()) { String key = aProperty.getKey(); if (shouldPublishProperty(key) && !properties.contains(key)) { properties.add(key); Map<String, String> parameters = new LinkedHashMap<String, String>(); parameters.put("propName", key); parameters.put("propValue", aProperty.getValue()); configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); parameters.put("propValue", ""); unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); } } for (URLEntry urlEntry : advice.getUpdateRepositories()) { <START> Map<String, String> parameters = new LinkedHashMap<String, String>(); <END> parameters.put("type", "0"); parameters.put("location", urlEntry.getURL()); parameters.put("enabled", urlEntry.getAnnotation()); configurationData += TouchpointInstruction.encodeAction("addRepository", parameters); parameters.put("type", "1"); configurationData += TouchpointInstruction.encodeAction("addRepository", parameters); } } return new String[] {configurationData, unconfigurationData}; }</code><technical_language>hardcoding values, please constants in IRepository (IRepository.ENABLED IRepository.TYPE_...)</technical_language>

Target:
protected String[] getConfigurationStrings(Collection<IConfigAdvice> configAdvice) { String configurationData = ""; String unconfigurationData = ""; Set<String> properties = new HashSet<String>(); for (IConfigAdvice advice : configAdvice) { for (Entry<String, String> aProperty : advice.getProperties().entrySet()) { String key = aProperty.getKey(); if (shouldPublishProperty(key) && !properties.contains(key)) { properties.add(key); Map<String, String> parameters = new LinkedHashMap<String, String>(); parameters.put("propName", key); parameters.put("propValue", aProperty.getValue()); configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); parameters.put("propValue", ""); unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); } } for (IRepositoryReference repo : advice.getUpdateRepositories()) { Map<String, String> parameters = new LinkedHashMap<String, String>(); parameters.put("type", Integer.toString(repo.getType())); parameters.put("location", repo.getLocation().toString()); parameters.put("enabled", Boolean.toString((repo.getOptions() & IRepository.ENABLED) == IRepository.ENABLED)); configurationData += TouchpointInstruction.encodeAction("addRepository", parameters); parameters.remove("enabled"); unconfigurationData += TouchpointInstruction.encodeAction("removeRepository", parameters); } } return new String[] {configurationData, unconfigurationData}; }
Source:
<code>public void runWorkerShutdownHooks() { <START> if (topology.is_set_worker_hooks()) { <END> for (IWorkerHook hook : getDeserializedWorkerHooks()) { hook.shutdown(); } } }</code><technical_language>if statement unnecessary for now</technical_language>

Target:
public void runWorkerShutdownHooks() { for (IWorkerHook hook : getDeserializedWorkerHooks()) { hook.shutdown(); } }
Source:
<code>public void shouldGetURL() throws IOException { final S3FileStore s3FileStore = new S3FileStore(bucketSchema); s3FileStore.initialize(mockAmazonS3Client); <START> <END> final URL url = s3FileStore.publicUrlForFilePath(filePath); verify(mockAmazonS3Client).generatePresignedUrl(eq(bucketSchema + "-" + filePath.directory()), eq(filePath.filename()), any(Date.class), eq(HttpMethod.GET)); }</code><technical_language>DateTimeUtils "now" is forget reset in a "@ After" step of unit test. This allows ensure link expires amount of time</technical_language>

Target:
public void shouldGetURL() throws IOException { final S3FileStore s3FileStore = new S3FileStore(bucketSchema); s3FileStore.initialize(mockAmazonS3Client); final int randommillis = Randoms.randomInt(1000); DateTimeUtils.setCurrentMillisFixed(randommillis); final URL url = s3FileStore.publicUrlForFilePath(filePath); verify(mockAmazonS3Client).generatePresignedUrl(bucketSchema + "-" + filePath.directory(), filePath.filename(), new Date(3600000 + randommillis), HttpMethod.GET); }
Source:
<code><START> private Pattern getIsoPattern(OVirtNodeInfo info) { <END> log.infoFormat("getIsoPatter - pattern [{0}]", info.pattern); String expectedPattern = info.pattern; if (isoPattern == null || !expectedPattern.equals(isoPattern.toString())) { isoPattern = Pattern.compile(expectedPattern); } return isoPattern; }</code><technical_language>removed static</technical_language>

Target:
private static Pattern getIsoPattern(OVirtNodeInfo info) { String expectedPattern = info.pattern; if (isoPattern == null || !expectedPattern.equals(isoPattern.toString())) { isoPattern = Pattern.compile(expectedPattern); } return isoPattern; }
Source:
<code>public static String signCertificateRequest( String request, String name, String hostname ) throws IOException { EngineLocalConfig config = EngineLocalConfig.getInstance(); try ( final OutputStream os = new FileOutputStream( new File( new File(config.getPKIDir(), "requests"), String.format("%s.req", name) ) ) ) { os.write(request.getBytes(StandardCharsets.UTF_8)); } if ( !new OpenSslCAWrapper().signCertificateRequest( new File(new File(config.getUsrDir(), "bin"), "pki-enroll-request.sh"), name, hostname ) ) { throw new RuntimeException("Certificate enrollment failed"); } return new String(Files.readAllBytes( <START> new File(new File(config.getPKIDir(), "certs"), String.format("%s.cer", name)).toPath())); <END> }</code><technical_language>This convoluted mess replaced Paths.get(config.getPKIDir(), "certs", String.format("%s.cer", name)) if in this patch a subsequent one</technical_language>

Target:
public static String signCertificateRequest( String request, String name, String hostname ) throws IOException { EngineLocalConfig config = EngineLocalConfig.getInstance(); try ( final OutputStream os = new FileOutputStream( new File( new File(config.getPKIDir(), "requests"), String.format("%s.req", name) ) ) ) { os.write(request.getBytes(StandardCharsets.UTF_8)); } if ( !new OpenSslCAWrapper().signCertificateRequest( new File(new File(config.getUsrDir(), "bin"), "pki-enroll-request.sh"), name, hostname ) ) { throw new RuntimeException("Certificate enrollment failed"); } return new String(Files.readAllBytes( Paths.get(config.getPKIDir().getPath(), "certs", String.format("%s.cer", name)))); }
Source:
<code>protected void okPressed() { try { <START> { <END> String merge = branchText.getText(); if (merge.length() > 0) myConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_MERGE, merge); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_MERGE); } { String remote = remoteText.getText(); if (remote.length() > 0) myConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REMOTE, remote); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REMOTE); } { boolean rebaseFlag = rebase.getSelection(); if (rebaseFlag) myConfig.setBoolean(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REBASE, true); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REBASE); } try { myConfig.save(); super.okPressed(); } catch (IOException e) { Activator.handleError( UIText.BranchConfigurationDialog_SaveBranchConfigFailed, e, true); } } catch (RuntimeException e) { Activator.handleError(e.getMessage(), e, true); } }</code><technical_language>style nit: remove unnecessary curly braces</technical_language>

Target:
protected void okPressed() { try { String merge = branchText.getText(); if (merge.length() > 0) myConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_MERGE, merge); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_MERGE); String remote = remoteText.getText(); if (remote.length() > 0) myConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REMOTE, remote); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REMOTE); boolean rebaseFlag = rebase.getSelection(); if (rebaseFlag) myConfig.setBoolean(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REBASE, true); else myConfig.unset(ConfigConstants.CONFIG_BRANCH_SECTION, myBranchName, ConfigConstants.CONFIG_KEY_REBASE); try { myConfig.save(); super.okPressed(); } catch (IOException e) { Activator.handleError( UIText.BranchConfigurationDialog_SaveBranchConfigFailed, e, true); } } catch (RuntimeException e) { Activator.handleError(e.getMessage(), e, true); } }
Source:
<code>public void testBrickFieldValidValue() throws InterpretationException { <START> assertSame(BRICK_FORMULA_VALUE, brickFormula.interpretInteger(sprite)); <END> }</code><technical_language>equals</technical_language>

Target:
public void testBrickFieldValidValue() throws InterpretationException { assertEquals(BRICK_FORMULA_VALUE, brickFormula.interpretInteger(sprite)); }
Source:
<code>public void execute() throws MojoExecutionException, MojoFailureException { getLog().info(String.format("Transforming %d handlers to %s", files.size(), outputDirectory)); for (File file : files) { getLog().info(String.format("Transforming %s...", file)); if (!file.exists()) { throw new MojoFailureException(String.format("Grammar file %s does not exist!", file)); } else if (!file.isFile()) { throw new MojoFailureException(String.format("Grammar file %s is not a regular file!", file)); } Grammar grammar; Machine machine; try { grammar = new Parser(getLog()::debug, sourceDirectories).load(file); machine = grammar.build(maxSwitchStates, userSwitchThreshold, passContext); } catch (IOException e) { throw new MojoExecutionException(String.format("Cannot read file %s", file), e); } catch (ParserException | GeneratorException e) { throw new MojoFailureException(String.format("Error in file %s", file), e); } <START> File output = new File(outputDirectory, grammar.getPackage().replaceAll("\\.", "\\" + File.separator) + File.separator + grammar.getSimpleName() + ".java"); <END> output.getParentFile().mkdirs(); try { Files.write(Paths.get(output.toURI()), machine.buildSource().getBytes()); } catch (IOException e) { throw new MojoExecutionException(String.format("Cannot write generated source code to %s", output), e); } project.addCompileSourceRoot(outputDirectory.getAbsolutePath()); } }</code><technical_language>need escaping if replace instead of replaceAll</technical_language>

Target:
public void execute() throws MojoExecutionException, MojoFailureException { getLog().info(String.format("Transforming %d handlers to %s", files.size(), outputDirectory)); for (File file : files) { getLog().info(String.format("Transforming %s...", file)); if (!file.exists()) { throw new MojoFailureException(String.format("Grammar file %s does not exist!", file)); } else if (!file.isFile()) { throw new MojoFailureException(String.format("Grammar file %s is not a regular file!", file)); } Grammar grammar; Machine machine; try { grammar = new Parser(getLog()::debug, sourceDirectories).load(file); machine = grammar.build(maxSwitchStates, userSwitchThreshold, passContext); } catch (IOException e) { throw new MojoExecutionException(String.format("Cannot read file %s", file), e); } catch (ParserException | GeneratorException e) { throw new MojoFailureException(String.format("Error in file %s", file), e); } File output = new File(outputDirectory, grammar.getPackage().replace('.', File.separatorChar) + File.separator + grammar.getSimpleName() + ".java"); output.getParentFile().mkdirs(); try { Files.write(Paths.get(output.toURI()), machine.buildSource().getBytes()); } catch (IOException e) { throw new MojoExecutionException(String.format("Cannot write generated source code to %s", output), e); } project.addCompileSourceRoot(outputDirectory.getAbsolutePath()); } }
Source:
<code>void factoryStartFailsIfScenarioScopeIsNotBound() { factory = new GuiceFactory(Guice.createInjector()); Executable testMethod = () -> factory.start(); ConfigurationException actualThrown = assertThrows(ConfigurationException.class, testMethod); assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalTo( "Guice configuration errors:" + System.lineSeparator() + System.lineSeparator() + "1) No implementation for io.cucumber.guice.ScenarioScope was bound." + System.lineSeparator() + <START> " while locating io.cucumber.guice.ScenarioScope" + System.lineSeparator() + System.lineSeparator() + <END> "1 error" ))); }</code><technical_language>equalToCompressingWhiteSpaceinstead. is allot more readable. in DocStringTypeRegistryDocStringConverterTest</technical_language>

Target:
void factoryStartFailsIfScenarioScopeIsNotBound() { factory = new GuiceFactory(Guice.createInjector()); Executable testMethod = () -> factory.start(); ConfigurationException actualThrown = assertThrows(ConfigurationException.class, testMethod); assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalToCompressingWhiteSpace( "Guice configuration errors:\n\n" + "1) No implementation for io.cucumber.guice.ScenarioScope was bound.\n" + " while locating io.cucumber.guice.ScenarioScope\n\n" + "1 error" ))); }
Source:
<code>protected static boolean shouldClientBeTested(HttpClient client) { <START> String configuredHttpClientToTest = Configuration.getGlobalConfiguration().get(AZURE_TEST_HTTP_CLIENTS); <END> if (CoreUtils.isNullOrEmpty(configuredHttpClientToTest)) { return client.getClass().getSimpleName().equals(AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY); } if (configuredHttpClientToTest.equals(AZURE_TEST_HTTP_CLIENTS_VALUE_ALL)) { return true; } return client.getClass().getSimpleName().equals(configuredHttpClientToTest); }</code><technical_language>This support a comma-separated list of HttpClient names</technical_language>

Target:
public static boolean shouldClientBeTested(HttpClient client) { String configuredHttpClientToTest = Configuration.getGlobalConfiguration().get(AZURE_TEST_HTTP_CLIENTS); if (CoreUtils.isNullOrEmpty(configuredHttpClientToTest)) { return client.getClass().getSimpleName().equals(AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY); } if (configuredHttpClientToTest.equals(AZURE_TEST_HTTP_CLIENTS_VALUE_ALL)) { return true; } String[] configuredHttpClientList = configuredHttpClientToTest.split(","); return Arrays.stream(configuredHttpClientList).anyMatch(configuredHttpClient -> client.getClass().getSimpleName().equals(configuredHttpClient.trim())); }
Source:
<code>private static boolean isBehindLiveWindow(ExoPlaybackException e) { <START> com.google.android.exoplayer2.util.Log.e("ExoPlayer Exception", e.toString()); <END> if (e.type != ExoPlaybackException.TYPE_SOURCE) { return false; } Throwable cause = e.getSourceException(); while (cause != null) { if (cause instanceof BehindLiveWindowException || cause instanceof HttpDataSource.HttpDataSourceException) { return true; } cause = cause.getCause(); } return false; }</code><technical_language>reason Log exoplayer</technical_language>

Target:
private static boolean isBehindLiveWindow(ExoPlaybackException e) { Log.e("ExoPlayer Exception", e.toString()); if (e.type != ExoPlaybackException.TYPE_SOURCE) { return false; } Throwable cause = e.getSourceException(); while (cause != null) { if (cause instanceof BehindLiveWindowException || cause instanceof HttpDataSource.HttpDataSourceException) { return true; } cause = cause.getCause(); } return false; }
Source:
<code>public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { if (CloudPlatform.CLOUD_FOUNDRY.isActive(environment)) { Map<String, Object> map = new HashMap<>(); map.put("spring.boot.admin.client.auto-deregistration", "true"); MapPropertySource propertySource = new MapPropertySource( <START> "cloudConfigPropertySource", map); <END> environment.getPropertySources().addFirst(propertySource); } }</code><technical_language>This property source name a misleading. property source is added for spring Boot Admin clients cloud foundry better, in opinion</technical_language>

Target:
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { if (CloudPlatform.CLOUD_FOUNDRY.isActive(environment) && !environment.containsProperty("spring.boot.admin.client.auto-deregistration")) { Map<String, Object> map = new HashMap<>(); map.put("spring.boot.admin.client.auto-deregistration", "true"); MapPropertySource propertySource = new MapPropertySource( "springBootAdminClientCloudFoundryProperties", map); environment.getPropertySources().addFirst(propertySource); } }
Source:
<code>protected void executeQueryCommand() { List<LUNs> luns = getLunsForVgId(getVgId()); List<LUNs> lunsFromDeviceList = getDeviceList(); for (LUNs lun : luns) { for (LUN_storage_server_connection_map map : getLunsMap(lun.getLUN_id())) { addConnection(lun, getConnection(map.getstorage_server_connection())); } for (LUNs lunFromDeviceList : lunsFromDeviceList) { if (lun.getLUN_id().equals(lunFromDeviceList.getLUN_id())) { <START> lun.setPathsDictionary(lunFromDeviceList.getPathsDictionary()); <END> } } } setReturnValue(luns); }</code><technical_language>matching LUNs a complexity of luns.size() * lunsFromDeviceList.size(). Consider converting list a map, iterating other, resulting in a complexity of luns.size() + lunsFromDeviceList.size()</technical_language>

Target:
protected void executeQueryCommand() { List<LUNs> luns = getLunsForVgId(getVgId()); Map<String, LUNs> lunsFromDeviceMap = getLunsFromDeviceMap(); for (LUNs lun : luns) { for (LUN_storage_server_connection_map map : getLunsMap(lun.getLUN_id())) { addConnection(lun, getConnection(map.getstorage_server_connection())); } LUNs lunFromDeviceList = lunsFromDeviceMap.get(lun.getLUN_id()); lun.setPathsDictionary(lunFromDeviceList.getPathsDictionary()); } setReturnValue(luns); }
Source:
<code>public void updateVariable(boolean isAdmin, UpdateTaskVariablePayload updateTaskVariablePayload) { if (!isAdmin) { getTaskToUpdate(updateTaskVariablePayload.getTaskId()); } <START> if (updateTaskVariablePayload.getName() == null || updateTaskVariablePayload.getName().isEmpty()) { <END> throw new IllegalStateException("You cannot update a variable without name"); } Map<String, org.activiti.engine.impl.persistence.entity.VariableInstance> variables = taskService.getVariableInstancesLocal(updateTaskVariablePayload.getTaskId()); if (variables == null) { throw new IllegalStateException("Variable does not exist"); } if (!variables.containsKey(updateTaskVariablePayload.getName())) { throw new IllegalStateException("Variable does not exist"); } taskService.setVariableLocal(updateTaskVariablePayload.getTaskId(), updateTaskVariablePayload.getName(), updateTaskVariablePayload.getValue()); }</code><technical_language>@CTI777 odd formatting (indentation)</technical_language>

Target:
public void updateVariable(boolean isAdmin, UpdateTaskVariablePayload updateTaskVariablePayload) { if (!isAdmin) { assertCanModifyTask(getInternalTask(updateTaskVariablePayload.getTaskId())); } if (updateTaskVariablePayload.getName() == null || updateTaskVariablePayload.getName().isEmpty()) { throw new IllegalStateException("You cannot update a variable without name"); } assertVariableExists(updateTaskVariablePayload); taskService.setVariableLocal(updateTaskVariablePayload.getTaskId(), updateTaskVariablePayload.getName(), updateTaskVariablePayload.getValue()); }
Source:
<code>public int compareTo(RDotTxtEntry that) { if (this == that) { return 0; } ComparisonChain comparisonChain = ComparisonChain.start().compare(this.type, that.type); String thisNameParts = this.name.split("_"); String thatNameParts = that.name.split("_"); int index = 0; while (index < thisNameParts.length && index < thatNameParts.length) { comparisonChain = comparisonChain.compare(thisNameParts[index], thatNameParts[index]); index++; } if (index < thisNameParts.length) { comparisonChain = comparisonChain.compare(thisNameParts[index], ""); } else if (index < thatNameParts.length) { comparisonChain = comparisonChain.compare("", thatNameParts[index]); <START> } <END> return comparisonChain.result(); }</code><technical_language>this is guaranteed consume entire string. if longer a double-underscore in it? give a false "equal" comparison a string? comparing array lengths instead of this block. work</technical_language>

Target:
public int compareTo(RDotTxtEntry that) { if (this == that) { return 0; } ComparisonChain comparisonChain = ComparisonChain.start().compare(this.type, that.type); String thisNameParts = this.name.split("_"); String thatNameParts = that.name.split("_"); int index = 0; while (index < thisNameParts.length && index < thatNameParts.length) { comparisonChain = comparisonChain.compare(thisNameParts[index], thatNameParts[index]); index++; } if (index < thisNameParts.length || index < thatNameParts.length) { comparisonChain = comparisonChain.compare(thisNameParts.length, thatNameParts.length); } return comparisonChain.result(); }
Source:
<code>public void execute(CommandContext context) { File f = findRestApiConfigFile(context); if (f.exists()) { AppConfig appConfig = context.getAppConfig(); ServerManager mgr = new ServerManager(context.getManageClient(), appConfig.getGroupName()); <START> saveResource(mgr, context, f); <END> if (appConfig.isTestPortSet()) { String payload = copyFileToString(f); String json = payloadTokenReplacer.replaceTokens(payload, appConfig, true); adjustPayloadBeforeSavingResource(mgr, context, f, json); mgr.save(json); } } else { logger.info(format("No REST API server file found at %s, so not updating the server", f.getAbsolutePath())); } }</code><technical_language>This is a good cleanup here, thanks</technical_language>

Target:
public void execute(CommandContext context) { File f = findRestApiConfigFile(context); if (f != null && f.exists()) { AppConfig appConfig = context.getAppConfig(); ServerManager mgr = new ServerManager(context.getManageClient(), appConfig.getGroupName()); saveResource(mgr, context, f); if (appConfig.isTestPortSet()) { json = payloadTokenReplacer.replaceTokens(payload, appConfig, true); adjustPayloadBeforeSavingResource(mgr, context, f, json); mgr.save(json); } } }
Source:
<code>public void testFeedListDownloadUrls() { List<Feed> feeds = saveFeedlist(10, 0, false); List<String> urls = DBReader.getFeedListDownloadUrls(); assertNotNull(urls); <START> assertEquals(urls.size(), feeds.size()); <END> for (int i = 0; i < urls.size(); i++) { assertEquals(urls.get(i), feeds.get(i).getDownload_url()); } }</code><technical_language>100% I this other around. feeds.size() expected value. This problem is present in other tests. Before, a failing test showed a failed assertion. shows actual expected value, is misleading if exchanged</technical_language>

Target:
public void testFeedListDownloadUrls() { List<Feed> feeds = saveFeedlist(10, 0, false); List<String> urls = DBReader.getFeedListDownloadUrls(); assertNotNull(urls); assertEquals(feeds.size(), urls.size()); for (int i = 0; i < urls.size(); i++) { assertEquals(urls.get(i), feeds.get(i).getDownload_url()); } }
Source:
<code>protected void setActionMessageParameters() { <START> addCanDoActionMessage(VdcBllMessages.VAR__ACTION__DISABLE_GLUSTER_HOOK); <END> addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_HOOK); }</code><technical_language>Please change this VAR__ACTION__DISABLE</technical_language>

Target:
protected void setActionMessageParameters() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__DISABLE); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_HOOK); }