Program: 86510
Project: 86510
Buggy source:
/** 
 * Apply a set of version overrides to a list of dependencies. Return a set of the overrides which were not applied.
 * @param project The current Project
 * @param dependencies The list of dependencies
 * @param explicitOverrides Any explicitOverrides to track for ignoring
 * @param overrides The map of dependency version overrides
 * @return The map of overrides that were not matched in the dependencies
 * @throws ManipulationException if an error occurs
 */
private Map<ArtifactRef,String> applyOverrides(final Project project,final HashMap<ProjectVersionRef,Dependency> dependencies,final WildcardMap<String> explicitOverrides,final Map<ArtifactRef,String> overrides) throws ManipulationException {
  final Map<ArtifactRef,String> unmatchedVersionOverrides=new LinkedHashMap<>();
  unmatchedVersionOverrides.putAll(overrides);
  if (dependencies == null || dependencies.size() == 0) {
    return unmatchedVersionOverrides;
  }
  final CommonState commonState=session.getState(CommonState.class);
  final boolean strict=commonState.getStrict();
  for (  final ProjectVersionRef dependency : dependencies.keySet()) {
    ProjectRef depPr=new SimpleProjectRef(dependency.getGroupId(),dependency.getArtifactId());
    for (    final Map.Entry<ArtifactRef,String> entry : overrides.entrySet()) {
      ProjectRef groupIdArtifactId=entry.getKey().asProjectRef();
      if (depPr.equals(groupIdArtifactId)) {
        final String oldVersion=dependencies.get(dependency).getVersion();
        final String overrideVersion=entry.getValue();
        final String resolvedValue=dependency.getVersionString();
        if (isEmpty(overrideVersion)) {
          logger.warn("String_Node_Str" + groupIdArtifactId + "String_Node_Str");
        }
 else         if (isEmpty(oldVersion)) {
          logger.debug("String_Node_Str" + groupIdArtifactId + "String_Node_Str");
        }
 else         if (explicitOverrides.containsKey(depPr)) {
          logger.debug("String_Node_Str",depPr);
          unmatchedVersionOverrides.remove(entry.getKey());
        }
 else         if (strict && oldVersion.contains("String_Node_Str") && !PropertiesUtils.checkStrictValue(session,resolvedValue,overrideVersion)) {
          logger.debug("String_Node_Str",resolvedValue,dependency,entry.getKey(),overrideVersion);
          if (commonState.getFailOnStrictViolation()) {
            throw new ManipulationException("String_Node_Str",depPr.toString(),dependencies.get(dependency).getVersion(),resolvedValue,entry.getKey().getVersionString(),entry.getKey().asProjectRef().toString());
          }
 else {
            logger.warn("String_Node_Str",resolvedValue,overrideVersion,dependencies.get(dependency).getVersion());
          }
        }
 else {
          if (!oldVersion.equals("String_Node_Str")) {
            logger.info("String_Node_Str",overrideVersion,dependency,project.getPom());
          }
          if (!PropertiesUtils.cacheProperty(project,commonState,versionPropertyUpdateMap,oldVersion,overrideVersion,entry.getKey(),false)) {
            if (oldVersion.equals("String_Node_Str")) {
              logger.debug("String_Node_Str",groupIdArtifactId,oldVersion,overrideVersion);
            }
 else             if (strict && !PropertiesUtils.checkStrictValue(session,resolvedValue,overrideVersion)) {
              if (commonState.getFailOnStrictViolation()) {
                throw new ManipulationException("String_Node_Str",oldVersion,groupIdArtifactId.toString(),overrideVersion);
              }
 else {
                logger.warn("String_Node_Str",oldVersion,groupIdArtifactId,overrideVersion);
              }
            }
 else {
              logger.debug("String_Node_Str",groupIdArtifactId,oldVersion,overrideVersion);
              if (oldVersion.contains("String_Node_Str")) {
                String suffix=PropertiesUtils.getSuffix(session);
                String replaceVersion;
                if (commonState.getStrictIgnoreSuffix() && oldVersion.contains(suffix)) {
                  replaceVersion=StringUtils.substringBefore(oldVersion,suffix);
                  replaceVersion+=suffix + StringUtils.substringAfter(overrideVersion,suffix);
                }
 else {
                  replaceVersion=oldVersion + StringUtils.removeStart(overrideVersion,resolvedValue);
                }
                logger.debug("String_Node_Str",resolvedValue,replaceVersion);
                dependencies.get(dependency).setVersion(replaceVersion);
              }
 else {
                dependencies.get(dependency).setVersion(overrideVersion);
              }
            }
          }
          unmatchedVersionOverrides.remove(entry.getKey());
        }
      }
    }
  }
  return unmatchedVersionOverrides;
}

