auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void addProcess(final String processName, final String authKey, final List<String> command, final Map<String, String> env, final String workingDirectory, final boolean isPrivileged, final boolean respawn) { for (String s : command) { if (s == null) { throw ProcessLogger.ROOT_LOGGER.nullCommandComponent(); } } synchronized (lock) { if (shutdown) { return; } final Map<String, ManagedProcess> processes = this.processes; if (processes.containsKey(processName)) { ProcessLogger.ROOT_LOGGER.duplicateProcessName(processName); return; } final ManagedProcess process = new ManagedProcess(processName, command, env, workingDirectory, lock, this, authKey, isPrivileged, respawn); processes.put(processName, process); <START> processesByKey.put(new Key(authKey.getBytes()), process); <END> processAdded(processName); } }</code><technical_language>This needs 'US-ASCII' if is encoded this</technical_language>

Target:
public void addProcess(final String processName, final String authKey, final List<String> command, final Map<String, String> env, final String workingDirectory, final boolean isPrivileged, final boolean respawn) { for (String s : command) { if (s == null) { throw ProcessLogger.ROOT_LOGGER.nullCommandComponent(); } } synchronized (lock) { if (shutdown) { return; } final Map<String, ManagedProcess> processes = this.processes; if (processes.containsKey(processName)) { ProcessLogger.ROOT_LOGGER.duplicateProcessName(processName); return; } final ManagedProcess process = new ManagedProcess(processName, command, env, workingDirectory, lock, this, authKey, isPrivileged, respawn); processes.put(processName, process); processesByKey.put(new Key(authKey.getBytes(Charset.forName("US-ASCII"))), process); processAdded(processName); } }
Source:
<code>private void registerShoutListeners() { listen(Message.LOADED, (sender, subject, args) -> { if (!subject.equals("sequences")) { return; } assert (args[0] instanceof Map<?, ?>); Map<String, Sequence> newSequences = (Map<String, Sequence>) args[0]; load(newSequences); }); listen(Message.FILTERED, (sender, subject, args) -> { assert args.length == 1; assert (args[0] instanceof Set<?>); updateVisible((Set<Sequence>) args[0]); }); listen(Message.RESET, (sender, subject, args) -> { Set<Sequence> visibleSet = new HashSet<>(sequences.values()); updateVisible(visibleSet); shout(Message.FILTERED, "", visibleSet); }); listen(Message.OPENED, (sender, subject, args) -> { if (!subject.equals("meta")) { return; } assert args[0] instanceof File; SequenceMetaParser parser = new SequenceMetaParser(); try { parser.parse((File) args[0]); <START> addMetaData(parser); <END> } catch (Exception exception) { Logging.exception(exception); AbstractNotification notification = new NotificationFactory() .getNotification(exception); shout(NotificationController.NOTIFY, "", notification); } }); }</code><technical_language>passing parser instead of data produces</technical_language>

