auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public ChangeRequestSCMHeadCategory() { <END> super("change-requests", Messages._ChangeRequestSCMHeadCategory_DisplayName()); }</code><technical_language>is this in impl package? SCM implementation wish return this others</technical_language>

Target:
private ChangeRequestSCMHeadCategory() { super("change-requests", Messages._ChangeRequestSCMHeadCategory_DisplayName()); }
Source:
<code>KeyedMeter(String key, String name) { <START> _key = key; _name = name; _isEagerlyRegistered = false; <END> }</code><technical_language>Delegate this(key, name, false)</technical_language>

Target:
KeyedMeter(String key, String name) { this(key, name, false); }
Source:
<code>public void testValidateBondsNewSlaveAddedToBond(){ List<Bond> parametersBondList = new ArrayList<Bond>(); Set<VdsNetworkInterface> existingNics = new HashSet<VdsNetworkInterface>(); Bond unmanagedBond = createBond("bond_unmanaged", "eth0", "eth1", "eth2"); existingNics.add(unmanagedBond); <START> Bond bond = createBond("bond0", "eth0", "eth1", "eth2"); <END> parametersBondList.add(bond); Bond existingBond = createBond("bond0", "eth0", "eth1"); existingNics.add(existingBond); BusinessEntityMap nicEntityMap = new BusinessEntityMap<VdsNetworkInterface>(existingNics); UnmanagedNetworkValidator validator = new UnmanagedNetworkValidator(); ValidationResult result = validator.validateBonds(unmanagedBond, parametersBondList, nicEntityMap); assertEquals(ValidationResult.VALID, result); }</code><technical_language>dont commetns, avoid ~ do this rename: bond->bondWithUnmanagedNetwork</technical_language>

Target:
public void testValidateBondsNewSlaveAddedToBond(){ VdsNetworkInterface unmanagedBond = createBond("bond_unmanaged", "eth0", "eth1", "eth2"); VdsNetworkInterface existingBond = createBond("bond0", "eth0", "eth1"); Set<VdsNetworkInterface> existingNics = new HashSet<>(Arrays.asList(unmanagedBond, existingBond)); Bond existingBondWithUnmanagedNetwork = createBond("bond0", "eth0", "eth1", "eth2"); List<Bond> bondsFromSetupNetworksParametersList = Arrays.asList(existingBondWithUnmanagedNetwork); BusinessEntityMap<VdsNetworkInterface> nicEntityMap = new BusinessEntityMap<>(existingNics); ValidationResult result = validator.validateBonds(unmanagedBond, bondsFromSetupNetworksParametersList, nicEntityMap); assertEquals(ValidationResult.VALID, result); }
Source:
<code>private void handleReblogStateChanges() { mViewModel.getReblogState().observe(this, event -> { event.applyIfNotHandled(state -> { if (state instanceof NoSite) { ReaderActivityLauncher.showNoSiteToReblog(getActivity()); } else if (state instanceof SitePicker) { SitePicker spState = (SitePicker) state; ActivityLauncher.showSitePickerForResult( this, spState.getSite(), SitePickerMode.REBLOG_SELECT_MODE ); } else if (state instanceof PostEditor) { <START> PostEditor peState = (PostEditor) state; <END> ActivityLauncher.openEditorForReblog( getActivity(), peState.getSite(), peState.getPost(), PagePostCreationSourcesDetail.POST_FROM_REBLOG ); } else { ToastUtils.showToast(getActivity(), R.string.reader_reblog_error); } return null; }); }); }</code><technical_language>rename peState :-)</technical_language>

Target:
private void handleReblogStateChanges() { mViewModel.getReblogState().observe(this, event -> { event.applyIfNotHandled(state -> { if (state instanceof NoSite) { ReaderActivityLauncher.showNoSiteToReblog(getActivity()); } else if (state instanceof SitePicker) { SitePicker spState = (SitePicker) state; ActivityLauncher.showSitePickerForResult( this, spState.getSite(), SitePickerMode.REBLOG_SELECT_MODE ); } else if (state instanceof PostEditor) { PostEditor postEditorStateData = (PostEditor) state; ActivityLauncher.openEditorForReblog( getActivity(), postEditorStateData.getSite(), postEditorStateData.getPost(), PagePostCreationSourcesDetail.POST_FROM_REBLOG ); } else { ToastUtils.showToast(getActivity(), R.string.reader_reblog_error); } return null; }); }); }
Source:
<code>public V setValue(V arg0) { <START> throw new IllegalStateException("Pairs are immutable."); <END> }</code><technical_language>UnsupportedOperationException is more accurate. Pair is immutable though. private fields potentially mutable, user in constructor, provided user getters</technical_language>

Target:
public V setValue(V arg0) { throw new UnsupportedOperationException("Pairs are immutable."); }
Source:
<code>public T get() throws InterruptedException, ExecutionException { try { T v = future.get(); onceToCircuitbreaker.applyOnce(cb -> nanosecondTimer.elapsed( time -> cb.onSuccess(time, TimeUnit.NANOSECONDS))); return v; } catch (CancellationException | InterruptedException e) { onceToCircuitbreaker.applyOnce(cb -> cb.releasePermission()); throw e; } catch (Exception e) { onceToCircuitbreaker.applyOnce(cb -> nanosecondTimer.elapsed( time -> cb.onError(time, TimeUnit.NANOSECONDS, e))); throw e; <START> } finally { future.cancel(true); <END> } }</code><technical_language>cancelling future (here below)</technical_language>

Target:
public T get() throws InterruptedException, ExecutionException { try { T v = future.get(); onceToCircuitbreaker.applyOnce(cb -> cb.onSuccess(System.nanoTime() - start, TimeUnit.NANOSECONDS)); return v; } catch (CancellationException | InterruptedException e) { onceToCircuitbreaker.applyOnce(cb -> cb.releasePermission()); throw e; } catch (Exception e) { onceToCircuitbreaker.applyOnce(cb -> cb.onError(System.nanoTime() - start, TimeUnit.NANOSECONDS, e)); throw e; } }
Source:
<code>public void onPlayerTick(TickEvent.PlayerTickEvent event) { if (event.phase != TickEvent.Phase.END || event.side != Side.SERVER) { return; } EntityPlayer player = event.player; World world = player.world; BlockPos pos = player.getPosition(); IWorldClimateHolder worldClimateHolder = ClimateManager.climateRoot.getWorldClimate(world); IClimateState climateState = worldClimateHolder.getState(pos); <START> if (world.getTotalWorldTime() % 100 == 0 <END> && !climateState.equals(previousState)) { ClimateHandlerServer.previousState = climateState; NetworkUtil.sendToPlayer(new PacketClimatePlayer(climateState), player); } }</code><technical_language>TickHelper avoid players ticking server time</technical_language>

