Failure-Preventing
Recommendations
                 Adrian
               Schröter

             Dr. Daniela
                 Damian
Motivation

  The US economy lost in 2002
    60 billion dollar
   due to software defects




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

Hypothesis:
     “The Relation between Social and
     Technical Dimensions in Software
    Development can be used to Create
   Failure-Preventing Recommendations.”
Approach



  Change
Approach

     owns


  Change
Approach

                                                                                                                              owns


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

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

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

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

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

	                                                                                                                                             	
	                  }                                                                                                                          	                  }
	                                                                                                                                             	
	                  return null;                                                                                                               	                  return null;




A.java                                                                                                                                        B.java
Approach

                                                                                                                                     owns

owns                                                                                                                              Change                                                                                                                              owns

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

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

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

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

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

       	                                                                                                                                             	
       	                  }                                                                                                                          	                  }
       	                                                                                                                                             	
       	                  return null;                                                                                                               	                  return null;




       A.java                                                                                                                                        B.java
Approach

                                                                                                                               de nt            De
                                                                                                                                                   pen
                                                                                                                          p en                            den
                                                                                                                        De                owns               t

owns                                                                                                                                   Change                                                                                                                                     owns

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

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

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

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

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

       	                                                                                                                                                         	
       	                  }                                                                                                                                      	                  }
       	                                                                                                                                                         	
       	                  return null;                                                                                                                           	                  return null;




       A.java                                                                                                                                               B.java
Approach
                                                                                                                                   ange
                                                                                                                                  h
                                                                                                                          ou tC
                                                                                                 d ab
          lke                                                                                                                   de nt            De
                                                                                                                                                    pen
       Ta                                                                                                                  p en                            den
                                                                                                                         De                owns               t

owns                                                                                                                                    Change                                                                                                                                     owns

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

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

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

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

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

        	                                                                                                                                                         	
        	                  }                                                                                                                                      	                  }
        	                                                                                                                                                         	
        	                  return null;                                                                                                                           	                  return null;




       A.java                                                                                                                                                B.java
Approach
                                                                                                                                   ange
                                                                                                                                  h
                                                                                                                          ou tC
                                                                                                 d ab
          lke                                                                                                                   de nt            De
                                                                                                                                                    pen
       Ta                                                                                                                  p en                            den
                                                                                                                         De                owns               t

owns                                                                                                                                    Change                                                                                                                                     owns

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

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

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

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

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

        	                                                                                                                                                         	
        	                  }                                                                                                                                      	                  }
        	                                                                                                                                                         	
        	                  return null;                                                                                                                           	                  return null;




       A.java                                                                                                                                                B.java
Evaluation


Fix Inducing      None Fix Inducing
Evaluation


Fix Inducing      None Fix Inducing
Evaluation


Fix Inducing                  None Fix Inducing




                 The difference
               is they didn’t talk
Evaluation


Fix Inducing                    Fix




                Fix addressed
               the dependency
Future Contributions

• modeling the coordination around changes
• a tool set to extract change centric socio-
  technical networks
• create actionable knowledge to guide
  developers

