Criteria to decide suitable CLOC tools for your source code

Hi,

Please find to answer follwing questions in order to find out sutable CLOC tools for your project.

  • What are the features of CLOC?
  • Language Support
  • Platform Support
  • Two Baseline Compare
  • File compare of Addition, Deletion and updating
  • Algorithm
  • CLI support
  • GUI Support
  • Output (CSV, XML)
  • Qualitative matrix
  • Price / Open Source
  • Rajesh Kumar

    Rajesh Kumar 

    Good Reference can be found on

    <!–[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <![endif]–><!–[if gte mso 9]> <![endif]–><!–[if gte mso 10]> <! /* Style Definitions */ table.MsoNormalTable {mso-style-name:”Table Normal”; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:””; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,”sans-serif”; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} –> <!–[endif]–>

    <!–[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <![endif]–><!–[if gte mso 9]> <![endif]–><!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:”Table Normal”; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:””; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,”sans-serif”; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} <![endif]–>

    http://community.scmgalaxy.com/pg/file/read/4281/sloc-using-rsm

    http://cloc.sourceforge.net/

    http://www.qsm.com/?q=resources/code-counters/index.html

    http://en.wikipedia.org/wiki/Source_lines_of_code

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 : / / / /

Important Configuration Definitions

  • Source code— Files written in high-level languages such as C# that need to be compiled (for example, foo.cs).
  • Source(s)— All the files involved in building a product (for example, C, CPP, VB, DOC, HTM, H, and CS). This term is used mostly as a catch-all phrase that is specific not only to source code files but to all the files that are stored in version tracking systems.
  • Codeline— A tree or branch of code that has a specific purpose, such as the mainline, release line, or hotfix line that grows collectively.
  • Mainline or trunk (“The Golden Tree”)— The main codeline of the product that contains the entire source code, document files, and anything else necessary to build and release the complete product.
  • Snapshot— A specific point in time in which the sources and build are captured and stored, usually on a release or build machine.
  • Milestone— A measurement of work items that includes a specified number of deliverables for a given project scheduled for a specified amount of time that are delivered, reviewed, and fixed to meet a high quality bar. The purpose of a milestone is to understand what is done, what is left to do, and how that fits with the given schedule and resources. To do this, the team must complete a portion of the project and review it to understand where the project is in the schedule and to reconcile what is not done with the rest of the schedule. A milestone is the best way to know how much time a portion of the project will take.
  • Code freeze— A period when the automatic updates and build processes are stopped to take the final check-ins at a milestone.
  • Public build— A build using the sources from the mainline or trunk.
  • Private build (also referred to as a sandbox build)— A build using a project component tree to build more specific pieces of the product. This is usually done prior to checking in the code to the mainline.
  • Branching— A superset of files off the mainline taken at a certain time (snapshot) that contains new developments for hotfixes or new versions. Each branch continues to grow independently or dependently on the mainline.
  • Forking— Cloning a source tree to allow controlled changes on one tree while allowing the other tree to grow at its own rate. The difference between forking and branching is that forking involves two trees, whereas branching involves just one. It is also important to note that forking or cloning makes a copy (snapshot) of the tree and does not share the history between the two trees, whereas branching does share the history.
  • Virtual Build Labs (VBLs)— A Virtual Build Lab is a build lab that is owned by a specific component or project team. The owner is responsible for propagating and integrating his code into the mainline or public build. Each VBL performs full builds and installable releases from the code in its source lines and the mainline. Although the term virtual is used in the name of the labs, don’t confuse it with Virtual PC or Virtual Machines because the labs are real physical rooms and computer boxes. It is not recommended that you use Virtual software for build machines except possibly for an occasional one-off or hotfix build. , “The Build Lab and Personnel.” There is usually a hierarchy of VBLs so that code “rolls up” to the mainline or trunk. For example, let’s say that you have a mainline, Project A is a branch off of the mainline, and Developer 1 has a branch off the project branch. Developer 1 has several branches off his branch, with each branch representing a different component of the product. If he wants to integrate one of his branches into main, he should first merge his changes with all the levels above the branch to make sure he gets all the changes. Alternatively, he can just roll the changes into main, which sits higher in the hierarchy. This will become clearer in the next couple of pages.
  • Reverse integration (RI)— The process of moving sources from one branch or tree to another that is higher in the VBL hierarchy.
  • Forward integration (FI)— The process of moving sources from one branch or tree to another that is lower in the VBL hierarchy.
  • Buddy build— A build performed on a machine other than the machine that the developer originally made changes on. This is done to validate the list of changed files so that there are no unintended consequences to the change in the mainline build.
Tagged : / / / / / / / /