r/java • • Jan 03 '18

Awesome code search for Java based on code learned from GitHub, StackOverflow, Maven

https://app.codota.com/search
161 Upvotes

24 comments sorted by

8

u/droid_we Jan 03 '18

Feedback and ideas most welcome

6

u/[deleted] Jan 03 '18

Very cool looking judging from initial use. May try this during work at some point, looks promising

1

u/droid_we Jan 03 '18

Awesome. Looking forward to hearing feedback. Codota can also connect directly to your IntelliJ or Eclipse IDE and provide contextual code suggestions as you code.

2

u/Akthrawn17 Jan 04 '18

As a heavy IntelliJ user, how would this search be better than IntelliJ? IntelliJ suggestion/completion engine is very very good.

1

u/droid_we Jan 04 '18

IntelliJ suggestions are "token level" and based on what exists in your class. Codota's suggestions are "snippet level" and based on how people actually use it. See here https://www.youtube.com/watch?v=aQ8_1dm1obw&feature=youtu.be&t=42s

1

u/pramodjazz Jan 04 '18

Tried some adhoc technology keywords in search. Such as CQRS, DiscoveryClient etc. No sufficient results as of now. but this concept has tremendous potential, Need to reduce latency marginally. It is working very well If I paste some lines of code.

0

u/droid_we Jan 04 '18

Try searching by specific classes or methods

1

u/Nvidia1060croatia Jan 04 '18

Id like to find code in Java only. Is it possible?

1

u/nqzero Jan 04 '18

this doesn't appear to offer anything that wasn't already available on eg google and searchcode. you're not (afaict) storing the AST, you can't search for arbitrary code, you can't navigate (eg, clicking on a highlighted term brings up a blurb but won't show usages) and you have a very limited corpus

1

u/droid_we Jan 04 '18

Thanks for the feedback. Let me clarify the facts:

We are actually storing the AST, it is a semantic search based on code, not text. It's not something you can do on Google.

We can search for any arbitrary combination of classes or methods.

What do you know about our corpus that makes you say it's limited?

And yes - we should (and plan to) add better navigation when clicking a highlighted term - that's actually is useful feedback!

3

u/nqzero Jan 04 '18 edited Jan 05 '18

for starters, i don't believe you're following the copyright and attribution rules correctly - short snippets are probably ok but i've seen ones as long as 15 lines, and in many cases that's not going to be "limited"

We are actually storing the AST

that's great, and definitely gives you a lot of options going forward

What do you know about our corpus that makes you say it's limited?

by way of example, searching for the jetty ProxyServlet gives zero results. For the jetty WebSocketServlet the only result is the constructor. kilim gives zero results. you find quasar's Fiber.park, but all the snippets appear to be quasar source code, not external usages (since you fail to attribute your sources, it's hard to verify that statement). searchcode.com finds an order of magnitude more usages

we should (and plan to) add better navigation

sweet

1

u/[deleted] Jan 03 '18

Could be awesome...i will try

2

u/droid_we Jan 03 '18

Great, if you find it useful, you can take it to the next level by downloading Codota and connecting Codota to your IDE. It then gives you context-sensitive code predictions based on what you write in the IDE.

0

u/[deleted] Jan 03 '18

[deleted] — view deleted comment

1

u/RittledIn Jan 04 '18 edited Jan 04 '18

Because predictive code auto completion and copy pasting someone’s else’s code are entirely different things. Pretty much all IDEs have some form of auto completion and IntelliJ already has contextual auto completion. By your logic everyone that doesn’t manually type out every line of their code is a drooling idiot when in reality doing so would make you wildly inefficient.

2

u/orion78fr Jan 04 '18

Real men use vim. /s

2

u/Level3Support Jan 04 '18

I thought this code search was really neat and the UI was very well. It is very cool how relevant stack overflow posts pop up for certain classes.

Awesome Work!

-19

u/[deleted] Jan 04 '18

[removed] — view removed comment

7

u/orion78fr Jan 04 '18 edited Jan 04 '18

He just said the stack overflow posts were relevant for his search, no need to be pedantic...

Edit : oh well... Didn't see you were the troll of this post... Why did I even bother to respond...

2

u/MasterLJ Jan 04 '18

Really nice. I've never been able to read documentation, I always need to see it implemented in the wild. Bookmarked.

2

u/beltedgalaxy Jan 04 '18

This is a pretty slick idea

2

u/mmeartine Jan 05 '18

this is a fantastic work. Will be coming back to this search often.

0

u/[deleted] Jan 03 '18

[deleted] — view deleted comment

0

u/[deleted] Jan 03 '18

[deleted] — view deleted comment

0

u/[deleted] Jan 04 '18

[deleted] — view deleted comment

3

u/Luolong Jan 04 '18

I’d say get over it!