Projects with at minimum one valid Java file

52 views
Skip to first unread message

nbrito.aline

unread,
Oct 3, 2015, 10:05:50 PM10/3/15
to Boa Language and Infrastructure User Forum
Hello guys,

Can anyone help me with a query?

I counted the number of Java projects and the result was 554.864.

In the query below, the number of projects with at minimum one valid Java file in the last snapshot was 274.989 (263.426 projects with at minimum one import and 11.563 without imports).

Are my results correct? I have  279.875  projects (554.864 -  274.989) without valid Java files  in the latest snapshot.

________
p : Project = input ; 
java_projects_valid : output sum of int ; 
java_projects_valid_without_imports:  output sum of int ; 
java_projects_valid_with_imports: output sum of int ; 
all_projects: output sum of int ; 

isProjectJavaValid := false;
containsImport := false;
all_projects << 1 ; 

visit ( p , visitor { 

    before node: CodeRepository -> {
 snapshot := getsnapshot(node, "SOURCE_JAVA_JLS");
 foreach (i: int; def(snapshot[i])){
   isProjectJavaValid = true;
  visit(snapshot[i]);
 }
 stop;
    }
     
    before node: ASTRoot -> {
           if(len(node.imports) > 0){
               containsImport = true;
            }
     }
});


if(containsImport){
    java_projects_valid_with_imports << 1;
}

if(!containsImport && isProjectJavaValid ){
    java_projects_valid_without_imports << 1;
}

if(isProjectJavaValid){
    java_projects_valid << 1;
}
________

Regards,
Aline

Robert E Dyer

unread,
Oct 5, 2015, 1:39:58 PM10/5/15
to boa-...@googlegroups.com
Hi Aline,

I believe you have the correct results.  The issue is that most code forges (GitHub included) are not horribly accurate with their metadata.  Take a look at my example query here:


This lists all projects that identify as ‘Java’ but have no java files (in *any* revision).  Just looking at the first you see this:


It clearly lists Java as a language.  Yet here is the code:


and it clearly has *no* source code!

So I think your results are accurate.  It is just noise you need to filter out!

- Robert

Aline Brito

unread,
Oct 5, 2015, 4:25:03 PM10/5/15
to boa-...@googlegroups.com
Hello Robert,

I checked some java projects on GitHub too. I was in doubt because my result was approximately 50%.

Thanks for the help!

Best Regards,
Aline

2015-10-05 14:39 GMT-03:00 Robert E Dyer <psy...@gmail.com>:
Hi Aline,

I believe you have the correct results.  The issue is that most code forges (GitHub included) are not horribly accurate with their metadata.  Take a look at my example query here:


This lists all projects that identify as ‘Java’ but have no java files (in *any* revision).  Just looking at the first you see this:


It clearly lists Java as a language.  Yet here is the code:


and it clearly has *no* course code!

So I think your results are accurate.  It is just noise you need to filter out!

- Robert
--
More information about Boa: http://boa.cs.iastate.edu/
---
You received this message because you are subscribed to the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boa-user+u...@googlegroups.com.
To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

________________________________________________
Robert Dyer | Assistant Professor | Department of Computer Science
BGSU | rd...@bgsu.edu | 419.372.3469 | 244 Hayes | Bowling Green, OH

Want to mine ultra-large-scale software repositories with minimal initial
investment? Check out Boa! http://boa.cs.iastate.edu/

--
More information about Boa: http://boa.cs.iastate.edu/
---
You received this message because you are subscribed to the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boa-user+u...@googlegroups.com.
To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages