auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void showEmailSentDialog(String email) { new AlertDialog.Builder(this) .setTitle(R.string.fui_title_confirm_recover_password) .setMessage(getString(R.string.fui_confirm_recovery_body, email)) <START> .setOnDismissListener(this) <END> .setPositiveButton(android.R.string.ok, null) .show(); }</code><technical_language>nit: clearer define onDismissListener inline here</technical_language>

Target:
private void showEmailSentDialog(String email) { new AlertDialog.Builder(this) .setTitle(R.string.fui_title_confirm_recover_password) .setMessage(getString(R.string.fui_confirm_recovery_body, email)) .setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { finish(Activity.RESULT_OK, new Intent()); } }) .setPositiveButton(android.R.string.ok, null) .show(); }
Source:
<code>public MessageChannel resolveDestination(String name) { MessageChannel channel = null; try { return super.resolveDestination(name); } catch (DestinationResolutionException e) { } if (name.contains(":")) { if (binderFactory != null) { <START> String[] tokens = name.split(":", 2); <END> String transport = null; String type; if (tokens.length == 2) { type = tokens[0]; } else if (tokens.length == 3) { transport = tokens[0]; type = tokens[1]; } else { throw new IllegalArgumentException("Unrecognized channel naming scheme: " + name + " , should be" + " [<transport>:]<type>:<name>"); } Binder<MessageChannel> binder = binderFactory.getBinder(transport); if ("queue".equals(type)) { channel = binder.bindDynamicProducer(name, this.producerProperties); } else { channel = binder.bindDynamicPubSubProducer(name, this.producerProperties); } } } if (channel == null) { channel = super.resolveDestination(name); } return channel; }</code><technical_language>change maximum 3. fix merge</technical_language>

Target:
public MessageChannel resolveDestination(String name) { MessageChannel channel = null; DestinationResolutionException destinationResolutionException; try { return super.resolveDestination(name); } catch (DestinationResolutionException e) { destinationResolutionException = e; } synchronized (this) { try { return super.resolveDestination(name); } catch (DestinationResolutionException e) { destinationResolutionException = e; } if (this.beanFactory != null && this.binderFactory != null) { channel = new DirectChannel(); this.beanFactory.registerSingleton(name, channel); channel = (MessageChannel) this.beanFactory.initializeBean(channel, name); String transport = null; if (name.contains(":")) { String[] tokens = name.split(":", 2); if (tokens.length == 2) { transport = tokens[0]; } else if (tokens.length != 1) { throw new IllegalArgumentException("Unrecognized channel naming scheme: " + name + " , should be" + " [<transport>:]<name>"); } } String[] dynamicDestinations = null; Properties producerProperties = null; if (this.channelBindingServiceProperties != null) { dynamicDestinations = this.channelBindingServiceProperties.getDynamicDestinations(); producerProperties = this.channelBindingServiceProperties.getProducerProperties(name); } boolean dynamicAllowed = dynamicDestinations == null || dynamicDestinations.length == 0 || Arrays.asList(dynamicDestinations).contains(name); if (dynamicAllowed) { Binder<MessageChannel> binder = binderFactory.getBinder(transport); binder.bindProducer(name, channel, producerProperties); } else { throw destinationResolutionException; } } return channel; } }
Source:
<code>public void runScenarioAlwaysCompleted() throws Exception { String experimentID = BenchFlowData.SCENARIO_ALWAYS_COMPLETED_EXPERIMENT_ID; setUpMocks(experimentID); Response response = client.target(String.format("http://localhost:%d", RULE.getLocalPort())) .path(BenchFlowConstants.getPathFromExperimentID(experimentID)) .path(BenchFlowExperimentResource.RUN_ACTION_PATH).request().post(null); Assert.assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus()); BenchFlowExperimentModelDAO experimentModelDAO = new BenchFlowExperimentModelDAO(mongoClient); Assert.assertNotNull(experimentModelDAO.getExperimentModel(experimentID)); <START> executorService.awaitTermination(2, TimeUnit.SECONDS); <END> Assert.assertEquals(BenchFlowExperimentState.TERMINATED, experimentModelDAO.getExperimentState(experimentID)); Assert.assertEquals(TerminatedState.COMPLETED, experimentModelDAO.getTerminatedState(experimentID)); long expectedExecutedTrials = 2; long executedTrials = BenchFlowExperimentManagerApplication.getExperimentModelDAO() .getNumExecutedTrials(experimentID); Assert.assertEquals(expectedExecutedTrials, executedTrials); }</code><technical_language>This is safe, need check if started, wait if check again. applies cases</technical_language>

Target:
public void runScenarioAlwaysCompleted() throws Exception { String experimentID = BenchFlowData.SCENARIO_ALWAYS_COMPLETED_EXPERIMENT_ID; runAlwaysCompleteOrDefaultOrFailFirst(experimentID); }
Source:
<code>public Result login() { JsonNode json = request().body().asJson(); String username = json.findPath("username").getTextValue(); String password = json.findPath("password").getTextValue(); <START> if (username.equals("user") && password.equals("password")) { <END> session().clear(); session().put("email", username); return ok("Authenticated"); } else { return internalServerError("Bad email / password."); } }</code><technical_language>write a test it</technical_language>

Target:
public Result login() { JsonNode json = request().body().asJson(); try { expectFilledString(json, "username", "password"); } catch (InvalidJsonException e) { return badRequest("Expected username and password in Json."); } String username = json.findPath("username").getTextValue(); String password = json.findPath("password").getTextValue(); if (username.equals("user") && password.equals("password")) { session().clear(); session().put("email", username); return ok("Authenticated"); } else { return unauthorized("Bad username/password."); } }
Source:
<code>public void stop() { logger.debug("Stopping {}", this); synchronized (this) { if (refCount == 0) { throw new IllegalStateException("Reference count is zero"); } if (--refCount > 0) { return; } <START> if (!isActive()) { <END> return; } } submit(new Runnable() { @Override public void run() { synchronized (DefaultEventLoop.this) { if (refCount == 0) { for (SelectionKey selectionKey : selector.keys()) { if (selectionKey.isValid()) { Channel channel = selectionKey.channel(); if (channel != null && channel.isOpen()) { Listener l = (Listener)selectionKey.attachment(); try { selectionKey.channel().close(); if (l != null) { if (l instanceof ClientListener) { ((ClientListener)l).disconnected(); } l.unregistered(selectionKey); } } catch (IOException e) { if (l != null) { l.handleException(e, DefaultEventLoop.this); } else { logger.warn("Exception while closing channel on unregistered key {}", channel, selectionKey, e); } } } } } alive = false; selector.wakeup(); } } } @Override public String toString() { return String.format("stop{%d}", refCount); } }); }</code><technical_language>enter this state</technical_language>

