ponder-lab / Optimize-Java-8-Streams-Refactoring

Refactorings for optimizing Java 8 stream client code for greater parallelism and efficiency.
http://cuny.is/streams
Eclipse Public License 1.0
8 stars 7 forks source link

Issues for collecting data #160

Closed yiming-tang-cs closed 6 years ago

yiming-tang-cs commented 6 years ago
  1. Some projects cannot be imported into Eclipse.

1.1 elasticsearch

Some projects cannot be imported because they already exist in the workspace or their project description file is corrupted
: is an invalid character in resource name ':benchmarks'.
: is an invalid character in resource name ':build-tools'.
: is an invalid character in resource name ':client'.
: is an invalid character in resource name ':client:rest'.

1.2 JabRef

Project at 'C:\Users\tangy\runtime-EclipseApplication\Jabref' can't be named 'JabRef' because it's located directly under the workspace root. If such a project is renamed, Eclipse would move the container directory. To resolve this problem, move the project out of the workspace root or configure it to have the name 'Jabref'.
  1. Tool may throw NPE for some projects (purple records in excel).

e.g.,


!ENTRY org.eclipse.jdt.ui 4 10001 2018-01-11 15:24:58.970
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException

!ENTRY edu.cuny.hunter.streamrefactoring.eval 4 0 2018-01-11 15:24:59.025
!MESSAGE Encountered exception during evaluation
!STACK 0
java.lang.NullPointerException

This NPE doesn't have any description.

  1. For some projects, the tool cannot find lines of codes. It seems it needs extra jar files.
Cannot find LOC
  C:\Program Files\Java\jre1.8.0_151\lib\ext\sunec.jar
    <default> (not open)
    sun.security (not open)
    sun (not open)
    sun.security.ec (not open)
  C:\Program Files\Java\jre1.8.0_151\lib\ext\sunjce_provider.jar
    <default> (not open)
    com.sun (not open)
    com.sun.crypto (not open)
    com (not open)
    com.sun.crypto.provider (not open)
  C:\Program Files\Java\jre1.8.0_151\lib\ext\sunmscapi.jar
    <default> (not open)
    sun.security (not open)
    sun (not open)
    sun.security.mscapi (not open)
  C:\Program Files\Java\jre1.8.0_151\lib\ext\sunpkcs11.jar
    <default> (not open)
    sun.security (not open)
    sun.security.pkcs11.wrapper (not open)
    sun (not open)
    sun.security.pkcs11 (not open)
  C:\Program Files\Java\jre1.8.0_151\lib\ext\zipfs.jar
    <default> (not open)
    com.sun (not open)
    com.sun.nio (not open)
    com (not open)
    com.sun.nio.zipfs (not open)
khatchad commented 6 years ago

This seems to be problems with your local configuration and nothing fundamentally having to do with the projects themselves.

yiming-tang-cs commented 6 years ago

1.1 elasticsearch Windows does not allow the file name containing ":". I will use my another computer to test it.

1.2 JabRef The developer set the name of root project. After I deleted setting, it can be imported.

No idea for 2 and 3 now.

yiming-tang-cs commented 6 years ago

Now, I can get a NPE with description.

!ENTRY org.eclipse.jdt.ui 4 10001 2018-01-13 18:11:05.880
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException
    at edu.cuny.hunter.streamrefactoring.core.analysis.StreamAnalyzer.visit(StreamAnalyzer.java:180)
    at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2844)
    at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:190)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2844)
    at org.eclipse.jdt.core.dom.LambdaExpression.accept0(LambdaExpression.java:212)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:239)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2844)
    at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:145)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2844)
    at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:191)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2844)
    at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2867)
    at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:257)
    at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2796)
    at edu.cuny.hunter.streamrefactoring.core.refactorings.ConvertToParallelStreamRefactoringProcessor.checkFinalConditions(ConvertToParallelStreamRefactoringProcessor.java:191)
    at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:222)
    at org.eclipse.ltk.core.refactoring.Refactoring.checkAllConditions(Refactoring.java:162)
    at edu.cuny.hunter.streamrefactoring.eval.handlers.EvaluateConvertToParallelStreamRefactoringHandler.lambda$0(EvaluateConvertToParallelStreamRefactoringHandler.java:167)
    at org.eclipse.core.runtime.jobs.Job$1.run(Job.java:161)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
yiming-tang-cs commented 6 years ago

For some projects, NPE disappears.

For performance-tests of eclipse-collections, I got an another exception:

!ENTRY org.eclipse.jdt.ui 4 10001 2018-01-14 16:10:40.717
!MESSAGE Internal Error
!STACK 0
java.lang.IllegalArgumentException: root does not exist \performance-tests\target\classes
    at com.ibm.wala.classLoader.DirectoryTreeModule.<init>(DirectoryTreeModule.java:35)
    at com.ibm.wala.classLoader.BinaryDirectoryTreeModule.<init>(BinaryDirectoryTreeModule.java:25)
    at com.ibm.wala.ide.util.EclipseProjectPath.resolveSourcePathEntry(EclipseProjectPath.java:170)
    at com.ibm.wala.ide.util.JavaEclipseProjectPath.resolveClasspathEntry(JavaEclipseProjectPath.java:83)
    at com.ibm.wala.ide.util.JavaEclipseProjectPath.resolveClasspathEntry(JavaEclipseProjectPath.java:1)
    at com.ibm.wala.ide.util.EclipseProjectPath.resolveClasspathEntries(EclipseProjectPath.java:292)
    at com.ibm.wala.ide.util.JavaEclipseProjectPath.resolveProjectClasspathEntries(JavaEclipseProjectPath.java:112)
    at com.ibm.wala.ide.util.JavaEclipseProjectPath.resolveProjectClasspathEntries(JavaEclipseProjectPath.java:1)
    at com.ibm.wala.ide.util.EclipseProjectPath.create(EclipseProjectPath.java:136)
    at edu.cuny.hunter.streamrefactoring.core.wala.TestableJavaEclipseProjectPath.create(TestableJavaEclipseProjectPath.java:61)
    at edu.cuny.hunter.streamrefactoring.core.wala.EclipseProjectAnalysisEngine.createProjectPath(EclipseProjectAnalysisEngine.java:119)
    at edu.cuny.hunter.streamrefactoring.core.wala.EclipseProjectAnalysisEngine.buildAnalysisScope(EclipseProjectAnalysisEngine.java:67)
    at edu.cuny.hunter.streamrefactoring.core.analysis.StreamAnalyzer.analyze(StreamAnalyzer.java:104)
    at edu.cuny.hunter.streamrefactoring.core.refactorings.ConvertToParallelStreamRefactoringProcessor.checkFinalConditions(ConvertToParallelStreamRefactoringProcessor.java:198)
    at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:222)
    at org.eclipse.ltk.core.refactoring.Refactoring.checkAllConditions(Refactoring.java:162)
    at edu.cuny.hunter.streamrefactoring.eval.handlers.EvaluateConvertToParallelStreamRefactoringHandler.lambda$0(EvaluateConvertToParallelStreamRefactoringHandler.java:167)
    at org.eclipse.core.runtime.jobs.Job$1.run(Job.java:161)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

The result file: https://docs.google.com/spreadsheets/d/1HTKcgdNXjBeVBazN8_bPh7711CjKubRpM0m2WF5X994/edit?usp=sharing