Forums : Feedback Forum

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

Incorrect project information

I've listed these in a few other threads but I just wanted to put them all in one for reference:

Project: http://www.ohloh.net/projects/3923

  • Mostly written in C/C++

It is a Java project. There are a handful of C++ files compared about 200 Java classes. Approximately half of the Java is in a preprocessed form - the extension is .jpp rather than .java - which probably causes this incorrect identification.

AFAIK there is no way for Projects to specify arbitrary file associations.

  • Short source control history

Ohloh shows the project as starting in August 2007. Our SVN history goes back to April 2006. We reorganised SVN (did I bunch of moves but retained file history) in August 2007. AFAIK Ohloh can not follow this kind of operation yet but it's on the 'to fix' list.

  • Not identifying Apache License

A lot of the code is licensed under the Apache license, with the following header:

// Copyright 2000-2005 the Contributors, as shown in the revision logs.
// Licensed under the Apache Public Source License 2.0 (the License).
// You may not use this file except in compliance with the License.

Ohloh is not picking up this license at all.

Charles Goodwin about 16 years ago
 

Hi Charles,

Thanks for your patience and your excellent description of the problems. I've done a little investigation on them.

  • Mostly written in C/C++

I do not believe that jpp files are the culprit here. It's true that Ohloh does not recognize or parse jpp files (Are these just regular java? Anything special we need to know? It might be trivial to simply add jpp as another java extension).

I did a manual count of the jpp files -- I found 16 files with a total of 8262 lines. Ohloh did find 59,534 lines of java, so the addition of the jpp would not make a big difference.

The real culprit appears to be the file core/org.vexi.core/src/org/vexi/plat/DarwinCarbonHeaders.h, which has 73,561 total lines, of which 57,688 are actual code. This single file outnumbers the entire java content of the project.

I'm not sure what the correct behavior for Ohloh should be here -- techinically, the engine is correct, because there's a lot of C in this header file. Any thoughts on how the Ohloh language decision could be improved?

  • Short source control history

Yes, you're right, we have a serious limitation here, and it affects a lot of projects. It's a hard fix. I'd love the time to attack this.

  • Not identifying Apache License

It looks like our license sniffer is being tripped up by the specific language you are using to cite the license. We are expecting Apache License or Apache Software License, not Apache Public Source License. AFAIK this project is the only instance of this particular wording -- although I could easily be mistaken here. Google code search comes up empty on Apache Public Source License. Technically, we could conceivably train our license sniffer to recognize this phrase, although I must admit that it seems like the better solution is to use the proper name of the license.

Robin Luckey about 16 years ago
 

Thanks for the response :-

Issue 1. .jpp is pretty much regular java with macros (//#repeat foo/bar ..., //#define MACRO(args) ...) for a few things Java doesn't cater for. Unless you are compiling, it shouldn't matter so much.

Issue 3. Ah, ok, I'll fix this. Thanks for pointing it out!

Another possible issue:

  • No support for arbitrary files

We have our own filetype, if you will - All *.t files are templates with XML/JavaScript content. Are these picked up by Ohloh?

There are a few other projects using this too (Vexi is a UI programming platform) listed on Ohloh.

Any tips on how to find all files of a particular type whilst excluding .svn directories? The 'find' command just isn't that intuitive.

Charles Goodwin about 16 years ago
 

Hi Charles,

The arbitrary files problem is a tough nut to crack. If it was simply a case of using a custom file extension, it's conceivable that somewhere down the road Ohloh could offer support for some kind of mapping directive that says wherever you see the *.t extension, use the XML parser. However, this particular case seems more difficult because I don't know that Ohloh has a parser that can handle an XML/Javascript blend.

It sounds like a custom parser would need to be added to the Ohloh line counter. If there are other projects using this file format, it's not unreasonable to do this.

I agree that find is one of your less intuitive tools :-). To skip Subversion directories (or in fact all files that start with a period) I us an option like this:

find . ! -path */.* -name *.t

If you are feeling adventurous you can install our line counter locally on your machine. It has a --detect feature which you can use to find files -- but it will only work for file types that Ohloh recognizes.

Robin Luckey about 16 years ago
 

Robin, ohloh has since done an update from our svn (as recently as 5 days ago) but still doesn't list the Apache License:
http://www.ohloh.net/projects/3923/analyses/latest

I fixed most of the references to say Apache Software License (although a few still remain as Apache Public Source License). Any idea what's wrong there?

Charles Goodwin about 16 years ago
 

Yikes. OK, I did some digging, and I found a bug in our license sniffer. It turns out we had a typo in one of our Apache regex's (regexen?), and our unit test didn't reveal it. I've fixed the bug, but to fix the project report we will have to fully re-analyze the project. We're a bit backed up on line counts right now, so this might take a day or two to go through.

I'll get it started. I'll check when it's done to be sure the fix went through.

Thanks for helping me find this bug,
Robin

Robin Luckey about 16 years ago
 

You're welcome. I love Ohloh and the reason I reported this was to try and help you improve it. :-)

Charles Goodwin about 16 years ago