Target:
public void stop() { logger.debug("Stopping {}", this); synchronized (this) { if (refCount == 0) { throw new IllegalStateException("Reference count is zero"); } if (--refCount > 0 || !isActive()) { return; } } submit(new Runnable() { @Override public void run() { synchronized (DefaultEventLoop.this) { if (refCount == 0) { for (SelectionKey selectionKey : selector.keys()) { if (selectionKey.isValid()) { Channel channel = selectionKey.channel(); if (channel != null && channel.isOpen()) { Listener l = (Listener)selectionKey.attachment(); try { selectionKey.channel().close(); if (l != null) { if (l instanceof ClientListener) { ((ClientListener)l).disconnected(); } l.unregistered(selectionKey); } } catch (IOException e) { if (l != null) { l.handleException(e, DefaultEventLoop.this); } else { logger.warn("Exception while closing channel on unregistered key {}", channel, selectionKey, e); } } } } } alive = false; selector.wakeup(); } } } @Override public String toString() { return String.format("stop{%d}", refCount); } }); }
Source:
<code>public Publication getPublicationById(Long id) { <START> return publicationRepository.findById(id).orElseThrow(() -> new RestException("Not found", 404)); <END> }</code><technical_language>HttpServletResponse.SC_NOT_FOUND</technical_language>

Target:
public Publication getPublicationById(Long id) { return publicationRepository.findById(id).orElseThrow(() -> new RestException("Not found", HttpServletResponse.SC_NOT_FOUND)); }
Source:
<code>private Map<String, DropwizardMetricSpec> readMap(ObjectMapper mapper, String dimensionMapPath) { <START> try { <END> InputStream is; if (Strings.isNullOrEmpty(dimensionMapPath)) { log.info("Using default metric dimension and types"); is = this.getClass().getClassLoader().getResourceAsStream("defaultMetricDimensions.json"); } else { log.info("Using metric dimensions at types at [%s]", dimensionMapPath); is = new FileInputStream(new File(dimensionMapPath)); } return mapper.readerFor(new TypeReference<Map<String, DropwizardMetricSpec>>() { }).readValue(is); } catch (IOException e) { throw new ISE(e, "Failed to parse metric dimensions and types"); } }</code><technical_language>is meaning of null</technical_language>

Target:
private Map<String, DropwizardMetricSpec> readMap(ObjectMapper mapper, String dimensionMapPath) { InputStream is = null; try { if (Strings.isNullOrEmpty(dimensionMapPath)) { log.info("Using default metric dimension and types"); is = this.getClass().getClassLoader().getResourceAsStream("defaultMetricDimensions.json"); } else { log.info("Using metric dimensions at types at [%s]", dimensionMapPath); is = new FileInputStream(new File(dimensionMapPath)); } return mapper.readerFor(new TypeReference<Map<String, DropwizardMetricSpec>>() { }).readValue(is); } catch (IOException e) { throw new ISE(e, "Failed to parse metric dimensions and types"); } finally { Closeables.closeQuietly(is); } }
Source:
<code><START> private AmrProfileStatusCode readAmrProfileStatusCode(final DataObject amrProfileStatusData) <END> throws ProtocolAdapterException { AmrProfileStatusCode amrProfileStatusCode = null; if (!amrProfileStatusData.isNumber()) { throw new ProtocolAdapterException("Could not read AMR profile register data. Invalid data type."); } final Set<AmrProfileStatusCodeFlag> flags = this.amrProfileStatusHelperService .toAmrProfileStatusCodeFlags((Number) amrProfileStatusData.value()); amrProfileStatusCode = new AmrProfileStatusCode(flags); return amrProfileStatusCode; }</code><technical_language>type of conversion of jDLMS DataObject a object appears in more classes. This a good candidate move a helper service DlmsHelperService</technical_language>

Target:
private AmrProfileStatusCode readAmrProfileStatusCode(final DataObject amrProfileStatusData) throws ProtocolAdapterException { AmrProfileStatusCode amrProfileStatusCode = null; if (!amrProfileStatusData.isNumber()) { throw new ProtocolAdapterException("Could not read AMR profile register data. Invalid data type."); } final Set<AmrProfileStatusCodeFlag> flags = this.amrProfileStatusCodeHelperService .toAmrProfileStatusCodeFlags((Number) amrProfileStatusData.value()); amrProfileStatusCode = new AmrProfileStatusCode(flags); return amrProfileStatusCode; }
Source:
<code>public void updateMatrices(float fov) { prevViewProjectionMatrix.set(viewProjectionMatrix); if (cachedPosition.equals(getPosition()) && cachedViewigDirection.equals(viewingDirection) && cachedZFar == zFar && cachedZNear == zNear) { return; } <START> projectionMatrix = new Matrix4f().ortho(left,right,top,bottom,zNear,zFar).transpose(); <END> viewMatrix = MatrixUtils.createViewMatrix(0f, 0.0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z); normViewMatrix = MatrixUtils.createViewMatrix(0f, 0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z); viewProjectionMatrix = new Matrix4f(viewMatrix).mul(projectionMatrix); viewProjectionMatrix.invert(inverseViewProjectionMatrix); cachedPosition.set(getPosition()); cachedViewigDirection.set(viewingDirection); cachedZFar = zFar; cachedZNear = zNear; updateFrustum(); }</code><technical_language>top bottom parameters need switched. suggestion projectionMatrix = new Matrix4f().ortho(left,right,bottom,top,zNear,zFar).transpose();</technical_language>

