auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void executeIdentifier(IdentifierTree tree) { Symbol symbol = tree.symbol(); SymbolicValue value = programState.getValue(symbol); if (value == null) { value = constraintManager.createSymbolicValue(tree); programState = programState.stackValue(value); learnIdentifierNullConstraints(tree, value); programState = programState.put(symbol, value); } else { programState = programState.stackValue(value); <START> programState = programState.put(symbol, value); <END> } }</code><technical_language>call put extracted if-else statement in order remove duplication</technical_language>

Target:
private void executeIdentifier(IdentifierTree tree) { Symbol symbol = tree.symbol(); SymbolicValue value = programState.getValue(symbol); if (value == null) { value = constraintManager.createSymbolicValue(tree); programState = programState.stackValue(value); learnIdentifierNullConstraints(tree, value); } else { programState = programState.stackValue(value); } programState = programState.put(symbol, value); }
Source:
<code>private HashMap<AbbreviatedObjectId, Object> populateMap( List<DiffEntry> diffEntries, ProgressMonitor pm) { HashMap<AbbreviatedObjectId, Object> map = new HashMap<>(); for (DiffEntry de : diffEntries) { Object old = map.put(id(de), de); if (old instanceof DiffEntry) { ArrayList<DiffEntry> list = new ArrayList<>(2); list.add((DiffEntry) old); list.add(de); map.put(id(de), list); } else if (old != null) { ((List<DiffEntry>) old).add(de); map.put(id(de), old); } <START> pm.update(1); <END> } return map; }</code><technical_language>advanceOrCancel</technical_language>

Target:
private HashMap<AbbreviatedObjectId, Object> populateMap( List<DiffEntry> diffEntries, ProgressMonitor pm) throws CanceledException { HashMap<AbbreviatedObjectId, Object> map = new HashMap<>(); for (DiffEntry de : diffEntries) { Object old = map.put(id(de), de); if (old instanceof DiffEntry) { ArrayList<DiffEntry> list = new ArrayList<>(2); list.add((DiffEntry) old); list.add(de); map.put(id(de), list); } else if (old != null) { ((List<DiffEntry>) old).add(de); map.put(id(de), old); } advanceOrCancel(pm); } return map; }
Source:
<code>private ILaunchConfiguration getRunningLaunchConfiguration() { Set<IProject> projects = new HashSet<IProject>( Arrays.asList(ProjectUtil.getProjects(repository))); LaunchConfigJob j = new LaunchConfigJob(projects); j.schedule(); try { <START> j.join(); <END> } catch (@SuppressWarnings("unused") InterruptedException e) { return null; } return j.getRunningLaunchConfiguration(); }</code><technical_language>This blocks ui thread. ModalContext.run() instead</technical_language>

Target:
private ILaunchConfiguration getRunningLaunchConfiguration() { final ILaunchConfiguration[] lc = new ILaunchConfiguration[1]; try { ModalContext.run(new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { Set<IProject> projects = new HashSet<IProject>(Arrays .asList(ProjectUtil.getProjects(repository))); ILaunchManager launchManager = DebugPlugin.getDefault() .getLaunchManager(); ILaunch[] launches = launchManager.getLaunches(); for (ILaunch launch : launches) { if (launch.isTerminated()) continue; ISourceLocator locator = launch.getSourceLocator(); if (locator instanceof ISourceLookupDirector) { ISourceLookupDirector director = (ISourceLookupDirector) locator; ISourceContainer[] containers = director .getSourceContainers(); if (isAnyProjectInSourceContainers(containers, projects)) { lc[0] = launch.getLaunchConfiguration(); return; } } } } }, true, new NullProgressMonitor(), getShell().getDisplay()); } catch (@SuppressWarnings("unused") InvocationTargetException e) { } catch (@SuppressWarnings("unused") InterruptedException e) { } return lc[0]; }
Source:
<code>protected abstract void completeRequest(T context) throws Exception; protected abstract DataBuffer getDataBuffer(T context, long offset, int len) throws Exception; private void replyError(Error error) { <START> mSerializingExecutor.addTask(() -> { <END> try { mResponse.onError(error.getCause().toGrpcStatusException()); } catch (StatusRuntimeException e) { if (e.getStatus().getCode() != Status.Code.CANCELLED) { throw e; } } }); mFinished.set(true); mSerializingExecutor.shutdown(5, TimeUnit.SECONDS); }</code><technical_language>send in-line</technical_language>

Target:
protected abstract void completeRequest(T context) throws Exception; protected abstract DataBuffer getDataBuffer(T context, long offset, int len) throws Exception; private void replyError(Error error) { mSerializingExecutor.execute(() -> { try { if (!mContext.isDoneUnsafe()) { mResponse.onError(error.getCause().toGrpcStatusException()); mContext.setDoneUnsafe(true); } else { LOG.debug("Tried to replyError when stream was already completed. context: {}", mContext); } } catch (StatusRuntimeException e) { if (e.getStatus().getCode() != Status.Code.CANCELLED) { throw e; } } }); }
Source:
<code>protected void update(float delta) { int lengthInterpretation; try { <START> lengthInterpretation = length == null ? 0 : length.interpretInteger(sprite); <END> } catch (InterpretationException interpretationException) { lengthInterpretation = 0; Log.d(getClass().getSimpleName(), "Formula interpretation for this specific Brick failed.", interpretationException); } this.sprite.runningStitch.activateStitching(sprite, new SimpleRunningStitch(sprite, lengthInterpretation)); }</code><technical_language>Please apply changes requested in review here</technical_language>

