auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void onInit() { super.onInit(); boolean hasTopics = false; if (this.topics != null) { Assert.noNullElements(this.topics, "'topics' may not contain null elements."); hasTopics = true; } boolean hasPatterns = false; if (this.topicPatterns != null) { Assert.noNullElements(this.topicPatterns, "'topicPatterns' may not contain null elements."); hasPatterns = true; } Assert.state(hasTopics || hasPatterns, "at least one topic or topic pattern is required for subscription."); if (this.messageConverter instanceof BeanFactoryAware) { ((BeanFactoryAware) this.messageConverter).setBeanFactory(this.getBeanFactory()); } MessageListenerDelegate delegate = new MessageListenerDelegate(); MessageListenerAdapter adapter = new MessageListenerAdapter(delegate); adapter.setSerializer(this.serializer); List<Topic> topicList = new ArrayList<Topic>(); if (hasTopics) { for (String topic : this.topics) { topicList.add(new ChannelTopic(topic)); } } if (hasPatterns) { for (String pattern : this.topicPatterns) { topicList.add(new PatternTopic(pattern)); } } adapter.afterPropertiesSet(); this.container.addMessageListener(adapter, topicList); if (this.taskExecutor != null) { <START> this.container.setTaskExecutor(this.taskExecutor); <END> } this.container.afterPropertiesSet(); }</code><technical_language>Look, container property is final, easily inject taskExecutor setter container. I I reason in extra property overhead</technical_language>

Target:
protected void onInit() { super.onInit(); boolean hasTopics = false; if (this.topics != null) { Assert.noNullElements(this.topics, "'topics' may not contain null elements."); hasTopics = true; } boolean hasPatterns = false; if (this.topicPatterns != null) { Assert.noNullElements(this.topicPatterns, "'topicPatterns' may not contain null elements."); hasPatterns = true; } Assert.state(hasTopics || hasPatterns, "at least one topic or topic pattern is required for subscription."); if (this.messageConverter instanceof BeanFactoryAware) { ((BeanFactoryAware) this.messageConverter).setBeanFactory(this.getBeanFactory()); } MessageListenerDelegate delegate = new MessageListenerDelegate(); MessageListenerAdapter adapter = new MessageListenerAdapter(delegate); adapter.setSerializer(this.serializer); List<Topic> topicList = new ArrayList<Topic>(); if (hasTopics) { for (String topic : this.topics) { topicList.add(new ChannelTopic(topic)); } } if (hasPatterns) { for (String pattern : this.topicPatterns) { topicList.add(new PatternTopic(pattern)); } } adapter.afterPropertiesSet(); this.container.addMessageListener(adapter, topicList); this.container.afterPropertiesSet(); }
Source:
<code>protected CNodeFactory getNodeFactory() { return <START> (CNodeFactory)super.getNodeFactory(); <END> }</code><technical_language>Please add a space cast</technical_language>

Target:
protected ICNodeFactory getNodeFactory() { return (ICNodeFactory) super.getNodeFactory(); }
Source:
<code>private PojoUtils.Getter generateGettersForField(Class<?> klass, String inputFieldName) throws NoSuchFieldException, SecurityException { Field f = klass.getDeclaredField(inputFieldName); Class c = ClassUtils.primitiveToWrapper(f.getType()); <START> PojoUtils.Getter classGetter = PojoUtils.createGetter(klass, inputFieldName, c); <END> return classGetter; }</code><technical_language>return directly</technical_language>

Target:
private PojoUtils.Getter generateGettersForField(Class<?> klass, String inputFieldName) throws NoSuchFieldException, SecurityException { Field f = klass.getDeclaredField(inputFieldName); Class c = ClassUtils.primitiveToWrapper(f.getType()); return PojoUtils.createGetter(klass, inputFieldName, c); }
Source:
<code><START> public static boolean isCidrFormatValid(String cidr) { <END> return (cidr == null || !cidr.matches(ValidationUtils.CIDR_FORMAT_PATTERN)) ? false : true; }</code><technical_language>methods non-static</technical_language>

Target:
public boolean isCidrFormatValid(String cidr) { return (cidr == null || !cidr.matches(ValidationUtils.CIDR_FORMAT_PATTERN)) ? false : true; }
Source:
<code>public List<AutoCloseable> start(Params params) { Configuration config = new FluoConfiguration(params.getConfiguration()).getReporterConfiguration("graphite"); if (!config.getBoolean("enable", false)) { return Collections.emptyList(); } String host = config.getString("host"); String prefix = config.getString("prefix", ""); int port = config.getInt("port", 8080); TimeUnit rateUnit = TimeUnit.valueOf(config.getString("rateUnit", "seconds").toUpperCase()); TimeUnit durationUnit = TimeUnit.valueOf(config.getString("durationUnit", "milliseconds").toUpperCase()); Graphite graphite = new Graphite(host, port); GraphiteReporter reporter = GraphiteReporter.forRegistry(params.getMetricRegistry()).convertDurationsTo(durationUnit) .convertRatesTo(rateUnit).prefixedWith(prefix).build(graphite); reporter.start(config.getInt("frequency", 60), TimeUnit.SECONDS); <START> log.info("Reporting metrics to graphite"); <END> return Collections.singletonList((AutoCloseable) reporter); }</code><technical_language>useful print host port metrics reported</technical_language>

Target:
public List<AutoCloseable> start(Params params) { Configuration config = new FluoConfiguration(params.getConfiguration()).getReporterConfiguration("graphite"); if (!config.getBoolean("enable", false)) { return Collections.emptyList(); } String host = config.getString("host"); String prefix = config.getString("prefix", ""); int port = config.getInt("port", 8080); TimeUnit rateUnit = TimeUnit.valueOf(config.getString("rateUnit", "seconds").toUpperCase()); TimeUnit durationUnit = TimeUnit.valueOf(config.getString("durationUnit", "milliseconds").toUpperCase()); Graphite graphite = new Graphite(host, port); GraphiteReporter reporter = GraphiteReporter.forRegistry(params.getMetricRegistry()).convertDurationsTo(durationUnit) .convertRatesTo(rateUnit).prefixedWith(prefix).build(graphite); reporter.start(config.getInt("frequency", 60), TimeUnit.SECONDS); log.info("Reporting metrics to graphite server {}:{}", host, port); return Collections.singletonList((AutoCloseable) reporter); }
Source:
<code>public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context) { <START> buffer.append(getComputedValue(name, prefix, object, context)); <END> }</code><technical_language>call getComputedValue(buffer, ...) remove signature of getComputedValue I anywhere</technical_language>