Target:
public void updateMatrices(float fov) { prevViewProjectionMatrix.set(viewProjectionMatrix); if (cachedPosition.equals(getPosition()) && cachedViewigDirection.equals(viewingDirection) && cachedZFar == zFar && cachedZNear == zNear) { return; } projectionMatrix = new Matrix4f().ortho(left, right, bottom, top, zNear, zFar).transpose(); viewMatrix = MatrixUtils.createViewMatrix(0f, 0.0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z); normViewMatrix = MatrixUtils.createViewMatrix(0f, 0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z); viewProjectionMatrix = new Matrix4f(viewMatrix).mul(projectionMatrix); viewProjectionMatrix.invert(inverseViewProjectionMatrix); cachedPosition.set(getPosition()); cachedViewigDirection.set(viewingDirection); cachedZFar = zFar; cachedZNear = zNear; updateFrustum(); }
Source:
<code>private Map<String,Object> walkJson(JSONObject jsonObj) { Map<String,Object> v = Maps.newHashMap(); for (Object key: jsonObj.keySet()) { <START> if (fields == null || fields.contains(key.toString())) <END> v.put(key.toString(), wrap(jsonObj.get(key))); } return v; }</code><technical_language>'fields' applied for top level json</technical_language>

Target:
private Map<String,Object> walkJson(JSONObject jsonObj) { Map<String,Object> v = Maps.newHashMap(); for (Object key: jsonObj.keySet()) { v.put(key.toString(), wrap(jsonObj.get(key))); } return v; }
Source:
<code>public List<Block> getBlocks(final String chr, final int start, final int end) { final int sequenceIndex = sequenceNames.indexOf(chr); if (sequenceIndex == -1 || indices[sequenceIndex] == null) { return Collections.emptyList(); } final List<Chunk> chunks = indices[sequenceIndex].getChunksOverlapping(start, end); if (chunks == null) { return Collections.emptyList(); } else { final List<Block> ret = new ArrayList<Block>(chunks.size()); for (final Chunk chunk : chunks) { ret.add(new Block(chunk.getChunkStart(), chunk.getChunkEnd() - chunk.getChunkStart())); <START> } <END> return ret; } }</code><technical_language>call if want convert this a stream: chunks.stream().map (chunk -> ...)</technical_language>

Target:
public List<Block> getBlocks(final String chr, final int start, final int end) { final int sequenceIndex = sequenceNames.indexOf(chr); if (sequenceIndex == -1 || indices[sequenceIndex] == null) { return Collections.emptyList(); } final List<Chunk> chunks = indices[sequenceIndex].getChunksOverlapping(start, end); if (chunks == null) { return Collections.emptyList(); } else { final List<Block> ret = new ArrayList<>(chunks.size()); chunks.stream() .map(chunk -> new Block(chunk.getChunkStart(), chunk.getChunkEnd() - chunk.getChunkStart())) .forEach(ret::add); return ret; } }
Source:
<code>public String exportData(String parserType, Set<E> set, File file) throws Exception { <START> OutputStreamWriter oWriter = new OutputStreamWriter(new FileOutputStream(file)); <END> Parser<E> parser = parsers.get(parserType); if (parser != null) { try { parser.serialize(set, oWriter); return AutomationCommand.SUCCESS; } finally { oWriter.close(); } } else return String.format("%s! Parser \"%s\" not found!", AutomationCommand.FAIL, parserType); }</code><technical_language>try-with-resources instead of suppress warnings annotation</technical_language>

Target:
public String exportData(String parserType, Set<E> set, File file) throws Exception { OutputStreamWriter oWriter = new OutputStreamWriter(new FileOutputStream(file)); Parser<E> parser = parsers.get(parserType); if (parser != null) { try { parser.serialize(set, oWriter); return AutomationCommand.SUCCESS; } finally { oWriter.close(); } } else { return String.format("%s! Parser \"%s\" not found!", AutomationCommand.FAIL, parserType); } }
Source:
<code>public ClientDetailsEntity retrieveByIdP(String idp) throws IllegalArgumentException { Object key = new ClientIdCacheKey("IdP+" + idp, releaseName); Date dbDate = retrieveLastModifiedDateByIdP(idp); ClientDetailsEntity clientDetails = null; try { clientDetailsIdPCache.acquireReadLockOnKey(key); clientDetails = toClientDetailsEntity(clientDetailsCache.get(key)); } finally { clientDetailsIdPCache.releaseReadLockOnKey(key); } if (needsFresh(dbDate, clientDetails)) { try { clientDetailsIdPCache.acquireWriteLockOnKey(key); clientDetails = toClientDetailsEntity(clientDetailsIdPCache.get(key)); if (needsFresh(dbDate, clientDetails)) { clientDetails = clientDetailsManager.findByIdP(idp); if (clientDetails == null) throw new IllegalArgumentException("Invalid idp " + idp); clientDetailsIdPCache.put(new Element(key, clientDetails)); } } finally { <START> clientDetailsIdPCache.acquireWriteLockOnKey(key); <END> } } return clientDetails; }</code><technical_language>@rcpeters releasing lock there</technical_language>

Target:
public ClientDetailsEntity retrieveByIdP(String idp) throws IllegalArgumentException { Object key = new ClientIdCacheKey("IdP+" + idp, releaseName); Date dbDate = retrieveLastModifiedDateByIdP(idp); ClientDetailsEntity clientDetails = null; try { clientDetailsIdPCache.acquireReadLockOnKey(key); clientDetails = toClientDetailsEntity(clientDetailsCache.get(key)); } finally { clientDetailsIdPCache.releaseReadLockOnKey(key); } if (needsFresh(dbDate, clientDetails)) { try { clientDetailsIdPCache.acquireWriteLockOnKey(key); clientDetails = toClientDetailsEntity(clientDetailsIdPCache.get(key)); if (needsFresh(dbDate, clientDetails)) { clientDetails = clientDetailsManager.findByIdP(idp); if (clientDetails == null) throw new IllegalArgumentException("Invalid idp " + idp); clientDetailsIdPCache.put(new Element(key, clientDetails)); } } finally { clientDetailsIdPCache.releaseWriteLockOnKey(key); } } return clientDetails; }
Source:
<code>private OkHttpClient createOkHttpClientWithNoTimeouts() { <START> return new OkHttpClient().newBuilder() <END> .connectTimeout(0, TimeUnit.MILLISECONDS) .writeTimeout(0, TimeUnit.MILLISECONDS) .readTimeout(0, TimeUnit.MILLISECONDS) .build(); }</code><technical_language>new OkHttpClient.Builder()..., a bit odd creating 2 clients</technical_language>