Target:
protected void update(float delta) { int lengthInterpretation = 0; try { if (length != null) { lengthInterpretation = length.interpretInteger(sprite); } } catch (InterpretationException interpretationException) { lengthInterpretation = 0; Log.d(getClass().getSimpleName(), "Formula interpretation for this specific Brick failed.", interpretationException); } this.sprite.runningStitch.activateStitching(sprite, new SimpleRunningStitch(sprite, lengthInterpretation)); }
Source:
<code>protected void checkImageValidity() { try { final DiskImage diskImage = getImage(); Guid storagePoolId = diskImage.getStoragePoolId() != null ? diskImage.getStoragePoolId().getValue() : Guid.Empty; Guid storageDomainId = getStorageDomainId() != null && !getStorageDomainId().getValue().equals(Guid.Empty) ? getStorageDomainId() .getValue() : diskImage.getStorageIds() != null && diskImage.getStorageIds().size() > 0 ? diskImage.getStorageIds() .get(0) : Guid.Empty; Guid imageGroupId = diskImage.getId() != null ? diskImage.getId().getValue() : Guid.Empty; final DiskImage image = (DiskImage) runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(storagePoolId, storageDomainId, imageGroupId, getImage().getImageId())).getReturnValue(); if (image.getImageStatus() != ImageStatus.OK) { <START> TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { <END> @Override public Void runInTransaction() { getCompensationContext().snapshotEntityStatus(diskImage, diskImage.getImageStatus()); diskImage.setImageStatus(image.getImageStatus()); getImageDao().update(diskImage.getImage()); getCompensationContext().stateChanged(); return null; } }); throw new VdcBLLException(VdcBllErrors.IRS_IMAGE_STATUS_ILLEGAL); } diskImage.setLastModified(image.getLastModifiedDate()); } catch (RuntimeException ex) { if (ex instanceof VdcBLLException) { throw ex; } throw new VdcBLLException(VdcBllErrors.RESOURCE_MANAGER_VM_SNAPSHOT_MISSMATCH, ex); } }</code><technical_language>is flow calls this method updates this image in transaction</technical_language>

Target:
protected void checkImageValidity() { try { final DiskImage diskImage = getImage(); Guid storagePoolId = diskImage.getStoragePoolId() != null ? diskImage.getStoragePoolId().getValue() : Guid.Empty; Guid storageDomainId = getStorageDomainId() != null && !getStorageDomainId().getValue().equals(Guid.Empty) ? getStorageDomainId() .getValue() : diskImage.getStorageIds() != null && diskImage.getStorageIds().size() > 0 ? diskImage.getStorageIds() .get(0) : Guid.Empty; Guid imageGroupId = diskImage.getId() != null ? diskImage.getId().getValue() : Guid.Empty; final DiskImage image = (DiskImage) runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(storagePoolId, storageDomainId, imageGroupId, getImage().getImageId())).getReturnValue(); if (image.getImageStatus() != ImageStatus.OK) { TransactionSupport.executeInScope(TransactionScopeOption.Required, new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntityStatus(diskImage, diskImage.getImageStatus()); diskImage.setImageStatus(image.getImageStatus()); getImageDao().update(diskImage.getImage()); getCompensationContext().stateChanged(); return null; } }); throw new VdcBLLException(VdcBllErrors.IRS_IMAGE_STATUS_ILLEGAL); } diskImage.setLastModified(image.getLastModifiedDate()); } catch (RuntimeException ex) { if (ex instanceof VdcBLLException) { throw ex; } throw new VdcBLLException(VdcBllErrors.RESOURCE_MANAGER_VM_SNAPSHOT_MISSMATCH, ex); } }
Source:
<code>protected boolean validateRoutingNumberAndAccountNumber(String routingNumber, String accountNumber) { boolean isValid = true; if (StringUtils.isNotEmpty(routingNumber)) { ACHBank achBank = achBankService.getByPrimaryId(routingNumber); if (ObjectUtils.isNull(achBank)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "ACH Bank does not exist for routing number"); isValid = false; } } <START> if (StringUtils.isEmpty(routingNumber) && StringUtils.isEmpty(accountNumber)) { <END> GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "Routing number or account number required"); isValid = false; } return isValid; }</code><technical_language>clause is of is checked above, clause put in else if</technical_language>

Target:
protected boolean validateRoutingNumberAndAccountNumber(String routingNumber, String accountNumber) { boolean valid = true; if (StringUtils.isNotBlank(routingNumber)) { ACHBank achBank = achBankService.getByPrimaryId(routingNumber); if (ObjectUtils.isNull(achBank)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "ACH Bank does not exist for routing number"); valid = false; } } else if (StringUtils.isBlank(accountNumber)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "Routing number or account number required"); valid = false; } return valid; }
Source:
<code>public String getEmail() { <START> return this.email; <END> }</code><technical_language>I this. is added getter. Is this done a purpose is some coding style</technical_language>

Target:
public String getEmail() { return email; }
Source:
<code>public Iterable<Channel> forIds(final Iterable<Long> ids) { return channels.get() .stream() .filter(input -> Iterables.contains(ids, input.getId())) <START> .collect(Collectors.toList()); <END> }</code><technical_language>MoreCollectors.toImmutableList()</technical_language>

Target:
public Iterable<Channel> forIds(final Iterable<Long> ids) { return channels.get() .stream() .filter(input -> Iterables.contains(ids, input.getId())) .collect(MoreCollectors.toImmutableList()); }
Source:
<code>public URL getEmailConfig() { if (Version.current.isTest()) <START> return getClass().getClassLoader().getResource("resources/emailConf-test.xml"); <END> else return getClass().getClassLoader().getResource("/resources/emailConf.xml"); }</code><technical_language>I this need a leading "/". java final String test = Version.current.isTest() ? "-test" : ""; return getClass().getClassLoader().getResource("/resources/emailConf" + test + ".xml");</technical_language>

Target:
public URL getEmailConfig() { final String test = Version.current.isTest() ? "-test" : ""; return getClass().getClassLoader().getResource("/resources/emailConf" + test + ".xml"); }
Source:
<code>protected void executeQueryCommand() { List<VDS> vdsList = getDbFacade().getVdsDao() .getAllForNetwork(getParameters().getId()); List<VdsNetworkInterface> vdsNetworkInterfaceList = getDbFacade().getInterfaceDao() .getVdsInterfacesByNetworkId(getParameters().getId()); final Map<Guid, VDS> vdsById = Entities.businessEntitiesById(vdsList); HostNetworkQosDao qosDao = getDbFacade().getHostNetworkQosDao(); <START> Map<String, Network> networks = Entities.entitiesByName( <END> getDbFacade().getNetworkDao().getAll()); List<PairQueryable<VdsNetworkInterface, VDS>> vdsInterfaceVdsPairs = new ArrayList<PairQueryable<VdsNetworkInterface, VDS>>(); for (final VdsNetworkInterface vdsNetworkInterface : vdsNetworkInterfaceList) { vdsInterfaceVdsPairs.add(new PairQueryable<VdsNetworkInterface, VDS>(vdsNetworkInterface, vdsById.get(vdsNetworkInterface.getVdsId()))); if (!Boolean.TRUE.equals(vdsNetworkInterface.getBonded()) || LinqUtils.filter(vdsNetworkInterfaceList, new Predicate<VdsNetworkInterface>() { @Override public boolean eval(VdsNetworkInterface bond) { return StringUtils.equals(bond.getBondName(), vdsNetworkInterface.getName()); } }).size() > 0) { Network network = networks.get(vdsNetworkInterface.getNetworkName()); vdsNetworkInterface.setNetworkImplementationDetails(NetworkUtils.calculateNetworkImplementationDetails(network, network == null ? null : qosDao.get(network.getQosId()), vdsNetworkInterface)); } } getQueryReturnValue().setReturnValue(vdsInterfaceVdsPairs); }</code><technical_language>do need retrieve networks in a DC? network interested in, call getNetworksDao().get(getParameters().getId())</technical_language>

