mining api popularity
play

Mining API Popularity 40 35 # projects using an API element 30 - PowerPoint PPT Presentation

Mining API Popularity 40 35 # projects using an API element 30 junit.framework.TestSuite javax.swing.JScrollPane javax.swing.border.Border 25 20 15 10 junit.framework.AssertionFailedError java.io.StringBufferInputStream


  1. Mining API Popularity 40 35 # projects using an API element 30 junit.framework.TestSuite javax.swing.JScrollPane javax.swing.border.Border 25 20 15 10 junit.framework.AssertionFailedError java.io.StringBufferInputStream java.lang.String 5 Jan 2008 time span Jan 2009 Yana Mileva, Valentin Dallmeier, Andres Zeller Saarland University, Germany

  2. Mining API Popularity java.io.StringBufferInputStream java.io.StringReader API java.io.PrintStream ...

  3. Mining API Popularity popular/used unpopular/unused

  4. Mining API Popularity import java.util.Iterator; import java.util.List; import java.util.Set; public class BcelTypeMunger extends ConcreteTypeMunger { import java.util.Iterator; import java.util.List; import java.util.Set; private boolean mungeNewParent(BcelClassWeaver weaver) import java.util.Iterator; { import java.util.List; public class BcelTypeMunger extends ConcreteTypeMunger { LazyClassGen target = weaver.getLazyClassGen(); import java.util.Set; boolean cont = true; private boolean mungeNewParent(BcelClassWeaver weaver) cont = enforce_abstractMethods(weaver); public class BcelTypeMunger extends ConcreteTypeMunger { { LazyClassGen target = weaver.getLazyClassGen(); List methods = newParent.getWithoutIter(true); private boolean mungeNewParent(BcelClassWeaver weaver) boolean cont = true; for (int i = 0; i < method.size(); i++){ { import java.util.Iterator; ResolvedMember superMethod = iter.next(); cont = enforce_abstractMethods(weaver); LazyClassGen target = weaver.getLazyClassGen(); import java.util.List; } boolean cont = true; List methods = newParent.getWithoutIter(true); import java.util.Set; } cont = enforce_abstractMethods(weaver); for (int i = 0; i < method.size(); i++){ public class BcelTypeMunger extends ConcreteTypeMunger { ResolvedMember superMethod = iter.next(); List methods = newParent.getWithoutIter(true); } for (int i = 0; i < method.size(); i++){ } private boolean mungeNewParent(BcelClassWeaver weaver) ResolvedMember superMethod = iter.next(); { } LazyClassGen target = weaver.getLazyClassGen(); } import java.util.Iterator; boolean cont = true; import java.util.List; cont = enforce_abstractMethods(weaver); import java.util.Iterator; import java.util.Set; import java.util.List; List methods = newParent.getWithoutIter(true); import java.util.Set; public class BcelTypeMunger extends ConcreteTypeMunger { for (int i = 0; i < method.size(); i++){ ResolvedMember superMethod = iter.next(); public class BcelTypeMunger extends ConcreteTypeMunger { private boolean mungeNewParent(BcelClassWeaver weaver) } { } private boolean mungeNewParent(BcelClassWeaver weaver) LazyClassGen target = weaver.getLazyClassGen(); { boolean cont = true; LazyClassGen target = weaver.getLazyClassGen(); cont = enforce_abstractMethods(weaver); boolean cont = true; cont = enforce_abstractMethods(weaver); List methods = newParent.getWithoutIter(true); for (int i = 0; i < method.size(); i++){ List methods = newParent.getWithoutIter(true); ResolvedMember superMethod = iter.next(); for (int i = 0; i < method.size(); i++){ } ResolvedMember superMethod = iter.next(); } } }

  5. Mining API Popularity • API quality • API usability • API compatibility • ...

  6. How was it till now? bug-tracking systems • API quality documentation • API usability • API compatibility • ... forums emails and groups

  7. Mining API Popularity import java.util.Iterator; import java.util.List; import java.util.Set; public class BcelTypeMunger extends ConcreteTypeMunger { import java.util.Iterator; private boolean mungeNewParent(BcelClassWeaver weaver) import java.util.List; import java.util.Iterator; { import java.util.List; import java.util.Set; LazyClassGen target = weaver.getLazyClassGen(); import java.util.Set; boolean cont = true; cont = enforce_abstractMethods(weaver); public class BcelTypeMunger extends ConcreteTypeMunger { public class BcelTypeMunger extends s t List methods = newParent.getWithoutIter(true); ConcreteTypeMunger { private boolean mungeNewParent(BcelClassWeaver weaver) c for (int i = 0; i < method.size(); i++){ { import java.util.Iterator; ResolvedMember superMethod = iter.next(); e LazyClassGen target = weaver.getLazyClassGen(); private boolean mungeNewParent import java.util.List; } boolean cont = true; j import java.util.Set; } o (BcelClassWeaver weaver) cont = enforce_abstractMethods(weaver); { public class BcelTypeMunger extends ConcreteTypeMunger { r List methods = newParent.getWithoutIter(true); P LazyClassGen target = for (int i = 0; i < method.size(); i++){ private boolean mungeNewParent(BcelClassWeaver weaver) ResolvedMember superMethod = iter.next(); { } 0 LazyClassGen target = weaver.getLazyClassGen(); } import java.util.Iterator; 0 boolean cont = true; import java.util.List; cont = enforce_abstractMethods(weaver); import java.util.Iterator; 2 import java.util.Set; import java.util.List; List methods = newParent.getWithoutIter(true); import java.util.Set; public class BcelTypeMunger extends ConcreteTypeMunger { for (int i = 0; i < method.size(); i++){ ResolvedMember superMethod = iter.next(); public class BcelTypeMunger extends ConcreteTypeMunger { private boolean mungeNewParent(BcelClassWeaver weaver) } { } private boolean mungeNewParent(BcelClassWeaver weaver) LazyClassGen target = weaver.getLazyClassGen(); { boolean cont = true; LazyClassGen target = weaver.getLazyClassGen(); cont = enforce_abstractMethods(weaver); boolean cont = true; cont = enforce_abstractMethods(weaver); List methods = newParent.getWithoutIter(true); for (int i = 0; i < method.size(); i++){ List methods = newParent.getWithoutIter(true); ResolvedMember superMethod = iter.next(); for (int i = 0; i < method.size(); i++){ } ResolvedMember superMethod = iter.next(); } } } Jan’08 Jan’09

  8. Mining API Popularity import java.util.Iterator; import java.util.List; import java.util.Set; 40 public class BcelTypeMunger extends ConcreteTypeMunger { import java.util.Iterator; private boolean mungeNewParent(BcelClassWeaver weaver) import java.util.List; import java.util.Iterator; { 35 import java.util.List; # projects using an API element import java.util.Set; LazyClassGen target = weaver.getLazyClassGen(); import java.util.Set; boolean cont = true; cont = enforce_abstractMethods(weaver); public class BcelTypeMunger extends ConcreteTypeMunger { public class BcelTypeMunger extends s 30 junit.framework.TestSuite t ConcreteTypeMunger { List methods = newParent.getWithoutIter(true); private boolean mungeNewParent(BcelClassWeaver weaver) c for (int i = 0; i < method.size(); i++){ javax.swing.JScrollPane { import java.util.Iterator; ResolvedMember superMethod = iter.next(); e LazyClassGen target = weaver.getLazyClassGen(); javax.swing.border.Border private boolean mungeNewParent import java.util.List; } boolean cont = true; j 25 import java.util.Set; } o (BcelClassWeaver weaver) cont = enforce_abstractMethods(weaver); { public class BcelTypeMunger extends ConcreteTypeMunger { r List methods = newParent.getWithoutIter(true); P LazyClassGen target = for (int i = 0; i < method.size(); i++){ private boolean mungeNewParent(BcelClassWeaver weaver) 20 ResolvedMember superMethod = iter.next(); { } 0 LazyClassGen target = weaver.getLazyClassGen(); } import java.util.Iterator; 0 boolean cont = true; import java.util.List; cont = enforce_abstractMethods(weaver); import java.util.Iterator; 15 2 import java.util.Set; import java.util.List; List methods = newParent.getWithoutIter(true); import java.util.Set; public class BcelTypeMunger extends ConcreteTypeMunger { for (int i = 0; i < method.size(); i++){ ResolvedMember superMethod = iter.next(); public class BcelTypeMunger extends ConcreteTypeMunger { 10 junit.framework.AssertionFailedError private boolean mungeNewParent(BcelClassWeaver weaver) } { } private boolean mungeNewParent(BcelClassWeaver weaver) java.io.StringBufferInputStream LazyClassGen target = weaver.getLazyClassGen(); { boolean cont = true; java.lang.String LazyClassGen target = weaver.getLazyClassGen(); 5 cont = enforce_abstractMethods(weaver); boolean cont = true; cont = enforce_abstractMethods(weaver); List methods = newParent.getWithoutIter(true); for (int i = 0; i < method.size(); i++){ List methods = newParent.getWithoutIter(true); ResolvedMember superMethod = iter.next(); for (int i = 0; i < method.size(); i++){ } ResolvedMember superMethod = iter.next(); } Jan 2008 time span Jan 2009 } } usage trends Jan’08 Jan’09

  9. Who would benefit? 40 35 # projects using an API element 30 junit.framework.TestSuite javax.swing.JScrollPane javax.swing.border.Border 25 20 15 10 junit.framework.AssertionFailedError java.io.StringBufferInputStream java.lang.String 5 Jan 2008 time span Jan 2009 API users API producers

  10. API users always want to use the best product want free of defects software don’t want to waste time

  11. API producers want to produce good product want feedback from the users

  12. Examples junit.framework.AssertionFailerError compatibility problems 40 35 # projects using an API element 30 junit.framework.TestSuite javax.swing.JScrollPane javax.swing.border.Border 25 java.io.StringBufferInputStream 20 code defect 15 10 junit.framework.AssertionFailedError java.io.StringBufferInputStream java.lang.String 5 java.lang.String - code smell Jan 2008 time span Jan 2009

  13. Hypothesis The past usage trend of an API element is predictive of the future usage trend of the same element.

Recommend


More recommend