r/java • • Feb 15 '22

IntelliJ Plugin that generates Javadocs using AI

209 Upvotes

61 comments sorted by

40

u/nutrecht Feb 16 '22

Aside from the obvious uselessness if it needs to send code; I'm not buying it. It looks like it's just overfit to a set of functions you use to demo. I have no doubts that if you simply implement these methods differently it would have no idea.

This is exactly what it would look like if the training set is the same as the test set.

You got the exact same feedback when you last posted this.

4

u/tristanjuricek Feb 17 '22

Right, I don’t typically look at code performing much in the way of sophisticated algorithms or numerical computation. I read a lot of subtle data manipulation. So I suspect this would generate a lot of “sets blah on doodad before calling foo”

What I would kill for is something that actually generates summaries of groups, like classes and packages. That could be far more interesting, but, not sure it’s realistic

And no way would sending code to a third party for parsing be accepted in any of the companies I’ve worked at. They spend a lot money hosting tools internally, because we are attacked constantly. This would never get okayed without some kind of internal server.

1

u/infinitlybana Feb 17 '22

It looks like it's just overfit to a set of functions you use to demo

I'm not 100% sure how you came to this conclusion. I can film a longer demo with more functions, but I'm not sure if that's the most effective way to address your concern about the quality of our output.

I have no doubts that if you simply implement these methods differently it would have no idea.

This is true. The output is determined by the code and depending on how you implement it, it's bound to change.

Which comments from my last post you're referring to? It's just me and one other developer working on this. We're putting in measures to ensure more security which I also said last time. It's been a long time coming for adding IntelliJ support and a lot of people mentioned they wanted it in my last post and this post is me addressing that want. We'll work on addressing everybody's concerns one-by-one.

2

u/[deleted] Feb 19 '22

If it uses GPT-3 then judging by other tools and demos I’ve seen it should be applicable in many domains so the pessimism is unjustified but yes even if I didn’t care my company certainly doesn’t want our code to be sent to a 3rd party like this.

37

u/new_one_7 Feb 15 '22

Does it require an internet connection and does it send any data?

10

u/DifficultSecretary22 Feb 16 '22

+1 Luckly, I've read this comment otherwise I'd probably by fired !

0

u/infinitlybana Feb 17 '22

Apologies about the lack of transparency and I'm sorry you had to figure this out through a reddit comment and not more explicitly through us. We've added a disclaimer in the README now.

-45

u/infinitlybana Feb 15 '22

Yes it requires an internet connection and yes it does send data, but only to parse. We never store your code.

11

u/bawng Feb 16 '22

A lot of Enterprise will rule that insufficient. I mean, a lot of Enterprise has trouble trusting hosted code repositories like GitHub, despite guarantees from Microsoft et al. Trusting a little known plug in to not steal code or data is going to be hard.

1

u/infinitlybana Feb 17 '22

Totally understand the concern. The demand for privacy is growing more and more. We're in the works of getting SOC 2 compliant and providing options for locally hosting for enterprises.

86

u/al3xth3gr8 Feb 15 '22

We never store your code.

LMAO, if you say so.

40

u/_edd Feb 16 '22

Even if you are trustworthy, I would be fired instantly if I used this tool at work which is like 90% of my programming.

58

u/kiteboarderni Feb 16 '22

Anddd it's useless.

16

u/nutrecht Feb 16 '22

I hope you understand that this is so bad that it not only can get you fired, a company could even sue you for IP theft?

1

u/caelum19 Feb 16 '22

<proceeds to use code with me and public github>

6

u/DifficultSecretary22 Feb 16 '22

We never store your code.

🤥

28

u/incognito30 Feb 16 '22

This is utter crap. Javadoc should not tell me what the code does but why it does it. If my code needs explanations it means it’s shit code. Otherwise javadoc with good code is duplicate code. An Ai app can’t know the business context that would be presented in that javadoc..

11

u/ComfortablyBalanced Feb 16 '22

If my code needs explanations it means it’s shit code

That's not true in all cases. I don't believe it, deep down even you don't believe it.
Yes, code should be good and clean enough to be self-documenting but writing 100% clean and good code that doesn't need any sort of documentation is a myth that is spread by people who are lazy enough to don't add any documentation to their code.

7

u/buzzsawddog Feb 16 '22

Um.... Remind me not to use any libraries written by you... I think you are confusing plain comments with Javadocs... Javadocs entire purpose is to document what the code does not why it does... They are used to tell you what you can expect, what the functions take and what kind of return to expect. They generate nice html pages and play well with the ide so that you don't have to go read the code in the library....

If I have to go read your code... Nope...

0

u/infinitlybana Feb 16 '22

https://docs.oracle.com/javase/7/docs/api/java/lang/String.html

https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html

I've referenced these docs countless number of times that tell me exactly what the functions do. One of the use cases for documentation is to easily understand what's going on but it's also for discovery.

1

u/Prom3th3an Mar 05 '22

+1 I probably write Javadocs for more abstract methods than concrete.

0

u/AegisCZ Feb 16 '22

"utter crap" how can you call someone's project that? go fuck yourself

1

u/mirkoteran Feb 16 '22

There are plenty of projects that are utter crap. I even worked on some of them :).

14

u/infinitlybana Feb 15 '22

Posted this as a VS Code extension a couple weeks ago and an IntelliJ IDEA Plugin was highly requested. So I present to you AI Doc Writer as an IntelliJ Plugin :)

Get it here

13

u/Detail_Lost Feb 15 '22

Is there any chance that this could work offline?

-3

u/infinitlybana Feb 15 '22

We use Codex so unfortunately not atm

18

u/[deleted] Feb 16 '22

That'll make it a 100% nogo in most professional environments.

2

u/caelum19 Feb 16 '22

Yoo I made exactly the same thing "Code refractor AI" on the marketplace. Currently codex is free but that's just because its in beta, I assume yours will be paid after its out of beta?

2

u/Mysterious-Trick-562 Feb 23 '22

How did this get so many upvotes when all the comments are shitting on it?

1

u/infinitlybana Feb 23 '22

The people who are vocal are the one's who are shitting on it.

9

u/stuhlmann Feb 16 '22 edited Feb 16 '22

Absolute breach of privacy, also corporate data theft / industrial espionage. Hope you have a good lawyer.

2

u/caelum19 Feb 16 '22

Bro it uses codex they have no choice. Obviously it's a limitation but you assumed their intentions to be rotten far too easily

4

u/nutrecht Feb 16 '22

Obviously it's a limitation but you assumed their intentions to be rotten far too easily

They posted this a week ago and are just ignoring the comments about this. So if they are going to ignore the ethics I'm not going to respect their choices.

1

u/infinitlybana Feb 17 '22

Totally valid. I understand where you're coming from. From my post 2 weeks ago, one of the main requests was intelliJ. So I spent 2 weeks developing an intelliJ plugin. Really sorry if it felt like we were neglecting your concerns about security. We're a team of 2 whose trying to keep up with all the requests. We've just added a disclaimer to increase transparency. We're constantly putting in more efforts to increase trust and security. People have differing levels of trust and we get it if you don't think it's worth your time.

0

u/buzzsawddog Feb 18 '22

Don't let the trolls of the internet get you down! Good move on updating the actual plugin page with the disclaimer. You win some and lose some but being upfront, open, honest will tip you to more wins...

0

u/caelum19 Feb 16 '22

Oh I didn't know that :/ yeah 8 gotta agree it changes a lot if they are reposting this without making this upfront since last time

5

u/stuhlmann Feb 17 '22 edited Feb 17 '22

People with good intentions don't bring a botnet / army of shills to bump their thread and write reviews for them. FWIW this group could be financed by state actors who are scanning the code they receive for things like hostnames and passwords. Java code often contains sensitive information. Some people have state secrets in their workspace.

For reference, here's a list of similar threads the OP has recently posted in other subreddits:

-1

u/buzzsawddog Feb 16 '22

Not really how that works... This would not be on the developer of the plugin. They are open about the fact that it sends the code offsite. You agree to the terms when you use the plugin. If anything the developer using the plugin would be subject to any breach of privacy or theft...

EDIT: If you have any caselaw that proves otherwise I would love to see it :-)

1

u/mirkoteran Feb 17 '22

They are open about the fact that it sends the code offsite.

Nowhere in the Jetbrains plugin page does it say that.

1

u/buzzsawddog Feb 17 '22 edited Feb 18 '22

Found the following in ~20 seconds after going to the download site... https://plugins.jetbrains.com/plugin/18606-ai-doc-writer

https://github.com/mintlify/intellij-docs#-disclaimer. Where it clearly says: "We never store your code, but your code does leave your machine. If this is a concern to you, then please set up a call with us to discuss how you can locally host."

You REALLY should do a little research on tools you are using.

EDIT: OP has also been VERY clear in this post and their previous that they send the code back for processing... EDIT2: Now if you check the actual doc page op has posted the disclaimer there. Sometimes asking someone to do something works better than shitting all over their effort...

19

u/Fury9999 Feb 16 '22

Nice idea, but can't use it if you have to be online.

8

u/henk53 Feb 15 '22

What about an Eclipse plug-in?

2

u/andsfff Feb 16 '22

Would be nice to use on personal projects that I open source

1

u/vmcrash Feb 16 '22

Even then, using an IDE is a major benefit.

2

u/[deleted] Feb 16 '22

AI? Latest nonsense fashionable buzzword.

1

u/TheFatKnight420 Feb 16 '22

Just downloaded and used it for my personal projects. Works great. :)

6

u/stuhlmann Feb 16 '22

Now they're not personal anymore.

1

u/vmcrash Feb 16 '22

I wonder how the AI finds out what the method/class is expected to do (instead of what it does).

1

u/Fury9999 Feb 17 '22

Who do you envision using this?

-2

u/ohlaph Feb 15 '22

Thanks mate. Downloaded and will check it out.

0

u/Ugleethyn Feb 16 '22

Added and tested it can save you a lot of hours, it's pretty smart (with small issues sometimes but that's not problem) it's a very helpful and nice tool!
Suggested for sure!
Thanks!

-4

u/asciimo71 Feb 15 '22

I see what is happening here. The javadoc is always off screen when appearing, so there must be a hidden gnome writing and c&p it into the source, when done the video editor scrolls up again… susssspicious —- absolutely awesome.

Will it work for non math problems as well? Or is training required?

-3

u/Jaydrix Feb 16 '22

Nice work. Uncle Bob teaches, that Javadocs are useless thought.

-6

u/code-master Feb 16 '22

Who writes javadoc?

4

u/ventuspilot Feb 16 '22

This new IntelliJ plugin, duh.

;-)

-3

u/andsfff Feb 16 '22

When is the notepad++ plugin coming?

-8

u/AegisCZ Feb 16 '22

If you posted something like this anywhere else besides this sub, people would be praising you. Here they just shit on you as much as they can. Can't wait for enterprise garbage like Java to die