Target:
public void onPlayerTick(TickEvent.PlayerTickEvent event) { if (event.phase != TickEvent.Phase.END || event.side != Side.SERVER) { return; } EntityPlayer player = event.player; World world = player.world; BlockPos pos = player.getPosition(); IWorldClimateHolder worldClimateHolder = ClimateManager.climateRoot.getWorldClimate(world); IClimateState climateState = worldClimateHolder.getState(pos); tickHelper.onTick(); if (tickHelper.updateOnInterval(100) && !climateState.equals(previousState)) { ClimateHandlerServer.previousState = climateState; NetworkUtil.sendToPlayer(new PacketClimatePlayer(climateState), player); } }
Source:
<code>public void setActiveHandler(WorkbenchDocksHandler handler) { if (!isAuthoringActive()) { return; } if (activeHandler != null) { if (activeHandler.equals(handler) && !activeHandler.shouldRefreshDocks()) { return; } } activeHandler = handler; if (activeHandler.shouldDisableDocks()) { uberfireDocks.hide(UberfireDockPosition.EAST, currentPerspectiveIdentifier); uberfireDocks.hide(UberfireDockPosition.WEST, currentPerspectiveIdentifier); } else { if (activeDocks != null) { uberfireDocks.remove(activeDocks); } Collection<WorkbenchDockEntry> docks = activeHandler.provideDocks(currentPerspectiveIdentifier); activeDocks = new UberfireDock[docks.size()]; int activeDocksIndex = 0; <START> for(WorkbenchDockEntry entry: docks) { <END> UberfireDock dock = entry.getDock(); uberfireDocks.add(dock); activeDocks[activeDocksIndex++] = dock; } uberfireDocks.show(UberfireDockPosition.EAST, currentPerspectiveIdentifier); uberfireDocks.show(UberfireDockPosition.WEST, currentPerspectiveIdentifier); for(WorkbenchDockEntry entry: docks) { UberfireDock dock = entry.getDock(); if (entry.isOpenByDefault()) { uberfireDocks.open(dock); } } } }</code><technical_language>formatting: for (WorkbenchDockEntry entry : docks)</technical_language>

Target:
public void setActiveHandler(WorkbenchDocksHandler handler) { if (!isAuthoringActive()) { return; } if (activeHandler != null) { if (activeHandler.equals(handler) && !activeHandler.shouldRefreshDocks()) { return; } } activeHandler = handler; if (activeHandler.shouldDisableDocks()) { uberfireDocks.hide(UberfireDockPosition.EAST, currentPerspectiveIdentifier); uberfireDocks.hide(UberfireDockPosition.WEST, currentPerspectiveIdentifier); } else { if (activeDocks != null) { uberfireDocks.remove(activeDocks); } Collection<WorkbenchDockEntry> docks = activeHandler.provideDocks(currentPerspectiveIdentifier); activeDocks = docks.stream() .map(entry -> entry.getDock()) .toArray(size -> new UberfireDock[size]); uberfireDocks.add(activeDocks); uberfireDocks.show(UberfireDockPosition.EAST, currentPerspectiveIdentifier); uberfireDocks.show(UberfireDockPosition.WEST, currentPerspectiveIdentifier); docks.stream().forEach(entry -> { if (entry.getOpenOnInitialization()) { uberfireDocks.open(entry.getDock()); }}); } }
Source:
<code>protected void run() throws Exception { AddCommand addCmd = new Git(db).add(); addCmd.setUpdate(update); <START> for (String p : filepatterns) { <END> addCmd.addFilepattern(p); } addCmd.call(); }</code><technical_language>Style-nit: put a single statement</technical_language>

Target:
protected void run() throws Exception { AddCommand addCmd = new Git(db).add(); addCmd.setUpdate(update); for (String p : filepatterns) addCmd.addFilepattern(p); addCmd.call(); }
Source:
<code>default void check() { if (isNewService() && dataDirectory().isDirectory()) { throw new IllegalArgumentException( "This timelock server has been configured as a new stack (the 'is-new-service' property is set to " + "true), but the Paxos data directory already exists. Almost surely this is because it " + "has already been turned on at least once, and thus the 'is-new-service' property should " + "be set to false for safety reasons."); } if (!isNewService() && !dataDirectory().isDirectory()) { throw new IllegalArgumentException( "If this is a new timelock service, please configure paxos.is-new-service to true for the first " + "startup only of each node. \n\nOtherwise, the timelock data directory appears to no " + "longer exist. If you are trying to move the nodes on your timelock cluster or add new " + "nodes, you have likely already made a mistake by this point. This is a non-trivial " <START> + "operation, please be careful and do not be afraid to seek out help."); <END> } Preconditions.checkArgument(dataDirectory().mkdirs() || dataDirectory().isDirectory(), "Could not create paxos data directory %s", dataDirectory()); }</code><technical_language>I more direct instruct people speak Atlas team proceeding</technical_language>

Target:
default void check() { if (isNewService() && dataDirectory().isDirectory()) { throw new IllegalArgumentException( "This timelock server has been configured as a new stack (the 'is-new-service' property is set to " + "true), but the Paxos data directory already exists. Almost surely this is because it " + "has already been turned on at least once, and thus the 'is-new-service' property should " + "be set to false for safety reasons."); } if (!isNewService() && !dataDirectory().isDirectory()) { throw new IllegalArgumentException( "If this is a new timelock service, please configure paxos.is-new-service to true for the first " + "startup only of each node. \n\nOtherwise, the timelock data directory appears to no " + "longer exist. If you are trying to move the nodes on your timelock cluster or add new " + "nodes, you have likely already made a mistake by this point. This is a non-trivial " + "operation, please be careful and make sure that you have appropriate approvals."); } Preconditions.checkArgument(dataDirectory().mkdirs() || dataDirectory().isDirectory(), "Could not create paxos data directory %s", dataDirectory()); }
Source:
<code>public Map<String, String> getOptions() { Map<String, String> options = new LinkedHashMap<>(); ResourceResolver resourceResolver = getHelper().getRequest().getResourceResolver(); if (null != resourceResolver) { <START> DynamicDeckConfigurationService configurationService = getHelper().getService(DynamicDeckConfigurationService.class); <END> if (null == configurationService) { LOGGER.debug("Configuration service is null, hence exiting the process and returning empty map"); return Collections.emptyMap(); } Map<String, String> collectionMap = DynamicDeckUtils.getCollectionsListForLoggedInUser(configurationService.getCollectionQuery(), resourceResolver); options.put(StringUtils.EMPTY, "Select the Collection"); collectionMap.forEach((key, value) -> options.put(value, key)); } else { LOGGER.error("Exception occurred while initiating the deck generation"); } return options; }</code><technical_language>this @OsgiService DynamicDeckConfigurationService configurationService ... feels weird annotations</technical_language>

