if (CollectionUtils.isNotEmpty(currentLicense)) {
MatchEntry me = currentLicense.iterator().next();
switch (params.getUpdateMode()) {
case ALL_FILES:
/* source already have a license header. lets replace it */
builder.replace(me, getJavaLicense());
break;
case WITHOUT_LICENSE_FILES:
/* we consider the default netbeans template as "file without license" */
if (builder.substring(me.getStart(), me.getEnd()).contains(NB_LICENSE_TEMPLATE)) {
builder.replace(me, getJavaLicense());