Target:
private OkHttpClient createOkHttpClientWithNoTimeouts() { return new OkHttpClient.Builder() .connectTimeout(0, TimeUnit.MILLISECONDS) .writeTimeout(0, TimeUnit.MILLISECONDS) .readTimeout(0, TimeUnit.MILLISECONDS) .build(); }
Source:
<code>public double getBaseOperationCost() throws StandardException { double cost = 0.0; if (operand != null) { if (getConstantLength() == -1) { <START> cost += SIMPLE_OP_COST * operand.getTypeServices().getNull().getLength(); <END> } cost += SIMPLE_OP_COST * FN_CALL_COST_FACTOR; } return cost; }</code><technical_language>Is cost multiplied length of data type? if a long string, is expensive</technical_language>

Target:
public double getBaseOperationCost() throws StandardException { double cost = 0.0; if (operand != null) { if (getConstantLength() == -1) { cost += SIMPLE_OP_COST * Math.min(operand.getTypeServices().getNull().getLength(), 16); } cost += SIMPLE_OP_COST * FN_CALL_COST_FACTOR; } return cost; }
Source:
<code>public OAuth2GrantPage build() { OAuth2GrantPage grantPage; <START> String url = NUXEO_URL + "/oauth2/authorize?client_id=test-client&response_type=code"; <END> if (extraParameters != null) { url += extraParameters.entrySet() .stream() .map(entry -> String.join("=", entry.getKey(), entry.getValue())) .collect(Collectors.joining("&", "&", "")); } driver.get(url); if (username != null && password != null) { LoginPage loginPage = asPage(LoginPage.class); grantPage = loginPage.login(username, password, OAuth2GrantPage.class); } else { grantPage = asPage(OAuth2GrantPage.class); } grantPage.checkClientName("Test Client"); grantPage.checkResponseType("code"); grantPage.checkClientId("test-client"); int fieldCount = 2; if (extraParameters != null) { extraParameters.forEach((key, value) -> { grantPage.checkExtraParameter(key, value); }); fieldCount += extraParameters.size(); } grantPage.checkFieldCount(fieldCount); return grantPage; }</code><technical_language>URIUtils.addParametersToURIQuery</technical_language>

Target:
public OAuth2GrantPage build() { OAuth2GrantPage grantPage; String url = NUXEO_URL + "/oauth2/authorize?client_id=test-client&response_type=code"; if (extraParameters != null) { url = URIUtils.addParametersToURIQuery(url, extraParameters); } driver.get(url); if (username != null && password != null) { LoginPage loginPage = asPage(LoginPage.class); grantPage = loginPage.login(username, password, OAuth2GrantPage.class); } else { grantPage = asPage(OAuth2GrantPage.class); } grantPage.checkClientName("Test Client"); grantPage.checkResponseType("code"); grantPage.checkClientId("test-client"); int fieldCount = 2; if (extraParameters != null) { extraParameters.forEach(grantPage::checkExtraParameter); fieldCount += extraParameters.size(); } grantPage.checkFieldCount(fieldCount); return grantPage; }
Source:
<code>public static String getThrottleTierFromSwagger(Map<String, Object> extensions) throws APIManagementException { String trottleTier = null; ObjectMapper mapper = new ObjectMapper(); if (extensions.containsKey(APIConstants.X_WSO2_THROTTLING_TIER)) { Object object = extensions.get(APIConstants.X_WSO2_THROTTLING_TIER).toString(); trottleTier = mapper.convertValue(object, String.class); } <START> return trottleTier; <END> }</code><technical_language>throttleTier</technical_language>

Target:
public static String getThrottleTierFromSwagger(Map<String, Object> extensions) throws APIManagementException { String throttleTier = null; ObjectMapper mapper = new ObjectMapper(); if (extensions.containsKey(APIConstants.X_WSO2_THROTTLING_TIER)) { Object object = extensions.get(APIConstants.X_WSO2_THROTTLING_TIER).toString(); throttleTier = mapper.convertValue(object, String.class); } return throttleTier; }
Source:
<code>private void verifyWriteRaisesNpe(short version, Message message) throws Exception { ObjectSerializationCache cache = new ObjectSerializationCache(); try { int size = message.size(cache, version); ByteBuffer buf = ByteBuffer.allocate(size); ByteBufferAccessor byteBufferAccessor = new ByteBufferAccessor(buf); <START> message.write(byteBufferAccessor, cache, version); <END> fail("Expected to see a NullPointerException when writing " + message + " at version " + version); } catch (NullPointerException e) { } }</code><technical_language>nit: assertThrows. a of in this PR</technical_language>