Target:
public Map<String, String> getOptions() { Map<String, String> options = new LinkedHashMap<>(); if (null != getHelper() && null != getHelper().getRequest() && null != getHelper().getRequest().getResourceResolver()) { ResourceResolver resourceResolver = getHelper().getRequest().getResourceResolver(); DynamicDeckConfigurationService configurationService = getHelper().getService(DynamicDeckConfigurationService.class); if (null == configurationService) { LOGGER.error("Configuration service is null, hence exiting the process and returning empty map"); return Collections.emptyMap(); } Map<String, String> collectionMap = DynamicDeckUtils.getCollectionsListForLoggedInUser(configurationService.getCollectionQuery(), resourceResolver); options.put(StringUtils.EMPTY, "Select the Collection"); collectionMap.forEach((key, value) -> options.put(value, key)); } else { LOGGER.error("Resource resolver is null while getting the collection list"); } return options; }
Source:
<code>private void processEmails(List<EmailMessage> partialEmailsForThreading, Iterator<EmailMessage> fullMessageIterator, AbstractFile abstractFile) { try { EmailMessageThreader.threadMessages(partialEmailsForThreading); } catch (Exception ex) { logger.log(Level.WARNING, String.format("Exception thrown parsing emails from %s", abstractFile.getName()), ex); } List<AbstractFile> derivedFiles = new ArrayList<>(); int msgCnt = 0; while (fullMessageIterator.hasNext()) { EmailMessage current = fullMessageIterator.next(); if (current == null) { continue; } if (partialEmailsForThreading.size() > msgCnt) { EmailMessage threaded = partialEmailsForThreading.get(msgCnt++); <START> if ((threaded.getMessageID() != null) && <END> (threaded.getMessageID().equals(current.getMessageID()) && threaded.getSubject().equals(current.getSubject()))) { current.setMessageThreadID(threaded.getMessageThreadID()); } } BlackboardArtifact msgArtifact = addEmailArtifact(current, abstractFile); if ((msgArtifact != null) && (current.hasAttachment())) { derivedFiles.addAll(handleAttachments(current.getAttachments(), abstractFile, msgArtifact)); } } if (derivedFiles.isEmpty() == false) { for (AbstractFile derived : derivedFiles) { services.fireModuleContentEvent(new ModuleContentEvent(derived)); } } context.addFilesToJob(derivedFiles); }</code><technical_language>fine add null check, EmailMessage is suppose work is functions return strings return empty string instead of null. means in threading code message id is set null instead of empty string</technical_language>

Target:
private void processEmails(List<EmailMessage> partialEmailsForThreading, Iterator<EmailMessage> fullMessageIterator, AbstractFile abstractFile) { try{ EmailMessageThreader.threadMessages(partialEmailsForThreading); } catch(Exception ex) { logger.log(Level.WARNING, String.format("Exception thrown parsing emails from %s", abstractFile.getName()), ex); } List<AbstractFile> derivedFiles = new ArrayList<>(); int msgCnt = 0; while(fullMessageIterator.hasNext()) { EmailMessage current = fullMessageIterator.next(); if(current == null) { continue; } if(partialEmailsForThreading.size() > msgCnt) { EmailMessage threaded = partialEmailsForThreading.get(msgCnt++); if(threaded.getMessageID().equals(current.getMessageID()) && threaded.getSubject().equals(current.getSubject())) { current.setMessageThreadID(threaded.getMessageThreadID()); } } BlackboardArtifact msgArtifact = addEmailArtifact(current, abstractFile); if ((msgArtifact != null) && (current.hasAttachment())) { derivedFiles.addAll(handleAttachments(current.getAttachments(), abstractFile, msgArtifact )); } } if (derivedFiles.isEmpty() == false) { for (AbstractFile derived : derivedFiles) { services.fireModuleContentEvent(new ModuleContentEvent(derived)); } } context.addFilesToJob(derivedFiles); }
Source:
<code>private void doPartitionDetectionActivities(Set<Integer> failedHostIds) { Preconditions.checkState(!m_partitionDetected, "Partition detection triggered twice."); boolean isPartitionDetectionEnabled = false; try { <START> isPartitionDetectionEnabled = VoltDB.instance().getCatalogContext().cluster.getNetworkpartition(); <END> } catch (Exception e) { m_tmLog.fatal("Couldn't load partititon detection configuration during a partition event."); } Set<Integer> previousHosts = m_foreignHosts.keySet(); Set<Integer> currentHosts = new HashSet<>(previousHosts); currentHosts.removeAll(failedHostIds); boolean partitionDetected = makePPDDecision(previousHosts, currentHosts); if (partitionDetected) { if (isPartitionDetectionEnabled) { m_tmLog.fatal("PARTITION DETECTION: This process will kill itself to ensure against split-brains."); m_tmLog.warn("If command logging or periodic snapshots are enabled, the will be in the " + "voltdb root folder for this node and may be used for recovery if needed."); m_partitionDetected = true; VoltDB.crashGlobalVoltDB("This process will kill itself to ensure against split-brains. " + "There may be additional info in the full logs.", false, null); } else { m_tmLog.error("PARTITION DETECTION: This process will continue running only because " + "Partition Detection has been disabled for this cluster. It is possible that " + "the previous cluster has split into multiple viable clusters with diverging " + "data. There may be additional info in the full logs."); } } }</code><technical_language>Yeah, this is ugly. pass in constructor</technical_language>

