News for hackers. Stuff that matters.
Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @04:20PM (#8133787)
Hi DanielStraight!

Great question. CodeExchange is intended to help you reformulate your query. That is, as you get results, it aims to help you change your query so the next results are closer to what you want.

Some typical use cases are finding API usage examples and algorithm implementations. This could mean finding code that invokes API methods, extends a parent class, implements an interface, implements depth first search or merge sort, etc...

Some examples:

[Looking for regular expression code] An example may be issuing a keyword search “regular expression”, then taking the recommendation “[imports library] java.util.regex.pattern” to find code that uses this library, and then clicking on the method call “Pattern.matches” in a code result in order to return code that calls this method.

[looking for Minecraft code] Another example may be issuing the keyword search “minecraft map” and then taking the recommendation “[keywords] world” to help disambiguate the word “map” from other meanings in Java.

[looking for merge sort code] Yet another example could be issuing the keyword search “merge sort” and then getting empty class results. Since algorithms have logic in them (loops, if statements, etc...) you can critique the result by clicking the up arrow above “complexity” in order to get results with more logic in them.

These examples don't have to start out with keywords, however. Sometimes you are working with a team that already has libraries being used and you have to learn how to use them. To specify them up front you can use the “Advanced Search”

The search history is intended to support reissuing queries that worked in the past, to find code you need today.

Thanks for your interest! Let me know if I can answer any other questions or clarify anything. If you have time please fill out the survey on our site to help our research!

Re:Show HN: CodeExchange – A new Java code search engine by DanielStraight on Monday August 04, 2014 @03:38PM (#8133598)
Can you give some examples of searches which provide really good results? Or some idea of what use cases you would use the search for?
Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Wednesday August 06, 2014 @02:09AM (#8141248)
Some example search videos have been posted here: http://codeexchange.ics.uci.edu/examples.html Thanks!
Re:Show HN: CodeExchange – A new Java code search engine by fataliss on Monday August 04, 2014 @04:47PM (#8133928)
Tiny feed back after first look, the "Advanced search" needs more space :) https://www.dropbox.com/s/w9w9nvdb9tkf1jn/Screenshot%202014-...

Other than that, looking good.

Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @05:03PM (#8134016)
Thanks :). We shall fix this soon!
Re:Show HN: CodeExchange – A new Java code search engine by boyter on Monday August 04, 2014 @05:00PM (#8134003)
Interesting. It looks like its actually parsing the Java to produce the results as a search for "bing" shows the number of imports and complexity of the code. This would be similar to sourcegraph.

I wonder what parser is used and if it can be applied to other languages.

Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @05:22PM (#8134096)
Good observation! We are continuously expanding our efforts, and will be looking into supporting other languages soon. For us, this will mean using or writing different parsers for different types of languages. Suggestions for which languages you want are appreciated! More details on the engineering of CodeExchange are being written.
Re:Show HN: CodeExchange – A new Java code search engine by boyter on Monday August 04, 2014 @05:32PM (#8134154)
Interesting. This is a university project yes? Will you be looking to open source some of the code, in particular the language parsers.

I ask from a purely selfish purpose as I want to integrate this sort of information into searchcode.com and would prefer to avoid writing my own implementations.

Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @06:31PM (#8134437)
Yes, it is a university project. We hope to make it open source, but first we are working to stabilize it and write about it.
Re:Show HN: CodeExchange – A new Java code search engine by boyter on Monday August 04, 2014 @07:44PM (#8134720)
Ah very cool. I have added a watch to your profile so I can see any further developments.
Re:Show HN: CodeExchange – A new Java code search engine by fredliu on Monday August 04, 2014 @06:17PM (#8134384)
Is the site overloaded right now? I typed in a few queries, nothing shows up, and the "status" under the 1st column is always "SEARCHING..."
Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @06:41PM (#8134474)
Thanks for letting us know! We are checking into it.
Re:Show HN: CodeExchange – A new Java code search engine by palakchokshi on Monday August 04, 2014 @07:05PM (#8134565)
Still down for me. Still Searching
Re:Show HN: CodeExchange – A new Java code search engine by mrpanda on Monday August 04, 2014 @04:37PM (#8133870)
zot zot

what was the point of this search engine? I mean who came up with this idea that we needed to build a java code search engine?

I dig the results view, its pretty cool to see 3 codes side by side.

Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Monday August 04, 2014 @05:11PM (#8134054)
We are continuously expanding our efforts, and will be looking into supporting other languages soon. Suggestions for which ones you want first are appreciated! Thanks (zot zot)!
Re:Show HN: CodeExchange – A new Java code search engine by jayherdabell on Monday August 04, 2014 @11:02PM (#8135321)
Just wanted to point out grepcode.com for comparison.
Re:Show HN: CodeExchange – A new Java code search engine by leemartie on Wednesday August 06, 2014 @02:11PM (#8143940)
Thanks for the pointer! As an academic research project, we try to collect as many of these as possible.