Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

There is a large body of literature regarding using network metrics (e.g. degree) for predicting defects. Something I'm running into is that a lot of my code is event-driven, so I have a large number of functions which aren't actually called by any other functions per se (they are instead just attached to UI events).

I'm looking for references on how to handle this. I think I could for example claim that these functions have in-degree one (since they are called by one place in the UI) but I'm not sure how effective that will be.

share|improve this question
"looking for references..." - resource requests are not quite welcome at Programmers. As far as I understand, one would rather present an underlying problem instead - a problem that was intended to be solved with particular resource requested – gnat Mar 22 at 9:48
1  
@gnat: This has come up with my questions before. The conclusion was that as long as the question is good, it doesn't matter if you ask for references. – Xodarap Mar 24 at 17:41

closed as off topic by maple_shaft Mar 22 at 11:33

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Maybe you could do dynamic (run-time) analysis instead of static (code analysis)? Get the "degree" of a function from the call count (maybe relative) for example.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.