- Timestamp:
- 07/18/16 12:26:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/loader/AUDIChangeLoader.java
r86 r135 28 28 29 29 /** 30 * TODO 30 * <p> 31 * Loads data from the automative defect data set from Audi Electronic Ventures donated by Altinger 32 * et al. at the MSR 2015. This loader contains the changes per commit, i.e., it is for JIT defect 33 * prediction. 34 * </p> 31 35 * 32 * @author sherbold 33 * 36 * @author Steffen Herbold 34 37 */ 35 38 class AUDIChangeLoader implements SingleVersionLoader { 36 39 40 /** 41 * <p> 42 * Internal helper class. 43 * </p> 44 * 45 * @author Steffen Herbold 46 */ 37 47 private class EntityRevisionPair implements Comparable<EntityRevisionPair> { 48 49 /** 50 * string that defines an entity 51 */ 38 52 private final String entity; 53 54 /** 55 * revision number of the entity 56 */ 39 57 private final int revision; 40 58 59 /** 60 * <p> 61 * Constructor. Creates a new EntityRevisionPair. 62 * </p> 63 * 64 * @param entity 65 * the entity 66 * @param revision 67 * the revision 68 */ 41 69 public EntityRevisionPair(String entity, int revision) { 42 70 this.entity = entity; … … 44 72 } 45 73 74 /* 75 * (non-Javadoc) 76 * 77 * @see java.lang.Object#equals(java.lang.Object) 78 */ 46 79 @Override 47 80 public boolean equals(Object other) { … … 54 87 } 55 88 89 /* 90 * (non-Javadoc) 91 * 92 * @see java.lang.Object#hashCode() 93 */ 56 94 @Override 57 95 public int hashCode() { … … 59 97 } 60 98 99 /* 100 * (non-Javadoc) 101 * 102 * @see java.lang.Comparable#compareTo(java.lang.Object) 103 */ 61 104 @Override 62 105 public int compareTo(EntityRevisionPair other) { … … 68 111 } 69 112 113 /* 114 * (non-Javadoc) 115 * 116 * @see java.lang.Object#toString() 117 */ 70 118 @Override 71 119 public String toString() { … … 74 122 } 75 123 124 /* 125 * (non-Javadoc) 126 * 127 * @see de.ugoe.cs.cpdp.loader.SingleVersionLoader#load(java.io.File) 128 */ 76 129 @Override 77 130 public Instances load(File file) { … … 139 192 for (int i = 1; i < linesBug.length; i++) { 140 193 lineSplitBug = linesBug[i].split(";"); 141 entityRevisionPairs.put(new EntityRevisionPair(lineSplitBug[0], Integer 142 .parseInt(lineSplitBug[revisionIndex])), i); 194 entityRevisionPairs.put( 195 new EntityRevisionPair(lineSplitBug[0], 196 Integer 197 .parseInt(lineSplitBug[revisionIndex])), 198 i); 143 199 } 144 200
Note: See TracChangeset
for help on using the changeset viewer.