Target:
public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context) { try { buffer.append(getComputedValue(name, prefix, object, context)); } catch (Exception e) { buffer.append(e.getMessage()); } }
Source:
<code>public CharSequence getSummary () { RadioStation station = getPersistedRadioStation(); if (station != null && station.name != null && !station.name.isEmpty()) { String summary = station.name; if (station.countryCode != null || station.bitrate > 0) { summary += " ("; <START> boolean hasCountry = false; <END> if (station.countryCode != null) { summary += station.countryCode; hasCountry = true; } if (station.bitrate > 0) { if (hasCountry) { summary += ", "; } summary += String.valueOf(station.bitrate) + " kbps"; } summary += ")"; } return summary; } else { return super.getSummary(); } }</code><technical_language>boolean hasCountry = (station.countryCode != null);</technical_language>

Target:
public CharSequence getSummary () { RadioStation station = getPersistedRadioStation(); if (station != null && station.name != null && !station.name.isEmpty()) { final boolean hasCountry = (station.countryCode != null); final boolean hasBitrate = (station.bitrate > 0); String summary; if (hasCountry && hasBitrate) { summary = String.format("%s (%s, %d kbit/s)", station.name, station.countryCode, station.bitrate); } else if (hasBitrate) { summary = String.format("%s (%d kbit/s)", station.name, station.bitrate); } else if (hasCountry){ summary = String.format("%s (%s)", station.name, station.countryCode); } else { summary = String.format("%s", station.name); } return summary; } else { return super.getSummary(); } }
Source:
<code>instancesByIdInRegion(final Multimap<String,String> idsByRegions) { return new Function<String, Set<? extends Reservation<? extends RunningInstance>>>() { @Override public Set<? extends Reservation<? extends RunningInstance>> apply(String from) { return client.getInstanceServices() <START> .describeInstancesInRegion(from, Iterables.toArray(idsByRegions.get(from), String.class)); <END> } }; }</code><technical_language>more static import here</technical_language>

Target:
instancesByIdInRegion(final Multimap<String,String> idsByRegions) { return new Function<String, Set<? extends Reservation<? extends RunningInstance>>>() { @Override public Set<? extends Reservation<? extends RunningInstance>> apply(String from) { return client.getInstanceServices() .describeInstancesInRegion(from, toArray(idsByRegions.get(from), String.class)); } }; }
Source:
<code>protected synchronized Object handleInvocation(Object proxy, Method method, Object[] args) { try { return method.invoke(delegate, args); } catch (TransactionLockWatchFailedException e) { throw e; } catch (Throwable t) { <START> delegate = fallbackCache; <END> throw new TransactionLockWatchFailedException("Unexpected failure in the lock watch cache", t); } }</code><technical_language>a logline, ideally a metric setup some alerts for rollout</technical_language>

Target:
protected synchronized Object handleInvocation(Object proxy, Method method, Object[] args) { try { return method.invoke(delegate, args); } catch (TransactionLockWatchFailedException e) { throw e; } catch (Throwable t) { log.warn("Unexpected failure occurred when trying to use the default cache. Switching to the fallback " + "implementation", t); fallbackCacheSelectedCounter.inc(); delegate = fallbackCache; throw new TransactionLockWatchFailedException("Unexpected failure in the lock watch cache", t); } }
Source:
<code>private void createMaps() throws IOException { final Image map = loadImage(); if (map == null) { log.info("You need to select a map image for this to work"); log.info("Shutting down"); return; } textOptionPane.show(); for (int x = 0; x * Tile.TILE_SIZE < map.getWidth(null); x++) { for (int y = 0; y * Tile.TILE_SIZE < map.getHeight(null); y++) { final Rectangle bounds = <START> new Rectangle(x * Tile.TILE_SIZE, y * Tile.TILE_SIZE, Tile.TILE_SIZE, Tile.TILE_SIZE); <END> final GraphicsConfiguration localGraphicSystem = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); final BufferedImage relief = localGraphicSystem.createCompatibleImage( Tile.TILE_SIZE, Tile.TILE_SIZE, Transparency.TRANSLUCENT); relief .getGraphics() .drawImage( map, 0, 0, Tile.TILE_SIZE, Tile.TILE_SIZE, bounds.x, bounds.y, bounds.x + Tile.TILE_SIZE, bounds.y + Tile.TILE_SIZE, observer); final String outFileName = location + File.separator + x + "_" + y + ".png"; ImageIO.write(relief, "png", new File(outFileName)); textOptionPane.appendNewLine("wrote " + outFileName); } } textOptionPane.appendNewLine("\r\nAll Finished!"); textOptionPane.countDown(); textOptionPane.dispose(); JOptionPane.showMessageDialog(null, new JLabel("All Finished")); }</code><technical_language>Minor, Tile.TILE_SIZE is a candidate for a static import, a bit</technical_language>

Target:
private void createMaps() throws IOException { final Image map = loadImage(); if (map == null) { log.info("You need to select a map image for this to work"); log.info("Shutting down"); return; } textOptionPane.show(); for (int x = 0; x * TILE_SIZE < map.getWidth(null); x++) { for (int y = 0; y * TILE_SIZE < map.getHeight(null); y++) { final Rectangle bounds = new Rectangle(x * TILE_SIZE, y * TILE_SIZE, TILE_SIZE, TILE_SIZE); final GraphicsConfiguration localGraphicSystem = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); final BufferedImage relief = localGraphicSystem.createCompatibleImage( TILE_SIZE, TILE_SIZE, Transparency.TRANSLUCENT); relief .getGraphics() .drawImage( map, 0, 0, TILE_SIZE, TILE_SIZE, bounds.x, bounds.y, bounds.x + TILE_SIZE, bounds.y + TILE_SIZE, observer); final String outFileName = location + File.separator + x + "_" + y + ".png"; ImageIO.write(relief, "png", new File(outFileName)); textOptionPane.appendNewLine("wrote " + outFileName); } } textOptionPane.appendNewLine("\r\nAll Finished!"); textOptionPane.countDown(); textOptionPane.dispose(); JOptionPane.showMessageDialog(null, new JLabel("All Finished")); }
Source:
<code>public void setupStaticKeyspace() throws Exception { migrate(); <START> if ( USE_VIRTUAL_KEYSPACES ) { <END> logger.info( "Creating static application keyspace " + getApplicationKeyspace() ); cass.createColumnFamily( getApplicationKeyspace(), createColumnFamilyDefinition( getApplicationKeyspace(), APPLICATIONS_CF, ComparatorType.BYTESTYPE ) ); cass.createColumnFamilies( getApplicationKeyspace(), getCfDefs( ApplicationCF.class, getApplicationKeyspace() ) ); cass.createColumnFamilies( getApplicationKeyspace(), getCfDefs( QueuesCF.class, getApplicationKeyspace() ) ); } }</code><technical_language>This if needed anymore, virtual. row key is app prefixed, put systems keyspace. Eventually, move org->keyspace lookup system</technical_language>

