Program: 125218
Project: 125218
Buggy source:
private void addModulesToCache(Set<String> mavenUristoSearch,List<MavenArtifact> searchResults,Map<String,ModuleToInstall> theCache){
  for (  MavenArtifact artifact : searchResults) {
    String artifactId=artifact.getArtifactId();
    String packageName=artifact.getType();
    if (packageName == null) {
      packageName=MavenConstants.TYPE_JAR;
    }
    String version=artifact.getVersion();
    String description=artifact.getDescription();
    String license=artifact.getLicense();
    String license_url=artifact.getLicenseUrl();
    String url=null;
    if (artifact.getUrl() != null && !"String_Node_Str".equals(artifact.getUrl())) {
      url=artifact.getUrl();
    }
    ModuleToInstall m=new ModuleToInstall();
    String mvnUri=MavenUrlHelper.generateMvnUrl(artifact.getGroupId(),artifactId,version,packageName,artifact.getClassifier());
    m.setMavenUri(mvnUri);
    List<ModuleNeeded> list=contextMap.get(mvnUri);
    for (    ModuleNeeded module : list) {
      if (mvnUri.equals(module.getMavenUri())) {
        m.setName(module.getModuleName());
      }
    }
    if (m.getName() == null) {
      if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(artifact.getGroupId()) || StringUtils.isEmpty(version)) {
        m.setName(artifactId + "String_Node_Str" + packageName);
      }
 else {
        m.setName(artifactId + "String_Node_Str" + version+ "String_Node_Str"+ packageName);
      }
    }
    m.setLicenseType(license);
    m.setLicenseUrl(license_url);
    m.setDescription(description);
    m.setUrl_description(url);
    m.setUrl_download(url);
    if (StringUtils.isEmpty(artifact.getType()) || MavenConstants.PACKAGING_POM.equals(artifact.getType())) {
      m.setDistribution(MavenConstants.DOWNLOAD_MANUAL);
    }
    if (theCache == localCache) {
      m.setFromCustomNexus(true);
    }
    theCache.put(mvnUri,m);
  }
}

Fixed version (ground truth):
private void addModulesToCache(Set<String> mavenUristoSearch,List<MavenArtifact> searchResults,Map<String,ModuleToInstall> theCache){
  for (  MavenArtifact artifact : searchResults) {
    String artifactId=artifact.getArtifactId();
    String packageName=artifact.getType();
    if (packageName == null) {
      packageName=MavenConstants.TYPE_JAR;
    }
    String version=artifact.getVersion();
    String description=artifact.getDescription();
    String license=artifact.getLicense();
    String license_url=artifact.getLicenseUrl();
    String url=null;
    if (artifact.getUrl() != null && !"String_Node_Str".equals(artifact.getUrl())) {
      url=artifact.getUrl();
    }
    ModuleToInstall m=new ModuleToInstall();
    String mvnUri=MavenUrlHelper.generateMvnUrl(artifact.getGroupId(),artifactId,version,packageName,artifact.getClassifier());
    m.setMavenUri(mvnUri);
    List<ModuleNeeded> list=contextMap.get(mvnUri);
    if (list != null) {
      for (      ModuleNeeded module : list) {
        if (mvnUri.equals(module.getMavenUri())) {
          m.setName(module.getModuleName());
        }
      }
    }
    if (m.getName() == null) {
      if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(artifact.getGroupId()) || StringUtils.isEmpty(version)) {
        m.setName(artifactId + "String_Node_Str" + packageName);
      }
 else {
        m.setName(artifactId + "String_Node_Str" + version+ "String_Node_Str"+ packageName);
      }
    }
    m.setLicenseType(license);
    m.setLicenseUrl(license_url);
    m.setDescription(description);
    m.setUrl_description(url);
    m.setUrl_download(url);
    if (StringUtils.isEmpty(artifact.getType()) || MavenConstants.PACKAGING_POM.equals(artifact.getType())) {
      m.setDistribution(MavenConstants.DOWNLOAD_MANUAL);
    }
    if (theCache == localCache) {
      m.setFromCustomNexus(true);
    }
    theCache.put(mvnUri,m);
  }
}