Fixed version (ground truth):
/** 
 * Apply a set of version overrides to a list of dependencies. Return a set of the overrides which were not applied.
 * @param project The current Project
 * @param dependencies The list of dependencies
 * @param explicitOverrides Any explicitOverrides to track for ignoring
 * @param overrides The map of dependency version overrides
 * @return The map of overrides that were not matched in the dependencies
 * @throws ManipulationException if an error occurs
 */
private Map<ArtifactRef,String> applyOverrides(final Project project,final HashMap<ArtifactRef,Dependency> dependencies,final WildcardMap<String> explicitOverrides,final Map<ArtifactRef,String> overrides) throws ManipulationException {
  final Map<ArtifactRef,String> unmatchedVersionOverrides=new LinkedHashMap<>();
  unmatchedVersionOverrides.putAll(overrides);
  if (dependencies == null || dependencies.size() == 0) {
    return unmatchedVersionOverrides;
  }
  final CommonState commonState=session.getState(CommonState.class);
  final boolean strict=commonState.getStrict();
  for (  final ProjectVersionRef dependency : dependencies.keySet()) {
    ProjectRef depPr=new SimpleProjectRef(dependency.getGroupId(),dependency.getArtifactId());
    for (    final Map.Entry<ArtifactRef,String> entry : overrides.entrySet()) {
      ProjectRef groupIdArtifactId=entry.getKey().asProjectRef();
      if (depPr.equals(groupIdArtifactId)) {
        final String oldVersion=dependencies.get(dependency).getVersion();
        final String overrideVersion=entry.getValue();
        final String resolvedValue=dependency.getVersionString();
        if (isEmpty(overrideVersion)) {
          logger.warn("String_Node_Str" + groupIdArtifactId + "String_Node_Str");
        }
 else         if (isEmpty(oldVersion)) {
          logger.debug("String_Node_Str" + groupIdArtifactId + "String_Node_Str");
        }
 else         if (explicitOverrides.containsKey(depPr)) {
          logger.debug("String_Node_Str",depPr);
          unmatchedVersionOverrides.remove(entry.getKey());
        }
 else         if (strict && oldVersion.contains("String_Node_Str") && !PropertiesUtils.checkStrictValue(session,resolvedValue,overrideVersion)) {
          logger.debug("String_Node_Str",resolvedValue,dependency,entry.getKey(),overrideVersion);
          if (commonState.getFailOnStrictViolation()) {
            throw new ManipulationException("String_Node_Str",depPr.toString(),dependencies.get(dependency).getVersion(),resolvedValue,entry.getKey().getVersionString(),entry.getKey().asProjectRef().toString());
          }
 else {
            logger.warn("String_Node_Str",resolvedValue,overrideVersion,dependencies.get(dependency).getVersion());
          }
        }
 else {
          if (!oldVersion.equals("String_Node_Str")) {
            logger.info("String_Node_Str",overrideVersion,dependency,project.getPom());
          }
          if (!PropertiesUtils.cacheProperty(project,commonState,versionPropertyUpdateMap,oldVersion,overrideVersion,entry.getKey(),false)) {
            if (oldVersion.equals("String_Node_Str")) {
              logger.debug("String_Node_Str",groupIdArtifactId,oldVersion,overrideVersion);
            }
 else             if (strict && !PropertiesUtils.checkStrictValue(session,resolvedValue,overrideVersion)) {
              if (commonState.getFailOnStrictViolation()) {
                throw new ManipulationException("String_Node_Str",oldVersion,groupIdArtifactId.toString(),overrideVersion);
              }
 else {
                logger.warn("String_Node_Str",oldVersion,groupIdArtifactId,overrideVersion);
              }
            }
 else {
              logger.debug("String_Node_Str",groupIdArtifactId,oldVersion,overrideVersion);
              if (oldVersion.contains("String_Node_Str")) {
                String suffix=PropertiesUtils.getSuffix(session);
                String replaceVersion;
                if (commonState.getStrictIgnoreSuffix() && oldVersion.contains(suffix)) {
                  replaceVersion=StringUtils.substringBefore(oldVersion,suffix);
                  replaceVersion+=suffix + StringUtils.substringAfter(overrideVersion,suffix);
                }
 else {
                  replaceVersion=oldVersion + StringUtils.removeStart(overrideVersion,resolvedValue);
                }
                logger.debug("String_Node_Str",resolvedValue,replaceVersion);
                dependencies.get(dependency).setVersion(replaceVersion);
              }
 else {
                dependencies.get(dependency).setVersion(overrideVersion);
              }
            }
          }
          unmatchedVersionOverrides.remove(entry.getKey());
        }
      }
    }
  }
  return unmatchedVersionOverrides;
}