Target:
public void setupStaticKeyspace() throws Exception { migrate(); logger.info( "Creating static application keyspace " + getApplicationKeyspace() ); cass.createColumnFamily( getApplicationKeyspace(), createColumnFamilyDefinition( getApplicationKeyspace(), APPLICATIONS_CF, ComparatorType.BYTESTYPE ) ); cass.createColumnFamilies( getApplicationKeyspace(), getCfDefs( ApplicationCF.class, getApplicationKeyspace() ) ); cass.createColumnFamilies( getApplicationKeyspace(), getCfDefs( QueuesCF.class, getApplicationKeyspace() ) ); }
Source:
<code>public String toTosca() { if (this.toscaString != null) return this.toscaString; if (this.offeringPath != null) { try { String offeringDirectory = Discoverer.instance().offeringManager.getOfferingDirectory().getAbsolutePath(); String offeringFileName = "offer_" + this.offeringId + ".yaml"; this.toscaString = new String(Files.readAllBytes(Paths.get(offeringDirectory + File.separatorChar + offeringFileName))); return this.toscaString; <START> } catch (IOException e) { } <END> } this.toscaString = Offering.getPreamble() + this.getNodeTemplate(); return this.toscaString; }</code><technical_language>IOException is usual here? If program crash, log exception. if wrong is happening</technical_language>

Target:
public String toTosca() { if (this.toscaString != null) return this.toscaString; if (this.isStored) { try { String offeringDirectory = Discoverer.instance().offeringManager.getOfferingDirectory().getAbsolutePath(); String offeringFileName = "offer_" + this.offeringId + ".yaml"; this.toscaString = new String(Files.readAllBytes(Paths.get(offeringDirectory + File.separatorChar + offeringFileName))); return this.toscaString; } catch (IOException e) { e.printStackTrace(); } } this.toscaString = Offering.getPreamble() + this.getNodeTemplate(); return this.toscaString; }
Source:
<code>private Stream<Map<Address, CacheEntry<K, V>>> getConflicts(LocalizedCacheTopology topology) { if (!running) <START> return Stream.empty(); <END> if (topology.getPhase() != CacheTopology.Phase.CONFLICT_RESOLUTION && stateConsumer.isStateTransferInProgress()) throw log.getConflictsStateTransferInProgress(cacheName); if (!streamInProgress.compareAndSet(false, true)) throw log.getConflictsAlreadyInProgress(); conflictSpliterator = new ReplicaSpliterator(topology); return StreamSupport .stream(conflictSpliterator, false) .filter(filterConsistentEntries()); }</code><technical_language>This is early: if thread 1 this check is de-scheduled line 238, thread 2 run entire stop() method thread 1 create spliterator running == false. I safe place do check is creating spliterator</technical_language>

Target:
private Stream<Map<Address, CacheEntry<K, V>>> getConflicts(LocalizedCacheTopology topology) { if (topology.getPhase() != CacheTopology.Phase.CONFLICT_RESOLUTION && stateConsumer.isStateTransferInProgress()) throw log.getConflictsStateTransferInProgress(cacheName); if (!streamInProgress.compareAndSet(false, true)) throw log.getConflictsAlreadyInProgress(); conflictSpliterator = new ReplicaSpliterator(topology); if (!running) { conflictSpliterator.stop(); return Stream.empty(); } return StreamSupport .stream(new ReplicaSpliterator(topology), false) .filter(filterConsistentEntries()); }
Source:
<code>public String toString() { return "Subpic[" + formatName + (id != null ? (" id=" + id) : "") + (path != null ? (" path=" + path) : "") <START> + (language == null ? "" : (" " + language)) + " forced=" + forced + "]"; <END> }</code><technical_language>Change have: " forced=" + forced (forced ? " forced" : "")</technical_language>

Target:
public String toString() { return "Subpic[" + formatName + (id != null ? (" id=" + id) : "") + (path != null ? (" path=" + path) : "") + (language == null ? "" : (" " + language)) + (forced ? " forced" : "") + "]"; }
Source:
<code>private void fireCommandExecution(final Element element, final ToolboxCommand command, final ToolboxButtonEvent event, final Context.EventType eventTypeType) { final Context _context = new AbstractContext(canvasHandler, eventTypeType, event.getX(), event.getY(), event.getAbsoluteX(), event.getAbsoluteY(), event.getClientX(), event.getClientY()) { @Override public CanvasCommandManager getCommandManager() { return CanvasToolboxControl.this.commandManagerProvider.getCommandManager(); } <START> { <END> } }; setCommandView(command).execute(_context, element); }</code><technical_language>Empty block; remove</technical_language>

Target:
private void fireCommandExecution(final Element element, final ToolboxCommand command, final ToolboxButtonEvent event, final Context.EventType eventTypeType) { final Context _context = new AbstractContext(canvasHandler, eventTypeType, event.getX(), event.getY(), event.getAbsoluteX(), event.getAbsoluteY(), event.getClientX(), event.getClientY()) { @Override public CanvasCommandManager getCommandManager() { return CanvasToolboxControl.this.commandManagerProvider.getCommandManager(); } }; setCommandView(command).execute(_context, element); }
Source:
<code>private boolean shouldCreateEndpoint(Annotation annotation) { Object inputChannel = AnnotationUtils.getValue(annotation, "inputChannel"); <START> if (inputChannel == null) { <END> inputChannel = AnnotationUtils.getValue(annotation); } return (inputChannel != null && inputChannel instanceof String && StringUtils.hasText((String) inputChannel)); }</code><technical_language>check annotation type, in case add other annotations</technical_language>

