facebookarchive / pfff

Tools for code analysis, visualizations, or style-preserving source transformation.
http://github.com/facebook/pfff/wiki/Main
Other
2.44k stars 205 forks source link

codegraph -lang java -build "path/to/source/code" error #157

Open tianhua87 opened 6 years ago

tianhua87 commented 6 years ago

java code:

import java.util.Scanner;
public class A {
  public static void main(String args[]){
    System.out.println("hello!");
    Scanner cin = new Scanner(System.in);
    int fk = cin.nextInt();
    System.out.println(fk);
  }
}

error:

lxr@lxr-ThinkStation-P310:~/mycode/pfff$ ./codegraph -lang java -build /home/lxr/A.java 
(ONCE) PB: wrong import: java.util.Scanner
PB: lookup fail on Package: String2 (in Method: A.main)
PB: lookup fail on Package: java2.util2.Scanner2 (in Method: A.main)
PB: lookup fail on Package: System2.out2 (in Method: A.main)
nb nodes = 13, nb edges = 4
parse errors = 0
lookup fail = 0
unresolved method calls = 0
(resolved method calls = 0)
unresolved field access = 0
(resolved field access) = 0)
unresolved class access = 0
unresolved calls = 0

I do not know where the problem is. My java version is 1.8.