Buggy code:
public class DDLFormScreenlet extends BaseScreenlet < DDLFormViewModel , DDLFormBaseInteractor > implements DDLFormListener { public DDLFormScreenlet ( Context context ) { } public DDLFormScreenlet ( Context context , AttributeSet attributes ) { } public DDLFormScreenlet ( Context context , AttributeSet attributes , int defaultStyle ) { } public void load ( ) { } public void loadForm ( ) { } public void loadRecord ( ) { } public void submitForm ( ) { } @ Override public void onDDLFormLoaded ( Record record ) { } @ Override public void onDDLFormLoadFailed ( Exception e ) { } @ Override public void onDDLFormRecordAdded ( Record record ) { } @ Override public void onDDLFormRecordAddFailed ( Exception e ) { } @ Override public void onDDLFormRecordLoaded ( Record record ) { } @ Override public void onDDLFormRecordLoadFailed ( Exception e ) { } @ Override public void onDDLFormRecordUpdated ( Record record ) { } @ Override public void onDDLFormUpdateRecordFailed ( Exception e ) { } public boolean getAutoLoad ( ) { } public void setAutoLoad ( boolean autoLoad ) { } public boolean isAutoScrollOnValidation ( ) { } public boolean isShowSubmitButton ( ) { } public long getGroupId ( ) { } public Record getRecord ( ) { } public void setAutoScrollOnValidation ( boolean autoScrollOnValidation ) { } public void setGroupId ( long groupId ) { } public DDLFormListener getListener ( ) { } public void setListener ( DDLFormListener listener ) { } @ Override protected DDLFormBaseInteractor createInteractor ( String actionName ) { } @ Override protected View createScreenletView ( Context context , AttributeSet attributes ) { } protected int getDefaultLayoutId ( Field . EditorType type ) { } @ Override protected void onUserAction ( String userActionName , DDLFormBaseInteractor interactor ) { } protected void setFieldLayoutId ( DDLFormViewModel viewModel , Field . EditorType editorType , TypedArray typedArray , int index ) { } @ Override protected void onRestoreInstanceState ( Parcelable inState ) { } @ Override protected Parcelable onSaveInstanceState ( ) { } @ Override protected void onScreenletAttached ( ) { <START_BUG> if ( _autoLoad ) { <END_BUG> load ( ) ; } } private static Map < Field . EditorType , String > _defaultLayoutNames ; private static final String _LOAD_FORM_ACTION = "loadForm" ; private static final String _LOAD_RECORD_ACTION = "loadRecord" ; private static final String _ADD_RECORD_ACTION = "addRecord" ; private static final String _UPDATE_RECORD_ACTION = "updateRecord" ; private static final String _STATE_SUPER = "ddlform-super" ; private static final String _STATE_AUTOSCROLL_ON_VALIDATION = "ddlform-autoScrollOnValidation" ; private static final String _STATE_SHOW_SUBMIT_BUTTON = "ddlform-showSubmitButton" ; private static final String _STATE_GROUP_ID = "ddlform-groupId" ; private static final String _STATE_STRUCTURE_ID = "ddlform-structureId" ; private static final String _STATE_RECORDSET_ID = "ddlform-recordSetId" ; private static final String _STATE_RECORD_ID = "ddlform-recordId" ; private static final String _STATE_USER_ID = "ddlform-userId" ; private static final String _STATE_RECORD = "ddlform-record" ; private boolean _autoLoad ; private boolean _autoScrollOnValidation ; private boolean _showSubmitButton ; private long _groupId ; private long _structureId ; private long _recordSetId ; private long _recordId ; private long _userId ; private Record _record ; private DDLFormListener _listener ; private boolean _loadRecordAfterForm ; No newline ; at end ; of file ; }

Fix:
if ( ( _autoLoad ) && ( ( _record . getFieldCount ( ) ) == 0 ) ) {