Target:
private boolean shouldCreateEndpoint(Annotation annotation) { Object inputChannel = AnnotationUtils.getValue(annotation, "inputChannel"); if (inputChannel == null && annotation instanceof InboundChannelAdapter) { inputChannel = AnnotationUtils.getValue(annotation); } return (inputChannel != null && inputChannel instanceof String && StringUtils.hasText((String) inputChannel)); }
Source:
<code>private static DataFetcher<IProject> getActivateViewpointDataFetcher() { return environment -> { Optional<IProject> optionalProject = SiriusGraphQLOptionalUtils.projectFromName(environment.getArgument(PROJECT_NAME_ARG)); Optional<Session> optionalSession = optionalProject.flatMap(SiriusGraphQLOptionalUtils::toSession); Optional<Viewpoint> optionalViewpoint = SiriusGraphQLOptionalUtils.viewpointFromIdentifier(environment.getArgument(VIEWPOINT_IDENTIFIER_ARG)); optionalSession.ifPresent(session -> { optionalViewpoint.ifPresent(viewpoint -> { RecordingCommand command = new RecordingCommand(session.getTransactionalEditingDomain()) { @Override protected void doExecute() { <START> session.createView(viewpoint, new ArrayList<>(), true, new NullProgressMonitor()); <END> } }; session.getTransactionalEditingDomain().getCommandStack().execute(command); }); }); return optionalProject.orElse(null); }; }</code><technical_language>This is correct enable a viewpoint. This simply creates DView serves a container for concreate representations defined in a viewpoint. proper API (or of broken ones, (don't ask)) org.eclipse.sirius.business.api.session.ViewpointSelector.selectViewpoint(Viewpoint, boolean, IProgressMonitor)</technical_language>

Target:
private static DataFetcher<IProject> getActivateViewpointDataFetcher() { return environment -> { Optional<IProject> optionalProject = SiriusGraphQLOptionalUtils.projectFromName(environment.getArgument(PROJECT_NAME_ARG)); Optional<Session> optionalSession = optionalProject.flatMap(SiriusGraphQLOptionalUtils::toSession); Optional<Viewpoint> optionalViewpoint = SiriusGraphQLOptionalUtils.viewpointFromIdentifier(environment.getArgument(VIEWPOINT_IDENTIFIER_ARG)); optionalSession.ifPresent(session -> { optionalViewpoint.ifPresent(viewpoint -> { RecordingCommand command = new RecordingCommand(session.getTransactionalEditingDomain()) { @Override protected void doExecute() { new ViewpointSelector(session).selectViewpoint(viewpoint, false, new NullProgressMonitor()); } }; session.getTransactionalEditingDomain().getCommandStack().execute(command); }); }); return optionalProject.orElse(null); }; }
Source:
<code>public LedgerMetadata(int ensembleSize, int writeQuorumSize, int ackQuorumSize, BookKeeper.DigestType digestType, byte[] password, Map<String, byte[]> customMetadata) { this.ensembleSize = ensembleSize; this.writeQuorumSize = writeQuorumSize; this.ackQuorumSize = ackQuorumSize; this.ctime = System.currentTimeMillis(); this.length = 0; this.state = LedgerMetadataFormat.State.OPEN; this.lastEntryId = LedgerHandle.INVALID_ENTRY_ID; this.metadataFormatVersion = CURRENT_METADATA_FORMAT_VERSION; <START> this.digestType = BookKeeper.DigestType.MAC.equals(BookKeeper.DigestType.MAC) ? <END> LedgerMetadataFormat.DigestType.HMAC : LedgerMetadataFormat.DigestType.CRC32; this.password = Arrays.copyOf(password, password.length); this.hasPassword = true; if (customMetadata != null) { this.customMetadata = customMetadata; } }</code><technical_language>this change do</technical_language>

Target:
public LedgerMetadata(int ensembleSize, int writeQuorumSize, int ackQuorumSize, BookKeeper.DigestType digestType, byte[] password, Map<String, byte[]> customMetadata) { this.ensembleSize = ensembleSize; this.writeQuorumSize = writeQuorumSize; this.ackQuorumSize = ackQuorumSize; this.ctime = System.currentTimeMillis(); this.length = 0; this.state = LedgerMetadataFormat.State.OPEN; this.lastEntryId = LedgerHandle.INVALID_ENTRY_ID; this.metadataFormatVersion = CURRENT_METADATA_FORMAT_VERSION; this.digestType = digestType.equals(BookKeeper.DigestType.MAC) ? LedgerMetadataFormat.DigestType.HMAC : LedgerMetadataFormat.DigestType.CRC32; this.password = Arrays.copyOf(password, password.length); this.hasPassword = true; if (customMetadata != null) { this.customMetadata = customMetadata; } }
Source:
<code>private List<Path> getFilesToRetry(FileSystem sourceFs, List<ReplChangeManager.FileInfo> srcFileList, FileSystem destinationFs, Path destination, boolean isCopyError) throws IOException { List<Path> pathList = new ArrayList<Path>(); for (ReplChangeManager.FileInfo srcFile : srcFileList) { if (srcFile.isCopyDone()) { continue; } Path srcPath = srcFile.getEffectivePath(); Path destPath = new Path(destination, srcPath.getName()); if (destinationFs.exists(destPath)) { if (isSourceFileMismatch(sourceFs, srcFile)) { destinationFs.delete(destPath, true); srcFile.setIsUseSourcePath(false); } else { if (!isCopyError) { srcFile.setCopyDone(true); continue; } } } else { if (sourceFs.exists(srcPath)) { <START> if (isSourceFileMismatch(sourceFs, srcFile)) { <END> srcFile.setIsUseSourcePath(false); } } else { if (srcFile.isUseSourcePath()) { srcFile.setIsUseSourcePath(false); } } } srcPath = srcFile.getEffectivePath(); if (null == srcPath) { LOG.error("File copy failed and likely source file is deleted or modified. " + "Source File: " + srcFile.getSourcePath()); throw new IOException("File copy failed and likely source file is deleted or modified."); } pathList.add(srcPath); } return pathList; }</code><technical_language>check if CM path exist if not, throw error/exception in base code</technical_language>

Target:
private List<Path> getFilesToRetry(FileSystem sourceFs, List<ReplChangeManager.FileInfo> srcFileList, FileSystem destinationFs, Path destination, boolean isCopyError) throws IOException { List<Path> pathList = new ArrayList<Path>(); for (ReplChangeManager.FileInfo srcFile : srcFileList) { if (srcFile.isCopyDone()) { continue; } Path srcPath = srcFile.getEffectivePath(); Path destPath = new Path(destination, srcPath.getName()); if (destinationFs.exists(destPath)) { if (isSourceFileMismatch(sourceFs, srcFile)) { destinationFs.delete(destPath, true); srcFile.setIsUseSourcePath(false); } else { if (!isCopyError) { srcFile.setCopyDone(true); continue; } } } else if (isSourceFileMismatch(sourceFs, srcFile)) { srcFile.setIsUseSourcePath(false); } srcPath = srcFile.getEffectivePath(); if (null == srcPath) { LOG.error("File copy failed and likely source file is deleted or modified. " + "Source File: " + srcFile.getSourcePath()); throw new IOException("File copy failed and likely source file is deleted or modified."); } if (!srcFile.isUseSourcePath() && !sourceFs.exists(srcFile.getCmPath())) { LOG.error("File Copy Failed. Both source and CM files are missing from source. " + "Missing Source File: " + srcFile.getSourcePath() + ", CM File: " + srcFile.getCmPath() + ". " + "Try setting higher value for hive.repl.cm.retain in source warehouse. " + "Also, bootstrap the system again to get back the consistent replicated state."); throw new IOException("Both source and CM path are missing from source."); } pathList.add(srcPath); } return pathList; }
Source:
<code><START> public void supportsMultipleReporters() { <END> this.context = new AnnotationConfigApplicationContext(); environment().setProperty("spring.zipkin.base-url", this.server.url("/").toString()); this.context.register(ZipkinAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class, TraceAutoConfiguration.class, MultipleReportersConfig.class); this.context.refresh(); then(this.context.getBeansOfType(Sender.class)).hasSize(2); then(this.context.getBeansOfType(Sender.class)).containsKeys("zipkinSender", "otherSender"); then(this.context.getBeansOfType(Reporter.class)).hasSize(2); then(this.context.getBeansOfType(Reporter.class)).containsKeys("zipkinReporter", "otherReporter"); this.context.close(); }</code><technical_language>report a span verify senders reporters called</technical_language>

Target:
public void supportsMultipleReporters() throws Exception { this.context = new AnnotationConfigApplicationContext(); environment().setProperty("spring.zipkin.base-url", this.server.url("/").toString()); this.context.register(ZipkinAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class, TraceAutoConfiguration.class, Config.class, MultipleReportersConfig.class, ZipkinBackwardsCompatibilityAutoConfiguration.class); this.context.refresh(); then(this.context.getBeansOfType(Sender.class)).hasSize(2); then(this.context.getBeansOfType(Sender.class)) .containsKeys(ZipkinAutoConfiguration.SENDER_BEAN_NAME, "otherSender"); then(this.context.getBeansOfType(Reporter.class)).hasSize(2); then(this.context.getBeansOfType(Reporter.class)).containsKeys( ZipkinAutoConfiguration.REPORTER_BEAN_NAME, "otherReporter"); Span span = this.context.getBean(Tracing.class).tracer().nextSpan().name("foo") .tag("foo", "bar").start(); span.finish(); Awaitility.await().untilAsserted( () -> then(this.server.getRequestCount()).isGreaterThan(0)); RecordedRequest request = this.server.takeRequest(); then(request.getPath()).isEqualTo("/api/v2/spans"); then(request.getBody().readUtf8()).contains("localEndpoint"); MultipleReportersConfig.OtherSender sender = this.context .getBean(MultipleReportersConfig.OtherSender.class); Awaitility.await().untilAsserted(() -> then(sender.isSpanSent()).isTrue()); }
Source:
<code>public boolean isProtected(ByteArrayWrapper key) { <START> return redisMetaRegion.containsKey(key.toString()) <END> && RedisDataType.REDIS_PROTECTED.equals(redisMetaRegion.get(key.toString())); }</code><technical_language>I extra containsKey call is needed in this method. Region.get return null if a region key null equal REDIS_PROTECTED. I advise get rid of containsKey call</technical_language>

Target:
public boolean isProtected(ByteArrayWrapper key) { return RedisDataType.REDIS_PROTECTED.equals(redisMetaRegion.get(key.toString())); }
Source:
<code>public void testZookeeperFramework_differentPath() throws UnirestException { scheduler.setZookeeperFrameworkUrl("zk://" + zookeeper.getIpAddress() + ":2181/framework"); CONTAINER_LIFECYCLE_MANAGEMENT.addAndStart(scheduler); ESTasks esTasks = new ESTasks(TEST_CONFIG, scheduler.getIpAddress()); <START> new TasksResponse(esTasks, 3); <END> ElasticsearchNodesResponse nodesResponse = new ElasticsearchNodesResponse(esTasks, 3); assertTrue("Elasticsearch nodes did not discover each other within 5 minutes", nodesResponse.isDiscoverySuccessful()); ElasticsearchZookeeperResponse elasticsearchZookeeperResponse = new ElasticsearchZookeeperResponse(new ESTasks(TEST_CONFIG, scheduler.getIpAddress())); assertEquals("zk://" + zookeeper.getIpAddress() + ":2181", elasticsearchZookeeperResponse.getHost()); }</code><technical_language>3 difficult understand. replaced cluster.getSlaves().length</technical_language>

Target:
public void testZookeeperFramework_differentPath() throws UnirestException { scheduler.setZookeeperFrameworkUrl("zk://" + zookeeper.getIpAddress() + ":2181/framework"); CONTAINER_LIFECYCLE_MANAGEMENT.addAndStart(scheduler); ESTasks esTasks = new ESTasks(TEST_CONFIG, scheduler.getIpAddress()); new TasksResponse(esTasks, TEST_CONFIG.getElasticsearchNodesCount()); ElasticsearchNodesResponse nodesResponse = new ElasticsearchNodesResponse(esTasks, TEST_CONFIG.getElasticsearchNodesCount()); assertTrue("Elasticsearch nodes did not discover each other within 5 minutes", nodesResponse.isDiscoverySuccessful()); ElasticsearchZookeeperResponse elasticsearchZookeeperResponse = new ElasticsearchZookeeperResponse(new ESTasks(TEST_CONFIG, scheduler.getIpAddress())); assertEquals("zk://" + zookeeper.getIpAddress() + ":2181", elasticsearchZookeeperResponse.getHost()); }
Source:
<code>public static CourseUnitYoutubeVideoFragment newInstance(VideoBlockModel unit, boolean hasNextUnit, boolean hasPreviousUnit) { <START> CourseUnitYoutubeVideoFragment f = new CourseUnitYoutubeVideoFragment(); <END> Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); args.putBoolean(HAS_NEXT_UNIT_ID, hasNextUnit); args.putBoolean(HAS_PREV_UNIT_ID, hasPreviousUnit); f.setArguments(args); return f; }</code><technical_language>CourseUnitYoutubeVideoFragment f = new CourseUnitYoutubeVideoFragment(); // Supply num input argument. Bundle args = new Bundle(); args.putSerializable(Router.EXTRA_COURSE_UNIT, unit); args.putBoolean(HAS_NEXT_UNIT_ID, hasNextUnit); args.putBoolean(HAS_PREV_UNIT_ID, hasPreviousUnit); f.setArguments(args); return f; replaced CourseUnitYoutubeVideoFragment fragment = new CourseUnitYoutubeVideoFragment(); fragment.setArguments(getCourseUnitBundle(unit, hasNextUnit, hasPreviousUnit)); return fragment; getCourseUnitBundle is in CourseUnitVideoFragment.java return arguments</technical_language>

Target:
public static CourseUnitYoutubeVideoFragment newInstance(VideoBlockModel unit, boolean hasNextUnit, boolean hasPreviousUnit) { CourseUnitYoutubeVideoFragment fragment = new CourseUnitYoutubeVideoFragment(); fragment.setArguments(getCourseUnitBundle(unit, hasNextUnit, hasPreviousUnit)); return fragment; }
Source:
<code><START> public void should_skip_vue_script_with_lang_ts() { <END> ActiveRules activeRules = (new ActiveRulesBuilder()) .create(RuleKey.of(CheckList.REPOSITORY_KEY, "VariableDeclarationAfterUsage")) .activate() .build(); checkFactory = new CheckFactory(activeRules); context.setActiveRules(activeRules); inputFile("vue/tsScript.vue"); createSensor().execute(context); assertThat(context.allAnalysisErrors()).isEmpty(); }</code><technical_language>refactor 2 tests</technical_language>

Target:
public void should_skip_vue_script_with_lang_ts() { analyseFile("vue/tsScript.vue"); assertThat(context.allIssues()).isEmpty(); }
Source:
<code>private static <OUT> RecordWriter<SerializationDelegate<StreamRecord<OUT>>> createRecordWriter( StreamEdge edge, int outputIndex, Environment environment, String taskName, long bufferTimeout) { @SuppressWarnings("unchecked") StreamPartitioner<OUT> outputPartitioner = (StreamPartitioner<OUT>) edge.getPartitioner(); LOG.debug("Using partitioner for output of task {}", outputPartitioner, outputIndex, taskName); ResultPartitionWriter bufferWriter = environment.getWriter(outputIndex); if (outputPartitioner instanceof ConfigurableStreamPartitioner) { int numKeyGroups = bufferWriter.getNumTargetKeyGroups(); if (0 < numKeyGroups) { ((ConfigurableStreamPartitioner) outputPartitioner).configure(numKeyGroups); } } try { <START> outputPartitioner = InstantiationUtil.clone(outputPartitioner, Thread.currentThread().getContextClassLoader()); <END> } catch (Exception e) { ExceptionUtils.rethrow(e); } RecordWriter<SerializationDelegate<StreamRecord<OUT>>> output = new RecordWriterBuilder<SerializationDelegate<StreamRecord<OUT>>>() .setChannelSelector(outputPartitioner) .setTimeout(bufferTimeout) .setTaskName(taskName) .build(bufferWriter); output.setMetricGroup(environment.getMetricGroup().getIOMetricGroup()); return output; }</code><technical_language>In opinion clone partitioner configuring it. I configure theoretically initialize some state is serializable</technical_language>

Target:
private static <OUT> RecordWriter<SerializationDelegate<StreamRecord<OUT>>> createRecordWriter( StreamEdge edge, int outputIndex, Environment environment, String taskName, long bufferTimeout) { StreamPartitioner<OUT> outputPartitioner = null; try { outputPartitioner = InstantiationUtil.clone( (StreamPartitioner<OUT>) edge.getPartitioner(), environment.getUserClassLoader()); } catch (Exception e) { ExceptionUtils.rethrow(e); } LOG.debug("Using partitioner for output of task {}", outputPartitioner, outputIndex, taskName); ResultPartitionWriter bufferWriter = environment.getWriter(outputIndex); if (outputPartitioner instanceof ConfigurableStreamPartitioner) { int numKeyGroups = bufferWriter.getNumTargetKeyGroups(); if (0 < numKeyGroups) { ((ConfigurableStreamPartitioner) outputPartitioner).configure(numKeyGroups); } } RecordWriter<SerializationDelegate<StreamRecord<OUT>>> output = new RecordWriterBuilder<SerializationDelegate<StreamRecord<OUT>>>() .setChannelSelector(outputPartitioner) .setTimeout(bufferTimeout) .setTaskName(taskName) .build(bufferWriter); output.setMetricGroup(environment.getMetricGroup().getIOMetricGroup()); return output; }
Source:
<code>public static void dump(EhcacheStateService clusterTierManagerState, StateDumpCollector clusterTierManagerStateDump) { clusterTierManagerStateDump.addState("defaultServerResource", String.valueOf(clusterTierManagerState.getDefaultServerResource())); clusterTierManagerStateDump.addState("configured", String.valueOf(clusterTierManagerState.isConfigured())); StateDumpCollector poolsDump = clusterTierManagerStateDump.subStateDumpCollector("pools"); for (Map.Entry<String, ServerSideConfiguration.Pool> poolEntry : clusterTierManagerState.getSharedResourcePools().entrySet()) { StateDumpCollector poolDump = poolsDump.subStateDumpCollector(poolEntry.getKey()); poolDump.addState("serverResource", poolEntry.getValue().getServerResource()); poolDump.addState("size", String.valueOf(poolEntry.getValue().getSize())); } <START> clusterTierManagerStateDump.addState("stores", clusterTierManagerState.getStores()); <END> }</code><technical_language>Handing out internal data structures this dangerous. want wrap it</technical_language>

Target:
public static void dump(EhcacheStateService clusterTierManagerState, StateDumpCollector clusterTierManagerStateDump) { clusterTierManagerStateDump.addState("defaultServerResource", String.valueOf(clusterTierManagerState.getDefaultServerResource())); clusterTierManagerStateDump.addState("configured", String.valueOf(clusterTierManagerState.isConfigured())); StateDumpCollector poolsDump = clusterTierManagerStateDump.subStateDumpCollector("pools"); for (Map.Entry<String, ServerSideConfiguration.Pool> poolEntry : clusterTierManagerState.getSharedResourcePools().entrySet()) { StateDumpCollector poolDump = poolsDump.subStateDumpCollector(poolEntry.getKey()); poolDump.addState("serverResource", poolEntry.getValue().getServerResource()); poolDump.addState("size", String.valueOf(poolEntry.getValue().getSize())); } Set<String> stores = new HashSet<>(clusterTierManagerState.getStores()); clusterTierManagerStateDump.addState("stores", stores); }
Source:
<code>protected void executeCommand() { setQuotaParameter(); <START> TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { <END> @Override public Void runInTransaction() { getQuotaDAO().save(getQuota()); copyQuotaPermissions(); getReturnValue().setSucceeded(true); return null; } }); }</code><technical_language>I if (isCopyPerms()) { execInTX -> save quota copy perms } else { save quota } remove check for isCopy... in copyQuota method</technical_language>

