Phase Transitions of Structured Codes of Graphs