Target:
private void verifyWriteRaisesNpe(short version, Message message) throws Exception { ObjectSerializationCache cache = new ObjectSerializationCache(); assertThrows(NullPointerException.class, () -> { int size = message.size(cache, version); ByteBuffer buf = ByteBuffer.allocate(size); ByteBufferAccessor byteBufferAccessor = new ByteBufferAccessor(buf); message.write(byteBufferAccessor, cache, version); }); }
Source:
<code>public byte exitStatus(boolean isStrict) { byte result = 0x0; <START> if (!failedScenarios.isEmpty() || (isStrict && (!pendingScenarios.isEmpty() || !undefinedScenarios.isEmpty() || !ambiguousScenarios.isEmpty()))) { <END> result |= ERRORS; } return result; }</code><technical_language>[printNonZeroResultScenarios](<LINK_0> I ambiguousScenarios treated failedScenarios return a zero exit status</technical_language>

Target:
public byte exitStatus(boolean isStrict) { byte result = 0x0; if (!failedScenarios.isEmpty() || !ambiguousScenarios.isEmpty() || (isStrict && (!pendingScenarios.isEmpty() || !undefinedScenarios.isEmpty()))) { result |= ERRORS; } return result; }
Source:
<code><START> private BlockState onCanGrief(final EndermanEntity endermanEntity) { <END> final BlockState heldBlockState = endermanEntity.getHeldBlockState(); return ((GrieferBridge) this.enderman).bridge$canGrief() ? heldBlockState : null; }</code><technical_language>Change method name prefix</technical_language>

Target:
private BlockState impl$onCanGrief(final EndermanEntity endermanEntity) { final BlockState heldBlockState = endermanEntity.getHeldBlockState(); return ((GrieferBridge) this.enderman).bridge$canGrief() ? heldBlockState : null; }
Source:
<code>public static BoolToken unifiable(Term term1, Term term2, TermContext context) { SymbolicConstraint constraint = new SymbolicConstraint(context); SymbolicUnifier unifier = new SymbolicUnifier(constraint, context); try { unifier.unify(term1, term2); } catch (UnificationFailure e) { return BoolToken.FALSE; } <START> return constraint.isSubstitution() ? BoolToken.TRUE : null; <END> }</code><technical_language>if constraint.isSubstitution I understand this method return BoolToken.TRUE. if constraint.isFalse is true, return BoolToken.FALSE instead of null</technical_language>

Target:
public static BoolToken unifiable(Term term1, Term term2, TermContext context) { SymbolicConstraint constraint = new SymbolicConstraint(context); SymbolicUnifier unifier = new SymbolicUnifier(constraint, context); try { unifier.unify(term1, term2); } catch (UnificationFailure e) { return BoolToken.FALSE; } constraint.simplify(); if (constraint.isSubstitution()) { return BoolToken.TRUE; } else if (constraint.isFalse()) { return BoolToken.FALSE; } else { return null; } }
Source:
<code><START> public void setupUI() { <END> setMainView(); adapter = new HomeScreenAdapter(activity); mTopBanner = View.inflate(activity, R.layout.grid_header_top_banner, null); setupGridView(); }</code><technical_language>nice this private call of HomeActivityUIController constructor</technical_language>

Target:
private void setupUI() { setMainView(); adapter = new HomeScreenAdapter(activity); mTopBanner = View.inflate(activity, R.layout.grid_header_top_banner, null); setupGridView(); }
Source:
<code><START> ObjectId getData() { <END> return data; }</code><technical_language>need this public. client of Iterator<Note> blob is attached note</technical_language>

Target:
public ObjectId getData() { return data; }
Source:
<code>public Collection<Integer> translateForBatch( SinkTransformation<InputT, CommT, WriterStateT, GlobalCommT> transformation, Context context) { StreamGraphUtils.validateTransformationUid(context.getStreamGraph(), transformation); final int parallelism = getParallelism(transformation, context); int writerId = addWriter( transformation, <START> parallelism, context); <END> int committerId = addCommitter( writerId, transformation, new BatchCommitterOperatorFactory<>(transformation.getSink()), parallelism, context); addGlobalCommitter( committerId >= 0 ? committerId : writerId, transformation, new BatchGlobalCommitterOperatorFactory<>(transformation.getSink()), context); return Collections.emptyList(); }</code><technical_language>nit: put context in new line, for line 72 76</technical_language>

Target:
public Collection<Integer> translateForBatch( SinkTransformation<InputT, CommT, WriterStateT, GlobalCommT> transformation, Context context) { StreamGraphUtils.validateTransformationUid(context.getStreamGraph(), transformation); final int parallelism = getParallelism(transformation, context); int writerId = addWriter( transformation, parallelism, context); int committerId = addCommitter( writerId, transformation, new BatchCommitterOperatorFactory<>(transformation.getSink()), 1, 1, context); addGlobalCommitter( committerId >= 0 ? committerId : writerId, transformation, new BatchGlobalCommitterOperatorFactory<>(transformation.getSink()), context); return Collections.emptyList(); }
Source:
<code>public void decorate(Object element, IDecoration decoration) { IIndexFileLocation ifl= null; IProject project= null; <START> boolean isCDTProject = false; <END> if (element instanceof IFile) { final IFile file = (IFile) element; project= file.getProject(); try { if (project.hasNature(CProjectNature.C_NATURE_ID) || project.hasNature(CCProjectNature.CC_NATURE_ID)) { ifl = IndexLocationFactory.getWorkspaceIFL(file); isCDTProject = true; } } catch (CoreException e) { CUIPlugin.log(e); } } else if (element instanceof ITranslationUnit) { final ITranslationUnit tu = (ITranslationUnit) element; ifl= IndexLocationFactory.getIFL(tu); project= tu.getCProject().getProject(); isCDTProject = true; } if (isCDTProject && isIndexed(project, ifl)) { decoration.addOverlay(INDEXED, IDecoration.TOP_LEFT); } }</code><technical_language>isCDTProject variable is redundant ifl != null condition instead</technical_language>

Target:
public void decorate(Object element, IDecoration decoration) { IIndexFileLocation ifl= null; IProject project= null; if (element instanceof IFile) { final IFile file = (IFile) element; project= file.getProject(); try { if (project.hasNature(CProjectNature.C_NATURE_ID) || project.hasNature(CCProjectNature.CC_NATURE_ID)) { ifl = IndexLocationFactory.getWorkspaceIFL(file); } } catch (CoreException e) { CUIPlugin.log(e); } } else if (element instanceof ITranslationUnit) { final ITranslationUnit tu = (ITranslationUnit) element; ifl= IndexLocationFactory.getIFL(tu); project= tu.getCProject().getProject(); } if (ifl != null && isIndexed(project, ifl)) { decoration.addOverlay(INDEXED, IDecoration.TOP_LEFT); } }
Source:
<code>public JButton getSaveButton() { if (saveButton == null) { saveButton = new JButton(Constant.messages.getString("menu.file.save")); saveButton.setIcon( DisplayUtils.getScaledIcon(new ImageIcon(ZAP.class.getResource("/resource/icon/16/096.png")))); saveButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { final JFileChooser fc = new JFileChooser(System.getProperty("user.home")); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setMultiSelectionEnabled(false); fc.setSelectedFile(new File(OWASP_ZAP_ROOT_CA_FILENAME)); if (fc.showSaveDialog(DefaultExplorePanel.this) == JFileChooser.APPROVE_OPTION) { final File f = fc.getSelectedFile(); try { writePubCertificateToFile(f); } catch (final Exception e) { View.getSingleton().showWarningDialog(DefaultExplorePanel.this, Constant.messages <START> .getString("quickstart.explore.warning.savefail".concat(e.getMessage()))); <END> } } } }); } return saveButton; }</code><technical_language>resource message exist, concatenating key instead of resource message</technical_language>