Target:
protected void executeCommand() { setQuotaParameter(); if (getParameters().isCopyPermissions()) { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { return executeAddQutoa(); } }); } else { executeAddQutoa(); } }
Source:
<code>public static String[] trim(String[] stringsToTrim) { String stringsAfterTrim[] = new String[stringsToTrim.length]; <START> int m = 0; <END> for (String a : stringsToTrim) { stringsAfterTrim[m++] = a.trim(); } return stringsAfterTrim; }</code><technical_language>i, j iterate array instead</technical_language>

Target:
public static String[] trim(String[] stringsToTrim) { String[] stringsAfterTrim = new String[stringsToTrim.length]; int i = 0; for (String stringToTrim : stringsToTrim) { stringsAfterTrim[i++] = stringToTrim.trim(); } return stringsAfterTrim; }
Source:
<code>public XMLInformation getXMLInformation() { MasterMonitorInfo mmi = Monitor.getMmi(); if (null == mmi) { throw new WebApplicationException(Status.INTERNAL_SERVER_ERROR); } <START> XMLInformation xml = new XMLInformation(mmi.tServerInfo.size(), new MasterResource().getTables(), new TablesResource().getTables()); <END> for (TabletServerStatus status : mmi.tServerInfo) { xml.addTablet(new TabletServer(status)); } return xml; }</code><technical_language>getTables() MasterResources TablesResources static methods. stateless, static method invoke existing non-static method a static final singleton instance of respective classes</technical_language>

