Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison Wesley Longman, Inc., was aware of a trademark claim, the designations have been printed in initial capital letters or in all capital letters.

The authors and publisher have taken care in preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.

For more information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales@pearsoned.com or (800) 382-3419.

For government sales inquiries, please contact governmentsales@pearsoned.com.

For questions about sales outside the U.S., please contact international@pearsoned.com.

Library of Congress Cataloging-in-Publication Data

Fowler, Martin,
       Refactoring : improving the design of existing code / Martin
     Fowler.
              p. m. — (The Addison-Wesley object technology series)
          Includes bibliographical references and index.
          ISBN 0-201-48567-2
          1. Software refactoring. 2. Object-oriented programming (Computer
    science) I. Title. II. Series.
   QA76.76.R42F69 1999
   005.1’4—dc21                                          99–20765
                                                                               CIP

Copyright © 1999 by Addison Wesley Longman, Inc.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of the publisher. Printed in the United States of America. Published simultaneously in Canada.

Executive Editor: J. Carter Shanklin
Project Editor: Krysia Bebick
Editorial Assistant: Kristin Erickson
Production Manager: John Fuller
Production Coordinator: Genevieve C. Rajewski
Copy Editor: Catherine Judge Allen
Composition: Kim Arney
Index: Irv Hershman
Proofreader: Amy Finch

ISBN 0-201-48567-2

Text printed in the United States on recycled paper at Courier in Westford, Massachusetts.

Twenty-ninth printing, November 2014