Target:
protected void executeQueryCommand() { List<VDS> vdsList = getDbFacade().getVdsDao() .getAllForNetwork(getParameters().getId()); List<VdsNetworkInterface> vdsNetworkInterfaceList = getDbFacade().getInterfaceDao() .getVdsInterfacesByNetworkId(getParameters().getId()); final Map<Guid, VDS> vdsById = Entities.businessEntitiesById(vdsList); List<PairQueryable<VdsNetworkInterface, VDS>> vdsInterfaceVdsPairs = new ArrayList<PairQueryable<VdsNetworkInterface, VDS>>(); Network network = getDbFacade().getNetworkDao().get(getParameters().getId()); HostNetworkQos qos = getDbFacade().getHostNetworkQosDao().get(network.getQosId()); for (final VdsNetworkInterface vdsNetworkInterface : vdsNetworkInterfaceList) { vdsInterfaceVdsPairs.add(new PairQueryable<VdsNetworkInterface, VDS>(vdsNetworkInterface, vdsById.get(vdsNetworkInterface.getVdsId()))); vdsNetworkInterface.setNetworkImplementationDetails(NetworkUtils.calculateNetworkImplementationDetails(network, qos, vdsNetworkInterface)); } getQueryReturnValue().setReturnValue(vdsInterfaceVdsPairs); }
Source:
<code>public FFmpegOutputBuilder addMetaTag(String key, String value) { <START> this.video_enabled = true; <END> if (this.meta_tags == null) { this.meta_tags = new ArrayList<>(); } this.meta_tags.add(key + "=" + value); return this; }</code><technical_language>consistent elsewhere, do a quick checkNotNull(key), checkNotNull(value)</technical_language>

Target:
public FFmpegOutputBuilder addMetaTag(String key, String value) { this.video_enabled = true; if (this.video_meta_tags == null) { this.video_meta_tags = new ArrayList<>(); } this.video_meta_tags.add(checkNotNull(key) + "=" + checkNotNull(value).replace("\"", "")); return this; }
Source:
<code>private void deleteStagedCatalogIfNeeded() { if (((m_commandLog != null) && m_commandLog.isEnabled()) || (m_terminusNonce != null)){ <START> assert((m_terminusNonce == null) || !m_terminusNonce.trim().isEmpty()); <END> File stagedCatalog = new VoltFile(RealVoltDB.getStagedCatalogPath(m_nodeSettings.getVoltDBRoot().getAbsolutePath())); if (stagedCatalog.exists()){ boolean success = stagedCatalog.delete(); if (success){ hostLog.info("Deleted staged schema and classes because durability is present."); } else { hostLog.warn("Could not delete staged schema and classes. They will be ignored during command log or terminus snapshot recovery."); } } } }</code><technical_language>This assert get triggered in this block</technical_language>

Target:
private void deleteStagedCatalogIfNeeded() { if (((m_commandLog != null) && m_commandLog.isEnabled()) || (m_terminusNonce != null)) { File stagedCatalog = new VoltFile(RealVoltDB.getStagedCatalogPath(getVoltDBRootPath())); if (stagedCatalog.exists()) { if (stagedCatalog.delete()) { hostLog.info("Saved copy of the initialized schema deleted because command logs and/or snapshots are in use."); } else { hostLog.warn("Failed to delete the saved copy of the initialized schema."); } } } }
Source:
<code>LegacyPolicy getLegacyPolicyFromServicePolicy(ServicePolicy servicePolicy) { List<GeoCircleFence> geoFences = null; if (servicePolicy.getLocations() != null) { if (!servicePolicy.getLocations().isEmpty()) { geoFences = new ArrayList<>(); for (ServicePolicy.Location location : servicePolicy.getLocations()) { geoFences.add(getGeoCircleFenceFromLocation(location)); } } } Integer requiredFactors = servicePolicy.getRequiredFactors(); int amount = (requiredFactors != null) ? requiredFactors : 0; Boolean inherence = servicePolicy.isInherenceFactorRequired(); <START> Boolean knownledge = servicePolicy.isKnowledgeFactorRequired(); <END> Boolean possession = servicePolicy.isPossessionFactorRequired(); boolean denyRootedJailbroken = (servicePolicy.isJailBreakProtectionEnabled() != null) ? servicePolicy.isJailBreakProtectionEnabled() : false; List<LegacyPolicy.TimeFence> timeFences = new ArrayList<>(); for (ServicePolicy.TimeFence servicePolicyTimefence : servicePolicy.getTimeFences()) { List<LegacyPolicy.Day> days = new ArrayList<>(); for (ServicePolicy.Day day : servicePolicyTimefence.getDays()) { days.add(LegacyPolicy.Day.fromString(day.toString())); } timeFences.add(new LegacyPolicy.TimeFence( servicePolicyTimefence.getName(), days, servicePolicyTimefence.getStartHour(), servicePolicyTimefence.getStartMinute(), servicePolicyTimefence.getEndHour(), servicePolicyTimefence.getEndMinute(), servicePolicyTimefence.getTimeZone()) ); } return new LegacyPolicy(amount, inherence, knownledge, possession, denyRootedJailbroken, geoFences, timeFences); }</code><technical_language>This knowledge</technical_language>