Target:
private void doPartitionDetectionActivities(Set<Integer> failedHostIds) { Preconditions.checkState(!m_partitionDetected, "Partition detection triggered twice."); Set<Integer> previousHosts = getLiveHostIds(); Set<Integer> currentHosts = new HashSet<>(previousHosts); currentHosts.removeAll(failedHostIds); Preconditions.checkState(previousHosts.contains(m_localHostId)); Preconditions.checkState(currentHosts.contains(m_localHostId)); boolean partitionDetected = makePPDDecision(previousHosts, currentHosts); if (partitionDetected) { if (m_partitionDetectionEnabled.get()) { m_tmLog.fatal("PARTITION DETECTION: This process will kill itself to ensure against split-brains."); m_tmLog.warn("If command logging or periodic snapshots are enabled, the will be in the " + "voltdb root folder for this node and may be used for recovery if needed."); m_partitionDetected = true; VoltDB.crashGlobalVoltDB("This process will kill itself to ensure against split-brains. " + "There may be additional info in the full logs.", false, null); } else { m_tmLog.error("PARTITION DETECTION: This process will continue running only because " + "Partition Detection has been disabled for this cluster. It is possible that " + "the previous cluster has split into multiple viable clusters with diverging " + "data. There may be additional info in the full logs."); } } }
Source:
<code>public IterableStream<ConfigurationSetting> getElements() { <START> return items == null ? IterableStream.empty() : new IterableStream<>(items); <END> }</code><technical_language>introduce IterableStream.of(List) similar avoid null checks in cases</technical_language>

Target:
public IterableStream<ConfigurationSetting> getElements() { return IterableStream.of(items); }
Source:
<code>public SubTabVolumeGeneralView(DetailModelProvider<VolumeListModel, VolumeGeneralModel> modelProvider, ApplicationConstants constants) { super(modelProvider); formPanel = new GeneralFormPanel(); initWidget(formPanel); driver.initialize(this); formBuilder = new FormBuilder(formPanel, 1, 7); formBuilder.addFormItem(new FormItem(constants.NameVolume(), name, 0, 0)); formBuilder.addFormItem(new FormItem(constants.volumeIdVolume(), volumeId, 1, 0)); formBuilder.addFormItem(new FormItem(constants.volumeTypeVolume(), volumeType, 2, 0)); replicaFormItem = new FormItem(constants.replicaCountVolume(), replicaCount, 3, 0); formBuilder.addFormItem(replicaFormItem); stripeFormItem = new FormItem(constants.stripeCountVolume(), stripeCount, 4, 0); formBuilder.addFormItem(stripeFormItem); formBuilder.addFormItem(new FormItem(constants.numberOfBricksVolume(), numOfBricks, 5, 0)); formBuilder.addFormItem(new FormItem(constants.transportTypesVolume(), transportTypes, 6, 0)); getDetailModel().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { VolumeGeneralModel model = (VolumeGeneralModel) sender; if ("VolumeType".equals(((PropertyChangedEventArgs) args).propertyName)) { translateVolumeType((GlusterVolumeEntity) model.getEntity()); } } <START> private void translateVolumeType(GlusterVolumeEntity volumeEntity) { <END> Translator translator = EnumTranslator.getInstance(); if (translator.containsKey(volumeEntity.getVolumeType())) { getDetailModel().setVolumeTypeSilently(translator.get(volumeEntity.getVolumeType())); } } }); }</code><technical_language>move method</technical_language>

Target:
public SubTabVolumeGeneralView(DetailModelProvider<VolumeListModel, VolumeGeneralModel> modelProvider, ApplicationConstants constants) { super(modelProvider); formPanel = new GeneralFormPanel(); initWidget(formPanel); driver.initialize(this); formBuilder = new FormBuilder(formPanel, 1, 7); formBuilder.addFormItem(new FormItem(constants.NameVolume(), name, 0, 0)); formBuilder.addFormItem(new FormItem(constants.volumeIdVolume(), volumeId, 1, 0)); formBuilder.addFormItem(new FormItem(constants.volumeTypeVolume(), volumeType, 2, 0)); replicaFormItem = new FormItem(constants.replicaCountVolume(), replicaCount, 3, 0); formBuilder.addFormItem(replicaFormItem); stripeFormItem = new FormItem(constants.stripeCountVolume(), stripeCount, 4, 0); formBuilder.addFormItem(stripeFormItem); formBuilder.addFormItem(new FormItem(constants.numberOfBricksVolume(), numOfBricks, 5, 0)); formBuilder.addFormItem(new FormItem(constants.transportTypesVolume(), transportTypes, 6, 0)); getDetailModel().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { VolumeGeneralModel model = (VolumeGeneralModel) sender; if ("VolumeType".equals(((PropertyChangedEventArgs) args).propertyName)) { translateVolumeType((GlusterVolumeEntity) model.getEntity()); } } }); }
Source:
<code>public abstract AbstractGCPTokenIdentifier createTokenIdentifier(Text renewer) throws IOException; public abstract AbstractGCPTokenIdentifier createTokenIdentifier() throws IOException; <START> public abstract AbstractGCPTokenIdentifier createEmptyIdentifier(); <END> protected <T extends AbstractGCPTokenIdentifier> T convertTokenIdentifier( final AbstractGCPTokenIdentifier identifier, final Class<T> expectedClass) throws DelegationTokenIOException { if (!identifier.getClass().equals(expectedClass)) { throw DelegationTokenIOException.wrongTokenType(expectedClass, identifier); } return (T) identifier; }</code><technical_language>clarify this is? return a dummy object, a specific purpose</technical_language>

Target:
public abstract DelegationTokenIdentifier createTokenIdentifier(Text renewer) throws IOException; public abstract DelegationTokenIdentifier createTokenIdentifier() throws IOException; public abstract DelegationTokenIdentifier createEmptyIdentifier(); protected <T extends DelegationTokenIdentifier> T convertTokenIdentifier( DelegationTokenIdentifier identifier, Class<T> expectedClass) throws DelegationTokenIOException { if (!identifier.getClass().equals(expectedClass)) { throw DelegationTokenIOException.wrongTokenType(expectedClass, identifier); } return (T) identifier; }
Source:
<code>public void changePassword(String oldPassword, String newPassword) { <START> <END> }</code><technical_language>is a reason this method implemented</technical_language>

