---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Hi Meinert,
On Jul 20, 2016, at 12:38 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Indeed, I had a plan to look at multiple projects, although I did not think about all projects :).
One thing we need to take into account is also the presence of libraries. When we do not have external libraries, the logic of importing is different than when we have them. Yet, most errors are likely to occur when the external libraries are missing because this is when you have only partial information.
It would be cool to try both variations. If we have a maven project or something similar, we can automate the download of dependencies.
Would you like to help in that direction?
Cheers, Doru
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
“Live like you mean it."
As a first test I tried to import the spring framework from github ( https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com:
As a first test I tried to import the spring framework from github ( https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Thanks! I will look at these.
Cheers, Doru
On Jul 20, 2016, at 2:50 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com: As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"We are all great at making mistakes."
Hi,
I created test cases out of the ArgoUML and Guava systems.
There is still a problem with spring-core, but I did not figure it out yet.
Nevertheless, it would be great if you could try again and perhaps extend the analysis to other systems.
@Meinert: one thing that would be cool even if we do not have the all github would be to prepare a set of scripts like you offered for the Guava case. The thing is that for Guava, I tried to get the Maven dependencies and it did not work (at least not on the head of development). This means that I could not see what happens in the best case scenario when we have all libraries and we can resolve the dependencies.
What do you think?
Cheers, Doru
On Jul 20, 2016, at 2:57 PM, Tudor Girba tudor@tudorgirba.com wrote:
Thanks! I will look at these.
Cheers, Doru
On Jul 20, 2016, at 2:50 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com: As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"We are all great at making mistakes."
-- www.tudorgirba.com www.feenk.com
"One cannot do more than one can do."
Hi
Tudor, actually I'm on vacation the next two weeks. So I can help only after that unfortunately. Maybe as a first step we should just create a Project were everybody could add his failing scripts as pull request.
Best regards Meinert
Am 22.07.2016 um 14:35 schrieb Tudor Girba tudor@tudorgirba.com:
Hi,
I created test cases out of the ArgoUML and Guava systems.
There is still a problem with spring-core, but I did not figure it out yet.
Nevertheless, it would be great if you could try again and perhaps extend the analysis to other systems.
@Meinert: one thing that would be cool even if we do not have the all github would be to prepare a set of scripts like you offered for the Guava case. The thing is that for Guava, I tried to get the Maven dependencies and it did not work (at least not on the head of development). This means that I could not see what happens in the best case scenario when we have all libraries and we can resolve the dependencies.
What do you think?
Cheers, Doru
On Jul 20, 2016, at 2:57 PM, Tudor Girba tudor@tudorgirba.com wrote:
Thanks! I will look at these.
Cheers, Doru
On Jul 20, 2016, at 2:50 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com: As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"We are all great at making mistakes."
-- www.tudorgirba.com www.feenk.com
"One cannot do more than one can do."
Am 22.07.2016 um 14:35 schrieb Tudor Girba tudor@tudorgirba.com:
Hi,
I created test cases out of the ArgoUML and Guava systems.
There is still a problem with spring-core, but I did not figure it out yet.
Nevertheless, it would be great if you could try again and perhaps extend the analysis to other systems.
@Meinert: one thing that would be cool even if we do not have the all github would be to prepare a set of scripts like you offered for the Guava case. The thing is that for Guava, I tried to get the Maven dependencies and it did not work (at least not on the head of development). This means that I could not see what happens in the best case scenario when we have all libraries and we can resolve the dependencies.
What do you think?
Cheers, Doru
On Jul 20, 2016, at 2:57 PM, Tudor Girba tudor@tudorgirba.com wrote:
Thanks! I will look at these.
Cheers, Doru
On Jul 20, 2016, at 2:50 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com: As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"We are all great at making mistakes."
-- www.tudorgirba.com www.feenk.com
"One cannot do more than one can do."
This is great Doru! Keep doing! This is very important.
Alexandre
On Jul 20, 2016, at 4:57 PM, Tudor Girba tudor@tudorgirba.com wrote:
Thanks! I will look at these.
Cheers, Doru
On Jul 20, 2016, at 2:50 PM, Meinert Schwartau m.schwartau@gmail.com wrote:
Wie analysing guava I had similar problems:
git clone https://github.com/google/guava.git
cd guava
mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
../jdt2famix/release/jdt2famix.sh
Then I got the following exception:
jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
Best regards
Meinert
2016-07-20 22:33 GMT+02:00 Meinert Schwartau m.schwartau@gmail.com: As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
Best regards Meinert
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"We are all great at making mistakes."
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
On Thu, Jul 21, 2016 at 2:38 AM, Meinert Schwartau m.schwartau@gmail.com wrote:
---------- Weitergeleitete Nachricht ---------- From: Tudor Girba tudor@tudorgirba.com To: Moose-related development moose-dev@list.inf.unibe.ch Cc: Date: Tue, 19 Jul 2016 07:41:05 -0600 Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
Getting the download url for all java github projects is very easy:
https://api.github.com/search/repositories?q=language:Java
Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
How do you think about it?
I wonder if you could automate this with... https://balletie.github.io/GitHub/
cheers -ben