Target:
public XMLInformation getXMLInformation() { MasterMonitorInfo mmi = Monitor.getMmi(); if (null == mmi) { throw new WebApplicationException(Status.INTERNAL_SERVER_ERROR); } new MasterResource(); new TablesResource(); XMLInformation xml = new XMLInformation(mmi.tServerInfo.size(), MasterResource.getTables(), TablesResource.getTables()); for (TabletServerStatus status : mmi.tServerInfo) { xml.addTabletServer(new TabletServer(status)); } return xml; }
Source:
<code><START> public boolean isConversionSupported(MediaType mediaType) { <END> if (encoderRegistry == null) return false; return encoderRegistry.isConversionSupported(storageMediaType, mediaType); }</code><technical_language>I updated <LINK_0></technical_language>

Target:
public boolean isConversionSupported(MediaType mediaType) { return storageMediaType == null || encoderRegistry.isConversionSupported(storageMediaType, mediaType); }
Source:
<code>public boolean shouldAllowFeedbackPrompt() { boolean result = true; if (installTimeEventCheck != null) { final long installTime = applicationInfoProvider.getInstallTime(); boolean installResult = installTimeEventCheck.shouldAllowFeedbackPrompt(installTime); if (!installResult) { logger.d("Blocking prompt based on install time check"); } result = result && installResult; } <START> if (lastUpdateTimeTimeEventCheck != null) { <END> final long lastUpdateTime = applicationInfoProvider.getLastUpdateTime(); boolean lastUpdateResult = lastUpdateTimeTimeEventCheck.shouldAllowFeedbackPrompt(lastUpdateTime); if (!lastUpdateResult) { logger.d("Blocking prompt based on last update check"); } result = result && lastUpdateResult; } if (lastCrashTimeManager != null) { boolean lastCrashResult = lastCrashTimeManager.shouldAllowFeedbackPrompt(); if (!lastCrashResult) { logger.d("Blocking prompt based on last crash check"); } result = result && lastCrashResult; } return result; }</code><technical_language>a darling fix name for please</technical_language>

Target:
public boolean shouldAllowFeedbackPrompt() { boolean result = true; if (installTimeEventCheck != null) { final long installTime = applicationInfoProvider.getInstallTime(); boolean installResult = installTimeEventCheck.shouldAllowFeedbackPrompt(installTime); if (!installResult) { logger.d("Blocking prompt based on install time check"); } result = result && installResult; } if (lastUpdateTimeEventCheck != null) { final long lastUpdateTime = applicationInfoProvider.getLastUpdateTime(); boolean lastUpdateResult = lastUpdateTimeEventCheck.shouldAllowFeedbackPrompt(lastUpdateTime); if (!lastUpdateResult) { logger.d("Blocking prompt based on last update check"); } result = result && lastUpdateResult; } if (lastCrashTimeManager != null) { boolean lastCrashResult = lastCrashTimeManager.shouldAllowFeedbackPrompt(); if (!lastCrashResult) { logger.d("Blocking prompt based on last crash check"); } result = result && lastCrashResult; } return result; }
Source:
<code>public void start() { log.debugf("Async cache loader starting %s", this); state.set(newState(false, null)); stopped = false; stateLock = new BufferLock(asyncConfiguration.modificationQueueSize()); int poolSize = asyncConfiguration.threadPoolSize(); DefaultThreadFactory processorThreadFactory = new DefaultThreadFactory(null, Thread.NORM_PRIORITY, DefaultThreadFactory.DEFAULT_PATTERN, nodeName, "AsyncStoreProcessor"); executor = new ThreadPoolExecutor(poolSize, poolSize, 120L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), processorThreadFactory); ((ThreadPoolExecutor) executor).allowCoreThreadTimeOut(true); DefaultThreadFactory coordinatorThreadFactory = new DefaultThreadFactory(null, Thread.NORM_PRIORITY, DefaultThreadFactory.DEFAULT_PATTERN, nodeName, "AsyncStoreCoordinator"); coordinator = coordinatorThreadFactory.newThread(new AsyncStoreCoordinator(asyncConfiguration.failSilently())); coordinator.start(); long interval = ctx.getCache().getCacheConfiguration().persistence().availabilityInterval(); Observable.interval(interval, TimeUnit.MILLISECONDS, Schedulers.from(ctx.getExecutor())) .map(t -> actual.isAvailable()) <START> .doOnError(err -> log.debugf("Error encountered when calling isAvailable on %s: %s", actual, err)) <END> .retry() .subscribe(available -> { availabilityLock.lock(); try { if (available != delegateAvailable) { if (available) { delegateAvailable = true; availability.signalAll(); } else { delegateAvailable = false; } } } finally { availabilityLock.unlock(); } }); }</code><technical_language>Hrmm assume exception is available? <LINK_0> instead</technical_language>

