Buggy code:
public abstract class AccountsPayableDocumentBase extends PurchasingAccountsPayableDocumentBase implements AccountsPayableDocument { private static final Logger LOG = Logger . getLogger ( AccountsPayableDocumentBase . class ) ; protected Timestamp accountsPayableApprovalTimestamp ; protected String lastActionPerformedByPersonId ; protected String accountsPayableProcessorIdentifier ; protected boolean holdIndicator ; protected Timestamp extractedTimestamp ; protected Integer purchaseOrderIdentifier ; protected String processingCampusCode ; protected String noteLine1Text ; protected String noteLine2Text ; protected String noteLine3Text ; protected boolean continuationAccountIndicator ; protected boolean closePurchaseOrderIndicator ; protected boolean reopenPurchaseOrderIndicator ; protected String bankCode ; protected boolean unmatchedOverride ; protected String chartOfAccountsCode ; protected String organizationCode ; protected boolean generateEncumbranceEntries ; protected String debitCreditCodeForGLEntries ; protected PurApItemUseTax offsetUseTax ; protected CampusParameter processingCampus ; protected transient PurchaseOrderDocument purchaseOrderDocument ; protected Bank bank ; public AccountsPayableDocumentBase ( ) { } public void setLineItemTotal ( KualiDecimal total ) { } public void setGrandTotal ( KualiDecimal total ) { } @ Override protected void removeGeneralLedgerPendingEntries ( ) { } @ Override public boolean requiresAccountsPayableReviewRouting ( ) { } @ Override public boolean approvalAtAccountsPayableReviewAllowed ( ) { } protected abstract boolean isAttachmentRequired ( ) { } public abstract boolean documentHasNoImagesAttached ( ) { } @ Override public void populateDocumentForRouting ( ) { } @ Override public void prepareForSave ( KualiDocumentEvent event ) { } public abstract String getPoDocumentTypeForAccountsPayableDocumentCancel ( ) { } @ Override public void doRouteLevelChange ( DocumentRouteLevelChange levelChangeEvent ) { } public abstract boolean processNodeChange ( String newNodeName , String oldNodeName ) { } public abstract void saveDocumentFromPostProcessing ( ) { } @ Override public Integer getPurchaseOrderIdentifier ( ) { } @ Override public void setPurchaseOrderIdentifier ( Integer purchaseOrderIdentifier ) { } @ Override public String getAccountsPayableProcessorIdentifier ( ) { } @ Override public void setAccountsPayableProcessorIdentifier ( String accountsPayableProcessorIdentifier ) { } @ Override public String getLastActionPerformedByPersonId ( ) { } @ Override public void setLastActionPerformedByPersonId ( String lastActionPerformedByPersonId ) { } @ Override public String getProcessingCampusCode ( ) { } @ Override public void setProcessingCampusCode ( String processingCampusCode ) { } @ Override public Timestamp getAccountsPayableApprovalTimestamp ( ) { } @ Override public void setAccountsPayableApprovalTimestamp ( Timestamp accountsPayableApprovalTimestamp ) { } @ Override public Timestamp getExtractedTimestamp ( ) { } @ Override public void setExtractedTimestamp ( Timestamp extractedTimestamp ) { } @ Override public boolean isHoldIndicator ( ) { } @ Override public void setHoldIndicator ( boolean holdIndicator ) { } @ Override public String getNoteLine1Text ( ) { } @ Override public void setNoteLine1Text ( String noteLine1Text ) { } @ Override public String getNoteLine2Text ( ) { } @ Override public void setNoteLine2Text ( String noteLine2Text ) { } @ Override public String getNoteLine3Text ( ) { } @ Override public void setNoteLine3Text ( String noteLine3Text ) { } @ Override public CampusParameter getProcessingCampus ( ) { } public String getChartOfAccountsCode ( ) { } public void setChartOfAccountsCode ( String chartOfAccountsCode ) { } public String getOrganizationCode ( ) { } public void setOrganizationCode ( String organizationCode ) { } public boolean isGenerateEncumbranceEntries ( ) { } public void setGenerateEncumbranceEntries ( boolean generateEncumbranceEntries ) { } @ Override public PurchaseOrderDocument getPurchaseOrderDocument ( ) { } @ Override public void setPurchaseOrderDocument ( PurchaseOrderDocument purchaseOrderDocument ) { } public boolean isClosePurchaseOrderIndicator ( ) { } public void setClosePurchaseOrderIndicator ( boolean closePurchaseOrderIndicator ) { } public boolean isReopenPurchaseOrderIndicator ( ) { } public void setReopenPurchaseOrderIndicator ( boolean reopenPurchaseOrderIndicator ) { } public String getBankCode ( ) { } public void setBankCode ( String bankCode ) { } public Bank getBank ( ) { } public void setBank ( Bank bank ) { } @ Deprecated public void setProcessingCampus ( CampusParameter processingCampus ) { } public Person getLastActionPerformedByUser ( ) { } public String getLastActionPerformedByPersonName ( ) { } public String getDebitCreditCodeForGLEntries ( ) { } public void setDebitCreditCodeForGLEntries ( String debitCreditCodeForGLEntries ) { } @ Override public boolean isUnmatchedOverride ( ) { } @ Override public void setUnmatchedOverride ( boolean unmatchedOverride ) { } public boolean getExtractedIndicatorForSearching ( ) { } public boolean isHoldIndicatorForSearching ( ) { } @ Override public abstract KualiDecimal getGrandTotal ( ) { } @ Override public abstract KualiDecimal getInitialAmount ( ) { } @ Override public boolean isContinuationAccountIndicator ( ) { } @ Override public void setContinuationAccountIndicator ( boolean continuationAccountIndicator ) { } @ Override public boolean isExtracted ( ) { } @ Override public abstract AccountsPayableDocumentSpecificService getDocumentSpecificService ( ) { } @ Override public AccountsPayableItem getAPItemFromPOItem ( PurchaseOrderItem poi ) { } @ Override public Class getItemClass ( ) { } @ Override public PurchasingAccountsPayableDocument getPurApSourceDocumentIfPossible ( ) { } @ Override public String getPurApSourceDocumentLabelIfPossible ( ) { } public void updateExtendedPriceOnItems ( ) { for ( AccountsPayableItem item : ( ( List < AccountsPayableItem > ) ( getItems ( ) ) ) ) { item . refreshReferenceObject ( ITEM_TYPE ) ; final KualiDecimal itemExtendedPrice = ( ( item . getExtendedPrice ( ) ) == null ) ? KualiDecimal . ZERO : item . getExtendedPrice ( ) ; if ( ObjectUtils . isNotNull ( item . getItemType ( ) ) ) { <START_BUG> if ( ( item . getItemType ( ) . isQuantityBasedGeneralLedgerIndicator ( ) ) && ( ( item . getExtendedPrice ( ) ) == null ) ) { <END_BUG> KualiDecimal newExtendedPrice = item . calculateExtendedPrice ( ) ; item . setExtendedPrice ( newExtendedPrice ) ; } } } } @ Override public KualiDecimal getTotalRemitTax ( ) { } @ Override public boolean customizeOffsetGeneralLedgerPendingEntry ( GeneralLedgerPendingEntrySourceDetail accountingLine , GeneralLedgerPendingEntry explicitEntry , GeneralLedgerPendingEntry offsetEntry ) { } @ Override public boolean generateGeneralLedgerPendingEntries ( GeneralLedgerPendingEntrySourceDetail glpeSourceDetail , GeneralLedgerPendingEntrySequenceHelper sequenceHelper , PurApItemUseTax offsetUseTax ) { } public String getHoldIndicatorForResult ( ) { } public String getProcessingCampusCodeForSearch ( ) { } public String getDocumentChartOfAccountsCodeForSearching ( ) { } public String getDocumentOrganizationCodeForSearching ( ) { } public String getDocumentType ( ) { } @ Override public boolean shouldGiveErrorForEmptyAccountsProration ( ) { } public boolean isOpenAttachmentTab ( ) { } }

Fix:
if ( item . getItemType ( ) . isQuantityBasedGeneralLedgerIndicator ( ) ) {