2. The module generating apparatus according to claim 1 , wherein the macroblocking analyzing unit appends, to a number identifying a variable for a statement in each block, a virtual portion representing a number unique in the statement, the virtual portion being appended as the appendant information and to express the number for identifying the variable by a combination of a lower portion representing a number unique in the source code entirely and an upper portion made up of the virtual portion.
1. A module generating apparatus comprising: a parsing unit that, by a processor, performs syntax analysis of a source code for a program and outputs information concerning the syntax analysis; a macroblocking analyzing unit that based on syntax analysis information output from the parsing unit, segments the program into a plurality of blocks through structural analysis of the program and outputs block structure information obtained as a result of the segmentation and appendant information for virtualizing a calculation pattern of each block; a junction-node restructuring unit that based on the block structure information and the appendant information output from the macroblocking analyzing unit, focuses on one block, defined as a subroutine, extracts a node directly related to the block of focus by tracing back a processing sequence to a node that is in an ancestor block upstream in the processing sequence from the block of focus and from which the block of focus is reached as a result of sequential processing, and by tracing the processing sequence to a node that is in a descendant block downstream in the processing sequence from the block of focus and that is processed after the block of focus; an identical portion merging/restructuring unit that, with respect to a plurality of portions that use the block of focus extracted from the program by the junction-node restructuring unit, compares nodes in ancestor blocks of the block of focus to merge the ancestor blocks, compares nodes in descendant blocks of the block of focus to merge the descendant blocks, and outputs merged-block information obtained as a result of merging the ancestor blocks and merging the descendant blocks; a similar portion merging/restructuring unit that with respect to a second block of focus extracted from the program by the junction-node restructuring unit, compares the merged-block information to define, as subroutines of an identical type, a plurality of blocks of focus that have similar or identical merged block information, further merges similar or identical merged block information, and outputs abstracted code information obtained as a result of the merging; and an intermediate language restructuring unit that outputs information of a commonized component, based on the abstracted code information and the syntax analysis information.