Target:
LegacyPolicy getLegacyPolicyFromServicePolicy(ServicePolicy servicePolicy) { List<GeoCircleFence> geoFences = null; if (servicePolicy.getLocations() != null) { if (!servicePolicy.getLocations().isEmpty()) { geoFences = new ArrayList<>(); for (ServicePolicy.Location location : servicePolicy.getLocations()) { geoFences.add(getGeoCircleFenceFromLocation(location)); } } } Integer requiredFactors = servicePolicy.getRequiredFactors(); int amount = (requiredFactors != null) ? requiredFactors : 0; Boolean inherence = servicePolicy.isInherenceFactorRequired(); Boolean knowledge = servicePolicy.isKnowledgeFactorRequired(); Boolean possession = servicePolicy.isPossessionFactorRequired(); boolean denyRootedJailbroken = (servicePolicy.isJailBreakProtectionEnabled() != null) ? servicePolicy.isJailBreakProtectionEnabled() : false; List<LegacyPolicy.TimeFence> timeFences = new ArrayList<>(); for (ServicePolicy.TimeFence servicePolicyTimefence : servicePolicy.getTimeFences()) { List<LegacyPolicy.Day> days = new ArrayList<>(); for (ServicePolicy.Day day : servicePolicyTimefence.getDays()) { days.add(LegacyPolicy.Day.fromString(day.toString())); } timeFences.add(new LegacyPolicy.TimeFence( servicePolicyTimefence.getName(), days, servicePolicyTimefence.getStartHour(), servicePolicyTimefence.getStartMinute(), servicePolicyTimefence.getEndHour(), servicePolicyTimefence.getEndMinute(), servicePolicyTimefence.getTimeZone()) ); } return new LegacyPolicy(amount, inherence, knowledge, possession, denyRootedJailbroken, geoFences, timeFences); }
Source:
<code>EurekaInterestClientImpl(final SourcedEurekaRegistry<InstanceInfo> registry, ChannelFactory<InterestChannel> channelFactory, int retryWaitMillis) { this.registry = registry; this.interestTracker = new InterestTracker(); this.isShutdown = new AtomicBoolean(false); RetryableConnectionFactory<InterestChannel> retryableConnectionFactory = new RetryableConnectionFactory<>(channelFactory); Observable<Interest<InstanceInfo>> opStream = interestTracker.interestChangeStream(); Func2<InterestChannel, Interest<InstanceInfo>, Observable<Void>> executeOnChannel = new Func2<InterestChannel, Interest<InstanceInfo>, Observable<Void>>() { @Override public Observable<Void> call(InterestChannel interestChannel, Interest<InstanceInfo> interest) { return interestChannel.change(interest); } }; this.retryableConnection = retryableConnectionFactory.singleOpConnection(opStream, executeOnChannel); retryableConnection.getChannelObservable() .flatMap(new Func1<InterestChannel, Observable<Long>>() { @Override public Observable<Long> call(InterestChannel interestChannel) { if (interestChannel instanceof Sourced) { Source toRetain = ((Sourced) interestChannel).getSource(); <START> return registry.evictAllExcept(Source.matcherFor(toRetain)); <END> } return Observable.empty(); } }) .subscribe(new Subscriber<Long>() { @Override public void onCompleted() { logger.info("Completed one round of eviction due to a new interestChannel creation"); } @Override public void onError(Throwable e) { logger.warn("OnError in one round of eviction due to a new interestChannel creation"); } @Override public void onNext(Long aLong) { logger.info("Evicted instances in one round of eviction due to a new interestChannel creation", aLong); } }); retryableConnection.getRetryableLifecycle() .retryWhen(new RetryStrategyFunc(retryWaitMillis)) .subscribe(new Subscriber<Void>() { @Override public void onCompleted() { logger.info("channel onCompleted"); } @Override public void onError(Throwable e) { logger.error("Lifecycle closed with an error"); } @Override public void onNext(Void aVoid) { } }); }</code><technical_language>rename Matcher SourceMatcher? This name is libraries</technical_language>

Target:
EurekaInterestClientImpl(final SourcedEurekaRegistry<InstanceInfo> registry, ChannelFactory<InterestChannel> channelFactory, int retryWaitMillis) { super(registry, retryWaitMillis); this.interestTracker = new InterestTracker(); RetryableConnectionFactory<InterestChannel> retryableConnectionFactory = new RetryableConnectionFactory<>(channelFactory); Observable<Interest<InstanceInfo>> opStream = interestTracker.interestChangeStream(); Func2<InterestChannel, Interest<InstanceInfo>, Observable<Void>> executeOnChannel = new Func2<InterestChannel, Interest<InstanceInfo>, Observable<Void>>() { @Override public Observable<Void> call(InterestChannel interestChannel, Interest<InstanceInfo> interest) { return interestChannel.change(interest); } }; this.retryableConnection = retryableConnectionFactory.singleOpConnection(opStream, executeOnChannel); registryEvictionSubscribe(retryableConnection); lifecycleSubscribe(retryableConnection); }
Source:
<code>public GameBuilder defaultValues() { game.setFeaturedMod(KnownFeaturedMod.DEFAULT.getTechnicalName()); game.setFeaturedModVersions(FXCollections.emptyObservableMap()); game.setVictoryCondition(VictoryCondition.DEMORALIZATION); game.setHost("Host"); game.setMapFolderName("mapName"); game.setNumPlayers(1); game.setNumPlayers(2); game.setSimMods(FXCollections.emptyObservableMap()); game.setStatus(GameStatus.OPEN); game.setTitle("Title"); game.setTeams(FXCollections.emptyObservableMap()); game.setId(1); game.setMaxRating(800); <START> game.setMaxRating(1300); <END> game.setStartTime(Instant.now()); game.setGameType(GameType.CUSTOM); return this; }</code><technical_language>This dupe a typo? 800 do nothing. a 'min' rating perhaps</technical_language>