Target:
private void registerShoutListeners() { listen(Message.LOADED, (sender, subject, args) -> { if (!subject.equals("sequences")) { return; } assert (args[0] instanceof Map<?, ?>); Map<String, Sequence> newSequences = (Map<String, Sequence>) args[0]; load(newSequences); }); listen(Message.FILTERED, (sender, subject, args) -> { assert args.length == 1; assert (args[0] instanceof Set<?>); updateVisible((Set<Sequence>) args[0]); }); listen(Message.RESET, (sender, subject, args) -> { Set<Sequence> visibleSet = new HashSet<>(sequences.values()); updateVisible(visibleSet); shout(Message.FILTERED, "", visibleSet); }); listen(Message.OPENED, (sender, subject, args) -> { if (!subject.equals("meta")) { return; } assert args[0] instanceof File; SequenceMetaParser parser = new SequenceMetaParser(); try { parser.parse((File) args[0]); addMetaData(parser.getColumns(), parser.getData()); } catch (Exception exception) { Logging.exception(exception); AbstractNotification notification = new NotificationFactory() .getNotification(exception); shout(NotificationController.NOTIFY, "", notification); } }); }
Source:
<code>protected void interpolate(Properties properties, File baseDir) { MavenSession mavenSession = legacySupport.getSession(); <START> if (mavenSession == null) { <END> return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { return; } Interpolator interpolator = new Interpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { try { entry.setValue(interpolator.interpolate((String) entry.getValue())); } catch (InterpolationException e) { logger.warn("Cannot interpolate build.properties value: " + entry.getValue()); } } }</code><technical_language>this is worth a warning cases session is null</technical_language>

Target:
protected void interpolate(Properties properties, File baseDir) { MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { return; } Interpolator interpolator = new Interpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { try { entry.setValue(interpolator.interpolate((String) entry.getValue())); } catch (InterpolationException e) { logger.warn("Cannot interpolate build.properties value: " + entry.getValue()); } } }
Source:
<code>void reset() { LOG.info("Reset HelixTaskExecutor"); if (_messageQueueMonitor != null) { _messageQueueMonitor.reset(); } for (String msgType : _hdlrFtyRegistry.keySet()) { ExecutorService pool = _executorMap.remove(msgType); _monitor.removeExecutorMonitor(msgType); if (pool != null) { LOG.info("Reset exectuor for msgType: " + msgType + ", pool: " + pool); shutdownAndAwaitTermination(pool); } MsgHandlerFactoryRegistryItem item = _hdlrFtyRegistry.get(msgType); if (item.factory() != null) { try { item.factory().reset(); <START> } catch (Exception ex) { <END> LOG.error("Failed to reset the factory of message type {}.", item.factory().toString(), msgType); } } } StringBuilder sb = new StringBuilder(); for (String taskId : _taskMap.keySet()) { MessageTaskInfo info = _taskMap.get(taskId); sb.append( "Task: " + taskId + " fails to terminate. Message: " + info._task.getMessage() + "\n"); } LOG.info(sb.toString()); _taskMap.clear(); _messageTaskMap.clear(); _knownMessageIds.clear(); _lastSessionSyncTime = null; }</code><technical_language>I understand swallow exception here. This exception means user's reset issue, error go</technical_language>

Target:
void reset() { LOG.info("Reset HelixTaskExecutor"); if (_messageQueueMonitor != null) { _messageQueueMonitor.reset(); } for (String msgType : _hdlrFtyRegistry.keySet()) { ExecutorService pool = _executorMap.remove(msgType); _monitor.removeExecutorMonitor(msgType); if (pool != null) { LOG.info("Reset exectuor for msgType: " + msgType + ", pool: " + pool); shutdownAndAwaitTermination(pool); } MsgHandlerFactoryRegistryItem item = _hdlrFtyRegistry.get(msgType); if (item.factory() != null) { try { item.factory().reset(); } catch (Exception ex) { LOG.error("Failed to reset the factory of message type {}.", item.factory().toString(), msgType, ex); } } } StringBuilder sb = new StringBuilder(); for (String taskId : _taskMap.keySet()) { MessageTaskInfo info = _taskMap.get(taskId); sb.append( "Task: " + taskId + " fails to terminate. Message: " + info._task.getMessage() + "\n"); } LOG.info(sb.toString()); _taskMap.clear(); _messageTaskMap.clear(); _knownMessageIds.clear(); _lastSessionSyncTime = null; }
Source:
<code><START> static final ReplicaMap<InetAddressAndPort> endpointMap(ReplicaList list) { return new ReplicaMap<>(list, Replica::endpoint); } <END></code><technical_language>This is a method, skip final</technical_language>

Target:
static ReplicaMap<InetAddressAndPort> endpointMap(ReplicaList list) { return new ReplicaMap<>(list, Replica::endpoint); }
Source:
<code>public int hashCode() { <START> int hash = 7; <END> hash = 31 * hash + containers; hash = 31 * hash + Boolean.hashCode(debug); hash = 31 * hash + Objects.hashCode(dockerRootDir); hash = 31 * hash + Objects.hashCode(driver); hash = 31 * hash + Arrays.hashCode(driverStatus); hash = 31 * hash + Objects.hashCode(executionDriver); hash = 31 * hash + Objects.hashCode(httpProxy); hash = 31 * hash + Objects.hashCode(httpsProxy); hash = 31 * hash + Objects.hashCode(iD); hash = 31 * hash + Boolean.hashCode(iPv4Forwarding); hash = 31 * hash + images; hash = 31 * hash + Objects.hashCode(indexServerAddress); hash = 31 * hash + Objects.hashCode(initPath); hash = 31 * hash + Objects.hashCode(initSha1); hash = 31 * hash + Objects.hashCode(kernelVersion); hash = 31 * hash + Arrays.hashCode(labels); hash = 31 * hash + Long.hashCode(memTotal); hash = 31 * hash + Boolean.hashCode(memoryLimit); hash = 31 * hash + nCPU; hash = 31 * hash + nEventsListener; hash = 31 * hash + nFd; hash = 31 * hash + nGoroutines; hash = 31 * hash + Objects.hashCode(name); hash = 31 * hash + Objects.hashCode(noProxy); hash = 31 * hash + Objects.hashCode(operatingSystem); hash = 31 * hash + Boolean.hashCode(swapLimit); hash = 31 * hash + Objects.hashCode(systemTime); hash = 31 * hash + Arrays.hashCode(systemStatus); return hash; }</code><technical_language>Objects.hash()</technical_language>

Target:
public int hashCode() { return Objects.hash(containers, debug, dockerRootDir, driver, driverStatus, executionDriver, httpProxy, httpsProxy, iD, iPv4Forwarding, images, indexServerAddress, initPath, initSha1, kernelVersion, labels, memTotal, memoryLimit, nCPU, nEventsListener, nFd, nGoroutines, name, noProxy, operatingSystem, swapLimit, systemTime, systemStatus); }
Source:
<code>public Host getHostByName(String serverName) { Host host = null; if (hostMap.containsKey(serverName)) { return hostMap.get(serverName); } host = (Host) loadObject(Host.class, serverName); if (host == null) { host = <START> CDI.current().select(Host.class, <END> AppLifecycleListener.DefaultLiteral.INSTANCE).get(); host.setName(serverName); host.setId(serverName); host.initializeHost(); storeObject(host); } else { log.info("Host restored from file, name: {}", serverName); } hostMap.put(serverName, host); return host; }</code><technical_language>create producer method like: @Produces Host createHost() { return new Host(); }</technical_language>

Target:
public Host getHostByName(String serverName) { Host host = null; if (hostMap.containsKey(serverName)) { return hostMap.get(serverName); } host = (Host) loadObject(Host.class, serverName); if (host == null) { host = createHost(); host.setName(serverName); host.setId(serverName); host.initializeHost(); storeObject(host); } else { log.info("Host restored from file, name: {}", serverName); } hostMap.put(serverName, host); return host; }
Source:
<code>public UserAuthorization findUserAuthorization(Long userId, Long roleId, String objectPath) { PersistenceManager pm = PersistenceFilter.getManager(); javax.jdo.Query query = pm.newQuery(UserAuthorization.class); Map<String, Object> paramMap = new HashMap<String, Object>(); <START> ; <END> StringBuilder filterString = new StringBuilder(); StringBuilder paramString = new StringBuilder(); appendNonNullParam("userId", filterString, paramString, "Long", userId, paramMap); appendNonNullParam("roleId", filterString, paramString, "Long", roleId, paramMap); appendNonNullParam("objectPath", filterString, paramString, "String", objectPath, paramMap); query.setFilter(filterString.toString()); query.declareParameters(paramString.toString()); List<UserAuthorization> authList = (List<UserAuthorization>) query.executeWithMap(paramMap); if (authList.isEmpty()) { return null; } else { return authList.get(0); } }</code><technical_language>Extra ;</technical_language>

Target:
public UserAuthorization findUserAuthorization(Long userId, Long roleId, String objectPath) { PersistenceManager pm = PersistenceFilter.getManager(); javax.jdo.Query query = pm.newQuery(UserAuthorization.class); Map<String, Object> paramMap = new HashMap<String, Object>(); StringBuilder filterString = new StringBuilder(); StringBuilder paramString = new StringBuilder(); appendNonNullParam("userId", filterString, paramString, "Long", userId, paramMap); appendNonNullParam("roleId", filterString, paramString, "Long", roleId, paramMap); appendNonNullParam("objectPath", filterString, paramString, "String", objectPath, paramMap); query.setFilter(filterString.toString()); query.declareParameters(paramString.toString()); List<UserAuthorization> authList = (List<UserAuthorization>) query.executeWithMap(paramMap); if (authList.isEmpty()) { return null; } else { return authList.get(0); } }
Source:
<code>public ProgressorJsonRpcHandler( RequestHandlerConfigurator configurator, AppContext appContext, EventBus eventBus, RequestTransmitter requestTransmitter) { this.configurator = configurator; this.requestTransmitter = requestTransmitter; handleMavenServerMessages(); eventBus.addHandler(WorkspaceRunningEvent.TYPE, e -> subscribe()); <START> if (appContext.getWorkspace().getStatus() == RUNNING) { <END> subscribe(); } }</code><technical_language>If workspace started subscription done. listen workspace started event</technical_language>

Target:
public ProgressorJsonRpcHandler( RequestHandlerConfigurator configurator, AppContext appContext, EventBus eventBus, RequestTransmitter requestTransmitter) { this.configurator = configurator; this.requestTransmitter = requestTransmitter; handleProgressesReports(); eventBus.addHandler(WorkspaceRunningEvent.TYPE, e -> subscribe()); if (appContext.getWorkspace().getStatus() == RUNNING) { subscribe(); } }
Source:
<code>public Callable<String> getCachePopulator( final String id, final StaticMapExtractionNamespace extractionNamespace, final String lastVersion, final Map<String, String> swap ) { return new Callable<String>() { @Override public String call() throws Exception { if (lastVersion != null) { <START> throw new AssertionError( <END> "StaticMapExtractionNamespaceCacheFactory could only be configured for a namespace which is scheduled " + "to be updated once, not periodically. Last version: `" + lastVersion + "`"); } else { swap.putAll(extractionNamespace.getMap()); return version; } } }; }</code><technical_language>this throw in getCachePopulator instead of in callable? a failure immediately</technical_language>

Target:
public Callable<String> getCachePopulator( final String id, final StaticMapExtractionNamespace extractionNamespace, final String lastVersion, final Map<String, String> swap ) { if (lastVersion != null) { throw new AssertionError( "StaticMapExtractionNamespaceCacheFactory could only be configured for a namespace which is scheduled " + "to be updated once, not periodically. Last version: `" + lastVersion + "`"); } return new Callable<String>() { @Override public String call() throws Exception { swap.putAll(extractionNamespace.getMap()); return version; } }; }
Source:
<code>private StageExecutionDescriptor(StageExecutionStrategy stageExecutionStrategy, Set<PlanNodeId> groupedExecutionScanNodes) { this.stageExecutionStrategy = requireNonNull(stageExecutionStrategy, "stageExecutionStrategy is null"); this.groupedExecutionScanNodes = requireNonNull(groupedExecutionScanNodes, "groupedExecutionScanNodes is null"); switch (stageExecutionStrategy) { case UNGROUPED_EXECUTION: checkArgument(groupedExecutionScanNodes.isEmpty()); break; case FIXED_LIFESPAN_SCHEDULE_GROUPED_EXECUTION: case DYNAMIC_LIFESPAN_SCHEDULE_GROUPED_EXECUTION: checkArgument(!groupedExecutionScanNodes.isEmpty()); break; default: <START> throw new IllegalArgumentException("Unsupport stage execution strategy: " + stageExecutionStrategy); <END> } }</code><technical_language>nit: Unsupported</technical_language>

Target:
private StageExecutionDescriptor(StageExecutionStrategy stageExecutionStrategy, Set<PlanNodeId> groupedExecutionScanNodes) { switch (stageExecutionStrategy) { case UNGROUPED_EXECUTION: checkArgument(groupedExecutionScanNodes.isEmpty(), "groupedExecutionScanNodes must be empty if stage execution strategy is ungrouped execution"); break; case FIXED_LIFESPAN_SCHEDULE_GROUPED_EXECUTION: case DYNAMIC_LIFESPAN_SCHEDULE_GROUPED_EXECUTION: checkArgument(!groupedExecutionScanNodes.isEmpty(), "groupedExecutionScanNodes cannot be empty if stage execution strategy is grouped execution"); break; default: throw new IllegalArgumentException("Unsupported stage execution strategy: " + stageExecutionStrategy); } this.stageExecutionStrategy = requireNonNull(stageExecutionStrategy, "stageExecutionStrategy is null"); this.groupedExecutionScanNodes = requireNonNull(groupedExecutionScanNodes, "groupedExecutionScanNodes is null"); }
Source:
<code>private PartitionPublishingState getClientPartitionPublishingState(String partitionId) { if (!this.isIdempotentPartitionPublishing) { throw logger.logExceptionAsWarning( new IllegalStateException("getPartitionPublishingState() shouldn't be called if the producer" + " is not an idempotent producer.")); } if (this.partitionPublishingStates.containsKey(partitionId)) { return this.partitionPublishingStates.get(partitionId); } else { <START> synchronized (this) { <END> if (this.partitionPublishingStates.containsKey(partitionId)) { return this.partitionPublishingStates.get(partitionId); } PartitionPublishingState state = new PartitionPublishingState(); this.partitionPublishingStates.put(partitionId, state); return state; } } }</code><technical_language>synchronising entire class... is synchronise parts need be</technical_language>

Target:
private PartitionPublishingState getClientPartitionPublishingState(String partitionId) { if (!isIdempotentPartitionPublishing) { throw logger.logExceptionAsWarning( new IllegalStateException("getPartitionPublishingState() shouldn't be called if the producer" + " is not an idempotent producer.")); } if (partitionPublishingStates.containsKey(partitionId)) { return partitionPublishingStates.get(partitionId); } else { synchronized (partitionPublishingStates) { if (partitionPublishingStates.containsKey(partitionId)) { return partitionPublishingStates.get(partitionId); } PartitionPublishingState state = new PartitionPublishingState(); partitionPublishingStates.put(partitionId, state); return state; } } }
Source:
<code>public PageSizeTemplate(Integer value, Integer minPageSize, Integer maxPageSize) { super(value); setDescription("Represents maximum number of items on the page"); <START> setAllowedValues("Any integer greater or equals to " + minPageSize + " and less or equals to " + maxPageSize); <END> }</code><technical_language>.. equal to... (without s)</technical_language>

Target:
public PageSizeTemplate(Integer value, Integer minPageSize, Integer maxPageSize) { super(value); setDescription("Represents maximum number of items on the page"); setAllowedValues("Any integer greater or equal to " + minPageSize + " and less or equal to " + maxPageSize); }
Source:
<code><START> public final ZkSubscription<List<String>> subscribeForSessionListChanges(final Runnable listener) { <END> getLog().info("subscribeForSessionListChanges: " + listener.hashCode()); return new ZkSubscriptionImpl.ZkSubscriptionChildrenImpl( getCurator(), listener, getSubscriptionPath("/sessions")); }</code><technical_language>throws NakadiRuntimeException {</technical_language>

Target:
public final ZkSubscription<List<String>> subscribeForSessionListChanges(final Runnable listener) throws NakadiRuntimeException { getLog().info("subscribeForSessionListChanges: " + listener.hashCode()); return new ZkSubscriptionImpl.ZkSubscriptionChildrenImpl( getCurator(), listener, getSubscriptionPath("/sessions")); }
Source:
<code><START> public Shell() throws IOException <END></code><technical_language>remove throws IOException affect callers all. expecting IOException -- if throw anymore, fine</technical_language>

Target:
public Shell()
Source:
<code>private void onCallResponse(CallResponse<CallInfo> message, ActorRef self, ActorRef sender) throws ServletParseException { String senderPath = sender.path().name(); CallInfo callInfo = message.get(); callDetailsMap.put(senderPath, callInfo); if (callInfo != null && callInfo.invite() != null) { if (logger.isDebugEnabled()) { <START> logger.debug("onCallResponse Before: callLocationMap: "+ callLocationMap.toString()); <END> } callLocationMap.put(callInfo.invite().getAddressHeader(ContactHeader.NAME).getURI().toString(), sender); if (logger.isDebugEnabled()) { logger.debug("onCallResponse After: callLocationMap: "+ callLocationMap.toString()); } } if (callInfo.direction().equalsIgnoreCase("inbound")) { if (logger.isDebugEnabled()) { logger.debug("New inbound call from: "+callInfo.from()+" to: "+callInfo.to()); } incomingCallDetailsMap.put(senderPath, callInfo); incomingCallsUpToNow.incrementAndGet(); } else { if (logger.isDebugEnabled()) { logger.debug("New outbound call from: "+callInfo.from()+" to: "+callInfo.to()); } outgoingCallDetailsMap.put(senderPath, callInfo); outgoingCallsUpToNow.incrementAndGet(); } if (maxConcurrentCalls.get() < callDetailsMap.size()) { maxConcurrentCalls.set(callDetailsMap.size()); } if (maxConcurrentIncomingCalls.get() < incomingCallDetailsMap.size()) { maxConcurrentIncomingCalls.set(incomingCallDetailsMap.size()); } if (maxConcurrentOutgoingCalls.get() < outgoingCallDetailsMap.size()) { maxConcurrentOutgoingCalls.set(outgoingCallDetailsMap.size()); } }</code><technical_language>removed</technical_language>

Target:
private void onCallResponse(CallResponse<CallInfo> message, ActorRef self, ActorRef sender) throws ServletParseException { String senderPath = sender.path().name(); CallInfo callInfo = message.get(); callDetailsMap.put(senderPath, callInfo); if (callInfo != null && callInfo.invite() != null) { callLocationMap.put(callInfo.invite().getAddressHeader(ContactHeader.NAME).getURI().toString(), sender); } if (callInfo.direction().equalsIgnoreCase("inbound")) { if (logger.isDebugEnabled()) { logger.debug("New inbound call from: "+callInfo.from()+" to: "+callInfo.to()); } incomingCallDetailsMap.put(senderPath, callInfo); incomingCallsUpToNow.incrementAndGet(); } else { if (logger.isDebugEnabled()) { logger.debug("New outbound call from: "+callInfo.from()+" to: "+callInfo.to()); } outgoingCallDetailsMap.put(senderPath, callInfo); outgoingCallsUpToNow.incrementAndGet(); } if (maxConcurrentCalls.get() < callDetailsMap.size()) { maxConcurrentCalls.set(callDetailsMap.size()); } if (maxConcurrentIncomingCalls.get() < incomingCallDetailsMap.size()) { maxConcurrentIncomingCalls.set(incomingCallDetailsMap.size()); } if (maxConcurrentOutgoingCalls.get() < outgoingCallDetailsMap.size()) { maxConcurrentOutgoingCalls.set(outgoingCallDetailsMap.size()); } }
Source:
<code>public void refreshChangedItems() { TreeViewer viewer = this.filteredTree.getViewer(); for (OperationItem item : this.activeItems.keySet()) { viewer.update(item, null); if (shouldBeVisible(item)) { viewer.expandToLevel(item, 0); } } viewer.refresh(false); <START> Iterator<OperationItem> items = this.activeItems.keySet().iterator(); <END> while (items.hasNext()) { OperationItem item = items.next(); if (this.activeItems.get(item)) { items.remove(); } } }</code><technical_language>I this simpler if a set of removedItems called clear set here</technical_language>

Target:
public void refreshChangedItems() { TreeViewer viewer = this.filteredTree.getViewer(); for (OperationItem item : Sets.union(this.activeItems, this.removedItems)) { viewer.update(item, null); if (shouldBeVisible(item)) { viewer.expandToLevel(item, 0); } } viewer.refresh(false); this.activeItems.removeAll(this.removedItems); this.removedItems.clear(); }
Source:
<code>public void onCheatGrowth(ActivateEvent event, EntityRef item, CheatGrowthComponent cheatGrowthComponent, ItemComponent itemComponent) { <START> if (!event.getTarget().hasComponent(VineDefinitionComponent.class) || !event.getTarget().hasComponent(VineNodeComponent.class)) { <END> return; } VineDefinitionComponent vineDefinitionComponent = event.getTarget().getComponent(VineDefinitionComponent.class); VineNodeComponent vineNodeComponent = event.getTarget().getComponent(VineNodeComponent.class); if (!cheatGrowthComponent.causesUnGrowth) { doGrowVine(event.getTarget(), vineNodeComponent, vineDefinitionComponent); } }</code><technical_language>please replace event.getTarget a variable clearer</technical_language>

Target:
public void onCheatGrowth(ActivateEvent event, EntityRef item, CheatGrowthComponent cheatGrowthComponent, ItemComponent itemComponent) { EntityRef target = event.getTarget(); if (!target.hasComponent(VineDefinitionComponent.class) || !target.hasComponent(VineNodeComponent.class)) { return; } VineDefinitionComponent vineDefinitionComponent = target.getComponent(VineDefinitionComponent.class); VineNodeComponent vineNodeComponent = target.getComponent(VineNodeComponent.class); if (!cheatGrowthComponent.causesUnGrowth) { doGrowVine(target, vineNodeComponent, vineDefinitionComponent); } }
Source:
<code>protected File createPapyrusUserOomphModel(Path setupFilePath, File... project) throws IOException { OomphUserModelBuilder userModelBuilder = new OomphUserModelBuilder(); Path oomphFolderPath = getTestTmpFolder().resolve("oomphFolder"); File userSetupFile = userModelBuilder.setInstallationLocation(oomphFolderPath.toString()) .setWorkspaceLocation(getWorkspaceLocation().getAbsolutePath()) <START> .setProjectPaths(Arrays.stream(project).map(p -> p.getAbsolutePath()).toArray(String[]::new)) END> .setRepositories("<LINK_0>", "<LINK_1>") .setRequirements("org.eclipse.uml2.feature.group", "org.eclipse.papyrus.sdk.feature.feature.group", "org.eclipse.emf.compare.rcp.ui.feature.group", "org.eclipse.emf.compare.uml2.feature.group", "org.eclipse.emf.compare.diagram.gmf.feature.group", "org.eclipse.emf.compare.diagram.papyrus.feature.group") .saveTo(setupFilePath.toString()); return userSetupFile; }</code><technical_language>please add "<LINK_2>" repositories list</technical_language>

Target:
protected File createPapyrusUserOomphModel(Path setupFilePath, File... project) throws IOException { OomphUserModelBuilder userModelBuilder = new OomphUserModelBuilder(); Path oomphFolderPath = getTestTmpFolder().resolve("oomphFolder"); File userSetupFile = userModelBuilder.setInstallationLocation(oomphFolderPath.toString()) .setWorkspaceLocation(getWorkspaceLocation().getAbsolutePath()) .setProjectPaths(Arrays.stream(project).map(p -> p.getAbsolutePath()).toArray(String[]::new)) .setRepositories("<LINK_0>", "<LINK_1>", "<LINK_2>") .setRequirements("org.eclipse.uml2.feature.group", "org.eclipse.papyrus.sdk.feature.feature.group", "org.eclipse.emf.compare.rcp.ui.feature.group", "org.eclipse.emf.compare.uml2.feature.group", "org.eclipse.emf.compare.diagram.gmf.feature.group", "org.eclipse.emf.compare.diagram.papyrus.feature.group") .saveTo(setupFilePath.toString()); return userSetupFile; }
Source:
<code>public void registerForVoiceRouterMessages(long id) { VoiceRouter.VoiceMessageListener listener = new VoiceRouter.VoiceMessageListener() { @Override public void onVoiceMessage() { if (aidlCallbackListener != null) { for (OsmandAidlService.AidlCallbackParams cb : aidlCallbackListener.getAidlCallbacks().values()) { if (!aidlCallbackListener.getAidlCallbacks().isEmpty() && (cb.getKey() & KEY_ON_VOICE_MESSAGE) > 0) { try { cb.getCallback().onVoiceRouterNotify(); } catch (Exception e) { LOG.debug(e.getMessage(), e); <START> } <END> } } } } }; voiceRouterMessageCallbacks.put(id, listener); app.getRoutingHelper().getVoiceRouter().addVoiceMessageListener(listener); }</code><technical_language>debug</technical_language>

Target:
public void registerForVoiceRouterMessages(long id) { VoiceRouter.VoiceMessageListener listener = new VoiceRouter.VoiceMessageListener() { @Override public void onVoiceMessage() { if (aidlCallbackListener != null) { for (OsmandAidlService.AidlCallbackParams cb : aidlCallbackListener.getAidlCallbacks().values()) { if (!aidlCallbackListener.getAidlCallbacks().isEmpty() && (cb.getKey() & KEY_ON_VOICE_MESSAGE) > 0) { try { cb.getCallback().onVoiceRouterNotify(); } catch (Exception e) { LOG.error(e.getMessage(), e); } } } } } }; voiceRouterMessageCallbacks.put(id, listener); app.getRoutingHelper().getVoiceRouter().addVoiceMessageListener(listener); }
Source:
<code>public void createRequiredExternalIdWithRolesOK() { mockHealthCodeAndAccountRetrieval(); STUDY.setExternalIdRequiredOnSignup(true); <START> StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT).withExternalId(null).build(); <END> participantService.createParticipant(STUDY, participant, false); }</code><technical_language>verify commitAssign() is called</technical_language>

Target:
public void createRequiredExternalIdWithRolesOK() { mockHealthCodeAndAccountRetrieval(); STUDY.setExternalIdRequiredOnSignup(true); StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT).withExternalId(null).build(); participantService.createParticipant(STUDY, participant, false); verify(externalIdService).commitAssignExternalId(null); }
Source:
<code>private boolean acquire(String callerId,String resourceId, Long ttl, Date now, Date expiration) { BasicDBObject update=new BasicDBObject(). append(CALLERID,callerId). append(RESOURCEID,resourceId). append(TIMESTAMP,now). append(TTL, ttl). append(EXPIRATION,expiration). append(COUNT,1). append(VERSION,1); LOGGER.debug("insert: {}", update); <START> coll.insert(update, WriteConcern.ACKNOWLEDGED); <END> return true; }</code><technical_language>Ack is enough. remove dup exception</technical_language>

