On an Automatic Function Point Measurement from Source Codes
Shinji Kusumoto, Takuto Edagawa, Yoshiki Higo
*Graduate School of Information Science and Technology, Osaka University{kusumoto, t-edagw,higo}@ist.osaka-u.ac.jp

Abstract
This paper describes issues of introducing function
point analysis to software organizations and thenproposes a method to automatically extract data andtransaction functions from Web application using
static analysis.

1. Introduction
In global software development projects, it isimportant to quantitatively grasp the progress of eachsoftware development block. Size of software issometimes used to check the progress of thedevelopment. Function point (FP) [1] is one of thesoftware size metrics and it has been widely used inbusiness application software developments. Because
it measures the functional requirements, the measured
size stays constant despite the programming language,
design technology, or development skills involved.
Also, it is available in the early stage of thedevelopment process, for planning design anddevelopment projects. Up to the present, various FP
methods have been proposed. The IFPUG(International Function Point Users Group) method has
been widely used in software organizations.
However, several problems still remain. Oneof them is benchmarking. If an organization tries tointroduce FP for estimation, it is necessary to collectthe base data. That is, FPs have to be measured fromthe past software developed there. Usually, FP is
counted from design specifications. But, during thedevelopment, some functionalities are frequentlyadded and modified. So, the actual functionalities exist
only in the source code and counting FP from sourcecode is cost-consuming. Moreover, it is reported thatdifferences for the same product may occur even in thesame organization since FP measurement involves
judgment on the part of the counter. One of thepromising approach to solve the problems is toautomate the FP measurement.
This paper describes the conventional
approaches to automate the FP measurement and theissues. Then, we briefly explain our approach underindustry-university cooperation. In this paper, weintend to examine the possibility to measure FP fromsource code automatically using static analysis: At first,
under several conditions, we propose a measurement

method to count data and transaction functions fromWeb application source code.

2. Function Point Analysis
Function point (FP) measures the functionality
provided by software. It can be determined from therequirements specification, design specification andprogram code. Unlike LOC, since FP measures
functionality, it is said to be independent of thetechnology and programming language used for thesoftware implementation. Allan Albrecht first
proposed original function point analysis. The IFPUG
method is a modified-one of the Albrecht’s function
point. In the modification, the evaluation of thecomplexity of the software was objectively establishedand the rules of the counting procedures were also
described minutely and precisely. In the IFPUG
method, the counting procedure of FP consists ofseven steps[2], Step1: Determine the Type of Function
Point Count, Step2: Identify the Counting Boundary,
Step3: Count Data Function Types, Step4: Counttransaction Function Types, Step5: Determine theUnadjusted Function Point Count, Step6: Determine
the Value Adjustment Factor and Step7: Calculate theFinal Adjusted Function Point Count.

3. Conventional Approaches
An appropriate method to measure FP from source
codes has been proposed in [3]. The method firstly
transforms source codes to specifications written byformal notations and then calculates FP based on theIFPUG method from the specifications. However, toour knowledge, actual application results have notbeen reported. It would be difficult for softwareorganizations to develop such translators in the actual
software development under several limitations.
There is another way to estimate thedevelopment effort by using some metrics. In [4], a
new complexity metric, called DataBase Points (calledDBP) has been proposed. DBP is a point calculated
based on items related to database (table, relation,transaction, form, reports). DBP estimates accurate
effort, even it can apply to only the system using MSACCESS. Since the key idea of our method is also
extraction of tables and transactions, measurement of
DBP is similar to ours. But, the definition of DBP is
not based on FP.

4. Our approach
Considering the automatic FP measurement fromsource code, it is not realistic to propose a method thatcan be applicable to any software. In this paper, we set
the target application to kinds of Web applications
using SQL database systems. The main steps of FPmeasurement are identifications of data and transaction
functions included in the target software. Data function(DF) is a set of logically meaningful data, and it isused by transaction functions (TFs). Thus, we consider
DFs as database tables used in the application. On theother hand, TF is an input-output processing to DFs
and so we regard TF as a set of SQL statements
executed in a screen transition.
In order to extract DFs and TFs, we introduce
SQL tree. SQL Trees are constructed by analyzing thesource code implementing Actions. An SQL Tree is adata structure storing SQL statements, and it includes abranch structure of the source code. The tree iscomposed of three types of nodes: ‘Code Node’,‘Branch Node’ and ‘SQL Call Node’. Code Nodescorrespond with source code range, and Branch Nodescorrespond with conditional branch, and SQL CallNodes correspond with SQL calls. Then, using SQL
trees, DFs and TFs are extracted. We regard a DF as a
database table used by target application. These tables
can be extracted by analyzing SQL Trees. After that,each of DFs is classified into ILF or EIF as follows:(D1): If its table is accessed by ‘insert’, ‘update’, or‘delete’, the database state is changed. Therefore, it isregarded as ILF,
(D2): If RuleD1 is not satisfied, it is regarded as EIF.
A TF is identified as a set of SQLs which canbe executed simultaneously in the Action. Then, using
the following rules, each of TFs is classified into EI,
EO and EQ.
(1): If the TF has at least one SQL statement whichchanges database state, it is regarded as EI,(2): If RuleT1 is not satisfied, at least one dataobtained from database is converted, it is regarded asEO,(3): If both RulesT1 and T2 are not satisfied, it isregarded as EQ.

• accesses to the database by JDBC or iBATIS .
It is the reason why the application is supposed to be
developed by Struts that the extraction of screentransition is easy. Because, in Struts, screen transitions
are determinably defined by configuration files. Since
our proposed method doesn’t include the extracting
method of screen transition, it depends on the tool. The
developed tool cannot validate whether or not the
proposed method can apply the application developed
without Struts. However, no matter how theapplication is developed by some methodology, theapplication has to define correspondence relationshipof a user action and screen transition. Therefore, webelieve that screen transition is able to be extracted
easily. As for a database access method, the present
tool is intended for JDBC or iBATIS. But, since theinformation of the called SQL is only needed, we caneasily deal with an application using other accessmethods. The tool mainly consists of the parser and theFP calculator. The parser firstly analyzes sourcecode(Java file and configuration files) and provides theinformation needed to calculate FP. Then, FP
calculator extracts TFs and DFs with the information
obtained by the parser, and calculates FP.

6. Conclusions
In this paper, we have proposed FP measurement byfocusing screen transitions in Web application anddatabase accesses. TFs are extracted from screentransitions as a set of SQLs. DFs are extracted fromSQLs as a database table. In the future, it is necessary
to improve the proposed method and the tool throughcontinuous case studies/experiments.

Acknowledgment
This work is being conducted as a part of Stage Project,
the Development of Next Generation IT Infrastructure,
supported by Ministry of Education, Culture, Sports,
Science and Technology and Japan Society for thePromotion of Science, Grant-in-Aid for Scientific
Research (C) (20500033).

References[1] A. J. Albrecht. Function point analysis. Encyclopedia ofSoftware Engineering, 1:518–524, 1994.

[2] International Function Point Users Groupg. Function

5. Measurement Tool

Point Counting Practices Manual Release 4.2, 2004.

We have developed a FP measurement tool. The target
application is supposed to satisfy the following
conditions:• a main logic is written by Java,• uses Struts framework,[3] A. April, E. Merlo, and A. Abran. A reverse engineering
approach to evaluate function point rules. In Fourth Working
Conference on Reverse Engineering, 1997.
[4] S. Abiad, R. Haraty, and N. Mansour. Software metrics
for small database applications. In ACM symposium on
Applied computing, volume 2, pages 866–870, 2000.