Target:
public GameBuilder defaultValues() { game.setFeaturedMod(KnownFeaturedMod.DEFAULT.getTechnicalName()); game.setFeaturedModVersions(FXCollections.emptyObservableMap()); game.setVictoryCondition(VictoryCondition.DEMORALIZATION); game.setHost("Host"); game.setMapFolderName("mapName"); game.setNumPlayers(1); game.setNumPlayers(2); game.setSimMods(FXCollections.emptyObservableMap()); game.setStatus(GameStatus.OPEN); game.setTitle("Title"); game.setTeams(FXCollections.emptyObservableMap()); game.setId(1); game.setMinRating(800); game.setMaxRating(1300); game.setStartTime(Instant.now()); game.setGameType(GameType.CUSTOM); return this; }
Source:
<code>public ATCommandResponse sendATCommand(ATCommand command) throws InvalidOperatingModeException, XBeeException { <START> if (!connectionInterface.isConnected()) <END> throw new XBeeException(XBeeException.CONNECTION_NOT_OPEN); ATCommandResponse response = null; switch (getOperatingMode()) { case AT: case UNKNOWN: default: throw new InvalidOperatingModeException(); case API: case API_ESCAPE: XBeeAPIPacket packet = new ATCommandPacket(getNextFrameID(), command.getCommand(), command.getParameter()); try { ATCommandResponsePacket answerPacket = (ATCommandResponsePacket)sendXBeePacket(packet); response = new ATCommandResponse(command, answerPacket.getCommandData(), answerPacket.getStatus()); } catch (InvalidOperatingModeException e) { } catch (ClassCastException e1) { System.err.println("Received an invalid packet type after sending an AT Command packet."); e1.printStackTrace(); } } return response; }</code><technical_language>connectionInterface null</technical_language>

Target:
public ATCommandResponse sendATCommand(ATCommand command) throws InvalidOperatingModeException, XBeeException { if (!connectionInterface.isOpen()) throw new XBeeException(XBeeException.CONNECTION_NOT_OPEN); if (!connectionInterface.isOpen()) throw new NullPointerException("AT command cannot be null."); ATCommandResponse response = null; switch (getOperatingMode()) { case AT: case UNKNOWN: default: throw new InvalidOperatingModeException(); case API: case API_ESCAPE: XBeeAPIPacket packet = new ATCommandPacket(getNextFrameID(), command.getCommand(), command.getParameter()); try { ATCommandResponsePacket answerPacket = (ATCommandResponsePacket)sendXBeePacket(packet); response = new ATCommandResponse(command, answerPacket.getCommandData(), answerPacket.getStatus()); } catch (InvalidOperatingModeException e) { } catch (ClassCastException e1) { System.err.println("Received an invalid packet type after sending an AT Command packet."); e1.printStackTrace(); } } return response; }
Source:
<code>private double correctedCentralWavelength() { if (_mode instanceof Imaging) { _Filter = Filter.fromFile(getPrefix(), params.filter().get().name(), getDirectory() + "/"); <START> return (int) _Filter.getEffectiveWavelength(); <END> } else if (!isXDispUsed()) { return params.centralWavelength().toNanometers(); } else { return XDISP_CENTRAL_WAVELENGTH; } }</code><technical_language>conversion (int) loose precision? method is returning double</technical_language>

Target:
private double correctedCentralWavelength() { if (_mode instanceof Imaging) { _Filter = Filter.fromFile(getPrefix(), getFilter().name(), getDirectory() + "/"); return _Filter.getEffectiveWavelength(); } else if (!isXDispUsed()) { return params.centralWavelength().toNanometers(); } else { return XDISP_CENTRAL_WAVELENGTH; } }
Source:
<code>public void setupCache() throws Exception { globalConfig = new GlobalConfigurationBuilder(); globalConfig.globalJmxStatistics().disable(); globalConfig.globalJmxStatistics().mBeanServerLookup(null); GlobalAuthorizationConfigurationBuilder globalRoles = globalConfig.security().authorization() .principalRoleMapper(getPrincipalRoleMapper()); cacheConfig = new ConfigurationBuilder(); cacheConfig.transaction().lockingMode(LockingMode.PESSIMISTIC); cacheConfig.invocationBatching().enable(); cacheConfig.jmxStatistics().disable(); AuthorizationConfigurationBuilder authConfig = cacheConfig.security().authorization().enable(); Map<String, AuthorizationPermission[]> rolePermissionMap = getRolePermissionMap(); for (Entry<String, AuthorizationPermission[]> role : rolePermissionMap.entrySet()) { authConfig = authConfig.role(role.getKey()); GlobalRoleConfigurationBuilder roleBuilder = globalRoles.role(role.getKey()); for (AuthorizationPermission permission : role.getValue()) { roleBuilder = roleBuilder.permission(permission); } } Subject admin = getAdminSubject(); Subject.doAs(admin, new PrivilegedExceptionAction<Void>() { public Void run() throws Exception { manager = new DefaultCacheManager(globalConfig.build()); manager.defineConfiguration(CACHE_NAME, cacheConfig.build()); secureCache = manager.getCache(CACHE_NAME); <START> secureCache.put("predefined key", "predefined value"); <END> return null; } }); }</code><technical_language>"const-ify" "predefined key" "predefined value"</technical_language>

Target:
public void setupCache() throws Exception { globalConfig = new GlobalConfigurationBuilder(); globalConfig.globalJmxStatistics().disable(); globalConfig.globalJmxStatistics().mBeanServerLookup(null); GlobalAuthorizationConfigurationBuilder globalRoles = globalConfig.security().authorization() .principalRoleMapper(getPrincipalRoleMapper()); cacheConfig = new ConfigurationBuilder(); cacheConfig.transaction().lockingMode(LockingMode.PESSIMISTIC); cacheConfig.invocationBatching().enable(); cacheConfig.jmxStatistics().disable(); AuthorizationConfigurationBuilder authConfig = cacheConfig.security().authorization().enable(); Map<String, AuthorizationPermission[]> rolePermissionMap = getRolePermissionMap(); for (Entry<String, AuthorizationPermission[]> role : rolePermissionMap.entrySet()) { authConfig = authConfig.role(role.getKey()); GlobalRoleConfigurationBuilder roleBuilder = globalRoles.role(role.getKey()); for (AuthorizationPermission permission : role.getValue()) { roleBuilder = roleBuilder.permission(permission); } } Subject admin = getAdminSubject(); Subject.doAs(admin, new PrivilegedExceptionAction<Void>() { public Void run() throws Exception { manager = new DefaultCacheManager(globalConfig.build()); manager.defineConfiguration(CACHE_NAME, cacheConfig.build()); secureCache = manager.getCache(CACHE_NAME); secureCache.put(TEST_ENTRY_KEY, TEST_ENTRY_VALUE); return null; } }); }
Source:
<code>public boolean equals(Object obj) { if (obj == null) return false; <START> if (!(obj instanceof NegativeNodeLocationFilter)) return false; <END> return (this.toString().equals(obj.toString())); }</code><technical_language>I NegativeLocationFilter (like class name), is another class called NegativeNodeLocationFilter</technical_language>