Target:
public JButton getSaveButton() { if (saveButton == null) { saveButton = new JButton(Constant.messages.getString("menu.file.save")); saveButton.setIcon( DisplayUtils.getScaledIcon(new ImageIcon(ZAP.class.getResource("/resource/icon/16/096.png")))); saveButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { final JFileChooser fc = new JFileChooser(System.getProperty("user.home")); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setMultiSelectionEnabled(false); fc.setSelectedFile(new File(OWASP_ZAP_ROOT_CA_FILENAME)); if (fc.showSaveDialog(DefaultExplorePanel.this) == JFileChooser.APPROVE_OPTION) { final File f = fc.getSelectedFile(); try { writePubCertificateToFile(f); } catch (final Exception e) { View.getSingleton().showWarningDialog(DefaultExplorePanel.this, Constant.messages .getString("quickstart.explore.warning.savefail", e.getMessage())); } } } }); } return saveButton; }
Source:
<code>public void updateClasspath(IProject project, IProgressMonitor monitor) { IJavaProject javaProject = JavaCore.create(project); if(javaProject != null) { try { IClasspathEntry containerEntry = getMavenContainerEntry(javaProject); IPath path = containerEntry != null ? containerEntry.getPath() : new Path(CONTAINER_ID); IClasspathEntry[] mainClasspath = getClasspath(project, CLASSPATH_RUNTIME, monitor); HashSet<IPath> mainPaths = new HashSet<>(); for(IClasspathEntry ce : mainClasspath) { mainPaths.add(ce.getPath()); } IClasspathEntry[] testClasspath = getClasspath(project, CLASSPATH_DEFAULT, monitor); IClasspathEntry[] classpath = new IClasspathEntry[testClasspath.length]; for(int i = 0; i < testClasspath.length; i++ ) { IClasspathEntry classpathEntry = testClasspath[i]; if(mainPaths.contains(classpathEntry.getPath())) { classpath[i] = setOrRemoveTestAttribute(classpathEntry, false); } else { classpath[i] = setOrRemoveTestAttribute(classpathEntry, true); } <START> } <END> IClasspathContainer container = new MavenClasspathContainer(path, classpath); JavaCore.setClasspathContainer(container.getPath(), new IJavaProject[] {javaProject}, new IClasspathContainer[] {container}, monitor); saveContainerState(project, container); } catch(CoreException ex) { log.error(ex.getMessage(), ex); } } }</code><technical_language>This part feels wrong. IClasspathDescriptor (which is designed encapsulate IClasspathEntry). guess is ClasspathDescriptor changed receive a scope element, drive classpath attribute modification</technical_language>

Target:
public void updateClasspath(IProject project, IProgressMonitor monitor) { IJavaProject javaProject = JavaCore.create(project); if(javaProject != null) { try { IClasspathEntry containerEntry = getMavenContainerEntry(javaProject); IPath path = containerEntry != null ? containerEntry.getPath() : new Path(CONTAINER_ID); IClasspathEntry[] mainClasspath = getClasspath(project, CLASSPATH_RUNTIME, monitor); HashSet<IPath> mainPaths = new HashSet<>(); for(IClasspathEntry ce : mainClasspath) { mainPaths.add(ce.getPath()); } IClasspathEntry[] testClasspath = getClasspath(project, CLASSPATH_DEFAULT, monitor); IClasspathEntry[] classpath = new IClasspathEntry[testClasspath.length]; for(int i = 0; i < testClasspath.length; i++ ) { ClasspathEntryDescriptor classpathEntryDescriptor = new ClasspathEntryDescriptor(testClasspath[i]); boolean isTest = !mainPaths.contains(classpathEntryDescriptor.getPath()); classpathEntryDescriptor.setClasspathAttribute(IClasspathManager.TEST_ATTRIBUTE, isTest ? "test" : null); classpath[i] = classpathEntryDescriptor.toClasspathEntry(); } IClasspathContainer container = new MavenClasspathContainer(path, classpath); JavaCore.setClasspathContainer(container.getPath(), new IJavaProject[] {javaProject}, new IClasspathContainer[] {container}, monitor); saveContainerState(project, container); } catch(CoreException ex) { log.error(ex.getMessage(), ex); } } }
Source:
<code>public synchronized void setUp() { <START> if (fTraces == null) { <END> fTraces = setupTraces(); } if (fExperiment == null) { fExperiment = new TmfExperimentStub(EXPERIMENT, fTraces, BLOCK_SIZE); fExperiment.getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, true); } }</code><technical_language>Useless check fTraces is null setup is called. is called execution if test is run file</technical_language>

Target:
public static void setUp() { ITmfTrace[] traces = setupTraces(); fExperiment = new TmfExperimentStub(EXPERIMENT, traces, BLOCK_SIZE); fExperiment.getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, true); }
Source:
<code>protected PathRef getExistingUserWorkspaceRoot(CoreSession session, String username) { <START> String uswrPath = computePathUserWorkspaceRoot(session, username); <END> if (uswrPath == null) { return null; } PathRef rootref = new PathRef(uswrPath); if (session.exists(rootref)) { return rootref; } String path = CoreInstance.doPrivileged(session, s -> { DocumentModel uwsRootModel = doCreateUserWorkspacesRoot(session, rootref); DocumentModel docModel = s.getOrCreateDocument(uwsRootModel, doc -> initCreateUserWorkspacesRoot(s, doc)); return docModel.getPathAsString(); }); return new PathRef(path); }</code><technical_language>uswrPath -> uwrPath maybe? s stands for</technical_language>

