Program: 127913
Project: 127913
Buggy source:
public Map<ECustomVersionGroup,Set<LibraryFile>> getImportLibLibraries(){
  Map<ECustomVersionGroup,Set<LibraryFile>> libMap=new HashMap<ECustomVersionGroup,Set<LibraryFile>>();
  if (isFromExistVersion) {
    IHadoopService hadoopService=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {
      hadoopService=(IHadoopService)GlobalServiceRegister.getDefault().getService(IHadoopService.class);
    }
    if (hadoopService != null) {
      for (      ECustomVersionGroup group : existVersionSelectionMap.keySet()) {
        if (existVersionSelectionMap.get(group)) {
          if (types != null) {
            HashSet libInSameGroup=new HashSet<LibraryFile>();
            for (            ECustomVersionType type : types) {
              if (type.getGroup() == group) {
                if (ECustomVersionType.HCATALOG == type || ECustomVersionType.OOZIE == type) {
                  type=ECustomVersionType.HDFS;
                }
                Set<String> hadoopLibraries=hadoopService.getHadoopLibrariesByType(type,getDistribution(),getVersion());
                Set<LibraryFile> convertToLibraryFile=customLibUtil.convertToLibraryFile(hadoopLibraries);
                libInSameGroup.addAll(convertToLibraryFile);
              }
            }
            libMap.put(group,libInSameGroup);
          }
        }
      }
    }
  }
 else   if (isFromZip) {
    Set<ECustomVersionGroup> groups=new HashSet<ECustomVersionGroup>();
    for (    ECustomVersionGroup group : fromZipSelectionMap.keySet()) {
      if (fromZipSelectionMap.get(group)) {
        groups.add(group);
      }
    }
    return customLibUtil.readZipFile(zipLocation,groups);
  }
  return libMap;
}

Fixed version (ground truth):
public Map<ECustomVersionGroup,Set<LibraryFile>> getImportLibLibraries(){
  Map<ECustomVersionGroup,Set<LibraryFile>> libMap=new HashMap<ECustomVersionGroup,Set<LibraryFile>>();
  if (isFromExistVersion) {
    IHadoopService hadoopService=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {
      hadoopService=(IHadoopService)GlobalServiceRegister.getDefault().getService(IHadoopService.class);
    }
    if (hadoopService != null) {
      for (      ECustomVersionGroup group : existVersionSelectionMap.keySet()) {
        if (existVersionSelectionMap.get(group)) {
          if (types != null) {
            HashSet libInSameGroup=new HashSet<LibraryFile>();
            for (            ECustomVersionType type : types) {
              if (type.getGroup() == group) {
                Set<String> hadoopLibraries=new HashSet<String>();
                if (ECustomVersionType.PIG == type) {
                  hadoopLibraries=getLibrariesForPig();
                }
 else {
                  if (ECustomVersionType.HCATALOG == type || ECustomVersionType.OOZIE == type) {
                    type=ECustomVersionType.HDFS;
                  }
                  hadoopLibraries=hadoopService.getHadoopLibrariesByType(type,getDistribution(),getVersion());
                }
                Set<LibraryFile> convertToLibraryFile=customLibUtil.convertToLibraryFile(hadoopLibraries);
                libInSameGroup.addAll(convertToLibraryFile);
              }
            }
            libMap.put(group,libInSameGroup);
          }
        }
      }
    }
  }
 else   if (isFromZip) {
    Set<ECustomVersionGroup> groups=new HashSet<ECustomVersionGroup>();
    for (    ECustomVersionGroup group : fromZipSelectionMap.keySet()) {
      if (fromZipSelectionMap.get(group)) {
        groups.add(group);
      }
    }
    return customLibUtil.readZipFile(zipLocation,groups);
  }
  return libMap;
}