Getting Started

Getting Started with SemDiff

This tutorial will guide you through the steps of analyzing the history of an Eclipse project, org.eclipse.jdt.junit4.runtime. We will assume the following directory structure:

  • /home/myuser/semdiff/db -> This is the directory that will contain SemDiff's database.
  • /home/myuser/semdiff/junit/log -> This is the directory that will contain the eclipse project cvs log.
  • /home/myuser/semdiff/junit/source -> This is the directory that will contain the eclipse project source file.

Note to Windows users: you can replace all paths by C:\your_path. For example, C:\semdiff\db is a valid path for Windows./

Overview

  1. Initialize SemDiff database so it has the right structure.
  2. Define a local profile to tell SemDiff to perform the analysis on your machine (as opposed to communicating with a remote instance).
  3. Create a repository to indicate to SemDiff where to find project versions information.
  4. Retrieve repository history log.
  5. Analyze the first 10 transactions.

Steps

  1. Install SemDiff

  2. In the SemDiff menu, select "Init Database". Enter the following information:
    1. Username: sa
    2. Password: <Leave it empty>
    3. Connection String: jdbc:hsqldb:file:/home/myuser/semdiff/db/hsql;hsqldb.default_table_type=cached
    4. Driver: Choose "org.hsqldb.jdbcDriver"
    5. Dialect: Choose "org.hibernate.dialect.HSQLDialect"

  3. Push on OK. A dialog should appear telling you that the initialization went well.

  4. Open the repository view. Go to Window -> Show View -> Other... -> SemDiff -> SemDiff Repositories

  5. In the SemDiff Repositories view, click on the "Manage Profiles" button. Push on Add Profile.

  6. A dialog will appear, select "Local Profile", then Next >. Enter the following values:
    1. Name: My Local Profile
    2. Username: sa
    3. Password: <Leave it empty>
    4. Connection String: jdbc:hsqldb:file:/home/myuser/semdiff/db/hsql
    5. Driver: Choose "org.hsqldb.jdbcDriver"
    6. Dialect: Choose "org.hibernate.dialect.HSQLDialect"
    7. Local director: <Leave it empty>
    8. Same as Repository: <Checked>

  7. Push on Finish, then OK.

  8. Your profile should appear in the SemDiff Repositories View. Push on the "Add Repository" button (the green cross). A dialog should appear.

  9. Select the CVS repository type, push Next >. Enter the following values:
    1. Name: Eclipse JUnit 4 Runtime
    2. Description: Eclipse JUnit 4 Runtime
    3. Log directory: /home/myuser/semdiff/junit/log
    4. Server directory: /home/myuser/semdiff/junit/source
    5. Repository connection string: :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
    6. Repository paths: org.eclipse.jdt.junit4.runtime
    7. Date format: yyyy-MM-dd hh:mm:ss Z <The default value already entered>

  10. Push on Finish. Select the new repository, Eclipse JUnit4 Runtime, and activate it (the green circle button, or right-click on the repository and select "Set Active Repository").

  11. Select the menu SemDiff -> CVS Repository -> Generate RLog. Wait until it is completed.

  12. Select the menu SemDiff -> Run Detectors. A dialog will appear. Enter 0:10 and then push OK.

  13. Open the Transactions view. Go to Window -> Show View -> Other... -> SemDiff -> Transactions

  14. Push on the Goto transaction button (the yellow arrow) and enter 6.

  15. You can now see information about the transaction 6. You can also right click on any item to see the source of the versions of the file.

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.