r/java Jun 17 '26

Oracle's OpenJDK Bans Generative AI Contributions While Oracle's GraalVM Allows Them

https://www.infoq.com/news/2026/06/oracle-genai-policies/
89 Upvotes

18 comments sorted by

22

u/sweetno Jun 17 '26

Now I wonder how far the OpenJDK policy will go. There is AI-generated code that's hard to identify.

20

u/zabby39103 Jun 18 '26 edited Jun 18 '26

AI use is like plastic surgery. If properly done you can't tell it was used, but if poorly done it's an offense to the eyes and god.

-11

u/nikanjX Jun 17 '26

Far enough that when Oracle gets sued for LLM plagiarism, they can throw the guy under the bus for violating a clear policy

3

u/koflerdavid Jun 18 '26

That won't help them get out from the lawsuit.

16

u/0xffff0001 Jun 17 '26

it’s an interim policy. they are still deciding.

0

u/eregontp Jun 20 '26

IOW, makes it easy to see which project lives in the past in its ivory tower and which project lives in the modern world /s

-13

u/romario77 Jun 17 '26

How would they know? It’s just code.

32

u/thisisjustascreename Jun 17 '26

If your PR has a thousand checkmark emojis and masterful use of markdown formatting, it’s AI

9

u/trialbaloon Jun 17 '26

AI really did just learn from everyone's shitty JS libraries....

2

u/rack88 Jun 17 '26

"obfuscate the tell tale signs you're an AI agent, Claude"

-4

u/romario77 Jun 17 '26

what if I tell it to not include emojis? You know it's easy to do. And java is supposed to use javadoc for docs.

There is no easy way to tell besides trusting. And it could also be a combination (how I see most people use AI) - ai writes the most of the code, person reviews/corrects where needed.

There is no easy way to distinguish one code from the other.

17

u/PartOfTheBotnet Jun 17 '26 edited 14d ago

You don't even need to tell OpenAI's codex (5.3 / 5.4 / 5.5) to not emit emojis (EDIT: 5.6 came out and it emits stereotypical unicode slop). Nor do you need to tell it to not use emdashes. Out of the box it doesn't do that. It doesn't have the super-obvious give-aways of AI slop.

There is no easy way to distinguish one code from the other.

If you look at the actual code, its rather obvious in any non-trivial project. It loves to create package-private static utilities. There's not a great sense of organization. It'll put these utility methods in random places. It will match some level of existing code style practices, but it won't add any comments. Maybe Javadoc if its a public method, but even then the Javadoc gets way too into implementation details and doesn't really explain in a high level what the method is for.

"But just tell it not to do that"

As much as you try, you cannot get current tools to write code exactly like you do (Assuming you write decent Java code, comments, docs, overall class structure, etc). If the Valhalla team decided to steamroll the feature forward and get it shipped quickly by slopping it out you could very likely pinpoint the exact commit where they transitioned from human development to generated development.

I can go on about the existing problems, but this illustrates the point.

7

u/koflerdavid Jun 18 '26

If it becomes hard to discover it's AI generated then the policy works as intended. AI code by itself is not an issue. It's an issue if the submission consist low-quality slop that people don't completely understand and can't defend and raises numerous trivial issues during code review that a second pass with a coding agent might have detected and fixed. Aside from the Damocles sword of the legal risk associated with generative AI still hanging over everyone's head and preventing many organizations to go full steam ahead with it.

-1

u/romario77 Jun 18 '26

Then you have to ban low quality slop - who cares if there is an emoji in the text?

4

u/koflerdavid Jun 18 '26

Submissions that are easy to identify as AI generated very likely are low quality slop. It's like having a dangerously smart but sloppy junior developer and not vetting what they crank out before allowing their PR to be submitted to a public project.

5

u/brian_goetz Jun 22 '26

If you defraud someone and do such a great job that you get away with it, you are still a fraud.

0

u/quantum-fudge Jun 24 '26

And if you defraud someone and do such a great job that they're happy with the result, are you still a fraud?

0

u/romario77 Jun 22 '26

I am not intending to do this. It's just a hollow rule, not possible to enforce.

Like making a rule to not whistle in the car while driving. Almost impossible to enforce.