Research News

Nan Niu | Department of Electrical Engineering and Computing Systems

Dr. Nan Niu is an Assistant Professor of Computer Science specializing in software engineering. His current research focuses on the information seeking strategies that developers use in software engineering. He takes an ecological-evolutionary approach to understanding and improving developers’ search for relevant information during their daily activities, such as debugging, refactoring, and reuse. The central hypothesis is that developers are ecologically rational and adapt to the environments in which they operate. In this way, developers’ information seeking can be modeled in terms of the “built-in” foraging mechanisms that evolved to help our animal ancestors to find food. Dr. Niu’s NSF CAREER project is aimed at linking software developers’ rational behaviors together with their social information foraging, learning, and co-creation.

Nan Niu research

(a)   Illustration of patchy environment, where a hypothetical bird forages in an environment consisting of patches containing berry clusters.

(b)   Charnov’s Marginal Value Theorem states that the rate-maximizing time to spend in patch, t*, occurs when the slope of the within-patch gain function g(tW) is equal to the average rate of gain, which is the slope of the tangent line R*.

Nan Niu Research

Code navigation graphs for investigating the premises of the patch model. Time in the graph proceeds left to right and top to bottom. Boxes are states (oval boxes are distinguished to show search result pages). Arrows are moves. Double vertical lines are returns to a previous state. Color surrounding the boxes represents distinct Java packages (patches). Dotted enclosing lines show that the states and moves are part of the “keyword” problem space. Solid lines enclosed the “view code” problem space. Among the 24 code patches, the 15 developers participating in our user study visited an average of 5.1 patches for Type (a corrective maintenance task) and 2.8 patches for Size (a perfective maintenance task). The results not only indicate that code patches exhibit topical locality, but also imply that developers engage in more within-patch foraging than between-patch foraging.

More information about Dr. Niu and his research can be found at


Select for more information about the research activities within the College of Engineering and Applied Science.