Example 1.
Instruction: Use final for variables and cache array lengths before loops to avoid repeated property access.
Reasoning: This contains two unrelated instructions (final usage and caching array length). Since this is not a coherent single instruction, we will discard it and tag the instruction as invalid.
Category: invalid-instruction

Example 2.
Instruction: Extract the logic of calculating the candidate departure time
Reasoning: The user wants the logic for calculating a subproblem extracted into a seperate function.
Category: encapsulate-code-into-a-function

Example 3.
Instruction: Use a StringBuilder object to avoid creating multiple String objects.
Reasoning: The user suggests using a StringBuilder object for string operations. The category name should incorporate this specific class name.
Category: use-stringBuilder

Example 4.
Instruction: Avoid using string concatenation in loops.
Reasoning: The user wants to avoid the string concatenation operation
Category: avoid-using-string-concatenation

Example 5.
Instruction: Refactor the loop to use a string concatenation directly.
Reasoning: The user wants the loop to be refactored.
Category: refactor-loop

Example 6.
Instruction: Use prompt resource closing for improving robustness instead of postponed closing.
Reasoning: The user is suggesting that objects that objects explicitly call the close function rather than having the behavior be implicit.
Category: close-resources-with-close

Example 7.
Instruction: Use variables instead of fetching values multiple times.
Reasoning: The user is asking for the creation of another variable to avoid repeated operations
Category: use-intermediate-variables

Example 8.
Instruction: Use single loop for enhancing conciseness instead of nested loops.
Reasoning: The user is requesting a refactor to change the deeply nested loop into a shallow single loop.
Category: avoid-nested-loops
