#vulnerable code 
                                public long getActiveTimeMillis() {
        if (lastReturnTime > lastBorrowTime) {
            return lastReturnTime - lastBorrowTime;
        } else {
            return System.currentTimeMillis() - lastBorrowTime;
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public long getActiveTimeMillis() {
        // Take copies to avoid threading issues
        long rTime = lastReturnTime;
        long bTime = lastBorrowTime;
        
        if (rTime > bTime) {
            return rTime - bTime;
        } else {
            return System.currentTimeMillis() - bTime;
        }
    }