Program: 127811
Project: 127811
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) {
                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;
}

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>();
            boolean commonGroupCalculated=false;
            for (            ECustomVersionType type : types) {
              if (type.getGroup() == group) {
                Set<String> hadoopLibraries=new HashSet<String>();
                if (ECustomVersionType.PIG == type) {
                  hadoopLibraries=getLibrariesForPig();
                }
 else {
                  if (!commonGroupCalculated && (ECustomVersionType.HCATALOG == type || ECustomVersionType.OOZIE == type)) {
                    type=ECustomVersionType.HDFS;
                  }
                  if (type == ECustomVersionType.HDFS) {
                    commonGroupCalculated=true;
                  }
                  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;
}