2013 | 2012 | 2011 | ||||||||||
Net income (loss) | $ | 353,038 | $ | (96,338 | ) | $ | (39,493 | ) | ||||
Adjustments to reconcile net income (loss) to cash provided by (used in) operating activities: | ||||||||||||
Depreciation, amortization and accretion | 234,370 | 262,716 | 235,231 | |||||||||
Impairment and net loss on disposal of long-lived assets | 97,132 | 356,522 | 57,414 | |||||||||
Impairment of project assets | — | 3,253 | 7,933 | |||||||||
Impairment of goodwill | — | — | 393,365 | |||||||||
Share-based compensation | 55,079 | 36,971 | 114,428 | |||||||||
Remeasurement of monetary assets and liabilities | (15,109 | ) | 8,509 | (4,701 | ) | |||||||
Deferred income tax (benefit) expense | (20,878 | ) | 14,588 | (155,505 | ) | |||||||
Excess tax benefit from share-based compensation arrangements | (35,076 | ) | (27,373 | ) | (110,836 | ) | ||||||
Provision for doubtful accounts receivable | 2,106 | 4,471 | 10,761 | |||||||||
Gain on sales of marketable securities and restricted investments, net | — | (16 | ) | (4,581 | ) | |||||||
Other operating activities | (1,073 | ) | (4,762 | ) | (719 | ) | ||||||
Changes in operating assets and liabilities: | ||||||||||||
Accounts receivable, trade, unbilled and retainage | 564,964 | (388,039 | ) | (529,809 | ) | |||||||
Prepaid expenses and other current assets | 109,126 | (28,854 | ) | (140,961 | ) | |||||||
Other assets | (1,684 | ) | 82,120 | (21,908 | ) | |||||||
Inventories and balance of systems parts | 15,394 | (75,626 | ) | (348,151 | ) | |||||||
Project assets and deferred project costs | (316,022 | ) | (174,532 | ) | (368,619 | ) | ||||||
Accounts payable | (93,259 | ) | 174,319 | 94,674 | ||||||||
Income taxes payable | 36,307 | 63,489 | 95,132 | |||||||||
Accrued expenses and other liabilities | (138,937 | ) | 506,253 | 647,162 | ||||||||
Accrued solar module collection and recycling liability | 10,648 | 44,538 | 35,720 | |||||||||
Total adjustments | 503,088 | 858,547 | 6,030 | |||||||||
Net cash provided by (used in) operating activities | $ | 856,126 | $ | 762,209 | $ | (33,463 | ) |