Target:
public boolean equals(Object obj) { if (obj == null) return false; if (!(obj instanceof NegativeLocationFilter)) return false; return (this.toString().equals(obj.toString())); }
Source:
<code>public GroupDetail renameGroup(final AccountGroup.Id groupId, final String newName) throws OrmException, NameAlreadyUsedException, NoSuchGroupException, InvalidNameException { final GroupControl ctl = groupControlFactory.validateFor(groupId); final AccountGroup group = db.accountGroups().get(groupId); if (group == null || !ctl.isOwner()) { throw new NoSuchGroupException(groupId); } <START> if (newName.isEmpty()) { <END> throw new InvalidNameException(); } final AccountGroup.NameKey old = group.getNameKey(); final AccountGroup.NameKey key = new AccountGroup.NameKey(newName); try { final AccountGroupName id = new AccountGroupName(key, groupId); db.accountGroupNames().insert(Collections.singleton(id)); } catch (OrmDuplicateKeyException dupeErr) { AccountGroupName other = db.accountGroupNames().get(key); if (other != null && other.getId().equals(groupId)) { return groupDetailFactory.create(groupId).call(); } throw new NameAlreadyUsedException(); } group.setNameKey(key); db.accountGroups().update(Collections.singleton(group)); AccountGroupName priorName = db.accountGroupNames().get(old); if (priorName != null) { db.accountGroupNames().delete(Collections.singleton(priorName)); } groupCache.evict(group); groupCache.evictAfterRename(old, key); renameGroupOpFactory.create( currentUser.newCommitterIdent(new Date(), TimeZone.getDefault()), group.getGroupUUID(), old.get(), newName).start(0, TimeUnit.MILLISECONDS); return groupDetailFactory.create(groupId).call(); }</code><technical_language>I able rename a group a space: ssh ... gerrit rename-group test '" "' Suggestion: if (newName.trim().isEmpty()) {</technical_language>

Target:
public GroupDetail renameGroup(final AccountGroup.Id groupId, final String newName) throws OrmException, NameAlreadyUsedException, NoSuchGroupException, InvalidNameException { final GroupControl ctl = groupControlFactory.validateFor(groupId); final AccountGroup group = db.accountGroups().get(groupId); if (group == null || !ctl.isOwner()) { throw new NoSuchGroupException(groupId); } if (newName.trim().isEmpty()) { throw new InvalidNameException(); } final AccountGroup.NameKey old = group.getNameKey(); final AccountGroup.NameKey key = new AccountGroup.NameKey(newName); try { final AccountGroupName id = new AccountGroupName(key, groupId); db.accountGroupNames().insert(Collections.singleton(id)); } catch (OrmDuplicateKeyException dupeErr) { AccountGroupName other = db.accountGroupNames().get(key); if (other != null && other.getId().equals(groupId)) { return groupDetailFactory.create(groupId).call(); } throw new NameAlreadyUsedException(); } group.setNameKey(key); db.accountGroups().update(Collections.singleton(group)); AccountGroupName priorName = db.accountGroupNames().get(old); if (priorName != null) { db.accountGroupNames().delete(Collections.singleton(priorName)); } groupCache.evict(group); groupCache.evictAfterRename(old, key); renameGroupOpFactory.create( currentUser.newCommitterIdent(new Date(), TimeZone.getDefault()), group.getGroupUUID(), old.get(), newName).start(0, TimeUnit.MILLISECONDS); return groupDetailFactory.create(groupId).call(); }
Source:
<code>private void initNuageVspVpcOffering() { Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(TransactionStatus status) { if (_vpcOffDao.findByUniqueName(nuageVPCOfferingName) == null) { s_logger.debug("Creating default Nuage VPC offering " + nuageVPCOfferingName); Map<Network.Service, Set<Network.Provider>> svcProviderMap = new HashMap<Network.Service, Set<Network.Provider>>(); Set<Network.Provider> nuageProviders = new HashSet<Network.Provider>(); nuageProviders.add(Network.Provider.NuageVsp); svcProviderMap.put(Network.Service.Connectivity, nuageProviders); svcProviderMap.put(Network.Service.Dhcp, nuageProviders); svcProviderMap.put(Network.Service.StaticNat, nuageProviders); svcProviderMap.put(Network.Service.SourceNat, nuageProviders); svcProviderMap.put(Network.Service.NetworkACL, nuageProviders); Set<Network.Provider> userDataProviders = new HashSet<Network.Provider>(); <START> userDataProviders.add(Network.Provider.VPCVirtualRouter); <END> svcProviderMap.put(Network.Service.UserData, userDataProviders); createVpcOffering(nuageVPCOfferingName, nuageVPCOfferingDisplayText, svcProviderMap, true, VpcOffering.State.Enabled, null); } } }); }</code><technical_language>Replace lines 797-798 a call Collections.singleton()</technical_language>

Target:
private void initNuageVspVpcOffering() { Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(TransactionStatus status) { if (_vpcOffDao.findByUniqueName(nuageVPCOfferingName) == null) { if (s_logger.isDebugEnabled()) { s_logger.debug("Creating default Nuage VPC offering " + nuageVPCOfferingName); } Map<Network.Service, Set<Network.Provider>> svcProviderMap = Maps.newHashMap(NUAGE_VSP_VPC_SERVICE_MAP); Set<Network.Provider> userDataProviders = Collections.singleton(Network.Provider.VPCVirtualRouter); svcProviderMap.put(Network.Service.UserData, userDataProviders); createVpcOffering(nuageVPCOfferingName, nuageVPCOfferingDisplayText, svcProviderMap, true, VpcOffering.State.Enabled, null); } } }); }
Source:
<code>private void createIssues(InputFile file, SensorContext context, String repo) { RuleKey ruleKey = RuleKey.of(repo, RULE_KEY); for (int line = 1; line <= file.lines(); line++) { TextRange text = file.selectLine(line); <START> if (text.end().lineOffset() > 0) { <END> NewIssue newIssue = context.newIssue(); newIssue .forRule(ruleKey) .at(newIssue.newLocation() .on(file) .at(text) .message("This bug issue is generated on each line")) .save(); } } }</code><technical_language>info: I mark exit condition, similar to: if (text.end().lineOffset() <= 0) { continue; }</technical_language>