Failure-Preventing Recommendations

  • 1.
    Failure-Preventing Recommendations Adrian Schröter Dr. Daniela Damian
  • 2.
    Motivation TheUS economy lost in 2002 60 billion dollar due to software defects http://www.nist.gov/public_affairs/releases/n02-10.htm
  • 3.
    Research Hypothesis Hypothesis: “The Relation between Social and Technical Dimensions in Software Development can be used to Create Failure-Preventing Recommendations.”
  • 4.
  • 5.
    Approach owns Change
  • 6.
    Approach owns Change affects affects package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; import java.io.InputStream; import java.io.InputStream; import java.util.HashMap; import java.util.HashMap; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IVersionableHandle; import com.ibm.team.scm.common.IVersionableHandle; public class SimpleChange { public class SimpleChange { private String kind = null; private String kind = null; private String changeSetId = null; private String changeSetId = null; //private InputStream beforeFile = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeName = null; private String beforeFolder = null; private String beforeFolder = null; //private InputStream afterFile = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterName = null; private String afterFolder = null; private String afterFolder = null; //private String filename = null; //private String filename = null; //private String folder = null; //private String folder = null; private boolean isFile = true; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { TeamRepositoryException { this.instances = instances; this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); } } return null; return null; A.java B.java
  • 7.
    Approach owns owns Change owns affects affects package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; import java.io.InputStream; import java.io.InputStream; import java.util.HashMap; import java.util.HashMap; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IVersionableHandle; import com.ibm.team.scm.common.IVersionableHandle; public class SimpleChange { public class SimpleChange { private String kind = null; private String kind = null; private String changeSetId = null; private String changeSetId = null; //private InputStream beforeFile = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeName = null; private String beforeFolder = null; private String beforeFolder = null; //private InputStream afterFile = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterName = null; private String afterFolder = null; private String afterFolder = null; //private String filename = null; //private String filename = null; //private String folder = null; //private String folder = null; private boolean isFile = true; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { TeamRepositoryException { this.instances = instances; this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); } } return null; return null; A.java B.java
  • 8.
    Approach de nt De pen p en den De owns t owns Change owns affects affects package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; import java.io.InputStream; import java.io.InputStream; import java.util.HashMap; import java.util.HashMap; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IVersionableHandle; import com.ibm.team.scm.common.IVersionableHandle; public class SimpleChange { public class SimpleChange { private String kind = null; private String kind = null; private String changeSetId = null; private String changeSetId = null; //private InputStream beforeFile = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeName = null; private String beforeFolder = null; private String beforeFolder = null; //private InputStream afterFile = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterName = null; private String afterFolder = null; private String afterFolder = null; //private String filename = null; //private String filename = null; //private String folder = null; //private String folder = null; private boolean isFile = true; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { TeamRepositoryException { this.instances = instances; this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); } } return null; return null; A.java B.java
  • 9.
    Approach ange h ou tC d ab lke de nt De pen Ta p en den De owns t owns Change owns affects affects package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; import java.io.InputStream; import java.io.InputStream; import java.util.HashMap; import java.util.HashMap; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IVersionableHandle; import com.ibm.team.scm.common.IVersionableHandle; public class SimpleChange { public class SimpleChange { private String kind = null; private String kind = null; private String changeSetId = null; private String changeSetId = null; //private InputStream beforeFile = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeName = null; private String beforeFolder = null; private String beforeFolder = null; //private InputStream afterFile = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterName = null; private String afterFolder = null; private String afterFolder = null; //private String filename = null; //private String filename = null; //private String folder = null; //private String folder = null; private boolean isFile = true; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { TeamRepositoryException { this.instances = instances; this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); } } return null; return null; A.java B.java
  • 10.
    Approach ange h ou tC d ab lke de nt De pen Ta p en den De owns t owns Change owns affects affects package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; package ca.uvic.segal.jazz.extraction.datastructures.artifacts.changes; import java.io.InputStream; import java.io.InputStream; import java.util.HashMap; import java.util.HashMap; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import ca.uvic.segal.jazz.extraction.datastructures.Instances; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItem; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.filesystem.common.IFileItemHandle; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.IContent; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IChange; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolder; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IFolderHandle; import com.ibm.team.scm.common.IVersionableHandle; import com.ibm.team.scm.common.IVersionableHandle; public class SimpleChange { public class SimpleChange { private String kind = null; private String kind = null; private String changeSetId = null; private String changeSetId = null; //private InputStream beforeFile = null; //private InputStream beforeFile = null; private IFileItemHandle beforeFile = null; private IFileItemHandle beforeFile = null; private String beforeName = null; private String beforeName = null; private String beforeFolder = null; private String beforeFolder = null; //private InputStream afterFile = null; //private InputStream afterFile = null; private IFileItemHandle afterFile = null; private IFileItemHandle afterFile = null; private String afterName = null; private String afterName = null; private String afterFolder = null; private String afterFolder = null; //private String filename = null; //private String filename = null; //private String folder = null; //private String folder = null; private boolean isFile = true; private boolean isFile = true; private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private HashMap<Integer,String> kindMap = new HashMap<Integer,String>(); private Instances instances = null; private Instances instances = null; public SimpleChange(IChange change, String changeSetId, Instances instances) throws public SimpleChange(IChange change, String changeSetId, Instances instances) throws TeamRepositoryException { TeamRepositoryException { this.instances = instances; this.instances = instances; this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.ADD), "ADD"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.DELETE), "DELETE"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.MODIFY), "MODIFY"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.NONE), "NONE"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.RENAME), "RENAME"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); this.kindMap.put(new Integer(IChange.REPARENT), "REPARENT"); if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { if (change.item().getItemType().equals(IFileItem.ITEM_TYPE)) { //this.beforeFile = this.getFile(change.beforeState(), instances); //this.beforeFile = this.getFile(change.beforeState(), instances); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFile = (IFileItemHandle) change.beforeState(); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeFolder = this.extractFolder((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); this.beforeName = this.extractFileName((IFileItemHandle) change.beforeState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); //this.afterFile = this.getFile(change.afterState(), instances); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFile = (IFileItemHandle) change.afterState(); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterFolder = this.extractFolder((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); this.afterName = this.extractFileName((IFileItemHandle) change.afterState(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.filename = this.extractFileName((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); //this.folder = this.extractFolder((IFileItemHandle) change.item(), instances); } } return null; return null; A.java B.java
  • 11.
    Evaluation Fix Inducing None Fix Inducing
  • 12.
    Evaluation Fix Inducing None Fix Inducing
  • 13.
    Evaluation Fix Inducing None Fix Inducing The difference is they didn’t talk
  • 14.
    Evaluation Fix Inducing Fix Fix addressed the dependency
  • 15.
    Future Contributions • modelingthe coordination around changes • a tool set to extract change centric socio- technical networks • create actionable knowledge to guide developers