This report documents the exploratory testing session of the new Command Completion feature in IntelliJ IDEA. The feature successfully handles core code transformations like "Surround with try-catch" and local variable creation. However, two critical areas for improvement were identified:
- Performance (UI Responsiveness): Notable delays in loading the full list of completion suggestions.
- Context Awareness in Broken AST: The tool suggests advanced refactoring actions in syntactically incorrect code where simple syntax fixes should be prioritized.
- IDE: IntelliJ IDEA 2026.1 (Build #IU-261.22158.277)
- JDK: 26
- Language: JAVA
- Hardware: ASUS Vivobook S14, 16GB RAM, Intel® Core™ Ultra 5 226V
- Steps:
- Define a string array:
String[] names = {"Josh", }; - Trigger command completion on the string literal
"Josh" - Select the "Replace with text block" command
-
Expected result: The string is converted to a text block with proper indentation, preserving the array's readability on a single line (if possible).
-
Actual result: The IDE converts it to """\nJosh""" which introduces awkward formatting and unnecessary line breaks inside a single line array. IDE will compile it correctly but it affects readability.
- Steps:
- Write a basic print statement without a semicolon e.g.:
System.out.println("Test") - Trigger the command completion popup.
- Select the default completion suggestion (adding the semicolon).
-
Expected result: The IDE seamlessly completes the statement and appending the missing semicolon, applies proper line formatting, and moves the cursor to end of the statement.
-
Actual result: The statement is correctly completed with a semicolon and formatted. However, the cursor remains positioned before the newly added semicolon, rather than moving past it. This might disrupt the typing flow if the user wants to immediately start a new line.
- Steps:
- Write a statement using an undeclared variable, e.g.,
System.out.println(hello); - Place the cursor on the unresolved symbol
hello. - Trigger the command completion popup.
- Select the "Create local variable 'hello'" command.
-
Expected result: The IDE should automatically generate a local variable declaration for
helloabove the current line, correctly inferring the context, and allow immediate assignment of a value -
Actual result: As expected. The IDE successfully generates the variable declaration and places the cursor ready to assign its value.
- Steps:
- Write a statement that throws a checked exception, e.g.:
Files.readAllLines(Path.of("test.txt")); - Trigger the command completion popup on the statement.
- Select the "Surround with try-catch" command.
-
Expected result: The IDE correctly wraps the statement in a
try-catchblock, automatically identifying the requiredIOExceptionand adding the necessary imports. -
Actual result: As expected. The transformation is executed seamlessly, generating syntactically correct code and properly handling the checked exception type.
-
Severity: Minor
-
Priority: High
-
User Impact: High frequency of use makes even a 0.5s delay noticeable. On fresh starts (up to 2s delay), it disrupts the flow expected from IntelliJ, potentially discouraging users from relying on the feature.
-
Steps:
- Write any valid java statement e.g.:
String test = "Test"; - Trigger any completion command popup
- Observe the loading time of the suggested commands
-
Expected result: The full list of completion command suggestions loads immediately
-
Actual result: Suggestions pop up in waves; only 2-3 appear initially, with the rest following after a delay.
-
Reference:
-
See
BUG-01_Initial_State.pngandBUG-01_Full_Loaded_Suggestions.png. -
Note:
-
This delay was observed on a machine with Intel® Core™ Ultra 5 226V and a 16GB RAM.
-
Severity: Minor
-
Priority: Medium
-
User Impact: Visual noise. When a semicolon is missing, users expect a quick fix ("Insert ';'"). Displaying complex refactorings (like Extract Method) that require valid syntax is distracting and provides poor Developer Experience.
-
Steps:
- Write a variable declaration without a semicolon:
int i = 0 - Trigger command completion and look at the suggestions
- Write another variable with a semicolon:
int j = 0;and trigger command completion again - Compare suggestions
-
Expected result: IDE should prioritize fixing the syntax error (Insert ';') and limit complex refactoring suggestions that require a valid AST (Abstract Syntax Tree).
-
Actual result: Invalid syntax triggers a bloated list of irrelevant actions (Introduce Field, Type Info, etc.) that disappear once the code is corrected.
-
Reference: See
BUG-02_Correct_Syntax_Clean_List.png,BUG-02_Invalid_Syntax_Bloated_List_1.pngandBUG-02_Invalid_Syntax_Bloated_List_2.png.
If I had to prioritize the testing efforts below, I would start with Complex Code Structures. Command Completion relies heavily on context analysis. If it fails in complex Stream API chains or nested generics, it might introduce subtle logic errors into the user's code, which destroys trust in the feature. Performance and interoperability can be optimized iteratively, but the core code transformation logic must be undeniably reliable first.
To ensure the reliability of command completion further testing should cover:
- Complex Code Structures Testing suggestions inside deeply nested generic types, complex Stream API chains and advances lambda expressions.
- Performance Under Heavy Load: Testing response times and memory consumption in massive enterprise projects (files with >10 000 lines of code) to ensure no UI freezes occur.
- Plugin Interoperability: Verifying if command completion conflicts with other heavily used plugins that manipulates code in the editor e.g. Lombok, Spring Boot tools.
- Cross Language Behavior: Evaluating completion accuracy in mixed Java/Kotlin projects