Target:
private static void createIssues(InputFile file, SensorContext context, String repo) { RuleKey ruleKey = RuleKey.of(repo, RULE_KEY); for (int line = 1; line <= file.lines(); line++) { TextRange text = file.selectLine(line); if (text.end().lineOffset() == 0) { continue; } NewIssue newIssue = context.newIssue(); newIssue .forRule(ruleKey) .at(newIssue.newLocation() .on(file) .at(text) .message("This bug issue is generated on each line")) .save(); } }
Source:
<code>public URI getPageUri(final UriComponentsBuilder uriBuilder) { <START> return uriBuilder <END> .queryParam("offset", offset) .queryParam("limit", limit) .build().toUri(); }</code><technical_language>add null validation</technical_language>

Target:
public URI getPageUri(final UriComponentsBuilder uriBuilder) { return notNull(uriBuilder, "uriBuilder") .queryParam("offset", offset) .queryParam("limit", limit) .build().toUri(); }
Source:
<code>protected IPAssignment allocateIp(IpAddress ipAddress, Network network) { Instance instance = getInstanceForPrimaryIp(ipAddress); IPAssignment ip = null; String requestedIp = null; if (instance != null) { String allocatedIpAddress = DataAccessor .fieldString(instance, InstanceConstants.FIELD_ALLOCATED_IP_ADDRESS); if (allocatedIpAddress != null) { ip = new IPAssignment(allocatedIpAddress, null); } requestedIp = DataAccessor.fieldString(instance, InstanceConstants.FIELD_REQUESTED_IP_ADDRESS); } if (ip == null) { <START> ip = networkService.assignIpAddress(network, ipAddress, Arrays.asList(StringUtils.stripAll(StringUtils.split(requestedIp, ",")))); <END> if (ip == null) { objectProcessManager.scheduleStandardProcess(StandardProcess.DEACTIVATE, ipAddress, null); throw new ResourceExhaustionException("IP allocation error", "Failed to allocate IP from subnet", ipAddress); } } return ip; }</code><technical_language>trim trailing leading whitespaces</technical_language>

Target:
protected IPAssignment allocateIp(IpAddress ipAddress, Network network) { Instance instance = getInstanceForPrimaryIp(ipAddress); IPAssignment ip = null; String requestedIp = null; if (instance != null) { String allocatedIpAddress = DataAccessor .fieldString(instance, InstanceConstants.FIELD_ALLOCATED_IP_ADDRESS); if (allocatedIpAddress != null) { ip = new IPAssignment(allocatedIpAddress, null); } requestedIp = DataAccessor.fieldString(instance, InstanceConstants.FIELD_REQUESTED_IP_ADDRESS); } if (ip == null) { List<String> list = new ArrayList<>(); if (!StringUtils.isEmpty(requestedIp)) { list = Arrays.asList(StringUtils.stripAll(StringUtils.split(requestedIp, ","))); } ip = networkService.assignIpAddress(network, ipAddress, list); if (ip == null) { objectProcessManager.scheduleStandardProcess(StandardProcess.DEACTIVATE, ipAddress, null); throw new ResourceExhaustionException("IP allocation error", "Failed to allocate IP from subnet", ipAddress); } } return ip; }
Source:
<code>private BBox createBbox() { if (!containsParameter(BBOX)) { return null; } String bboxValue = getAsString(BBOX); BBox bbox; if (bboxValue.matches("^(\\d*\\.?\\d*\\,){3}(\\d*\\.?\\d*)$")) { <START> bbox = new BBox(bboxValue); <END> } else { bbox = parseJson(bboxValue, BBox.class); } bbox.setLl(convertToCrs84(bbox.getLl())); bbox.setUr(convertToCrs84(bbox.getUr())); return bbox; }</code><technical_language>move parsing GeojsonPoints here, please? public BBox(String) constructor is loose accepting a String ... if lowerLeft upperRight parsed reuse existing constructor then</technical_language>

Target:
private BBox createBbox() { if (!containsParameter(BBOX)) { return null; } String bboxValue = getAsString(BBOX); BBox bbox; if (bboxValue.matches("^(\\d*\\.?\\d*\\,){3}(\\d*\\.?\\d*)$")) { String[] coordArray = bboxValue.split("\\,"); GeojsonPoint ll = GeojsonPoint.createWithCoordinates(new Double[] {Double.valueOf(coordArray[0]), Double.valueOf(coordArray[1])}); GeojsonPoint ur = GeojsonPoint.createWithCoordinates(new Double[] {Double.valueOf(coordArray[2]), Double.valueOf(coordArray[3])}); bbox = new BBox(ll, ur); } else { bbox = parseJson(bboxValue, BBox.class); } bbox.setLl(convertToCrs84(bbox.getLl())); bbox.setUr(convertToCrs84(bbox.getUr())); return bbox; }
Source:
<code>protected boolean isHotPlugSupported() { if (FeatureSupported.hotPlug(getVds().getVdsGroupCompatibilityVersion())) { return true; <START> } <END> addCanDoActionMessage(VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED); return false; }</code><technical_language>Please replace 2 lines return failCanDoAction(VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED);</technical_language>

Target:
protected boolean isHotPlugSupported() { if (FeatureSupported.hotPlug(getVds().getVdsGroupCompatibilityVersion())) { return true; } return failCanDoAction(VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED); }
Source:
<code>private Mutation getMutation(Cell cell, TimestampRangeDelete delete, <START> long rangeTombstoneCassandraTimestamp, ToLongFunction<TimestampRangeDelete> exclusiveTimestampExtractor) { <END> if (delete.deleteSentinels()) { return Mutations.rangeTombstoneIncludingSentinelForColumn( cell.getColumnName(), exclusiveTimestampExtractor.applyAsLong(delete), rangeTombstoneCassandraTimestamp); } return Mutations.rangeTombstoneForColumn( cell.getColumnName(), exclusiveTimestampExtractor.applyAsLong(delete), rangeTombstoneCassandraTimestamp); }</code><technical_language>exclusive here, bubble logic is easier check</technical_language>

Target:
private Mutation getMutation(Cell cell, TimestampRangeDelete delete, long rangeTombstoneCassandraTimestamp, ToLongFunction<TimestampRangeDelete> exclusiveTimestampExtractor) { return Mutations.fromTimestampRangeDelete( cell.getColumnName(), delete, rangeTombstoneCassandraTimestamp, exclusiveTimestampExtractor); }
Source:
<code>public Transaction beginTransaction(MuleContext muleContext) throws TransactionException { <START> Transaction transaction = new ExtensionTransaction(muleContext); <END> transaction.begin(); return transaction; }</code><technical_language>delegate new method</technical_language>