Target:
public void changePassword(String oldPassword, String newPassword) { throw new UnsupportedOperationException("Not implemented, use updateUser()"); }
Source:
<code>public PickerMilestone(TurboMilestone milestone) { super(milestone.getRepoId(), milestone.getId(), milestone.getTitle()); setDueDate(milestone.getDueDate()); <START> setDescription(milestone.getDescription() == null ? "" : milestone.getDescription()); <END> setOpen(milestone.isOpen()); setOpenIssues(milestone.getOpenIssues()); setClosedIssues(milestone.getClosedIssues()); }</code><technical_language>this happen? TurboMilestone is supposed eliminated null this point</technical_language>

Target:
public PickerMilestone(TurboMilestone milestone) { super(milestone.getRepoId(), milestone.getId(), milestone.getTitle()); setDueDate(milestone.getDueDate()); setDescription(milestone.getDescription()); setOpen(milestone.isOpen()); setOpenIssues(milestone.getOpenIssues()); setClosedIssues(milestone.getClosedIssues()); }
Source:
<code>public TaskNounUiTextProvider() { Message<AbstractItem> message; try { Field taskNoun = AbstractItem.class.getDeclaredField("TASK_NOUN"); message = (Message<AbstractItem>) taskNoun.get(null); } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { <START> LOGGER.log(Level.FINE, "This version of Jenkins does not have AbstractItem.TASK_NOUN", e); <END> message = null; } this.taskNoun = message; }</code><technical_language>this applies NoSuchFieldException. other exception is actual problem logged</technical_language>

Target:
public TaskNounUiTextProvider() { Message<AbstractItem> message; try { Field taskNoun = AbstractItem.class.getDeclaredField("TASK_NOUN"); message = (Message<AbstractItem>) taskNoun.get(null); } catch (NoSuchFieldException e) { LOGGER.log(Level.FINE, "This version of Jenkins does not have AbstractItem.TASK_NOUN", e); message = null; } catch (IllegalAccessException | ClassCastException e) { LOGGER.log(Level.WARNING, "Could not access AbstractItem.TASK_NOUN by reflection", e); message = null; } this.taskNoun = message; }
Source:
<code>public TypeInformation getAccumulatorType() { <START> return resultType; <END> }</code><technical_language>returns resultType</technical_language>

Target:
public TypeInformation getAccumulatorType() { return accumulatorType; }
Source:
<code>public static II getPatientId(PRPAIN201305UV02 request) { LOG.info("getPatientId()"); II livingSubjectId = null; if (request != null && request.getControlActProcess() != null && request.getControlActProcess().getQueryByParameter() != null && request.getControlActProcess().getQueryByParameter().getValue() != null && request.getControlActProcess().getQueryByParameter().getValue().getParameterList() != null && request.getControlActProcess().getQueryByParameter().getValue().getParameterList() .getLivingSubjectId() != null) { List<PRPAMT201306UV02LivingSubjectId> ids = request.getControlActProcess().getQueryByParameter().getValue() .getParameterList().getLivingSubjectId(); if (ids != null) { <START> if (ids.size() == 1) { <END> livingSubjectId = getLivingSubjectId(ids.get(0)); } else if (ids.size() > 1) { livingSubjectId = getLivingSubjectIdFromAuthorOrPerformerValue(request, ids); } } } else { LOG.error("PatientId doesn't exist in the received PRPAIN201305UV02 message"); } return livingSubjectId; }</code><technical_language>Do need a case for ids.isEmpty()</technical_language>

Target:
public static II getPatientId(PRPAIN201305UV02 request) { II livingSubjectId = null; if (request != null && request.getControlActProcess() != null && request.getControlActProcess().getQueryByParameter() != null && request.getControlActProcess().getQueryByParameter().getValue() != null && request.getControlActProcess().getQueryByParameter().getValue().getParameterList() != null && request.getControlActProcess().getQueryByParameter().getValue().getParameterList() .getLivingSubjectId() != null) { List<PRPAMT201306UV02LivingSubjectId> ids = request.getControlActProcess().getQueryByParameter().getValue() .getParameterList().getLivingSubjectId(); if (ids != null && !ids.isEmpty()) { if (ids.size() == 1) { livingSubjectId = getLivingSubjectId(ids.get(0)); } else if (ids.size() > 1) { livingSubjectId = getLivingSubjectIdFromAuthorOrPerformerValue(request, ids); } } } else { LOG.error("PatientId doesn't exist in the received PRPAIN201305UV02 message"); } return livingSubjectId; }
Source:
<code>private void previewDataImport() { DataImportOptions previewImportOptions = getOptions(); assembleDataImport(); if (fileOrUrlChooserTextBox_.getText() == "") { gridViewer_.setData(null); return; } previewImportOptions.setMaxRows(maxRows_); progressIndicator_.onProgress("Retrieving preview data"); server_.previewDataImport(previewImportOptions, maxCols_, maxFactors_, new ServerRequestCallback<DataImportPreviewResponse>() { @Override public void onResponseReceived(DataImportPreviewResponse response) { if (response.getErrorMessage() != null) { response.setColumnDefinitions(lastSuccessfulResponse_); setGridViewerData(response); progressIndicator_.onError(response.getErrorMessage()); return; } lastSuccessfulResponse_ = response; gridViewer_.setOption("status", "Previewing first " + toLocaleString(maxRows_) + <START> " entries. " + Integer.toString(response.getParsingErrors()) + <END> " parsing errors."); assignColumnDefinitions(response, importOptions_.getColumnDefinitions()); setGridViewerData(response); gridViewer_.setColumnDefinitionsUIVisible(true, onColumnMenuShow(), new Operation() { @Override public void execute() { columnTypesMenu_.hide(); } }); progressIndicator_.onCompleted(); } @Override public void onError(ServerError error) { gridViewer_.setData(null); progressIndicator_.onError(error.getMessage()); } }); }</code><technical_language>Nit: for simplicity, omit parsing errors text a parsing error</technical_language>

