Question: Create the control flow graph for the method shown in the figure below. Note the presence of the logical AND operator (&&) in statement 6.
Create the control flow graph for the method shown in the figure below. Note the
presence of the logical AND operator (&&) in statement 6. Use the line number in
each node of CFG, e.g., use 1-3 to represent 1,2,3.
Based on the graph, compute the McCabe complexity metric and list all the linearly independent paths.

public void processPacket(Packet document) { String author = "Unknown"; String title = "Untitled": int startPos = 0, endpos = 0; if (document.message_.startsWith("!PS")) { startPos = document.message_.indexOf("author:"); if (startPos >= 0 && startPos = 16) { author = document.message_.substring(8, 16); List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