Target:
private boolean acquire(String callerId,String resourceId, Long ttl, Date now, Date expiration) { BasicDBObject update=new BasicDBObject(). append(CALLERID,callerId). append(RESOURCEID,resourceId). append(TIMESTAMP,now). append(TTL, ttl). append(EXPIRATION,expiration). append(COUNT,1). append(VERSION,1); try { LOGGER.debug("insert: {}", update); coll.insert(update, WriteConcern.ACKNOWLEDGED); } catch (DuplicateKeyException dke) { return false; } return true; }
Source:
<code>public List<Block> execute(TocMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { Block rootBlock = null; WikiModel wikiModel = this.wikiModelProvider.get(); if (parameters.getReference() != null) { if (wikiModel != null) { parameters.setScope(TocMacroParameters.Scope.PAGE); rootBlock = getXDOM(new DocumentResourceReference(parameters.getReference()), wikiModel); } else { throw new MacroExecutionException( "The \"reference\" parameter can only be used when a WikiModel implementation is available"); } } TreeParametersBuilder builder = new TreeParametersBuilder(); TreeParameters treeParameters = builder.build(rootBlock, parameters, context); List<Block> parametersList = this.tocTreeBuilder.build(treeParameters); if (parameters.getBox()) { <START> MacroBlock mb = new MacroBlock("toc", parametersList.get(0).getRoot().getParameters(), false); <END> } return parametersList; }</code><technical_language>I this expect. returning a new toc macro here, a box intent of this if</technical_language>

Target:
public List<Block> execute(TocMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { Block rootBlock = null; WikiModel wikiModel = this.wikiModelProvider.get(); if (parameters.getReference() != null) { if (wikiModel != null) { parameters.setScope(TocMacroParameters.Scope.PAGE); rootBlock = getXDOM(new DocumentResourceReference(parameters.getReference()), wikiModel); } else { throw new MacroExecutionException( "The \"reference\" parameter can only be used when a WikiModel implementation is available"); } } TreeParametersBuilder builder = new TreeParametersBuilder(); TreeParameters treeParameters = builder.build(rootBlock, parameters, context); List<Block> parametersList = this.tocTreeBuilder.build(treeParameters); if (parameters.getBox()) { BoxMacroParameters boxParameters = new BoxMacroParameters(); boxParameters.setCssClass(context.getId() + "message"); parametersList = boxMacro.execute(boxParameters, content, context); } return parametersList; }
Source:
<code>private void writeMappingTable(Map<String,String> mappings) { createMappingTable(); PreparedStatement pStatement = session.prepare("INSERT INTO openshift_metrics.metrics_mappings (project_id, project_name) VALUES(?,?);"); for (Map.Entry<String,String> entry: mappings.entrySet()) { <START> int max_retries = 3; <END> int tries = 0; boolean succeeded = false; while (!succeeded && tries < max_retries) { try { log.infof("trying to write value to metrics_mapping table: %s %s", entry.getKey(), entry.getValue()); session.execute(pStatement.bind(entry.getKey(), entry.getValue())); log.infof("wrote value to metrics_mapping table"); succeeded = true; } catch (Exception e) { log.errorf(e, "Error trying to insert entry into the openshift_metrics.metrics_mappings table (%s:%s). Will retry.", entry.getKey(), entry.getValue()); try { Thread.sleep(1000); } catch (InterruptedException e1) { e1.printStackTrace(); } } tries++; } if (!succeeded) { throw new RuntimeException("Could not write all values to the openshift_metrics.metrics_mapping table. Aborting"); } } session.execute(pStatement.bind("%succeeded", "true")); }</code><technical_language>try stay consistent coding conventions rename this maxRetries</technical_language>

Target:
private void writeMappingTable(Map<String,String> mappings) { createMappingTable(); PreparedStatement pStatement = session.prepare("INSERT INTO openshift_metrics.metrics_mappings (project_id, project_name) VALUES(?,?);"); for (Map.Entry<String,String> entry: mappings.entrySet()) { int maxRetries = 3; int tries = 0; boolean succeeded = false; while (!succeeded && tries < maxRetries) { try { log.debugf("trying to write value to metrics_mapping table: %s %s", entry.getKey(), entry.getValue()); session.execute(pStatement.bind(entry.getKey(), entry.getValue())); log.debugf("wrote value to metrics_mapping table"); succeeded = true; } catch (Exception e) { log.errorf(e, "Error trying to insert entry into the openshift_metrics.metrics_mappings table (%s:%s). Will retry.", entry.getKey(), entry.getValue()); try { Thread.sleep(1000); } catch (InterruptedException ie) { break; } } tries++; } if (!succeeded) { throw new RuntimeException("Could not write all values to the openshift_metrics.metrics_mapping table. Aborting"); } } session.execute(pStatement.bind("%succeeded", "true")); }
Source:
<code>public void testRelativeIncludesWithLoadingViaUri() throws Exception { tearDown(); File configFile = new File("./tmp/test-config.xml"); File configFile2 = new File("./tmp/test-config2.xml"); new File(configFile.getParent()).mkdirs(); out = new BufferedWriter(new FileWriter(configFile2)); startConfig(); appendProperty("a", "b"); endConfig(); out = new BufferedWriter(new FileWriter(configFile)); startConfig(); startInclude(configFile2.getName()); endInclude(); appendProperty("c", "d"); endConfig(); Path fileResource = new Path(configFile.toURI()); conf.addResource(fileResource); <START> assertEquals(conf.get("a"), "b"); <END> assertEquals(conf.get("c"), "d"); configFile.delete(); configFile2.delete(); new File(configFile.getParent()).delete(); }</code><technical_language>params wrong round. fault, reason replicate existing issue</technical_language>

Target:
public void testRelativeIncludesWithLoadingViaUri() throws Exception { tearDown(); File configFile = new File("./tmp/test-config.xml"); File configFile2 = new File("./tmp/test-config2.xml"); new File(configFile.getParent()).mkdirs(); out = new BufferedWriter(new FileWriter(configFile2)); startConfig(); appendProperty("a", "b"); endConfig(); out = new BufferedWriter(new FileWriter(configFile)); startConfig(); startInclude(configFile2.getName()); endInclude(); appendProperty("c", "d"); endConfig(); Path fileResource = new Path(configFile.toURI()); conf.addResource(fileResource); assertEquals("b", conf.get("a")); assertEquals("d", conf.get("c")); configFile.delete(); configFile2.delete(); new File(configFile.getParent()).delete(); }
Source:
<code><START> public static long getLength(ArtifactInputStream is) <END> throws IOException { InputStream target = is.getTarget(); if (!(target instanceof SbByteRangeInputStream)) { return -1L; } SbByteRangeInputStream bris = (SbByteRangeInputStream) target; return bris.getLength(); }</code><technical_language>I this logic -- in ArtifactInputStream (or parent), contained in class need a utility class for this. benefit of this</technical_language>

Target:
public static long getLength(ArtifactInputStream is) throws IOException { InputStream target = is.getTarget(); if (!(target instanceof ByteRangeInputStream)) { return -1L; } ByteRangeInputStream bris = (ByteRangeInputStream) target; return bris.getLength(); }
Source:
<code><START> public void persistAsyncTaskPlaceHolder(VdcActionType parentCommand, String taskKey) { <END> if (!taskKeyToTaskIdMap.containsKey(taskKey)) { taskKeyToTaskIdMap.put(taskKey, persistAsyncTaskPlaceHolder(parentCommand)); } }</code><technical_language>I suggested in another patch, consider a version for persistAsyncTaskPlaceHolder argument (parentCommand) default a DEFAULT_TASK_KEY. for getTaskIdForTaskKey - a "getTaskIdMethod". This is mandatory, a suggestion</technical_language>

Target:
public void persistAsyncTaskPlaceHolder(VdcActionType parentCommand, String taskKey) { if (taskKeyToTaskIdMap.containsKey(taskKey)) { return; } try { AsyncTasks task = createAsyncTask(new AsyncTaskCreationInfo(), parentCommand); Guid taskId = task.getTaskId(); AsyncTaskUtils.addOrUpdateTaskInDB(task, null, EMPTY_GUID_ARRAY); taskKeyToTaskIdMap.put(taskKey, taskId); } catch (RuntimeException ex) { log.errorFormat("Error during persistAsyncTaskPlaceHolder for command: {0}. Exception {1}", this.getClass().getName(), ex); } }
Source:
<code><START> public Integer int32(String name) { <END> Int32Field field = fieldSearcher.nextField(name, Int32Field.class, null, readBuffer); if (field == null) { return null; } return (Integer) field.decode(readBuffer); }</code><technical_language>some generics Field, eliminate redundant null checking decode calling here. point in handing null readBuffer method</technical_language>

Target:
public Integer int32(String name) { return fieldDecoder.decodeValue(name, Int32Field.class); }
Source:
<code>private static String formatTime( final long startTime ) { return OffsetDateTime <START> .ofInstant( Instant.ofEpochMilli( startTime ), ZoneId.of("GMT") ) <END> .format( ISO_OFFSET_DATE_TIME ); }</code><technical_language>matter UTC</technical_language>

Target:
private static String formatTime( final long startTime ) { return OffsetDateTime .ofInstant( Instant.ofEpochMilli( startTime ), UTC_ZONE_ID) .format( ISO_OFFSET_DATE_TIME ); }
Source:
<code>private boolean isCallToSystemIdentityHashCodeWithValueBasedClass(int seen) { boolean callToSystemIdentityHashCode = seen == INVOKESTATIC && "java/lang/System".equals(getClassConstantOperand()) && "identityHashCode".equals(getNameConstantOperand()); <START> if (!callToSystemIdentityHashCode) { <END> return false; } Item callArgumentStackItem = getStack().getStackItem(0); String callArgumentSignature = callArgumentStackItem.getSignature(); String callArgumentClassName = ClassName.extractClassName(callArgumentSignature); return ValueBasedClassIdentifier.isValueBasedClass(callArgumentClassName); }</code><technical_language>IDENTITY_HASH_CODE constant, simplify this: boolean callToSystemIdentityHashCode = == INVOKESTATIC && getMethodDescriptorOperand().equals(IDENTITY_HASH_CODE);</technical_language>

Target:
private boolean isCallToSystemIdentityHashCodeWithValueBasedClass(int seen) { boolean callToSystemIdentityHashCode = seen == INVOKESTATIC && getMethodDescriptorOperand().equals(IDENTITY_HASH_CODE); if (!callToSystemIdentityHashCode) { return false; } Item callArgumentStackItem = getStack().getStackItem(0); String callArgumentSignature = callArgumentStackItem.getSignature(); String callArgumentClassName = ClassName.fromFieldSignature(callArgumentSignature); return ValueBasedClassIdentifier.isValueBasedClass(callArgumentClassName); }
Source:
<code>public boolean isValidExprForIndexesAndMVs(StringBuffer msg, boolean isMV) { final int invalidFunctionId = containsFunctionByIds(INVALID_FUNCTIONS_FOR_IDXS_AND_MVS); if (invalidFunctionId != -1) { if (invalidFunctionId == FunctionSQL.voltGetCurrentTimestampId()) { msg.append("cannot include the function NOW or CURRENT_TIMESTAMP."); return false; } else if (invalidFunctionId == FunctionForVoltDB.FunctionDescriptor.FUNC_VOLT_STR) { msg.append("cannot include the function STR."); return false; } else { <START> msg.append("cannot include invalid function."); <END> return false; } } else if (hasAnySubexpressionOfClass(AggregateExpression.class)) { msg.append("cannot contain aggregate expressions."); return false; } else if (hasAnySubexpressionOfClass(AbstractSubqueryExpression.class)) { if (isMV) { msg.append("cannot contain subquery sources."); } else { msg.append("cannot contain subqueries."); } return false; } else if (hasUserDefinedFunctionExpression()) { msg.append("cannot contain calls to user defined functions."); return false; } else { return true; } }</code><technical_language>assert false; // reach Also, prefer switch for a bit of clarity</technical_language>

Target:
public boolean isValidExprForIndexesAndMVs(StringBuffer msg, boolean isMV) { final int invalidFunctionId = containsFunctionByIds(INVALID_FUNCTIONS_FOR_IDXS_AND_MVS); if (invalidFunctionId != -1) { if (invalidFunctionId == FunctionSQL.voltGetCurrentTimestampId()) { msg.append("cannot include the function NOW or CURRENT_TIMESTAMP."); return false; } else if (invalidFunctionId == FunctionForVoltDB.FunctionDescriptor.FUNC_VOLT_STR) { msg.append("cannot include the function STR."); return false; } else { assert false; return false; } } else if (hasAnySubexpressionOfClass(AggregateExpression.class)) { msg.append("cannot contain aggregate expressions."); return false; } else if (hasAnySubexpressionOfClass(AbstractSubqueryExpression.class)) { if (isMV) { msg.append("cannot contain subquery sources."); } else { msg.append("cannot contain subqueries."); } return false; } else if (hasUserDefinedFunctionExpression()) { msg.append("cannot contain calls to user defined functions."); return false; } else { return true; } }
Source:
<code>public void testGetCompletionTimesTwoFragmentInteractionP2PSync() { Trace trace1 = new Trace(); trace1.setId("1_2ip2psync"); trace1.setStartTime(System.currentTimeMillis() - 60000); Consumer c1 = new Consumer(); c1.setUri("testuri"); c1.setDuration(TimeUnit.NANOSECONDS.convert(5000, TimeUnit.MILLISECONDS)); trace1.getNodes().add(c1); Producer p1 = new Producer(); p1.setUri("testuri2"); p1.setBaseTime(TimeUnit.NANOSECONDS.convert(500, TimeUnit.MILLISECONDS)); p1.setDuration(TimeUnit.NANOSECONDS.convert(4000, TimeUnit.MILLISECONDS)); p1.addInteractionCorrelationId("cid1_2ip2psync"); c1.getNodes().add(p1); Trace trace2 = new Trace(); trace2.setId("2_2ip2psync"); trace2.setStartTime(trace1.getStartTime() + 2000); Consumer c2 = new Consumer(); c2.setUri("testuri2"); c2.setDuration(TimeUnit.NANOSECONDS.convert(1000, TimeUnit.MILLISECONDS)); c2.addInteractionCorrelationId("cid1_2ip2psync"); trace2.getNodes().add(c2); try { publisher.publish(null, Arrays.asList(trace1, trace2)); } catch (Exception e1) { <START> fail("Failed to store: " + e1); <END> } Wait.until(() -> service.searchFragments(null, new Criteria()).size() == 2); Wait.until(() -> analytics.getTraceCompletionTimes(null, new Criteria()).size() == 1); List<CompletionTime> times = analytics.getTraceCompletionTimes(null, new Criteria()); assertNotNull(times); assertEquals(1, times.size()); assertEquals(5000, times.get(0).getDuration()); }</code><technical_language>This a test error</technical_language>

Target:
public void testGetCompletionTimesTwoFragmentInteractionP2PSync() throws Exception { Trace trace1 = new Trace(); trace1.setId("1_2ip2psync"); trace1.setStartTime(System.currentTimeMillis() - 60000); Consumer c1 = new Consumer(); c1.setUri("testuri"); c1.setDuration(TimeUnit.NANOSECONDS.convert(5000, TimeUnit.MILLISECONDS)); trace1.getNodes().add(c1); Producer p1 = new Producer(); p1.setUri("testuri2"); p1.setBaseTime(TimeUnit.NANOSECONDS.convert(500, TimeUnit.MILLISECONDS)); p1.setDuration(TimeUnit.NANOSECONDS.convert(4000, TimeUnit.MILLISECONDS)); p1.addInteractionCorrelationId("cid1_2ip2psync"); c1.getNodes().add(p1); Trace trace2 = new Trace(); trace2.setId("2_2ip2psync"); trace2.setStartTime(trace1.getStartTime() + 2000); Consumer c2 = new Consumer(); c2.setUri("testuri2"); c2.setDuration(TimeUnit.NANOSECONDS.convert(1000, TimeUnit.MILLISECONDS)); c2.addInteractionCorrelationId("cid1_2ip2psync"); trace2.getNodes().add(c2); publisher.publish(null, Arrays.asList(trace1, trace2)); Wait.until(() -> service.searchFragments(null, new Criteria()).size() == 2); Wait.until(() -> analytics.getTraceCompletionTimes(null, new Criteria()).size() == 1); List<CompletionTime> times = analytics.getTraceCompletionTimes(null, new Criteria()); assertNotNull(times); assertEquals(1, times.size()); assertEquals(5000, times.get(0).getDuration()); }
Source:
<code>protected void executeCommand() { StoragePoolIsoMap map = loadStoragePoolIsoMap(); changeDomainStatusWithCompensation(map, StorageDomainStatus.Unknown, StorageDomainStatus.Locked, getCompensationContext()); if (shouldPerformOvfUpdate()) { ActionReturnValue returnValue = runInternalAction(ActionType.UpdateOvfStoreForStorageDomain, createUpdateOvfStoreParams(), cloneContext().withoutCompensationContext()); if (!returnValue.getSucceeded()) { <START> return; <END> } } if (noAsyncOperations()) { executeDeactivateCommand(); } setSucceeded(true); }</code><technical_language>report this failure out getActionReturnValue()</technical_language>

Target:
protected void executeCommand() { StoragePoolIsoMap map = loadStoragePoolIsoMap(); changeDomainStatusWithCompensation(map, StorageDomainStatus.Unknown, StorageDomainStatus.Locked, getCompensationContext()); if (shouldPerformOvfUpdate()) { ActionReturnValue returnValue = runInternalAction(ActionType.UpdateOvfStoreForStorageDomain, createUpdateOvfStoreParams(), cloneContext().withoutCompensationContext()); if (!returnValue.getSucceeded()) { getReturnValue().getValidationMessages().addAll(returnValue.getValidationMessages()); getReturnValue().getExecuteFailedMessages().addAll(returnValue.getExecuteFailedMessages()); return; } } if (noAsyncOperations()) { executeDeactivateCommand(); } setSucceeded(true); }
Source:
<code>public void testGetItemId() { <START> Long expected = CoreArtifactTokens.OseeTypesFolder.getId(); <END> Long actual = item.getItemId().getId(); assertEquals(expected, actual); }</code><technical_language>replace this 1 line: assertEquals(oreArtifactTokens.OseeTypesFolder, item.getItemId());</technical_language>

Target:
public void testGetItemId() { assertEquals(CoreArtifactTokens.OseeTypesFolder, item.getItemId()); }
Source:
<code>protected void changeParamgumentName(ParameterInfo info) { VariableDeclaration param= getParameter(info.getOldIndex()); if (!info.getOldName().equals(param.getName().getIdentifier())) return; String msg= RefactoringCoreMessages.ChangeSignatureRefactoring_update_parameter_references; TextEditGroup description= fCuRewrite.createGroupDescription(msg); TempOccurrenceAnalyzer analyzer= new TempOccurrenceAnalyzer(param, false); analyzer.perform(); SimpleName[] paramOccurrences= analyzer.getReferenceAndDeclarationNodes(); for (SimpleName <START> occurence : <END> paramOccurrences) { getASTRewrite().set(occurence, SimpleName.IDENTIFIER_PROPERTY, info.getNewName(), description); } }</code><technical_language>rename occurrence</technical_language>

Target:
protected void changeParamgumentName(ParameterInfo info) { VariableDeclaration param= getParameter(info.getOldIndex()); if (!info.getOldName().equals(param.getName().getIdentifier())) return; String msg= RefactoringCoreMessages.ChangeSignatureRefactoring_update_parameter_references; TextEditGroup description= fCuRewrite.createGroupDescription(msg); TempOccurrenceAnalyzer analyzer= new TempOccurrenceAnalyzer(param, false); analyzer.perform(); for (SimpleName occurrence : analyzer.getReferenceAndDeclarationNodes()) { getASTRewrite().set(occurrence, SimpleName.IDENTIFIER_PROPERTY, info.getNewName(), description); } }