Target:
private void previewDataImport() { DataImportOptions previewImportOptions = getOptions(); assembleDataImport(); if (fileOrUrlChooserTextBox_.getText() == "") { gridViewer_.setData(null); return; } previewImportOptions.setMaxRows(maxRows_); progressIndicator_.onProgress("Retrieving preview data"); server_.previewDataImport(previewImportOptions, maxCols_, maxFactors_, new ServerRequestCallback<DataImportPreviewResponse>() { @Override public void onResponseReceived(DataImportPreviewResponse response) { if (response.getErrorMessage() != null) { response.setColumnDefinitions(lastSuccessfulResponse_); setGridViewerData(response); progressIndicator_.onError(response.getErrorMessage()); return; } lastSuccessfulResponse_ = response; gridViewer_.setOption("status", "Previewing first " + toLocaleString(maxRows_) + " entries. " + ( response.getParsingErrors() > 0 ? Integer.toString(response.getParsingErrors()) + " parsing errors." : "") ); assignColumnDefinitions(response, importOptions_.getColumnDefinitions()); setGridViewerData(response); gridViewer_.setColumnDefinitionsUIVisible(true, onColumnMenuShow(), new Operation() { @Override public void execute() { columnTypesMenu_.hide(); } }); progressIndicator_.onCompleted(); } @Override public void onError(ServerError error) { gridViewer_.setData(null); progressIndicator_.onError(error.getMessage()); } }); }
Source:
<code>public void endElement(String uri, String localName, String qname) throws SAXException { String s = sb.toString(); if ("author".equals(qname)) { entry.setAuthor(s); } else if ("date".equals(qname)) { try { String dateString = s; <START> if (s.length() > 24) { <END> dateString = dateString.substring(0, 23) + dateString.charAt(dateString.length() - 1); } entry.setDate(repository.parse(dateString)); } catch (ParseException ex) { throw new SAXException("Failed to parse date: " + s, ex); } } else if ("path".equals(qname)) { if (s.startsWith(prefix) && !s.equals(prefix)) { File file = new File(home, s.substring(prefix.length())); String path = file.getAbsolutePath().substring(length); entry.addFile(path.intern()); if (isRenamed) { renamedFiles.add(file.getAbsolutePath().substring(home.length() + 1)); } } else { LOGGER.log(Level.FINER, "Skipping file outside repository: " + s); } } else if ("msg".equals(qname)) { entry.setMessage(s); } if ("logentry".equals(qname)) { entries.add(entry); } sb.setLength(0); }</code><technical_language>add e.g. static final String SVN_MILLIS_DATE_EG known-good format SVN_MILLIS_DATE_EG.length() avoid unnamed literals next line? (This reminds of a TODO refactor out of DateFormat for thread safety - apparent for microseconds handling.)</technical_language>

Target:
public void endElement(String uri, String localName, String qname) throws SAXException { String s = sb.toString(); if ("author".equals(qname)) { entry.setAuthor(s); } else if ("date".equals(qname)) { try { String dateString = s; if (s.length() > SVN_MILLIS_DATE_LENGTH) { dateString = dateString.substring(0, SVN_MILLIS_DATE_LENGTH - 1) + dateString.charAt(dateString.length() - 1); } entry.setDate(repository.parse(dateString)); } catch (ParseException ex) { throw new SAXException("Failed to parse date: " + s, ex); } } else if ("path".equals(qname)) { if (s.startsWith(prefix) && !s.equals(prefix)) { File file = new File(home, s.substring(prefix.length())); String path = file.getAbsolutePath().substring(length); entry.addFile(path.intern()); if (isRenamed) { renamedFiles.add(file.getAbsolutePath().substring(home.length() + 1)); } } else { LOGGER.log(Level.FINER, "Skipping file outside repository: " + s); } } else if ("msg".equals(qname)) { entry.setMessage(s); } if ("logentry".equals(qname)) { entries.add(entry); } sb.setLength(0); }
Source:
<code>private static Supplier<ByteBuffer> createCombineBufferSupplier( ByteBuffer combineBuffer, int numBuffers, int sliceSize ) { return new Supplier<ByteBuffer>() { private int i = 0; @Override public ByteBuffer get() { if (i < numBuffers) { return Groupers.getSlice(combineBuffer, sliceSize, i++); } else { <START> throw new ISE("Requested number of buffer slices exceeds the planned one"); <END> } } }; }</code><technical_language>add number of requested buffer slices planned number for debugging</technical_language>

Target:
private static Supplier<ByteBuffer> createCombineBufferSupplier( ByteBuffer combineBuffer, int numBuffers, int sliceSize ) { return new Supplier<ByteBuffer>() { private int i = 0; @Override public ByteBuffer get() { if (i < numBuffers) { return Groupers.getSlice(combineBuffer, sliceSize, i++); } else { throw new ISE("Requested number[%d] of buffer slices exceeds the planned one[%d]", i++, numBuffers); } } }; }
Source:
<code>public static Configuration setUpConfigForMiniCluster(Configuration conf, ReadOnlyProps overrideProps) throws Exception { assertNotNull(conf); setDefaultTestConfig(conf, overrideProps); conf.setInt(HConstants.REGION_SERVER_HANDLER_COUNT, 5); conf.setInt("hbase.regionserver.metahandler.count", 2); conf.setInt(HConstants.MASTER_HANDLER_COUNT, 2); conf.setInt("dfs.namenode.handler.count", 2); conf.setInt("dfs.namenode.service.handler.count", 2); conf.setInt("dfs.datanode.handler.count", 2); conf.setInt("ipc.server.read.threadpool.size", 2); conf.setInt("ipc.server.handler.threadpool.size", 2); conf.setInt("hbase.regionserver.hlog.syncer.count", 2); conf.setInt("hbase.hlog.asyncer.number", 2); conf.setInt("hbase.assignment.zkevent.workers", 5); conf.setInt("hbase.assignment.threads.max", 5); conf.setInt("hbase.catalogjanitor.interval", 5000); conf.setInt(QueryServices.TASK_HANDLING_INTERVAL_MS_ATTRIB, 10000); conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 2); conf.setInt(NUM_CONCURRENT_INDEX_WRITER_THREADS_CONF_KEY, 1); conf.setInt(GLOBAL_INDEX_ROW_AGE_THRESHOLD_TO_DELETE_MS_ATTRIB, 0); if (conf.getLong(QueryServices.UNGROUPED_AGGREGATE_PAGE_SIZE_IN_ROWS, 0) == 0) { <START> conf.setLong(QueryServices.UNGROUPED_AGGREGATE_PAGE_SIZE_IN_ROWS, 2); <END> } return conf; }</code><technical_language>In tests generally read/write rows anyways, setting this config unnecessarily slow down</technical_language>

