<commit_before>#!/bin/sh
#Follow with the DRY or Violations plugins.

set -e
if [ -z "$WORKSPACE" ]
then
	export WORKSPACE=`pwd`
	echo "set WORKSPACE to $WORKSPACE"
fi
echo "Generating duplication report."

java \
-Xmx512m \
-DObjC-CPD-LoggingEnabled=YES \
-classpath CPD/pmd-4.2.5/lib/pmd-4.2.5.jar:CPD/ObjCLanguage-0.0.6-SNAPSHOT.jar \
net.sourceforge.pmd.cpd.CPD \
--minimum-tokens 25 \
--language ObjectiveC \
--files "$WORKSPACE/SOLID" \
--encoding UTF-8 \
--format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml

# NOTE: The ObjC definition doesn't seem to work with PMD 5.0.0 as of 2012.08.09.<commit_msg>Tweaks to the CPD script.<commit_after>#!/bin/sh
#Follow with the DRY or Violations plugins.

set -e
if [ -z "$WORKSPACE" ]
then
	export WORKSPACE=`pwd`
	echo "set WORKSPACE to $WORKSPACE"
fi
echo "Generating duplication report."

java \
-Xmx512m \
-classpath CPD/pmd-4.2.5/lib/pmd-4.2.5.jar:CPD/ObjCLanguage-0.0.6-SNAPSHOT.jar \
net.sourceforge.pmd.cpd.CPD \
--minimum-tokens 25 \
--language ObjectiveC \
--files "$WORKSPACE/SOLID" \
--encoding UTF-8 \
--format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml
# --format xml

# For troubleshooting: -DObjC-CPD-LoggingEnabled=YES \

# NOTE: The ObjC definition doesn't seem to work with PMD 5.0.0 as of 2012.08.09.
{'fraction_non_alphanumeric': 0.14763014763014762, 'fraction_numerical': 0.04040404040404041, 'mean_word_length': 3.4261168384879723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6286519', 'n_tokens_mistral': 566, 'n_tokens_neox': 526, 'n_words': 121}