Skip to content

Error on testcontainers-java #9

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

Open
Ivan-Veselov opened this issue Aug 27, 2018 · 4 comments
Open

Error on testcontainers-java #9

Ivan-Veselov opened this issue Aug 27, 2018 · 4 comments
Labels
bug Something isn't working RefactoringDetectionTools

Comments

@Ivan-Veselov
Copy link
Contributor

https://github.com/testcontainers/testcontainers-java

ERROR [org.jetbrains.research.groups.ml_methods.refactoring.detection.DefaultBranchesDetectionTool.detect] - Error occurred during refactoring detection for repository: https://github.com/testcontainers/testcontainers-java.git
java.lang.RuntimeException: org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files: 
gradle/wrapper/gradle-wrapper.jar
	at org.refactoringminer.api.RefactoringHandler.handleException(RefactoringHandler.java:50)
	at org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl.detect(GitHistoryRefactoringMinerImpl.java:102)
	at org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl.detectAll(GitHistoryRefactoringMinerImpl.java:280)
	at org.jetbrains.research.groups.ml_methods.refactoring.detection.RMiner.detect(RMiner.java:52)
	at org.jetbrains.research.groups.ml_methods.refactoring.detection.DefaultBranchesDetectionTool.detect(DefaultBranchesDetectionTool.java:43)
	at org.jetbrains.research.groups.ml_methods.refactoring.detection.RefactoringDetectionApplication.run(RefactoringDetectionApplication.java:63)
	at org.jetbrains.research.groups.ml_methods.refactoring.detection.RefactoringDetectionApplication.main(RefactoringDetectionApplication.java:23)
Caused by: org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files: 
gradle/wrapper/gradle-wrapper.jar
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:276)
	at org.refactoringminer.util.GitServiceImpl.checkout(GitServiceImpl.java:120)
	at org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl.detectRefactorings(GitHistoryRefactoringMinerImpl.java:130)
	at org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl.detect(GitHistoryRefactoringMinerImpl.java:97)
	... 5 more
Caused by: org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with files: 
gradle/wrapper/gradle-wrapper.jar
	at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:467)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:449)
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:272)
	... 8 more
@Ivan-Veselov Ivan-Veselov added bug Something isn't working RefactoringDetectionTools labels Aug 27, 2018
@Ivan-Veselov Ivan-Veselov self-assigned this Aug 27, 2018
@Ivan-Veselov
Copy link
Contributor Author

Problem 1: RefactoringHandler in RMiner.java should override handleException to log exception occurred during commit processing and skip this commit. Currently in case of a commit failure the whole session is stopped.

@Ivan-Veselov
Copy link
Contributor Author

Problem 2: cloneIfNotExists uses old repository from a previous run. For us it's better to clone repository from scratch, us we don't plan to process one repository very often.
In my case old repository had a checkout conflict from a previous run and it was impossible to reproduce error without manually deleting this project from /tmp directory.

@Ivan-Veselov
Copy link
Contributor Author

Ivan-Veselov commented Aug 27, 2018

The actual error happens during checkout on testcontainers/testcontainers-java@fe62ccf

gradle/wrapper/gradle-wrapper.jar becomes modified and does not allow to checkout on another commit.

@Ivan-Veselov
Copy link
Contributor Author

Probably it's somehow connected with .gitattributes file. May be git tries to replace EOLs in .jar file.

@Ivan-Veselov Ivan-Veselov removed their assignment Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working RefactoringDetectionTools
Projects
None yet
Development

No branches or pull requests

1 participant