--- /dev/null
+# SAM
+SAM-Tools is a set of tools for measuring S/W Architecture Maturity (SAM).
+SAM analyzes both code and architecture in order to identify problems which may impact
+software maintenance.
+
+# Requirements
+
+[**SAM-Tools** repository](https://github.sec.samsung.net/RS7-Architectural-Refactoring/SAM-Tools) - clone it into directory on the same level as webapi-plugins - This path can be changed in `tools/sam/sam_cli.cfg` file.
+
+# Usage
+Simply run tools/sam/run_sam.sh script - from webapi-plugins/ directory
+with gbs profile and one of the parameter below:
+
+ -a Build project and generate report.
+
+ -b Build project and scan for files - without generating report.
+
+ -g Generate report - without building - assumes that first step was made earlier.
+
+i.e:
+
+ webapi-plugins(SAM)$ tools/sam/run_sam.sh -a 55unified
+
+Analysis Report will be located in output/html/ directory.
+
+Script assumes that `55unified` profile exists in ~/.gbs.conf file.
+
+# Links
+
+[Architecture Manager](https://code.sec.samsung.net/architecturemanager/app/sam/Tizen_Unified/Tizen_Unified/latest/overview)
+
+[Getting Started](https://github.sec.samsung.net/RS7-Architectural-Refactoring/SAM-Tools/wiki/Getting-Started)
+
+[SAM Metric](https://github.sec.samsung.net/RS7-Architectural-Refactoring/SAM-Tools/wiki/Metrics-in-SAM)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env bash
+
+export WEBAPI_DIRECTORY="${PWD}"
+DIR_NAME="${PWD##*/}"
+
+export BUILD_PROFILE="55unified"
+
+PATH_TO_SAM_TOOLS="$WEBAPI_DIRECTORY/../SAM-Tools"
+
+export WEBAPI_VERSION=$(sed packaging/webapi-plugins.spec -n -e "s/Version: *\(.*\)/\1/p")
+
+if [ "$DIR_NAME" != "webapi-plugins" ] ; then
+ echo "Script must be executed from webapi-plugins directory"
+ exit 0
+fi
+
+function usage {
+echo "Usage:
+$0 <parameters> GBS_PROFILE
+
+Parameters:
+ -a Build project and generate report.
+
+ -b Build project and scan for files - without generating report.
+
+ -g Generate report - without building - assumes that first step was made earlier."
+}
+
+function build {
+ "$PATH_TO_SAM_TOOLS/1_sam_cli_scan.sh" "tools/sam/sam_cli.cfg"
+}
+
+function generate {
+ echo "# This file is autogenerated, do not modify it manually" > "tools/sam/config/src_scope.cfg"
+ echo "/home/abuild/rpmbuild/BUILD/webapi-plugins-$WEBAPI_VERSION" >> "tools/sam/config/src_scope.cfg"
+ echo "$WEBAPI_DIRECTORY" >> "tools/sam/config/src_scope.cfg"
+
+ "$PATH_TO_SAM_TOOLS/2_sam_cli_sam.sh" "tools/sam/sam_cli.cfg"
+}
+
+function main {
+ LOOP=false
+ while getopts "a:b:g:" opt; do
+ LOOP=true
+ case "$opt" in
+ "a") BUILD_PROFILE=$OPTARG
+ build
+ generate
+ ;;
+ "b") BUILD_PROFILE=$OPTARG
+ build
+ ;;
+ "g") BUILD_PROFILE=$OPTARG
+ generate
+ ;;
+ esac
+ done
+ if [ "$LOOP" = false ] ; then
+ usage
+ fi
+}
+
+main "$@"
--- /dev/null
+#!/usr/bin/env bash
+#
+# Copyright (C) 2019 The SAM Tool Authors. All rights reserved.
+#
+# SAM (S/W Architecture Maturity)
+#
+# Samsung Research,
+# Samsung Electronics Co., Ltd.
+#
+# This software and its documentation are confidential and proprietary
+# information of Samsung Electronics Co., Ltd. No part of the software and
+# documents may be copied, reproduced, transmitted, translated, or reduced to
+# any electronic medium or machine-readable form without the prior written
+# consent of Samsung Electronics.
+#
+# Samsung Electronics makes no representations with respect to the contents,
+# and assumes no responsibility for any errors that might appear in the
+# software and documents. This publication and the contents here of are subject
+# to change without notice.
+#
+
+################################
+# Project Name
+################################
+SAM_PRJ_NAME="webapi-plugins"
+
+
+################################
+# Source Code
+################################
+BUILD_CMD="gbs build -A armv7l -P $BUILD_PROFILE --include-all"
+CLEAN_CMD=""
+SRC_PATH="$WEBAPI_DIRECTORY"
+SRC_LANG="auto_c_cpp" # Supported languages : c, cpp, auto_c_cpp, java, cs
+SRC_SCOPE="tools/sam/config/src_scope.cfg" # Scoping list
+SRC_EXCLUDE="tools/sam/config/src_exclude.cfg" # Excluding list
+
+
+################################
+# SCRA
+################################
+SCRA_SKIP=FALSE # Options : TRUE, FALSE
+SCRA_RAW_DATA_PATH=".scap/workspace/scra"
+SCRA_ROOT_TO_CUT="/home/abuild/rpmbuild/BUILD/webapi-plugins-$WEBAPI_VERSION"
+# SCRA_USE_PARAM=TRUE
+
+
+################################
+# ART_BEAN (Convert SCRA data)
+################################
+ART_BEAN_SKIP=FALSE # Options : TRUE, FALSE
+
+
+################################
+# PMD CPD (Duplicated Code)
+################################
+PMD_SKIP=FALSE # Options : TRUE, FALSE
+PMD_RAW_DATA_PATH=".scap/workspace/pmd"
+PMD_USE_BUILT_PATH=FALSE # Options : TRUE, FALSE
+PMD_ROOT_TO_CUT=$SRC_PATH
+#PMD_EXCLUDE_LIST="config/src_exclude.cfg" # Excluding list of PMD
+#PMD_RESULT_DETAIL_MODE=FALSE # Options : TRUE, FALSE
+#PMD_HEAP_SIZE=2048m
+#PMD_ENCODING="utf-8"
+
+
+################################
+# Metrix++ (Preprocessor)
+###############################
+MPP_SKIP=FALSE
+MPP_RAW_DATA_PATH=".scap/workspace/metrixpp"
+MPP_ROOT_TO_CUT=$SRC_PATH
+
+
+################################
+# Advanced Option
+################################
+#ADVANCED_SAM_OPTION="config/sam.cfg"
+#USE_EMBEDDED_LIB=TRUE
+
+SCAP_TOOL_PATH="hub/code-analysis-hub/bin/scap"
+SCAP=$SCAP_TOOL_PATH