5 exercises — practise fixing dangling modifiers in technical descriptions and reports.
0 / 5 completed
1 / 5
Which sentence corrects the dangling modifier in: "After parsing the config file, the server started successfully"?
"After the server parsed the config file, it started successfully" fixes the dangling modifier by giving the introductory clause its own explicit subject ("the server"), removing any ambiguity about who performs the parsing. In the original sentence and option A, "after parsing the config file" has no stated subject, and by the rule that an introductory participial phrase should modify the subject immediately following it, it technically attaches to "the server" — which happens to work here, but the structure is fragile and becomes a genuine dangling modifier in less fortunate word orders, so making the subject explicit is the more robust, unambiguous fix in careful technical writing. Option B still leaves the implicit subject of "parsing" ambiguous, just relocated. Option D only reorders the adverb "successfully" without addressing the modifier attachment issue at all.
2 / 5
Identify the sentence with a genuine dangling modifier that creates unintended meaning.
Option B contains a genuine dangling modifier: "having reviewed the pull request" is a participial phrase implying a human agent did the reviewing, but the subject that immediately follows is "the merge" — literally suggesting the merge reviewed the pull request, which is nonsensical. Option A correctly attaches the participial phrase to "the maintainer", the logical performer of the reviewing action. Option C also correctly links the phrase to "the maintainer", just with it set off in the middle of the sentence. Option D uses a full gerund phrase with "after", which likewise correctly modifies "the maintainer" as the following subject.
3 / 5
Which sentence correctly avoids a dangling modifier when describing an automated process?
"Once triggered by the webhook, the pipeline runs the full test suite" is correct: the passive participial phrase "triggered by the webhook" logically describes "the pipeline" (the pipeline is the thing that gets triggered), and "the pipeline" is exactly the subject that immediately follows the introductory phrase, so the modifier attaches correctly with no ambiguity. Option B changes the participle to active "triggering", which would incorrectly imply the pipeline itself triggers the webhook, reversing the real relationship. Option C keeps the correct passive participle but then swaps the subject and object of the main clause, producing the illogical claim that "the full test suite runs the pipeline". Option D is needlessly awkward and adds a redundant "by it" that muddles rather than clarifies the relationship.
4 / 5
Choose the corrected version of the dangling modifier in: "To deploy the update safely, a rollback plan should be prepared."
"To deploy the update safely, the team should prepare a rollback plan" corrects the dangling modifier: the infinitive phrase "to deploy the update safely" expresses a purpose that logically belongs to an agent capable of deploying — "the team" — and this revision supplies that agent as the subject of the main clause. In the original and option A, the phrase is left dangling because the passive main clause "a rollback plan should be prepared" has no explicit agent, so the purpose clause has nothing logical to attach to (a rollback plan cannot itself deploy anything). Option C merely relocates the dangling phrase without fixing the missing-agent problem. Option D only shifts the adverb "safely" and leaves the same underlying dangling-modifier issue unresolved.
5 / 5
A code review comment reads: "_____ , the null pointer exception was easy to reproduce." Choose the option that avoids a dangling modifier.
"After the developer added logging statements" is the only option that avoids a dangling modifier, because it is a full clause with its own explicit subject ("the developer") rather than a participial or infinitive phrase relying on the following clause's subject for its meaning. The main clause's subject is "the null pointer exception", which cannot logically be the one who "added logging statements" or was "having added" them — so options A, C, and D, all of which are reduced phrases lacking their own subject, would incorrectly and illogically attach the action of adding logging to "the null pointer exception" itself once combined with the given main clause.