Source:
<code>private MessageBuilder createMessageBuilder(boolean isDraft) { MessageBuilder builder; recipientPresenter.updateCryptoStatus(); ComposeCryptoStatus cryptoStatus = recipientPresenter.getCurrentCryptoStatus(); if(!isDraft && cryptoStatus.shouldUsePgpMessageBuilder()) { SendErrorState maybeSendErrorState = cryptoStatus.getSendErrorStateOrNull(); if (maybeSendErrorState != null) { recipientPresenter.showPgpSendError(maybeSendErrorState); return null; } <START> PgpMessageBuilder pgpBuilder = new PgpMessageBuilder(getApplicationContext(), UUIDGenerator.getInstance()); <END> recipientPresenter.builderSetProperties(pgpBuilder); builder = pgpBuilder; } else { builder = new SimpleMessageBuilder(getApplicationContext(), UUIDGenerator.getInstance()); } builder.setSubject(mSubjectView.getText().toString()) .setTo(recipientPresenter.getToAddresses()) .setCc(recipientPresenter.getCcAddresses()) .setBcc(recipientPresenter.getBccAddresses()) .setInReplyTo(mInReplyTo) .setReferences(mReferences) .setRequestReadReceipt(mReadReceipt) .setIdentity(mIdentity) .setMessageFormat(mMessageFormat) .setText(mMessageContentView.getCharacters()) .setAttachments(attachmentPresenter.createAttachmentList()) .setSignature(mSignatureView.getCharacters()) .setSignatureBeforeQuotedText(mAccount.isSignatureBeforeQuotedText()) .setIdentityChanged(mIdentityChanged) .setSignatureChanged(mSignatureChanged) .setCursorPosition(mMessageContentView.getSelectionStart()) .setMessageReference(mMessageReference) .setDraft(isDraft) .setIsPgpInlineEnabled(cryptoStatus.isPgpInlineModeEnabled()); quotedMessagePresenter.builderSetProperties(builder); return builder; }</code><technical_language>pattern of time is a static factory method (without arguments) fetches creates dependencies injects constructor arguments</technical_language>

Target:
private MessageBuilder createMessageBuilder(boolean isDraft) { MessageBuilder builder; recipientPresenter.updateCryptoStatus(); ComposeCryptoStatus cryptoStatus = recipientPresenter.getCurrentCryptoStatus(); if(!isDraft && cryptoStatus.shouldUsePgpMessageBuilder()) { SendErrorState maybeSendErrorState = cryptoStatus.getSendErrorStateOrNull(); if (maybeSendErrorState != null) { recipientPresenter.showPgpSendError(maybeSendErrorState); return null; } PgpMessageBuilder pgpBuilder = PgpMessageBuilder.newInstance(); recipientPresenter.builderSetProperties(pgpBuilder); builder = pgpBuilder; } else { builder = SimpleMessageBuilder.newInstance(); } builder.setSubject(mSubjectView.getText().toString()) .setSentDate(new Date()) .setHideTimeZone(K9.hideTimeZone()) .setTo(recipientPresenter.getToAddresses()) .setCc(recipientPresenter.getCcAddresses()) .setBcc(recipientPresenter.getBccAddresses()) .setInReplyTo(mInReplyTo) .setReferences(mReferences) .setRequestReadReceipt(mReadReceipt) .setIdentity(mIdentity) .setMessageFormat(mMessageFormat) .setText(mMessageContentView.getCharacters()) .setAttachments(attachmentPresenter.createAttachmentList()) .setSignature(mSignatureView.getCharacters()) .setSignatureBeforeQuotedText(mAccount.isSignatureBeforeQuotedText()) .setIdentityChanged(mIdentityChanged) .setSignatureChanged(mSignatureChanged) .setCursorPosition(mMessageContentView.getSelectionStart()) .setMessageReference(mMessageReference) .setDraft(isDraft) .setIsPgpInlineEnabled(cryptoStatus.isPgpInlineModeEnabled()); quotedMessagePresenter.builderSetProperties(builder); return builder; }