This randomized phase III trial is studying imatinib mesylate to see how well it works compared to placebo in treating patients with primary gastrointestinal stromal tumor that has been completely removed by surgery. Imatinib mesylate may interfere with the growth of tumor cells and may be an effective treatment for patients with primary gastrointestinal stromal tumor that has been completely removed by surgery.