52
Failure-Preventing Recommendations Adrian Schröter

Candidacy

Embed Size (px)

DESCRIPTION

This are the original slides that I used during my candidacy, I need to modify them for the ICSE doctoral symposium 2010, any feed back is as always more than welcome.

Citation preview

Page 1: Candidacy

Failure-Preventing Recommendations

Adrian Schröter

Page 2: Candidacy
Page 3: Candidacy

The Problem

Page 4: Candidacy

Why is it a Problem?

http://www.nist.gov/public_affairs/releases/n02-10.htm

The US economy lost in 2002

60 billion dollar due to software defects

Page 5: Candidacy

What has been done, so far ...

Page 6: Candidacy

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

Page 7: Candidacy

A.java

size

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

T. L. Graves, A. F. Karr, J. S. Marron, and H. P. Siy. Predicting fault incidence using software change history. IEEE Transactions on Software Engineering, 26(7):653–661, 2000.

Page 8: Candidacy

A.java

complexity

size

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

T. L. Graves, A. F. Karr, J. S. Marron, and H. P. Siy. Predicting fault incidence using software change history. IEEE Transactions on Software Engineering, 26(7):653–661, 2000.

Page 9: Candidacy

A.java

#developers

complexity

size

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

E. Weyuker, T. Ostrand and R. Bell. Do too many cooks spoil the broth? Using the number of developers to enhance defect prediction models. In Journal Empirical Software Engineering, pages 539–559, 2008.

Page 10: Candidacy

A.java

#developers

#changescomplexity

size

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

N. Nagappan and T. Ball. Use of Relative Code Churn Measures to Predict System Defect Density. In Proceedings of the 27th International Conference on Software Engineering, pages 284–292, 2005.

Page 11: Candidacy

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

dev + code

complexity

#developers

#changes

C. Bird, N. Nagappan, H. Gall, B. Murphy and P. Devanbu. Putting It All Together: Using Socio-technical Networks to Predict Failures. In Proceedings of the 20th International Symposium on Software Reliability Engineering, pages 109–119, 2009.

Page 12: Candidacy

A.java

dependency

dev + code

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

#developers

#changes

T. Zimmermann and N. Nagappan. Predicting defects using network analysis on dependency graphs. In Proceedings of the 30th International Conference on Software Engineering, pages 531–540, 2008.

Page 13: Candidacy

A.java

dependency

social-netsdev + code

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

#changes

A. Meneely, L. Williams, W. Snipes and J. Osborne. Predicting failures with developer networks and social network analysis. In Proceedings of the 16th International Symposium on Foundations of Software Engineering, pages 13–23, 2008.

Page 14: Candidacy

A.java

dependency

social-nets

entropy

dev + code

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;

import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;

import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;

import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;

import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange {

private String kind = null; private String changeSetId = null;

//private InputStream beforeFile = null;

private IFileItemHandle beforeFile = null; private String beforeName = null;

private String beforeFolder = null;

//private InputStream afterFile = null; private IFileItemHandle afterFile = null;

private String afterName = null; private String afterFolder = null;

//private String filename = null;

//private String folder = null;

private boolean isFile = true;

private HashMap<Integer,String> kindMap = new HashMap<Integer,String>();

private Instances instances = null;

public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances;

this.kindMap.put(new Integer(IChange.ADD), "ADD");

this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY");

this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME");

this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT");

if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances);

this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle)

change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle)

change.beforeState(), instances);

//this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState();

this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances);

this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances);

//this.filename = this.extractFileName((IFileItemHandle)

change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(),

instances);

this.isFile = true; }

if (change.item().getItemType().equals(IFolder.ITEM_TYPE)) {

this.beforeFolder = this.extractFolder((IFolderHandle) change.beforeState(), instances);

this.afterFolder = this.extractFolder((IFolderHandle) change.afterState(), instances);

//this.folder = this.extractFolder((IFolderHandle) change.item(), instances);

this.isFile = false; }

this.changeSetId = changeSetId;

this.kind = this.kindMap.get(change.kind()); }

public String extractFileName(IFileItemHandle fileHandle, Instances instances) throws TeamRepositoryException {

if (fileHandle != null && fileHandle.getStateId() != null) { IFileItem fileItem = (IFileItem)

instances.workspaceManager.versionableManager().fetchCompleteState( fileHandle, instances.iProgressMonitor);

return fileItem.getName(); }

return null;

}