Target:
protected PathRef getExistingUserWorkspaceRoot(CoreSession session, String username) { String uwrPath = computePathUserWorkspaceRoot(session, username); if (uwrPath == null) { return null; } PathRef rootref = new PathRef(uwrPath); if (session.exists(rootref)) { return rootref; } String path = CoreInstance.doPrivileged(session, s -> { DocumentModel uwsRootModel = doCreateUserWorkspacesRoot(session, rootref); DocumentModel docModel = s.getOrCreateDocument(uwsRootModel, doc -> initCreateUserWorkspacesRoot(s, doc)); return docModel.getPathAsString(); }); return new PathRef(path); }
Source:
<code>public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); callbackUrl.setRequired(true); callbackUrl.setDescription("Enter value corresponding to callback url."); <START> callbackUrl.setDisplayOrder(1); <END> configProperties.add(callbackUrl); Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); clientId.setRequired(true); clientId.setDescription("Enter Microsoft Live client identifier value"); clientId.setDisplayOrder(2); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); clientSecret.setRequired(true); clientSecret.setConfidential(true); clientSecret.setDescription("Enter Microsoft Live client secret value"); clientSecret.setDisplayOrder(3); configProperties.add(clientSecret); return configProperties; }</code><technical_language>this 3</technical_language>

Target:
public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); callbackUrl.setDescription("Enter value corresponding to callback url."); callbackUrl.setDisplayOrder(3); configProperties.add(callbackUrl); Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); clientId.setRequired(true); clientId.setDescription("Enter Microsoft Live client identifier value"); clientId.setDisplayOrder(1); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); clientSecret.setRequired(true); clientSecret.setConfidential(true); clientSecret.setDescription("Enter Microsoft Live client secret value"); clientSecret.setDisplayOrder(2); configProperties.add(clientSecret); return configProperties; }
Source:
<code>protected static Lookup rewrite(Expression expression, NodePath path) throws XPathException { ArrayList<Expression> eqArgs = new ArrayList<>(2); if (expression instanceof GeneralComparison) { GeneralComparison comparison = (GeneralComparison) expression; eqArgs.add(comparison.getLeft()); eqArgs.add(comparison.getRight()); Lookup func = Lookup.create(comparison.getContext(), getOperator(expression), path); func.setArguments(eqArgs); return func; } else if (expression instanceof InternalFunctionCall) { InternalFunctionCall fcall = (InternalFunctionCall) expression; Function function = fcall.getFunction(); if (function instanceof Lookup) { final RangeIndex.Operator operator = RangeIndex.Operator.getByName(function.getName().getLocalPart()); <START> if(function==null){ <END> return null; } eqArgs.add(function.getArgument(0)); eqArgs.add(function.getArgument(1)); Lookup func = Lookup.create(function.getContext(), operator, path); func.setArguments(eqArgs); return func; } } return null; }</code><technical_language>null check is late here. up</technical_language>

Target:
protected static Lookup rewrite(Expression expression, NodePath path) throws XPathException { ArrayList<Expression> eqArgs = new ArrayList<>(2); if (expression instanceof GeneralComparison) { GeneralComparison comparison = (GeneralComparison) expression; eqArgs.add(comparison.getLeft()); eqArgs.add(comparison.getRight()); Lookup func = Lookup.create(comparison.getContext(), getOperator(expression), path); if (func != null) { func.setArguments(eqArgs); return func; } } else if (expression instanceof InternalFunctionCall) { InternalFunctionCall fcall = (InternalFunctionCall) expression; Function function = fcall.getFunction(); if (function != null && function instanceof Lookup) { final RangeIndex.Operator operator = RangeIndex.Operator.getByName(function.getName().getLocalPart()); eqArgs.add(function.getArgument(0)); eqArgs.add(function.getArgument(1)); Lookup func = Lookup.create(function.getContext(), operator, path); func.setArguments(eqArgs); return func; } } return null; }
Source:
<code>public void process(QueryEnded event) { String from = conf.get(GrillConfConstants.GRILL_MAIL_FROM_ADDRESS); String host = conf.get(GrillConfConstants.GRILL_MAIL_HOST); String port = conf.get(GrillConfConstants.GRILL_MAIL_PORT); int mailSmtpTimeout = Integer.parseInt(conf.get(GrillConfConstants.GRILL_MAIL_SMTP_TIMEOUT, GrillConfConstants.GRILL_MAIL_DEFAULT_SMTP_TIMEOUT)); int mailSmtpConnectionTimeout = Integer.parseInt(conf.get(GrillConfConstants.GRILL_MAIL_SMTP_CONNECTIONTIMEOUT, GrillConfConstants.GRILL_MAIL_DEFAULT_SMTP_CONNECTIONTIMEOUT)); String mailSubject = "Query " + event.getCurrentValue().toString() + ": " + event.getQueryHandle(); QueryContext queryContext = queryService.getQueryContext(event.getQueryHandle()); String mailMessage = queryContext.getStatus().toString(); <START> String to = event.getUser(); <END> String cc = queryContext.getConf().get(GrillConfConstants.GRILL_QUERY_RESULT_EMAIL_CC, GrillConfConstants.GRILL_QUERY_RESULT_DEFAULT_EMAIL_CC); LOG.info("Sending completion email for query handle: " + event.getQueryHandle()); sendMail(host, port, from, to, cc, mailSubject, mailMessage, mailSmtpTimeout, mailSmtpConnectionTimeout); }</code><technical_language>get user context instead</technical_language>

Target:
public void process(QueryEnded event) { QueryContext queryContext = queryService.getQueryContext(event.getQueryHandle()); boolean whetherMailNotify = Boolean.parseBoolean(queryContext.getConf().get(GrillConfConstants.GRILL_WHETHER_MAIL_NOTIFY, GrillConfConstants.GRILL_WHETHER_MAIL_NOTIFY_DEFAULT)); if(!whetherMailNotify){ return; } String mailSubject = "Query " + queryContext.getStatus().getStatus() + ": " + event.getQueryHandle(); String mailMessage = createMailMessage(queryContext); String to = queryContext.getSubmittedUser(); String cc = queryContext.getConf().get(GrillConfConstants.GRILL_QUERY_RESULT_EMAIL_CC, GrillConfConstants.GRILL_QUERY_RESULT_DEFAULT_EMAIL_CC); LOG.info("Sending completion email for query handle: " + event.getQueryHandle()); sendMail(host, port, from, to, cc, mailSubject, mailMessage, mailSmtpTimeout, mailSmtpConnectionTimeout); }
Source:
<code><START> protected Merger(final Repository local) { <END> db = local; inserter = db.newObjectInserter(); reader = db.newObjectReader(); walk = new RevWalk(reader); }</code><technical_language>Yea, avoid changing newMerger method signatures, is grew setObjectInserter(). I wanted drop final part considering swapping in a ObjectInserter/ObjectReader in RecursiveMerger hard buffer virtual base stuff in-memory leaking repository a stored object. Unclear a conflict try load higher stages virtual ObjectIds. I guess forced write virtual bases out repository. delay top level pass, avoid intermediate stages. set approach. I need finish out reader-from-inserter fix RecursiveMerger. in-memory wrapper for virtual base sufficient</technical_language>

