Failure-Preventing Recommendations
Adrian Schröter
The Problem
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
What has been done, so far ...
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;
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.
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.
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.
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.
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.
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.
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.
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.
Change
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.
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.
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.
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.
What is the Cause?
Emerging Theory:“A major source for software
failures in software developed by
teams is miscoordination.”
What is missing?
Insights Developers can act upon.
What Can We Do?
Hypothesis:“The Relation between Social and Technical Dimensions in Software
Development can be used to Create Failure-Preventing Recommendations.”
Two Steps
Gather EmpiricalEvidence
PracticalImplementation
Two Steps
Gather EmpiricalEvidence
PracticalImplementation
Change
Change
owns
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;
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;
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;
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;
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;
Dependent DependentTalke
d about Change
Analysis
Fix Inducing None Fix Inducing
Analysis
Fix Inducing None Fix Inducing
Analysis
Fix Inducing None Fix Inducing
The difference is they didn’t talk
Triangulation
Fix Inducing Fix
Triangulation
Fix Inducing Fix
Fix addressed the dependency
Evaluation
open source closed source
Two Steps
Gather EmpiricalEvidence
PracticalImplementation
Implementation
Rational Team Concert plug-in
Evaluation
Interviews
Evaluation
Interviews Case Study
Evaluation
Interviews
Talk about the general approach.
Triangulate found patterns.
Interview IBM Jazz development Team.
Evaluation
Case Study
Work together with the Jazz Team.
Study usage of the deployed plug-in.
Observe if the plug-in prevented failures.
Time Line
2010 2011
1
Jazz Data Extraction
Time Line
2010 2011
1
Socio-Technical Nets
4
Time Line
2010 2011
1
4
Analysis
2
Time Line
2010 2011
1
4
2
Replication
3
Application
Time Line
2010 2011
1
4
2
3
6
Time Line
2010 2011
1
4
2
3
6
Write Up
2
Time Line
2010 2011
Write Up
2
Socio-Technical Nets
Jazz Data Extraction
1
Analysis
2
Replication
3
Application
6
4
Time Line
2010 2011
Write Up
2
Socio-Technical Nets
Jazz Data Extraction
1
Analysis
2
Replication
3
Application
6
4