Target:
public static Configuration setUpConfigForMiniCluster(Configuration conf, ReadOnlyProps overrideProps) throws Exception { assertNotNull(conf); setDefaultTestConfig(conf, overrideProps); conf.setInt(HConstants.REGION_SERVER_HANDLER_COUNT, 5); conf.setInt("hbase.regionserver.metahandler.count", 2); conf.setInt(HConstants.MASTER_HANDLER_COUNT, 2); conf.setInt("dfs.namenode.handler.count", 2); conf.setInt("dfs.namenode.service.handler.count", 2); conf.setInt("dfs.datanode.handler.count", 2); conf.setInt("ipc.server.read.threadpool.size", 2); conf.setInt("ipc.server.handler.threadpool.size", 2); conf.setInt("hbase.regionserver.hlog.syncer.count", 2); conf.setInt("hbase.hlog.asyncer.number", 2); conf.setInt("hbase.assignment.zkevent.workers", 5); conf.setInt("hbase.assignment.threads.max", 5); conf.setInt("hbase.catalogjanitor.interval", 5000); conf.setInt(QueryServices.TASK_HANDLING_INTERVAL_MS_ATTRIB, 10000); conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 2); conf.setInt(NUM_CONCURRENT_INDEX_WRITER_THREADS_CONF_KEY, 1); conf.setInt(GLOBAL_INDEX_ROW_AGE_THRESHOLD_TO_DELETE_MS_ATTRIB, 0); if (conf.getLong(QueryServices.UNGROUPED_AGGREGATE_PAGE_SIZE_IN_MS, 0) == 0) { conf.setLong(QueryServices.UNGROUPED_AGGREGATE_PAGE_SIZE_IN_MS, 0); } return conf; }
Source:
<code>Builder() { this.startTime = 0; this.druidCluster = null; this.databaseRuleManager = null; this.segmentReplicantLookup = null; this.dataSources = Sets.newHashSet(); this.availableSegments = Sets.newTreeSet(DruidCoordinator.SEGMENT_COMPARATOR); this.loadManagementPeons = Maps.newHashMap(); this.replicationManager = null; this.emitter = null; this.stats = new CoordinatorStats(); this.coordinatorDynamicConfig = new CoordinatorDynamicConfig.Builder().build(); this.balancerReferenceTimestamp = DateTime.now(); <START> this.strategyFactory = new CostBalancerStrategyFactory(1, 0.001F); <END> }</code><technical_language>default a constant instead of defined in multiple places</technical_language>

Target:
Builder() { this.startTime = 0; this.druidCluster = null; this.databaseRuleManager = null; this.segmentReplicantLookup = null; this.dataSources = Sets.newHashSet(); this.availableSegments = Sets.newTreeSet(DruidCoordinator.SEGMENT_COMPARATOR); this.loadManagementPeons = Maps.newHashMap(); this.replicationManager = null; this.emitter = null; this.stats = new CoordinatorStats(); this.coordinatorDynamicConfig = new CoordinatorDynamicConfig.Builder().build(); this.balancerReferenceTimestamp = DateTime.now(); this.strategyFactory = new CostBalancerStrategyFactory(1, BalancerStrategy.DEFAULT_BALANCER_SLOPE); }
Source:
<code>protected void setup(Binder binder) { T configuration = buildConfigObject(config); if (predicate.test(configuration)) { if (module instanceof ConfigurationAwareModule) { <START> install((ConfigurationAwareModule) module); <END> } else { binder.install(module); } } }</code><technical_language>add a version in parent takes a normal Module? current of ConditionalModule is confusing leads mistakes</technical_language>

Target:
protected void setup(Binder binder) { T configuration = buildConfigObject(config); if (predicate.test(configuration)) { install(module); } }
Source:
<code>protected void safeCreateTag(IProgressMonitor monitor, String tagName, String tagMessage) throws CoreException { RevCommit head = repository.findHead(); RevCommit commitForTag; try { commitForTag = repository.findCommitForTag(versionName); if (commitForTag == null) { <START> createTag(monitor, head, tagName, tagMessage); <END> } else if (!head.equals(commitForTag)) { throw new CoreException(error(format( CoreText.AbstractVersionFinishOperation_tagNameExists, versionName))); } } catch (MissingObjectException e) { throw new CoreException(error(e)); } catch (IncorrectObjectTypeException e) { throw new CoreException(error(e)); } catch (IOException e) { throw new CoreException(error(e)); } }</code><technical_language>TagOperation.execute() RefUpdate is fail if tag exists, points a commit force flag set</technical_language>

Target:
protected void safeCreateTag(IProgressMonitor monitor, String tagName, String tagMessage) throws CoreException { RevCommit head = repository.findHead(); RevCommit commitForTag; try { commitForTag = repository.findCommitForTag(versionName); if (commitForTag == null) { createTag(monitor, head, tagName, tagMessage); } else if (!head.equals(commitForTag)) { throw new CoreException(error(format( CoreText.AbstractVersionFinishOperation_tagNameExists, versionName))); } } catch (IOException e) { throw new CoreException(error(e)); } }
Source:
<code><START> public String getAddEncountersPrivilege() { <END> String ADD_ENCOUNTERS_PRIVILEGE = null; Privilege privilege = Context.getUserService().getPrivilege(ADD_ENCOUNTERS); if (privilege != null) { ADD_ENCOUNTERS_PRIVILEGE = ADD_ENCOUNTERS; } return ADD_ENCOUNTERS_PRIVILEGE; }</code><technical_language>logic for of methods is (pretty much) same. able create a single method handles logic is (checking privilege, setting result) call method for specific privilege</technical_language>

Target:
public String getAddEncountersPrivilege() { return checkPrivilege(ADD_ENCOUNTERS, null); }
Source:
<code>public void onNewSourceColumn() { if (!userPrefs_.allowSourceColumns().getValue()) pGlobalDisplay_.get().showMessage(GlobalDisplay.MSG_INFO, "Cannot Add Column", "Allow Source Columns preference is disabled."); <START> else if (additionalSourceCount_ == MAX_COLUMN_COUNT) <END> pGlobalDisplay_.get().showMessage(GlobalDisplay.MSG_INFO, "Cannot Add Column", "You can't add more than " + MAX_COLUMN_COUNT + " columns."); else createSourceColumn(); }</code><technical_language>Nit: a constant now, if max column count configurable want this a >= comparison safe in case max changes smaller current number of columns</technical_language>