Target:
protected Merger(final Repository local) { db = local; inserter = db.newObjectInserter(); reader = inserter.newReader(); walk = new RevWalk(reader); }
Source:
<code>public void shouldReturnNullForParentFileOfRoot() { options.set(USERNAME, "user@domain.com"); <START> CifsProcessConnection cifsWinRmConnection = new CifsProcessConnection(CIFS_PROTOCOL, options, INSTANCE); <END> OverthereFile file = cifsWinRmConnection.getFile("C:\\"); assertThat(file.getParentFile(), nullValue()); }</code><technical_language>Hmm totally forgot, this refactoring breaks compatibility. classes for Cifs for this release return CifsConnectionBuilder</technical_language>

Target:
public void shouldReturnNullForParentFileOfRoot() { options.set(USERNAME, "user@domain.com"); CifsWinRmConnection cifsWinRmConnection = new CifsWinRmConnection(CIFS_PROTOCOL, options, INSTANCE); OverthereFile file = cifsWinRmConnection.getFile("C:\\"); assertThat(file.getParentFile(), nullValue()); }
Source:
<code>public void dispose() { getControl().dispose(); <START> if (labelControl != null) { <END> labelControl.dispose(); } }</code><technical_language>getLabelControl</technical_language>

Target:
public void dispose() { getControl().dispose(); if (getLabelControl() != null) { getLabelControl().dispose(); } }
Source:
<code>public void addTonePacket(DtmfRawPacket p) { <START> queue.offer(p); <END> }</code><technical_language>I read diff carefully, but: PacketTransformers RawPacket/DtmfRawPacket instances, instances buffers re-used. I expect DTMF packets, a simple clone() enough</technical_language>

Target:
public void addTonePacket(DtmfRawPacket p) { queue.offer((DtmfRawPacket) p.clone()); }
Source:
<code>private boolean restoreTable(String fileName, UUID streamId) throws IOException { FileInputStream fileInput = null; try { fileInput = new FileInputStream(fileName); } catch (FileNotFoundException e) { log.error("restoreTable can not find file {}", fileName); return false; } long numEntries = 0; TxnContext txn = corfuStore.txn(CORFU_SYSTEM_NAMESPACE); SMREntry entry = new SMREntry("clear", new Array[0], Serializers.PRIMITIVE); txn.logUpdate(streamId, entry); try { while (fileInput.available()> 0) { OpaqueEntry opaqueEntry = OpaqueEntry.read(fileInput); List<SMREntry> smrEntries = opaqueEntry.getEntries().get(streamId); if (smrEntries == null || smrEntries.isEmpty()) { continue; } txn.logUpdate(streamId, smrEntries); numEntries++; <START> log.debug("write uuid with numEntries", streamId, numEntries); <END> } txn.commit(); fileInput.close(); } catch (IOException e) { log.error("restoreTable failed to read file {}", fileName); return false; } return true; }</code><technical_language>this line of while loop</technical_language>

Target:
private void restoreTable(String fileName, UUID streamId) throws IOException { try (FileInputStream fileInput = new FileInputStream(fileName)) { TxnContext txn = corfuStore.txn(CORFU_SYSTEM_NAMESPACE); SMREntry entry = new SMREntry("clear", new Array[0], Serializers.PRIMITIVE); txn.logUpdate(streamId, entry); long numEntries = 0; while (fileInput.available() > 0) { OpaqueEntry opaqueEntry = OpaqueEntry.read(fileInput); List<SMREntry> smrEntries = opaqueEntry.getEntries().get(streamId); if (smrEntries == null || smrEntries.isEmpty()) { continue; } txn.logUpdate(streamId, smrEntries); numEntries += smrEntries.size(); } txn.commit(); log.info("completed restore of table with numEntries", streamId, numEntries); } catch (FileNotFoundException e) { log.error("restoreTable can not find file {}", fileName); throw e; } }
Source:
<code>public int getMaxStackSize() { if (itemMaterial == null) { return 0; } else { <START> return itemMaterial.getMaxStackSize(); <END> } }</code><technical_language>simplified java return itemMaterial == null ? 0 : itemMaterial.getMaxStackSize();</technical_language>

Target:
public int getMaxStackSize() { return itemMaterial.getMaxStackSize(); }
Source:
<code>public void assertCopy(Object copy, Object source) { <START> Assertions.assertFalse(copy == source); <END> Assertions.assertEquals(copy, source); }</code><technical_language>Consider assertNotSame instead</technical_language>

Target:
void assertCopy(Object copy, Object source) { Assertions.assertNotSame(copy, source); Assertions.assertEquals(copy, source); }
Source:
<code>protected void doRollingUpgrade(RestClient client) { try (AeshTestConnection terminal = new AeshTestConnection()) { CLI.main(new AeshDelegatingShell(terminal), new String[]{}); terminal.readln("connect"); terminal.assertContains(" terminal.clear(); <START> terminal.readln("migrate synchronize --cache=" + CACHE_NAME); <END> } }</code><technical_language>migrate cluster syncrhonize...</technical_language>

Target:
protected void doRollingUpgrade(RestClient client) { try (AeshTestConnection terminal = new AeshTestConnection()) { CLI.main(new AeshDelegatingShell(terminal), new String[]{}); terminal.readln("connect"); terminal.assertContains(" terminal.clear(); terminal.readln("migrate cluster synchronize --cache=" + CACHE_NAME); } }