Program: 124561
Project: 124561
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  ComponentCondition hbaseLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.HBASE_LOADER_VALUE));
  ComponentCondition parquetLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.PARQUET_LOADER_VALUE));
  ComponentCondition hcatLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.HCAT_LOADER_VALUE));
  ComponentCondition avroLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.AVRO_LOADER_VALUE));
  ComponentCondition rcfileLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.RCFILE_LOADER_VALUE));
  ComponentCondition sequencefileLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.SEQUENCEFILE_LOADER_VALUE));
  ComponentCondition s3condition=new SimpleComponentCondition(new BasicExpression(PigConstant.PIGLOAD_S3_LOCATION_LOAD));
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String pigRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  String pigHCatRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_HCATALOG_MODULE_GROUP.getModuleName());
  String hbaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HBASE_MODULE_GROUP.getModuleName());
  String pigHBaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_HBASE_MODULE_GROUP.getModuleName());
  String pigParquetRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_PARQUET_MODULE_GROUP.getModuleName());
  String pigAvroRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_AVRO_MODULE_GROUP.getModuleName());
  String pigRcfileRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_RCFILE_MODULE_GROUP.getModuleName());
  String pigSequenceRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_SEQUENCEFILE_MODULE_GROUP.getModuleName());
  String pigS3RuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_S3_MODULE_GROUP.getModuleName());
  checkRuntimeId(pigRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  checkRuntimeId(pigHCatRuntimeId);
  checkRuntimeId(hbaseRuntimeId);
  checkRuntimeId(pigHBaseRuntimeId);
  checkRuntimeId(pigParquetRuntimeId);
  checkRuntimeId(pigAvroRuntimeId);
  checkRuntimeId(pigRcfileRuntimeId);
  checkRuntimeId(pigSequenceRuntimeId);
  checkRuntimeId(pigS3RuntimeId);
  hs.add(new DistributionModuleGroup(pigRuntimeId));
  hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  hs.add(new DistributionModuleGroup(mrRuntimeId));
  hs.add(new DistributionModuleGroup(pigHCatRuntimeId,false,hcatLoaderCondition));
  hs.add(new DistributionModuleGroup(hbaseRuntimeId,false,hbaseLoaderCondition));
  hs.add(new DistributionModuleGroup(pigHBaseRuntimeId,false,hbaseLoaderCondition));
  hs.add(new DistributionModuleGroup(pigParquetRuntimeId,false,parquetLoaderCondition));
  hs.add(new DistributionModuleGroup(pigAvroRuntimeId,false,avroLoaderCondition));
  hs.add(new DistributionModuleGroup(pigRcfileRuntimeId,false,rcfileLoaderCondition));
  hs.add(new DistributionModuleGroup(pigSequenceRuntimeId,false,sequencefileLoaderCondition));
  hs.add(new DistributionModuleGroup(pigS3RuntimeId,false,s3condition));
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  ComponentCondition hbaseLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.HBASE_LOADER_VALUE));
  ComponentCondition parquetLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.PARQUET_LOADER_VALUE));
  ComponentCondition hcatLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.HCAT_LOADER_VALUE));
  ComponentCondition avroLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.AVRO_LOADER_VALUE));
  ComponentCondition rcfileLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.RCFILE_LOADER_VALUE));
  ComponentCondition sequencefileLoaderCondition=new SimpleComponentCondition(new BasicExpression(PigConstant.LOADER_PARAMETER,EqualityOperator.EQ,PigConstant.SEQUENCEFILE_LOADER_VALUE));
  ComponentCondition s3condition=new SimpleComponentCondition(new BasicExpression(PigConstant.PIGLOAD_S3_LOCATION_LOAD));
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String pigRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  String pigHCatRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_HCATALOG_MODULE_GROUP.getModuleName());
  String hbaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HBASE_MODULE_GROUP.getModuleName());
  String pigHBaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_HBASE_MODULE_GROUP.getModuleName());
  String pigParquetRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_PARQUET_MODULE_GROUP.getModuleName());
  String pigAvroRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_AVRO_MODULE_GROUP.getModuleName());
  String pigRcfileRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_RCFILE_MODULE_GROUP.getModuleName());
  String pigSequenceRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_SEQUENCEFILE_MODULE_GROUP.getModuleName());
  String pigS3RuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.PIG_S3_MODULE_GROUP.getModuleName());
  checkRuntimeId(pigRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  checkRuntimeId(pigHCatRuntimeId);
  checkRuntimeId(hbaseRuntimeId);
  checkRuntimeId(pigHBaseRuntimeId);
  checkRuntimeId(pigParquetRuntimeId);
  checkRuntimeId(pigAvroRuntimeId);
  checkRuntimeId(pigRcfileRuntimeId);
  checkRuntimeId(pigSequenceRuntimeId);
  checkRuntimeId(pigS3RuntimeId);
  if (StringUtils.isNotBlank(pigRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigRuntimeId));
  }
  if (StringUtils.isNotBlank(hdfsRuntimeId)) {
    hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  }
  if (StringUtils.isNotBlank(mrRuntimeId)) {
    hs.add(new DistributionModuleGroup(mrRuntimeId));
  }
  if (StringUtils.isNotBlank(pigHCatRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigHCatRuntimeId,false,hcatLoaderCondition));
  }
  if (StringUtils.isNotBlank(hbaseRuntimeId)) {
    hs.add(new DistributionModuleGroup(hbaseRuntimeId,false,hbaseLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigHBaseRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigHBaseRuntimeId,false,hbaseLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigParquetRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigParquetRuntimeId,false,parquetLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigAvroRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigAvroRuntimeId,false,avroLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigRcfileRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigRcfileRuntimeId,false,rcfileLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigSequenceRuntimeId)) {
    hs.add(new DistributionModuleGroup(pigSequenceRuntimeId,false,sequencefileLoaderCondition));
  }
  if (StringUtils.isNotBlank(pigS3RuntimeId)) {
    hs.add(new DistributionModuleGroup(pigS3RuntimeId,false,s3condition));
  }
  return hs;
}