A system for generating suggestions for correcting an undefined token error comprising: at least one processor: a memory connected to the at least one processor; and at least one program module that when loaded into the memory causes the at least one processor to: detect an undefined token error in program source code; generate suggestions to correct the detected undefined token error by using an include graph for a project, wherein a node (222, 223, 224, 225, 226) in the include graph represents a file and relationships between files are represented by the way nodes (222, 223, 224, 225, 226) of the include graph are arranged, to find all paths going from a node representing an external file in which the token is defined to a project node, wherein the external file is a file that is external to the project; traversing each path that originates from the file that includes the undefined token, wherein each traversed path is segmented based on a folder in which a node resides; and for each path, display a file represented by a last node (224, 225) in the include graph before the project node, along with the file in which the token is defined, as a suggestion for correcting the error. a memory connected to the at least one processor; and at least one program module that when loaded into the memory causes the at least one processor to: detect an undefined token error in program source code; generate suggestions to correct the detected undefined token error by using an include graph for a project, wherein a node (222, 223, 224, 225, 226) in the include graph represents a file and relationships between files are represented by the way nodes (222, 223, 224, 225, 226) of the include graph are arranged, to find all paths going from a node representing an external file in which the token is defined to a project node, wherein the external file is a file that is external to the project; traversing each path that originates from the file that includes the undefined token, wherein each traversed path is segmented based on a folder in which a node resides; and for each path, display a file represented by a last node (224, 225) in the include graph before the project node, along with the file in which the token is defined, as a suggestion for correcting the error. detect an undefined token error in program source code; generate suggestions to correct the detected undefined token error by using an include graph for a project, wherein a node (222, 223, 224, 225, 226) in the include graph represents a file and relationships between files are represented by the way nodes (222, 223, 224, 225, 226) of the include graph are arranged, to find all paths going from a node representing an external file in which the token is defined to a project node, wherein the external file is a file that is external to the project; traversing each path that originates from the file that includes the undefined token, wherein each traversed path is segmented based on a folder in which a node resides; and for each path, display a file represented by a last node (224, 225) in the include graph before the project node, along with the file in which the token is defined, as a suggestion for correcting the error.