Target:
public void onNewSourceColumn() { if (!userPrefs_.allowSourceColumns().getValue()) pGlobalDisplay_.get().showMessage(GlobalDisplay.MSG_INFO, "Cannot Add Column", "Allow Source Columns preference is disabled."); else if (additionalSourceCount_ >= MAX_COLUMN_COUNT) pGlobalDisplay_.get().showMessage(GlobalDisplay.MSG_INFO, "Cannot Add Column", "You can't add more than " + MAX_COLUMN_COUNT + " columns."); else createSourceColumn(); }
Source:
<code>public void shouldCreateFilter() throws Exception { CategoryFilterFactory categoryFilterFactory = new CategoryFilterFactoryStub(); Filter filter = categoryFilterFactory.createFilter(CategoryFilterFactoryStub.class.getName()); <START> assertThat(filter, is((Filter) null)); <END> }</code><technical_language>strange test for null in this test, is testing happy path. create a FilterStub</technical_language>

Target:
public void shouldCreateFilter() throws Exception { FilterFactoryParams params = new FilterFactoryParams( CategoryFilterFactoryStub.class.getName()); Filter filter = categoryFilterFactory.createFilter(params); assertThat(filter, instanceOf(DummyFilter.class)); }
Source:
<code>private static int getReadPositionAtReferencePositionIgnoreSoftClips(final SAMRecord rec, final int pos) { final int readPosition; final Cigar oldCigar = rec.getCigar(); final int oldStart = rec.getAlignmentStart(); final Cigar newCigar = new Cigar(); <START> List<CigarElement> cigarElements = new ArrayList<>(oldCigar.getCigarElements()); END> int posShift = 0; boolean foundNonClip = false; for (final CigarElement cigarElement : cigarElements) { final CigarOperator op = cigarElement.getOperator(); if (op == CigarOperator.SOFT_CLIP) { newCigar.add(new CigarElement(cigarElement.getLength(), CigarOperator.MATCH_OR_MISMATCH)); if (!foundNonClip) { posShift += cigarElement.getLength(); } } else { if (!op.isClipping()) { foundNonClip = true; } newCigar.add(new CigarElement(cigarElement.getLength(), op)); } } rec.setAlignmentStart(rec.getAlignmentStart() - posShift); rec.setCigar(newCigar); readPosition = SAMRecord.getReadPositionAtReferencePosition(rec, pos, false); rec.setCigar(oldCigar); rec.setAlignmentStart(oldStart); return readPosition; }</code><technical_language>cigarElements final, right</technical_language>

Target:
private static int getReadPositionAtReferencePositionIgnoreSoftClips(final SAMRecord rec, final int pos) { final int readPosition; final Cigar oldCigar = rec.getCigar(); final int oldStart = rec.getAlignmentStart(); final Cigar newCigar = new Cigar(); final List<CigarElement> cigarElements = new ArrayList<>(oldCigar.getCigarElements()); int posShift = 0; boolean foundNonClip = false; for (final CigarElement cigarElement : cigarElements) { final CigarOperator op = cigarElement.getOperator(); if (op == CigarOperator.SOFT_CLIP) { newCigar.add(new CigarElement(cigarElement.getLength(), CigarOperator.MATCH_OR_MISMATCH)); if (!foundNonClip) { posShift += cigarElement.getLength(); } } else { if (!op.isClipping()) { foundNonClip = true; } newCigar.add(new CigarElement(cigarElement.getLength(), op)); } } rec.setCigar(newCigar); readPosition = SAMRecord.getReadPositionAtReferencePosition(rec, pos, false); rec.setCigar(oldCigar); return readPosition + posShift; }
Source:
<code>void registerAdditionalBox(@Observes BeforeBeanDiscovery event, BeanManager manager) { final AnnotatedType<Box> original = manager.createAnnotatedType(Box.class); AnnotatedType<Box> modifiedType = new ForwardingAnnotatedType<Box>() { @Override public AnnotatedType<Box> delegate() { return original; } @Override @SuppressWarnings("unchecked") public <A extends Annotation> A getAnnotation(Class<A> annotationType) { if (Additional.class.equals(annotationType)) { return (A) Additional.Literal.INSTANCE; } return null; } @Override public Set<Annotation> getAnnotations() { return Collections.<Annotation>singleton(Additional.Literal.INSTANCE); } @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { return getAnnotation(annotationType) != null; } @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public Set<AnnotatedMethod<? super Box>> getMethods() { <START> ImmutableSet.Builder builder = ImmutableSet.builder(); <END> Set<AnnotatedMethod<? super Box>> annotatedMethods = delegate().getMethods(); for (final AnnotatedMethod<? super Box> annotatedMethod : annotatedMethods) { builder.add(new NoAnnotationMethodWrapper() { protected AnnotatedMethod<? super Box> delegate() { return annotatedMethod; } }); } return builder.build(); } }; event.addAnnotatedType(modifiedType, "additionalBox"); }</code><technical_language>I ImmutableSet all. InterceptedAnnotatedTypeTest.getDeployment() declares a dependency guava..</technical_language>

Target:
void registerAdditionalBox(@Observes BeforeBeanDiscovery event, BeanManager manager) { final AnnotatedType<Box> original = manager.createAnnotatedType(Box.class); AnnotatedType<Box> modifiedType = new ForwardingAnnotatedType<Box>() { @Override public AnnotatedType<Box> delegate() { return original; } @Override @SuppressWarnings("unchecked") public <A extends Annotation> A getAnnotation(Class<A> annotationType) { if (Additional.class.equals(annotationType)) { return (A) Additional.Literal.INSTANCE; } return null; } @Override public Set<Annotation> getAnnotations() { return Collections.<Annotation>singleton(Additional.Literal.INSTANCE); } @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { return getAnnotation(annotationType) != null; } @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public Set<AnnotatedMethod<? super Box>> getMethods() { Set<AnnotatedMethod<? super Box>> methods = new HashSet<>(); Set<AnnotatedMethod<? super Box>> annotatedMethods = delegate().getMethods(); for (final AnnotatedMethod<? super Box> annotatedMethod : annotatedMethods) { methods.add(new NoAnnotationMethodWrapper() { protected AnnotatedMethod<? super Box> delegate() { return annotatedMethod; } }); } return methods; } }; event.addAnnotatedType(modifiedType, "additionalBox"); }
Source:
<code>public void clear() { <START> getClient().unsetSessionVariables(Lists.newArrayList("TIMEZONE")); <END> }</code><technical_language>SessionVars.TIMEZONE.name()</technical_language>

Target:
public void clear() { getClient().unsetSessionVariables(Lists.newArrayList(SessionVars.TIMEZONE.name())); }