Buggy code:
public class TimerImpl implements Timer { protected final String id ; protected volatile TimerState timerState ; protected final TimerServiceImpl timerService ; protected final TimedObjectInvoker timedObjectInvoker ; protected final Serializable info ; protected final boolean persistent ; protected final TimerHandleImpl handle ; protected final Date initialExpiration ; protected final long intervalDuration ; protected final Object primaryKey ; protected volatile Date nextExpiration ; protected volatile Date previousRun ; private final String timedObjectId ; private final ReentrantLock inUseLock = new ReentrantLock ( ) ; protected TimerImpl ( TimerImpl . Builder builder , TimerServiceImpl service ) { } @ Override public void cancel ( ) throws IllegalStateException , EJBException { } public String getId ( ) { } @ Override public boolean isCalendarTimer ( ) throws IllegalStateException , EJBException { } @ Override public TimerHandle getHandle ( ) throws IllegalStateException , EJBException { } public TimerHandle getTimerHandle ( ) { } @ Override public boolean isPersistent ( ) throws IllegalStateException , EJBException { } public boolean isTimerPersistent ( ) { } @ Override public Serializable getInfo ( ) throws IllegalStateException , EJBException { } public Serializable getTimerInfo ( ) { } @ Override public Date getNextTimeout ( ) throws IllegalStateException , EJBException { } public Date getNextExpiration ( ) { } public void setNextTimeout ( Date next ) { } @ Override public ScheduleExpression getSchedule ( ) throws IllegalStateException , EJBException { } @ Override public long getTimeRemaining ( ) throws IllegalStateException , EJBException { } public boolean isAutoTimer ( ) { } protected void cancelTimeout ( ) { } public Date getInitialExpiration ( ) { } public long getInterval ( ) { } public String getTimedObjectId ( ) { } public TimerServiceImpl getTimerService ( ) { } public boolean isActive ( ) { <START_BUG> return ( ( ( timerService . isStarted ( ) ) && ( ! ( isCanceled ( ) ) ) ) && ( ! ( isExpired ( ) ) ) ) && ( timerService . isScheduled ( getId ( ) ) ) ; <END_BUG> } public boolean isCanceled ( ) { } public boolean isExpired ( ) { } public boolean isInRetry ( ) { } public Date getPreviousRun ( ) { } public void setPreviousRun ( Date previousRun ) { } public TimerState getState ( ) { } protected void assertTimerState ( ) { } public void setTimerState ( TimerState state ) { } public void suspend ( ) { } public void invoke ( ) { } public void scheduleTimeout ( boolean newTimer ) { } protected TimerTask < ? > getTimerTask ( ) { } public void lock ( ) { } public void unlock ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } public Object getPrimaryKey ( ) { } public static TimerImpl . Builder builder ( ) { } public static class Builder { protected String id ; protected String timedObjectId ; protected Date initialDate ; protected long repeatInterval ; protected Date nextDate ; protected Date previousRun ; protected Serializable info ; protected Object primaryKey ; protected TimerState timerState ; protected boolean persistent ; protected boolean newTimer ; public TimerImpl . Builder setId ( final String id ) { } public TimerImpl . Builder setTimedObjectId ( final String timedObjectId ) { } public TimerImpl . Builder setInitialDate ( final Date initialDate ) { } public TimerImpl . Builder setRepeatInterval ( final long repeatInterval ) { } public TimerImpl . Builder setNextDate ( final Date nextDate ) { } public TimerImpl . Builder setPreviousRun ( final Date previousRun ) { } public TimerImpl . Builder setInfo ( final Serializable info ) { } public TimerImpl . Builder setPrimaryKey ( final Object primaryKey ) { } public TimerImpl . Builder setTimerState ( final TimerState timerState ) { } public TimerImpl . Builder setPersistent ( final boolean persistent ) { } public TimerImpl . Builder setNewTimer ( final boolean newTimer ) { } public TimerImpl build ( final TimerServiceImpl timerService ) { } } }

Fix:
return ( ( ( timerService . isStarted ( ) ) && ( ! ( isCanceled ( ) ) ) ) && ( ! ( isExpired ( ) ) ) ) && ( ( timerService . isScheduled ( getId ( ) ) ) || ( ( timerState ) == ( TimerState . CREATED ) ) ) ;