Known Type Changes

List of type changes and the known reasons for performing them (from literature and developer documentation)

Type From Type To # Projects # Commits # Instances Known Reasons
int long 75 623 4600 Primitive Widening
int double 22 47 115 Primitive Widening
java.util.List java.util.Set 68 281 742 Different Properties
java.util.LinkedList java.util.DeQue 8 8 19 Different Properties
java.util.ArrayList java.util.List 52 152 560 Use Supertype When Possible (Effective Java)
java.util.HashMap java.util.Map 38 112 348 Use Supertype When Possible (Effective Java)
java.util.Map java.util.concurrent.ConcurrentMap 37 93 139 Concurrency (Dig et al.)
int java.util.concurrent.atomic.AtomicInteger 32 65 86 Concurrency (Dig et al.)
java.lang.StringBuffer java.lang.StringBuilder 38 109 280 Performance
java.util.concurrent.atomic.AtomicLong java.util.concurrent.atomic.LongAdder 11 16 227 Performance
java.util.List com.google.collect.ImmutableList 18 66 145 Immutability
java.util.Set com.google.collect.ImmutableSet 9 50 95 Immutability
java.lang.String java.nio.file.Path 23 56 502 Conceptual Types (Dash et al.)
long java.util.Date 2 2 9 Conceptual Types (Dash et al.)
org.apache.commons.logging.Log org.sl4fj.Logger 8 123 1902 Third party library migration (Alurbaye et al.)
org.mongodb.BasicDbObject org.bson.Document 3 3 37 Third party library migration (Alurbaye et al.)
java.util.Random java.security.SecureRandom 6 6 8 Security
java.lang.String java.security.Key 2 2 2 Security
org.joda.time.DateTime java.time.ZonedDateTime 5 6 126 Deprecation