public String extractFolder(IFolderHandle _folderHandle, Instances instances) throws TeamRepositoryException { if (_folderHandle != null) {

IFolderHandle folderHandle = _folderHandle; String folderName = "";

while (folderHandle != null && folderHandle.getStateId() != null) {

IFolder folder = (IFolder) instances.workspaceManager.versionableManager().fetchCompleteState( folderHandle, instances.iProgressMonitor);

folderName = folder.getName() + "/" + folderName;

folderHandle = folder.getParent();

}

return folderName.equals("") ? null : folderName; }

return null;

A. Hassan. Predicting faults using the complexity of code changes. In Proceedings of the 31th International Conference on Software Engineering, pages 78–88, 2009.

Page 15: Candidacy

Change

Page 16: Candidacy

Change

size

A. Mockus and D. Weiss. Predicting risk of software changes. In Bell Labs Technical Journal, Volume 5 Issue 2, pages 169-180, 2002.

Page 17: Candidacy

Changelocation

size

J. Śliwerski, T. Zimmerann and A. Zeller. HATARI: raising risk awareness. In Proceedings of the 13th International Symposium on Foundations of Software Engineering, pages 107–110, 2005.

Page 18: Candidacy

Changecomplexity

impactsize

A. Mockus and D. Weiss. Predicting risk of software changes. In Bell Labs Technical Journal, Volume 5 Issue 2, pages 169-180, 2002.

Page 19: Candidacy

Changecomplexity

impact

bursts

size

S. Kim, T. Zimmermann, J. Whitehead and A. Zeller. Predicting Faults from Cached History. In Proceedings of the 29th International Conference on Software Engineering, pages 489–498, 2007.

Page 20: Candidacy

What is the Cause?

Emerging Theory:“A major source for software

failures in software developed by

teams is miscoordination.”

Page 21: Candidacy

What is missing?

Insights Developers can act upon.

Page 22: Candidacy

What Can We Do?

Hypothesis:“The Relation between Social and Technical Dimensions in Software

Development can be used to Create Failure-Preventing Recommendations.”

Page 23: Candidacy

Two Steps

Gather EmpiricalEvidence

PracticalImplementation

Page 24: Candidacy

Two Steps

Gather EmpiricalEvidence

PracticalImplementation

Page 25: Candidacy

Change

Page 26: Candidacy

Change

owns

Page 27: Candidacy

Change

owns

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

B.java

affects affectspackage ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

Page 28: Candidacy

Change

owns

owns owns

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

B.java

affects affectspackage ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

Page 29: Candidacy

Change

Dependent Dependentowns

owns owns

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

B.java

affects affectspackage ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

Page 30: Candidacy

Change

Dependent DependentTalke

d about Change

owns

owns owns

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

B.java

affects affectspackage ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

Page 31: Candidacy

Change

Dependent DependentTalke

d about Change

owns

owns owns

A.java

package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

B.java

affects affectspackage ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes;

import java.io.InputStream;import java.util.HashMap;

import ca.uvic.segal.jazz.extraction.datastructures.Instances;

import com.ibm.team.filesystem.common.IFileItem;import com.ibm.team.filesystem.common.IFileItemHandle;import com.ibm.team.repository.common.IContent;import com.ibm.team.repository.common.TeamRepositoryException;import com.ibm.team.scm.common.IChange;import com.ibm.team.scm.common.IFolder;import com.ibm.team.scm.common.IFolderHandle;import com.ibm.team.scm.common.IVersionableHandle;

public class SimpleChange { private String kind = null; private String changeSetId = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeFolder = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterFolder = null; //private String filename = null; //private String folder = null; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances);

} return null;

Page 32: Candidacy

Dependent DependentTalke

d about Change

Page 33: Candidacy

Analysis

Fix Inducing None Fix Inducing

Page 34: Candidacy

Analysis

Fix Inducing None Fix Inducing

Page 35: Candidacy

Analysis

Fix Inducing None Fix Inducing

The difference is they didn’t talk

Page 36: Candidacy

Triangulation

Fix Inducing Fix

Page 37: Candidacy

Triangulation

Fix Inducing Fix

Fix addressed the dependency

Page 38: Candidacy

Evaluation

open source closed source

Page 39: Candidacy

Two Steps

Gather EmpiricalEvidence

PracticalImplementation

Page 40: Candidacy

Implementation

Rational Team Concert plug-in

Page 41: Candidacy

Evaluation

Interviews

Page 42: Candidacy

Evaluation

Interviews Case Study

Page 43: Candidacy

Evaluation

Interviews

Talk about the general approach.

Triangulate found patterns.

Interview IBM Jazz development Team.

Page 44: Candidacy

Evaluation

Case Study

Work together with the Jazz Team.

Study usage of the deployed plug-in.

Observe if the plug-in prevented failures.

Page 45: Candidacy

Time Line

2010 2011

1

Jazz Data Extraction

Page 46: Candidacy

Time Line

2010 2011

1

Socio-Technical Nets

4

Page 47: Candidacy

Time Line

2010 2011

1

4

Analysis

2

Page 48: Candidacy

Time Line

2010 2011

1

4

2

Replication

3

Page 49: Candidacy

Application

Time Line

2010 2011

1

4

2

3

6

Page 50: Candidacy

Time Line

2010 2011

1

4

2

3

6

Write Up

2

Page 51: Candidacy

Time Line

2010 2011

Write Up

2

Socio-Technical Nets

Jazz Data Extraction

1

Analysis

2

Replication

3

Application

6

4

Page 52: Candidacy

Time Line

2010 2011

Write Up

2

Socio-Technical Nets

Jazz Data Extraction

1

Analysis

2

Replication

3

Application

6

4