Skip to content

[AREV-310] (ignore) Incremental test1 - #1866

Open
mchun2288 wants to merge 4 commits into
mainfrom
incremental-doc-test
Open

[AREV-310] (ignore) Incremental test1#1866
mchun2288 wants to merge 4 commits into
mainfrom
incremental-doc-test

Conversation

@mchun2288

@mchun2288 mchun2288 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What Is This Change?

some more tests for autoreview
not related to atlascode

How Has This Been Tested?

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

  • If Atlassian employee & Bitbucket changes: did you test with DC in mind? See Instructions

Recommendations:

  • Update the CHANGELOG if making a user facing change

Rovo Dev code review: Rovo Dev has reviewed this pull request
Any suggestions or improvements have been posted as pull request comments.

Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
@atlassian

atlassian Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The issue is ready for review.

Code Reviewer could not determine whether the following acceptance criteria have been met:

  • Call the GitHub GraphQL API querying pullRequest.reviewThreads { isResolved, comments { ... } } to determine resolution state per comment thread
  • In integrations-service, merge the resolution state into the PR comments response, setting CommentResolution accordingly
  • When a thread is unresolved, leave resolution as null

Check Jira issue

Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
Comment thread src/incrementaltest.java
teg-atlassian
teg-atlassian previously approved these changes Jun 10, 2026
Comment thread src/incrementaltest.java
}
double total = quantity * pricePerChicken * (1 + discount);

return total

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Code Bugs

return total is missing a semicolon, which will cause a compilation error.

Details

📖 Explanation: Missing semicolon causes a compilation error.

Suggested change
return total
return total;

Uses AI. Verify results. Give Feedback

Comment thread src/incrementaltest.java
if (isMember) {
discount = 0.10; // 10% member discount
}
double total = quantity * pricePerChicken * (1 + discount);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Code Bugs

The discount is applied in the wrong direction — (1 + discount) increases the price by 10% instead of reducing it; it should be (1 - discount).

Details

📖 Explanation: The discount is being added instead of subtracted, resulting in members paying 10% more rather than less.

Suggested change
double total = quantity * pricePerChicken * (1 + discount);
double total = quantity * pricePerChicken * (1 - discount);

Uses AI. Verify results. Give Feedback

Comment thread src/incrementaltest.java
public String getMostPopular(String[] items, int[] counts) {
int maxIndex = 0;

for (int i = 0; i <= counts.length; i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Code Bugs

The loop condition i <= counts.length will throw an ArrayIndexOutOfBoundsException on the last iteration; it should be i < counts.length.

Details

📖 Explanation: Using <= instead of < causes an ArrayIndexOutOfBoundsException on the last iteration.

Suggested change
for (int i = 0; i <= counts.length; i++) {
for (int i = 0; i < counts.length; i++) {

Uses AI. Verify results. Give Feedback

Comment thread src/incrementaltest.java
return String.format("%-20s $%.2f", item, price);
}

// Returns true if the order qualifies for free delivery (total over $25)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Maintainability - Documentation

The comment says "total over $25" but the implementation uses >=, meaning an order of exactly $25.00 also qualifies — consider updating the comment to "total of $25 or more" to accurately reflect the condition.

Details

📖 Explanation: There is a mismatch between the inline comment and the actual comparison operator used in the implementation.

Uses AI. Verify results. Give Feedback

@atlassian

atlassian Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The issue is ready for review.

Code Reviewer could not determine whether the following acceptance criteria have been met:

  • In github-for-jira, call the GitHub GraphQL API querying pullRequest.reviewThreads { isResolved, comments { ... } } to determine resolution state per comment thread
  • In integrations-service, merge the resolution state into the PR comments response, setting CommentResolution accordingly
  • When a thread is unresolved, leave resolution as null

Check Jira issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants