Changed, Added and Deleted SLOC

An important consideration for Software Project Managers is whether the requirements are being altered in a given project without their knowledge or consent. The impact of unauthorized or unscheduled departure from requirements can lead to considerable problems in maintaining and managing large source projects.

Having received requests from several major C/C++ and Java projects to measure ‘changes’ in source code projects, Power Software was commissioned to manufacture an automated tool to measure changed lines of source code.

The first question we asked was ‘are there any existing tools that can already accomplish this task?’ The obvious starting place was ‘Change Management’ tools like CMVC (Configuration Management Version Control) systems. These tools indicate which files have changed between projects but do not gather and present the information in the format our customers’ required. One problem with CMVC systems was that a file shown to be ‘changed’ might have changed only by time and date. This is misleading if we are looking for actual changes in source code.

The next place we looked was at existing Software Metrics tools. These tools measure source code parameters including SLOC (source lines of code). However it is possible that a Software Metrics tool could report that the compared files or projects have the same total number of source lines but these could have changed intrinsically. The actual lines of code could have changed but the total number of lines will be unchanged so the ‘changed line’ is not detected.

For our customers the particular information required is ‘changed source lines of code’, ‘added source lines of code’ and ‘deleted source lines of code’. This needs to be gathered across two releases of the same project to show exactly what has ‘changed’. The information needs to be presented as ‘changed lines’ at the file and project level to assist management in their job of maintaining highest quality through proper control mechanisms.

Tagged : / / / / / /

Tools for Counting Lines of Code in Source Code

USC CodeCount and USC COCOMO- $0

CodeCount automates the collection of source code sizing information. The CodeCount toolset utilizes one of two possible source lines of code (SLOC) definitions, physical or logical. COCOMO (COnstructive COst MOdel), is a tool which allows one to estimate the cost, effort, and schedule associated with a prospective software development project.

Languages: Ada, Assembly, C, C++, COBOL, FORTRAN, Java, JOVIAL, Pascal, PL1

SLOCCount – $0

SLOCCount is a set of tools for counting physical Source Lines of Code (SLOC) in a large number of languages of a potentially large set of programs. SLOCCount can automatically identify and measure many programming languages.

Languages: Ada, Assembly, awk, Bourne shell and variants, C, C++, C shell, COBOL, C#, Expect, Fortran, Haskell, Java, lex/flex, LISP/Scheme, Makefile, Modula-3, Objective-C, Pascal, Perl, PHP, Python, Ruby, sed, SQL, TCL, and Yacc/Bison.

SourceMonitor – $0

SourceMonitor lets you see inside your software source code to find out how much code you have and to identify the relative complexity of your modules. For example, you can use SourceMonitor to identify the code that is most likely to contain defects and thus warrants formal review. Collects metrics in a fast, single pass through source files. Displays and prints metrics in tables and charts.

Languages: C++, C, C#, Java, Delphi, Visual Basic (VB6) or HTML

LOCC – $0

LOCC is an extensible system for producing hierarchical, incremental measurements of work product size that are useful for estimation, planning, and other software engineering activities. LOCC supports size measurement of grammar-based languages through integrated support for JavaCC. LOCC produces size data corresponding to the number of packages, the number of classes in each package, the number of methods in each class, and the number of lines of code in each method.

Languages: C++, Java

Code Counter Pro – $25

Code Counter Pro is perfect for those reports you need to send to your boss – count up all your progamming lines (SLOC, KLOC) automatically, find out your team’s productivity, use as handy help for measuring Function Points through Backfiring, measure comment percentages and more.

Languages: ASM, COBOL, C, C++, C#, Fortran, Java, JSP, PHP, HTML, Delphi, Pascal, VB, XML

SLOC Metrics – $99

SLOC Metrics measures the size of your source code based on the Physical Source Lines of Code metric recommended by the Software Engineering Institute at Carnegie Mellon University (CMU/SEI-92-TR-019). Specifically, the source lines that are included in the count are the lines that contain executable statements, declarations, and/or compiler directives. Comments, and blank lines are excluded from the count. When a line or statement contains more than one type, it is classified as the type with the highest precedence. The order of precedence for the types is: executable, declaration, compiler directive, comment and lastly, white space.

Languages: ASP, C, C++, C#, Java, HTML, Perl, Visual Basic

Resource Standard Metrics – $200

Resource Standard Metrics, or RSM, is a source code metrics and quality analysis tool unlike any other on the market. The unique ability of RSM to support virtually any operating system provides your enterprise with the ability to standardize the measurement of source code quality and metrics throughout your organization. RSM provides the fastest, most flexible and easy-to-use tool to assist in the measurement of code quality and metrics.

Languages: C, C++, C#, Java

EZ-Metrix – $495

EZ-Metrix supports software development estimates, productivity measurement, schedule forecasting and quality analysis. With an easy Internet-based interface, multiple language support and flexible licensing features, you will be up and running in minutes with EZ-Metrix. Measure source code size from virtually all text-based languages and from any platform or operating system with the same utility. Size data may be stored in EZ-Metrix’s internal database or may be exported for further analysis.

Languages: Ada, ALGOL, antlr, asp, Assembly, awk, bash, BASIC, bison, C, C#, C++, ColdFusion, Delphi, Forth, FORTRAN, Haskell, HTML, Java, Javascript, JOVIAL, jsp, lex, lisp, Makefile, MUMPS, Pascal, Perl, PHP, PL/SQL, PL1, PowerBuilder, ps, Python, Ruby, sdl, sed, SGML, shell, SQL, Visual Basic, XML, Yacc

McCabe IQ – $ unknown

McCabe IQ enables you to deliver better, more reliable software to your end-users, and is known worldwide as the gold standard for the analysis, comprehension, testing, and reengineering of new software and legacy systems. McCabe IQ uses advanced software metrics to identify, objectively measure, and report on the complexity and quality of your code at the application and enterprise level.

Languages: Ada, ASM86, C, C#, C++.NET, C++, COBOL, FORTRAN, Java, JSP, Perl, PL1, VB, VB.NET

Tagged : / / / /

SLOC Tools Comparison | SLOC Tools Differences | SLOC Tools Comparison Table

sloc-tools-comparison

Tool Open Source – Commercial URL
CAST Commercial www.castsoftware.com
Sonar Open Source www.sonarsource.org
SLOC Open Source -> Commercial http://www.dwheeler.com/sloccount/
RSM Commercial www.msquaredtechnologies.com
LocMetrics Commercial www.locmetrics.com
EZ-Metrics Commercial http://www.jamesheiresconsulting.com/Products.htm
Metrixware Commercial www.metrixware.com
Parasoft (Jtest) Commercial www.parasoft.com/
Squale Open Source www.squale.org/
KODERS Commercial www.koders.com
PRACTILINE www.practiline.com
POWERSOFTWARE Commercial http://www.powersoftware.com/
CLOC Open Source http://cloc.sourceforge.net/
Unified CodeCount (UCC) Open Source http://sunset.usc.edu/research/CODECOUNT/
Tagged : / / / / / / / / / / / / / / /