Target:
public void start() { log.debugf("Async cache loader starting %s", this); state.set(newState(false, null)); stopped = false; stateLock = new BufferLock(asyncConfiguration.modificationQueueSize()); int poolSize = asyncConfiguration.threadPoolSize(); DefaultThreadFactory processorThreadFactory = new DefaultThreadFactory(null, Thread.NORM_PRIORITY, DefaultThreadFactory.DEFAULT_PATTERN, nodeName, "AsyncStoreProcessor"); executor = new ThreadPoolExecutor(poolSize, poolSize, 120L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), processorThreadFactory); ((ThreadPoolExecutor) executor).allowCoreThreadTimeOut(true); DefaultThreadFactory coordinatorThreadFactory = new DefaultThreadFactory(null, Thread.NORM_PRIORITY, DefaultThreadFactory.DEFAULT_PATTERN, nodeName, "AsyncStoreCoordinator"); coordinator = coordinatorThreadFactory.newThread(new AsyncStoreCoordinator(asyncConfiguration.failSilently())); coordinator.start(); }
Source:
<code>public void close(String connectionId) { try { SelectionKey key = keyForId(connectionId); close(key); } catch (IllegalStateException e) { <START> logger.error("Attempt to close socket for which there is no open connection. Connection id {}", connectionId); <END> } }</code><technical_language>metric</technical_language>

Target:
public void close(String connectionId) { SelectionKey key = keyForId(connectionId); if (key == null) { metrics.selectorCloseKeyErrorCount.inc(); logger.error("Attempt to close socket for which there is no open connection. Connection id {}", connectionId); } else { close(key); } }
Source:
<code>public ScatterStringConsumer(IStringResolver<Object> resolver) { fResolver = resolver; <START> fMap = checkNotNull(HashBiMap.create()); <END> }</code><technical_language>annotate this instead</technical_language>

Target:
public ScatterStringConsumer(IStringResolver<Object> resolver) { fResolver = resolver; fMap = HashBiMap.create(); }
Source:
<code>public Options getOptions() { final Options o = new Options(); setPropsOption = new Option("s", "set", true, "set initial properties" + " before the table comes online. Expects <prop>=<value>{,<prop>=<value>}"); o.addOption(setPropsOption); excludePropsOption = new Option("e", "exclude", true, "exclude properties that should not be copied from source table. Expects <prop>{,<prop>}"); o.addOption(excludePropsOption); noFlushOption = new Option("nf", "noFlush", false, "do not flush table data in memory before cloning."); o.addOption(noFlushOption); keepOfflineOption = <START> new Option("k", "keepOffline", false, "do not bring the table online after cloning."); <END> return o; }</code><technical_language>name option "o", consistent other offline commands. For example, is [CreateTableCommand](<LINK_0> in 2.X</technical_language>

Target:
public Options getOptions() { final Options o = new Options(); setPropsOption = new Option("s", "set", true, "set initial properties" + " before the table comes online. Expects <prop>=<value>{,<prop>=<value>}"); o.addOption(setPropsOption); excludePropsOption = new Option("e", "exclude", true, "exclude properties that should not be copied from source table. Expects <prop>{,<prop>}"); o.addOption(excludePropsOption); noFlushOption = new Option("nf", "noFlush", false, "do not flush table data in memory before cloning."); o.addOption(noFlushOption); keepOfflineOption = new Option("o", "offline", false, "do not bring the table online after cloning."); o.addOption(keepOfflineOption); return o; }
Source:
<code>private void normalizeProperties() { this.hostNameBindingsToDelete = new ArrayList<>(); this.appSettingsToAdd = new HashMap<>(); this.appSettingsToRemove = new ArrayList<>(); this.appSettingStickiness = new HashMap<>(); this.connectionStringsToAdd = new HashMap<>(); this.connectionStringsToRemove = new ArrayList<>(); this.connectionStringStickiness = new HashMap<>(); this.sourceControl = null; this.sourceControlToDelete = false; this.authenticationToUpdate = false; this.diagnosticLogsToUpdate = false; this.sslBindingsToCreate = new TreeMap<>(); this.msiHandler = null; this.webSiteBase = new WebSiteBaseImpl(inner()); <START> this.hostNameSslStateMap = new HashMap<>(this.webSiteBase.hostnameSslStates()); <END> this.webAppMsiHandler.clear(); }</code><technical_language>save update items</technical_language>

Target:
private void normalizeProperties() { this.hostNameBindingsToCreate = new TreeMap<>(); this.hostNameBindingsToDelete = new ArrayList<>(); this.appSettingsToAdd = new HashMap<>(); this.appSettingsToRemove = new ArrayList<>(); this.appSettingStickiness = new HashMap<>(); this.connectionStringsToAdd = new HashMap<>(); this.connectionStringsToRemove = new ArrayList<>(); this.connectionStringStickiness = new HashMap<>(); this.sourceControl = null; this.sourceControlToDelete = false; this.authenticationToUpdate = false; this.diagnosticLogsToUpdate = false; this.sslBindingsToCreate = new TreeMap<>(); this.msiHandler = null; this.webSiteBase = new WebSiteBaseImpl(inner()); this.hostNameSslStateMap = new HashMap<>(this.webSiteBase.hostnameSslStates()); this.webAppMsiHandler.clear(); }