For the condition that it is difficult to satisfy the requirement of full coverage in sensor networks, the problem of detecting and patching trap coverage holes is considered, and a trap hole-detection method and a trap hole-patching method are proposed. The trap hole-detection method exactly finds out the borderline of all coverage holes in a decentralized way. Therefore, the network can get the information of these holes, and determine if they are trap holes. The trap hole-patching method is based on the conception of edge-weighted graph. The locations of new nodes for patching the trap holes are estimated by using the two algorithms for several rounds. The algorithms consider the impact of network boundary compared with traditional methods, the proposed algorithms efficiently save the energy and need fewer nodes for patching trap holes. Simulation results show the effectiveness of the proposed method.