Target:
public Transaction beginTransaction(MuleContext muleContext) throws TransactionException { try { return this.beginTransaction(muleContext.getConfiguration().getId(), ((MuleContextWithRegistry) muleContext).getRegistry() .lookupObject(NotificationDispatcher.class), muleContext.getTransactionFactoryManager(), muleContext.getTransactionManager(), 10000); } catch (RegistrationException e) { throw new TransactionException(cannotStartTransaction("Extension"), e); } }
Source:
<code>public Mono<Response<Key>> getKeyWithResponse(KeyProperties keyProperties) { <START> Objects.requireNonNull(keyProperties, "The Key Base parameter cannot be null."); <END> return withContext(context -> getKeyWithResponse(keyProperties.getName(), keyProperties.getVersion() == null ? "" : keyProperties.getVersion(), context)); }</code><technical_language>~~Key Base~~ Key Properties parameter null</technical_language>

Target:
public Mono<Response<Key>> getKeyWithResponse(KeyProperties keyProperties) { Objects.requireNonNull(keyProperties, "The Key Properties parameter cannot be null."); return withContext(context -> getKeyWithResponse(keyProperties.getName(), keyProperties.getVersion() == null ? "" : keyProperties.getVersion(), context)); }
Source:
<code>private void handleOnSubmit() { Catalog catalog = getCatalog(); WorkspaceInfo workspace = (WorkspaceInfo) model.getObject(); NamespaceInfo namespace = catalog.getFactory().createNamespace(); namespace.setPrefix(workspace.getName()); namespace.setURI(nsUriTextField.getDefaultModelObjectAsString()); namespace.setIsolated(workspace.isIsolated()); if (!validateAndReport(() -> catalog.validate(workspace, true)) || !validateAndReport(() -> catalog.validate(namespace, true))) { return; } try { catalog.add(workspace); catalog.add(namespace); } catch (Exception exception) { LOGGER.log(Level.INFO, "Error storing workspace related objects.", exception); cleanAndReport(exception); } <START> if (infoPanel.defaultWs) { <END> catalog.setDefaultWorkspace(workspace); } try { if (accessdataPanel != null) accessdataPanel.save(); } catch (IOException e) { LOGGER.log( Level.INFO, "Error saving access rules associated to workspace " + workspace.getName(), e); error(e.getMessage() == null ? e.toString() : e.getMessage()); } doReturn(WorkspacePage.class); }</code><technical_language>Interesting, this is edit page eh? align (at this point, prefer)</technical_language>

Target:
private void handleOnSubmit() { Catalog catalog = getCatalog(); WorkspaceInfo workspace = (WorkspaceInfo) model.getObject(); NamespaceInfo namespace = catalog.getFactory().createNamespace(); namespace.setPrefix(workspace.getName()); namespace.setURI(nsUriTextField.getDefaultModelObjectAsString()); namespace.setIsolated(workspace.isIsolated()); if (!validateAndReport(() -> catalog.validate(workspace, true)) || !validateAndReport(() -> catalog.validate(namespace, true))) { return; } try { catalog.add(workspace); catalog.add(namespace); } catch (Exception exception) { LOGGER.log(Level.INFO, "Error storing workspace related objects.", exception); cleanAndReport(exception); } if (infoPanel.defaultWs) { catalog.setDefaultWorkspace(workspace); } try { if (accessdataPanel != null) accessdataPanel.save(); doReturn(WorkspacePage.class); } catch (IOException e) { LOGGER.log( Level.INFO, "Error saving access rules associated to workspace " + workspace.getName(), e); error(e.getMessage() == null ? e.toString() : e.getMessage()); } }
Source:
<code>public ChatComponent setItalic(boolean italic) { <START> $lock.writeLock().lock(); <END> if (this.italic == null) this.italic = new AtomicBoolean(italic); else this.italic.set(italic); $lock.writeLock().unlock(); return this; }</code><technical_language>THREAD-SAFETY This is a poor construct for a thread-safe class. save (that much) memory, solved a volatile boolean set false a default instead</technical_language>

Target:
public ChatComponent setItalic(boolean italic) { if (this.italic == null) this.italic = new AtomicBoolean(italic); else this.italic.set(italic); return this; }
Source:
<code>public boolean configure( StaplerRequest req, JSONObject formData) throws FormException { <START> this.stashRootUrl = null; <END> this.ignoreUnverifiedSsl = false; this.includeBuildNumberInKey = false; this.credentialsId = null; this.projectKey = null; this.prependParentProjectKey = false; this.disableInprogressNotification = false; this.considerUnstableAsSuccess = false; req.bindJSON(this, formData); save(); return true; }</code><technical_language>I suggest order consistent for easier reading/comparison: * field declarations in StashNotifier (maybe) * setters/getters in StashNotifier (maybe) * default values (lines 751-758) in StashNotifier::configure * assertThat calls (lines 27-33) in ConfigAsCodeTest::should_support_jcasc_from_yaml * setter calls (lines 40-47) in ConfigAsCodeTest::should_support_jcasc_to_yaml</technical_language>

Target:
public boolean configure( StaplerRequest req, JSONObject formData) throws FormException { this.considerUnstableAsSuccess = false; this.credentialsId = null; this.disableInprogressNotification = false; this.ignoreUnverifiedSsl = false; this.includeBuildNumberInKey = false; this.prependParentProjectKey = false; this.projectKey = null; this.stashRootUrl = null; req.bindJSON(this, formData); save(); return true; }
Source:
<code><START> private String initialConnectionName() throws CoreException { <END> String name = DEFAULT_CONNECTION_NAME; int count = 1; while (getSelectedConnectionType().getConnection(name) != null) { name = DEFAULT_CONNECTION_NAME + " " + count++; } return name; }</code><technical_language>I reason throw CoreException here</technical_language>

Target:
private String initialConnectionName() { String name = DEFAULT_CONNECTION_NAME; int count = 1; while (getSelectedConnectionType().getConnection(name) != null) { name = DEFAULT_CONNECTION_NAME + " " + count++; } return name; }
Source:
<code>public static boolean isEmpty(Object[] array) { <START> return array == null ? true : array.length == 0; <END> }</code><technical_language>return array == null || array.length == 0</technical_language>

Target:
public static boolean isEmpty(Object[] array) { return array == null || array.length == 0; }