Buggy code:
public class StatusBarHeaderView extends RelativeLayout implements View . OnClickListener , NextAlarmController . NextAlarmChangeCallback , WeatherController . Callback { private boolean mExpanded ; private boolean mListening ; private ViewGroup mSystemIconsContainer ; private ViewGroup mWeatherContainer ; private View mSystemIconsSuperContainer ; private View mDateGroup ; private View mClock ; private TextView mTime ; private TextView mAmPm ; private MultiUserSwitch mMultiUserSwitch ; private ImageView mMultiUserAvatar ; private TextView mDateCollapsed ; private TextView mDateExpanded ; private LinearLayout mSystemIcons ; private View mSignalCluster ; private View mSettingsButton ; private View mTaskManagerButton ; private View mQsDetailHeader ; private TextView mQsDetailHeaderTitle ; private Switch mQsDetailHeaderSwitch ; private ImageView mQsDetailHeaderProgress ; private TextView mEmergencyCallsOnly ; private BatteryLevelTextView mBatteryLevel ; private BatteryLevelTextView mDockBatteryLevel ; private TextView mAlarmStatus ; private TextView mWeatherLine1 ; private TextView mWeatherLine2 ; private boolean mShowEmergencyCallsOnly ; private boolean mAlarmShowing ; private AlarmClockInfo mNextAlarm ; private int mCollapsedHeight ; private int mExpandedHeight ; private int mMultiUserExpandedMargin ; private int mMultiUserCollapsedMargin ; private int mClockMarginBottomExpanded ; private int mClockMarginBottomCollapsed ; private int mMultiUserSwitchWidthCollapsed ; private int mMultiUserSwitchWidthExpanded ; private int mClockCollapsedSize ; private int mClockExpandedSize ; private float mClockCollapsedScaleFactor ; private float mAvatarCollapsedScaleFactor ; private ActivityStarter mActivityStarter ; private NextAlarmController mNextAlarmController ; private WeatherController mWeatherController ; private QSPanel mQSPanel ; private final Rect mClipBounds = new Rect ( ) ; private boolean mCaptureValues ; private boolean mSignalClusterDetached ; private final StatusBarHeaderView . LayoutValues mCollapsedValues = new StatusBarHeaderView . LayoutValues ( ) ; private final StatusBarHeaderView . LayoutValues mExpandedValues = new StatusBarHeaderView . LayoutValues ( ) ; private final StatusBarHeaderView . LayoutValues mCurrentValues = new StatusBarHeaderView . LayoutValues ( ) ; private float mCurrentT ; private boolean mShowingDetail ; private StatusBarHeaderView . SettingsObserver mSettingsObserver ; private boolean mShowWeather ; private boolean mShowBatteryTextExpanded ; private boolean mQSCSwitch = false ; public StatusBarHeaderView ( Context context , AttributeSet attrs ) { } @ Override protected void onFinishInflate ( ) { } @ Override protected void onLayout ( boolean changed , int l , int t , int r , int b ) { } @ Override protected void onConfigurationChanged ( Configuration newConfig ) { } private void updateClockCollapsedMargin ( ) { } private void requestCaptureValues ( ) { } private void loadDimens ( ) { } public void setActivityStarter ( ActivityStarter activityStarter ) { } public void setBatteryController ( BatteryController batteryController ) { } public void setDockBatteryController ( DockBatteryController dockBatteryController ) { } public void setNextAlarmController ( NextAlarmController nextAlarmController ) { } public void setWeatherController ( WeatherController weatherController ) { } public int getCollapsedHeight ( ) { } public int getExpandedHeight ( ) { } public void setListening ( boolean listening ) { } public void setExpanded ( boolean expanded ) { } public void updateEverything ( ) { } private void updateHeights ( ) { } private void updateVisibilities ( ) { mDateCollapsed . setVisibility ( ( ( mExpanded ) && ( mAlarmShowing ) ? View . VISIBLE : View . INVISIBLE ) ) ; mDateExpanded . setVisibility ( ( ( mExpanded ) && ( mAlarmShowing ) ? View . INVISIBLE : View . VISIBLE ) ) ; mAlarmStatus . setVisibility ( ( ( mExpanded ) && ( mAlarmShowing ) ? View . VISIBLE : View . INVISIBLE ) ) ; mSettingsButton . setVisibility ( ( mExpanded ? View . VISIBLE : View . INVISIBLE ) ) ; if ( ( mTaskManagerButton ) != null ) { mTaskManagerButton . setVisibility ( ( mExpanded ? View . VISIBLE : View . GONE ) ) ; } mWeatherContainer . setVisibility ( ( ( mExpanded ) && ( mShowWeather ) ? View . VISIBLE : View . GONE ) ) ; <START_BUG> mQsDetailHeader . setVisibility ( ( ( mExpanded ) && ( mShowingDetail ) ? View . VISIBLE : View . INVISIBLE ) ) ; <END_BUG> if ( ( mSignalCluster ) != null ) { updateSignalClusterDetachment ( ) ; } mEmergencyCallsOnly . setVisibility ( ( ( mExpanded ) && ( mShowEmergencyCallsOnly ) ? VISIBLE : GONE ) ) ; mBatteryLevel . setForceShown ( ( ( mExpanded ) && ( mShowBatteryTextExpanded ) ) ) ; mBatteryLevel . setVisibility ( VISIBLE ) ; if ( ( mDockBatteryLevel ) != null ) { mDockBatteryLevel . setForceShown ( ( ( mExpanded ) && ( mShowBatteryTextExpanded ) ) ) ; mDockBatteryLevel . setVisibility ( VISIBLE ) ; } } private void updateSignalClusterDetachment ( ) { } private void reattachSignalCluster ( ) { } private void updateSystemIconsLayoutParams ( ) { } private void updateListeners ( ) { } private void updateAvatarScale ( ) { } private void updateClockScale ( ) { } private void updateAmPmTranslation ( ) { } @ Override public void onNextAlarmChanged ( AlarmManager . AlarmClockInfo nextAlarm ) { } @ Override public void onWeatherChanged ( WeatherController . WeatherInfo info ) { } private void updateClickTargets ( ) { } private void updateClockLp ( ) { } private void updateMultiUserSwitch ( ) { } public void setExpansion ( float t ) { } private void updateLayoutValues ( float t ) { } private void setClipping ( float height ) { } public void setUserInfoController ( UserInfoController userInfoController ) { } @ Override public void onClick ( View v ) { } private void startSettingsActivity ( ) { } private void startBatteryActivity ( ) { } private void startClockActivity ( ) { } private void startDateActivity ( ) { } private void startForecastActivity ( ) { } public void setQSPanel ( QSPanel qsp ) { } @ Override public boolean shouldDelayChildPressedState ( ) { } public void setShowEmergencyCallsOnly ( boolean show ) { } @ Override protected void dispatchSetPressed ( boolean pressed ) { } private void captureLayoutValues ( StatusBarHeaderView . LayoutValues target ) { } private float getAlphaForVisibility ( View v ) { } private void applyAlpha ( View v , float alpha ) { } private void applyLayoutValues ( StatusBarHeaderView . LayoutValues values ) { } private static final class LayoutValues { float dateExpandedAlpha ; float dateCollapsedAlpha ; float emergencyCallsOnlyAlpha ; float alarmStatusAlpha ; float timeScale = 1.0F ; float clockY ; float dateY ;

Fix:
mQsDetailHeader . setVisibility ( ( ( mExpanded ) && ( mShowingDetail ) ? View . VISIBLE : View . GONE ) ) ;