Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run CloneWorks from other directory after change INSTALL_DIR #4

Open
Xiaoven opened this issue Nov 7, 2023 · 0 comments
Open

Comments

@Xiaoven
Copy link

Xiaoven commented Nov 7, 2023

The path of CloneWorks on my computer is /home/USER_NAME/opt/CloneWorks.

OS: Ubuntu 18.04

With the default config where INSTALL_DIR=., the example test works ok.

Problematic config

Then I set INSTALL_DIR=/home/USER_NAME/opt/CloneWorks, and add export PATH="/home/USER_NAME/opt/CloneWorks/cwbuild:$PATH" to ~/.zshrc.

Failure

I tried cwbuild -i sources -f sources/files -b sources/blocks -l java -g function -c type3line > cwbuild.log in another directory, but I got the following errors (Exception: Broken pipe and Exception: Stream closed ):

CloneWorks Version 1.0

Input Builder

System=/home/USER_NAME/MyDir/sources
FileIDs=/home/USER_NAME/MyDir/sources/files
Blocks=/home/USER_NAME/MyDir/sources/blocks
Configuration=type3line
Languages=java,
Granularity=function
TokenType=line

Parsing....

	Failed for file: InputFile [id=40, path=sources/ProjectA/projectA.callgraph/target/test-classes/callgraph/NonVirtualCall/source/NVC1.java].  Exception: Broken pipe
	Failed for file: InputFile [id=80, path=sources/ProjectA/projectA.callgraph/src/test/resources/callgraph/NonVirtualCall/source/NVC2.java].
	Failed for file: InputFile [id=0, path=sources/ProjectA/projectA.examples/target/test-classes/ClassHierarchy/source/D.java].  Exception: Broken pipe
	Failed for file: InputFile [id=220, path=sources/ProjectA/projectA.tests/src/test/resources/methoddispatchresolver/AbstractDispatch/B.java].  Exception: Stream closed
	...

Additional Info for debug

I log INSTALL_DIR and LIBS in cwbuild.

With the default setting, their values are:

INSTALL_DIR is  .
LIBS is  ./bin/:./libs/commons-lang3-3.4/commons-lang3-3.4.jar:./libs/commons-exec-1.3/commons-exec-1.3.jar:./libs/commons-cli-1.3.1/commons-cli-1.3.1.jar:./libs/commons-io-2.4/commons-io-2.4.jar
"./cfprocessors/txl_normalization" "r" "." "java" "function" extract

After modification, they are:

INSTALL_DIR is  /home/USER_NAME/opt/CloneWorks
LIBS is  /home/USER_NAME/opt/CloneWorks/bin/:/home/USER_NAME/opt/CloneWorks/libs/commons-lang3-3.4/commons-lang3-3.4.jar:/home/USER_NAME/opt/CloneWorks/libs/commons-exec-1.3/commons-exec-1.3.jar:/home/USER_NAME/opt/CloneWorks/libs/commons-cli-1.3.1/commons-cli-1.3.1.jar:/home/USER_NAME/opt/CloneWorks/libs/commons-io-2.4/commons-io-2.4.jar
"/home/USER_NAME/opt/CloneWorks/cfprocessors/txl_normalization" "r" "/home/USER_NAME/opt/CloneWorks" "java" "function" extract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant