nus-yam/ex-repair huggingface dataset:
Program: 124547
Project: 124547
Buggy source:
/** 
 * Build the Configuration
 * @return the configuration
 */
public AbstractConfiguration build(){
  initApplicationFileConfiguration();
  initAppVersion();
  initApplicationConfiguration();
  initModuleConfiguration();
  ConcurrentCompositeConfiguration finalConfiguration=new ConcurrentCompositeConfiguration();
  if (addSystemConfigs) {
    finalConfiguration.addConfiguration(new ConcurrentMapConfiguration(new SystemConfiguration()));
  }
  finalConfiguration.addProperty(BootstrapConfigKeys.APP_VERSION_KEY.getPropertyName(),appVersion);
  addServerInstanceProperties(finalConfiguration);
  if (applicationConfiguration == null) {
    LOGGER.warn("String_Node_Str" + appName + "String_Node_Str");
    finalConfiguration.addConfiguration(applicationFileConfiguration);
    finalConfiguration.addConfiguration(moduleDefaultConfiguration);
  }
 else {
    finalConfiguration.addConfiguration(applicationConfiguration);
    finalConfiguration.addConfiguration(applicationFileConfiguration);
  }
  configureArchaius(finalConfiguration);
  logConfiguration(finalConfiguration);
  return finalConfiguration;
}

Fixed version (ground truth):
/** 
 * Build the Configuration
 * @return the configuration
 */
public AbstractConfiguration build(){
  initApplicationFileConfiguration();
  initAppVersion();
  initApplicationConfiguration();
  initModuleConfiguration();
  ConcurrentCompositeConfiguration finalConfiguration=new ConcurrentCompositeConfiguration();
  if (addSystemConfigs) {
    finalConfiguration.addConfiguration(new ConcurrentMapConfiguration(new SystemConfiguration()));
  }
  finalConfiguration.addProperty(BootstrapConfigKeys.APP_VERSION_KEY.getPropertyName(),appVersion);
  addServerInstanceProperties(finalConfiguration);
  if (applicationConfiguration == null) {
    LOGGER.warn("String_Node_Str" + appName + "String_Node_Str");
    finalConfiguration.addConfiguration(applicationFileConfiguration);
    finalConfiguration.addConfiguration(moduleDefaultConfiguration);
  }
 else {
    finalConfiguration.addConfiguration(applicationConfiguration);
    finalConfiguration.addConfiguration(applicationFileConfiguration);
  }
  finalConfiguration.setProperty(BootstrapConfigKeys.APP_VERSION_KEY.getPropertyName(),appVersion);
  configureArchaius(finalConfiguration);
  logConfiguration(finalConfiguration);
  return finalConfiguration;
}
Program: 124549
Project: 124549
Buggy source:
@Test public void testYamlSerDe() throws Exception {
  final YamlMessageSerDe serDe=new YamlMessageSerDe();
  serDe.initialize();
  final TestObject obj=new TestObject(RandomStringUtils.randomAlphanumeric(64),new SomeOtherObject(RandomStringUtils.randomAlphanumeric(64)));
  final byte[] serializedObj=serDe.serialize(obj);
  dumpToLog(serDe,serializedObj);
  final TestObject deserializedObj=serDe.deserialize(serializedObj,0,serializedObj.length,TestObject.class);
  Assert.assertEquals(obj,deserializedObj);
}

Fixed version (ground truth):
@Test public void testYamlSerDe() throws Exception {
  final YamlMessageSerDe serDe=new YamlMessageSerDe();
  final TestObject obj=new TestObject(RandomStringUtils.randomAlphanumeric(64),new SomeOtherObject(RandomStringUtils.randomAlphanumeric(64)));
  final byte[] serializedObj=serDe.serialize(obj);
  dumpToLog(serDe,serializedObj);
  final TestObject deserializedObj=serDe.deserialize(serializedObj,0,serializedObj.length,TestObject.class);
  Assert.assertEquals(obj,deserializedObj);
}
Program: 124550
Project: 124550
Buggy source:
@Test public void testBsonSerDe() throws Exception {
  final BsonMessageSerDe serDe=new BsonMessageSerDe();
  serDe.initialize();
  final TestObject obj=new TestObject(RandomStringUtils.randomAlphanumeric(64),new SomeOtherObject(RandomStringUtils.randomAlphanumeric(64)));
  final byte[] serializedObj=serDe.serialize(obj);
  dumpToLog(serDe,serializedObj);
  final TestObject deserializedObj=serDe.deserialize(serializedObj,0,serializedObj.length,TestObject.class);
  Assert.assertEquals(obj,deserializedObj);
}

Fixed version (ground truth):
@Test public void testBsonSerDe() throws Exception {
  final BsonMessageSerDe serDe=new BsonMessageSerDe();
  final TestObject obj=new TestObject(RandomStringUtils.randomAlphanumeric(64),new SomeOtherObject(RandomStringUtils.randomAlphanumeric(64)));
  final byte[] serializedObj=serDe.serialize(obj);
  dumpToLog(serDe,serializedObj);
  final TestObject deserializedObj=serDe.deserialize(serializedObj,0,serializedObj.length,TestObject.class);
  Assert.assertEquals(obj,deserializedObj);
}
Program: 124551
Project: 124551
Buggy source:
protected Map<ComponentType,Set<DistributionModuleGroup>> buildModuleGroupsMap(DynamicPluginAdapter pluginAdapter) throws Exception {
  Map<ComponentType,Set<DistributionModuleGroup>> moduleGroupsMap=new HashMap<>();
  for (  Map.Entry<ComponentType,IDynamicModuleGroupTemplate> entry : moduleGroupsTemplateMap.entrySet()) {
    Map<ComponentType,Set<DistributionModuleGroup>> groupMap=entry.getValue().getModuleGroups();
    if (groupMap != null && !groupMap.isEmpty()) {
      moduleGroupsMap.putAll(groupMap);
    }
  }
  return moduleGroupsMap;
}

Fixed version (ground truth):
protected Map<ComponentType,Set<DistributionModuleGroup>> buildModuleGroupsMap(DynamicPluginAdapter pluginAdapter) throws Exception {
  Map<ComponentType,Set<DistributionModuleGroup>> moduleGroupsMap=new HashMap<>();
  for (  Map.Entry<ComponentType,IDynamicModuleGroupTemplate> entry : moduleGroupsTemplateMap.entrySet()) {
    Map<ComponentType,Set<DistributionModuleGroup>> groupMap=entry.getValue().getModuleGroups();
    if (groupMap != null && !groupMap.isEmpty()) {
      for (      Map.Entry<ComponentType,Set<DistributionModuleGroup>> groupEntry : groupMap.entrySet()) {
        ComponentType key=groupEntry.getKey();
        Set<DistributionModuleGroup> existingGroupSet=moduleGroupsMap.get(key);
        if (existingGroupSet != null) {
          String name="String_Node_Str";
          try {
            name=key.name();
          }
 catch (          Exception e) {
            ExceptionHandler.process(e);
          }
 finally {
            CommonExceptionHandler.warn(this.getClass().getSimpleName() + "String_Node_Str" + name+ "String_Node_Str");
          }
          existingGroupSet.addAll(groupEntry.getValue());
        }
 else {
          moduleGroupsMap.put(key,groupEntry.getValue());
        }
      }
    }
  }
  return moduleGroupsMap;
}
Program: 124552
Project: 124552
Buggy source:
protected Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> buildNodeModuleGroupsMap(DynamicPluginAdapter pluginAdapter) throws Exception {
  Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> nodeModuleGroupsMap=new HashMap<>();
  for (  Map.Entry<ComponentType,IDynamicModuleGroupTemplate> entry : moduleGroupsTemplateMap.entrySet()) {
    Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> groupMap=entry.getValue().getNodeModuleGroups();
    if (groupMap != null && !groupMap.isEmpty()) {
      nodeModuleGroupsMap.putAll(groupMap);
    }
  }
  return nodeModuleGroupsMap;
}

Fixed version (ground truth):
protected Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> buildNodeModuleGroupsMap(DynamicPluginAdapter pluginAdapter) throws Exception {
  Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> nodeModuleGroupsMap=new HashMap<>();
  for (  Map.Entry<ComponentType,IDynamicModuleGroupTemplate> entry : moduleGroupsTemplateMap.entrySet()) {
    Map<NodeComponentTypeBean,Set<DistributionModuleGroup>> groupMap=entry.getValue().getNodeModuleGroups();
    if (groupMap != null && !groupMap.isEmpty()) {
      for (      Map.Entry<NodeComponentTypeBean,Set<DistributionModuleGroup>> groupEntry : groupMap.entrySet()) {
        NodeComponentTypeBean key=groupEntry.getKey();
        Set<DistributionModuleGroup> existingGroupSet=nodeModuleGroupsMap.get(key);
        if (existingGroupSet != null) {
          String keyStr="String_Node_Str";
          try {
            ComponentType componentType=key.getComponentType();
            if (componentType != null) {
              keyStr=keyStr + componentType.name();
            }
            keyStr=keyStr + "String_Node_Str" + key.getComponentName();
          }
 catch (          Exception e) {
            ExceptionHandler.process(e);
          }
 finally {
            CommonExceptionHandler.warn(this.getClass().getSimpleName() + "String_Node_Str" + keyStr+ "String_Node_Str");
          }
          existingGroupSet.addAll(groupEntry.getValue());
        }
 else {
          nodeModuleGroupsMap.put(key,groupEntry.getValue());
        }
      }
    }
  }
  return nodeModuleGroupsMap;
}
Program: 124553
Project: 124553
Buggy source:
@Override public Set<DistributionModuleGroup> getModuleGroups(ComponentType componentType,String componentName){
  return getModuleGroupsMap().get(new NodeComponentTypeBean(componentType,componentName));
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups(ComponentType componentType,String componentName){
  return getNodeModuleGroupsMap().get(new NodeComponentTypeBean(componentType,componentName));
}
Program: 124554
Project: 124554
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HBASE_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  DistributionModuleGroup dmg=new DistributionModuleGroup(runtimeId,true,null);
  hs.add(dmg);
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HBASE_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  if (StringUtils.isNotBlank(runtimeId)) {
    DistributionModuleGroup dmg=new DistributionModuleGroup(runtimeId,true,null);
    hs.add(dmg);
  }
  return hs;
}
Program: 124555
Project: 124555
Buggy source:
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  hs.add(new DistributionModuleGroup(runtimeId));
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  if (StringUtils.isNotBlank(runtimeId)) {
    hs.add(new DistributionModuleGroup(runtimeId));
  }
  return hs;
}
Program: 124556
Project: 124556
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  DistributionModuleGroup dmg=new DistributionModuleGroup(runtimeId);
  hs.add(dmg);
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String runtimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(runtimeId);
  if (StringUtils.isNotBlank(runtimeId)) {
    DistributionModuleGroup dmg=new DistributionModuleGroup(runtimeId);
    hs.add(dmg);
  }
  return hs;
}
Program: 124557
Project: 124557
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  String hiveHBaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_HBASE_MODULE_GROUP.getModuleName());
  checkRuntimeId(hiveRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  checkRuntimeId(hiveHBaseRuntimeId);
  hs.add(new DistributionModuleGroup(hiveRuntimeId));
  hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  hs.add(new DistributionModuleGroup(mrRuntimeId));
  ComponentCondition hbaseLoaderCondition=new MultiComponentCondition(new SimpleComponentCondition(new BasicExpression(HiveConstant.HIVE_CONFIGURATION_COMPONENT_HBASEPARAMETER)),BooleanOperator.AND,new SimpleComponentCondition(new ShowExpression(HiveConstant.HIVE_CONFIGURATION_COMPONENT_HBASEPARAMETER)));
  hs.add(new DistributionModuleGroup(hiveHBaseRuntimeId,false,hbaseLoaderCondition));
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  String hiveHBaseRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_HBASE_MODULE_GROUP.getModuleName());
  checkRuntimeId(hiveRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  checkRuntimeId(hiveHBaseRuntimeId);
  if (StringUtils.isNotBlank(hiveRuntimeId)) {
    hs.add(new DistributionModuleGroup(hiveRuntimeId));
  }
  if (StringUtils.isNotBlank(hdfsRuntimeId)) {
    hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  }
  if (StringUtils.isNotBlank(mrRuntimeId)) {
    hs.add(new DistributionModuleGroup(mrRuntimeId));
  }
  if (StringUtils.isNotBlank(hiveHBaseRuntimeId)) {
    ComponentCondition hbaseLoaderCondition=new MultiComponentCondition(new SimpleComponentCondition(new BasicExpression(HiveConstant.HIVE_CONFIGURATION_COMPONENT_HBASEPARAMETER)),BooleanOperator.AND,new SimpleComponentCondition(new ShowExpression(HiveConstant.HIVE_CONFIGURATION_COMPONENT_HBASEPARAMETER)));
    hs.add(new DistributionModuleGroup(hiveHBaseRuntimeId,false,hbaseLoaderCondition));
  }
  return hs;
}
Program: 124558
Project: 124558
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String sparkHiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(sparkHiveRuntimeId);
  DistributionModuleGroup dmg=new DistributionModuleGroup(sparkHiveRuntimeId,true,null);
  hs.add(dmg);
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String sparkHiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(sparkHiveRuntimeId);
  if (StringUtils.isNotBlank(sparkHiveRuntimeId)) {
    DistributionModuleGroup dmg=new DistributionModuleGroup(sparkHiveRuntimeId,true,null);
    hs.add(dmg);
  }
  return hs;
}
Program: 124559
Project: 124559
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  checkRuntimeId(hiveRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  hs.add(new DistributionModuleGroup(hiveRuntimeId));
  hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  hs.add(new DistributionModuleGroup(mrRuntimeId));
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hiveRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HIVE_MODULE_GROUP.getModuleName());
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  checkRuntimeId(hiveRuntimeId);
  checkRuntimeId(hdfsRuntimeId);
  checkRuntimeId(mrRuntimeId);
  if (StringUtils.isNotBlank(hiveRuntimeId)) {
    hs.add(new DistributionModuleGroup(hiveRuntimeId));
  }
  if (StringUtils.isNotBlank(hdfsRuntimeId)) {
    hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  }
  if (StringUtils.isNotBlank(mrRuntimeId)) {
    hs.add(new DistributionModuleGroup(mrRuntimeId));
  }
  return hs;
}
Program: 124560
Project: 124560
Buggy source:
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(hdfsRuntimeId);
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrRuntimeId);
  String mrParquetId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_PARQUET_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrParquetId);
  String mrParquetRequired=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrParquetRequired);
  String mrAvroRequired=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_AVRO_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrAvroRequired);
  hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  hs.add(new DistributionModuleGroup(mrRuntimeId));
  hs.add(new DistributionModuleGroup(mrParquetId));
  hs.add(new DistributionModuleGroup(mrParquetRequired,true,null));
  hs.add(new DistributionModuleGroup(mrAvroRequired,true,null));
  return hs;
}

Fixed version (ground truth):
@Override public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
  Set<DistributionModuleGroup> hs=new HashSet<>();
  DynamicPluginAdapter pluginAdapter=getPluginAdapter();
  String hdfsRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.HDFS_MODULE_GROUP.getModuleName());
  checkRuntimeId(hdfsRuntimeId);
  String mrRuntimeId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrRuntimeId);
  String mrParquetId=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_PARQUET_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrParquetId);
  String mrParquetRequired=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrParquetRequired);
  String mrAvroRequired=pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.MAPREDUCE_AVRO_MRREQUIRED_MODULE_GROUP.getModuleName());
  checkRuntimeId(mrAvroRequired);
  if (StringUtils.isNotBlank(hdfsRuntimeId)) {
    hs.add(new DistributionModuleGroup(hdfsRuntimeId));
  }
  if (StringUtils.isNotBlank(mrRuntimeId)) {
    hs.add(new DistributionModuleGroup(mrRuntimeId));
  }
  if (StringUtils.isNotBlank(mrParquetId)) {
    hs.add(new DistributionModuleGroup(mrParquetId));
  }
  if (StringUtils.isNotBlank(mrParquetRequired)) {
    hs.add(new DistributionModuleGroup(mrParquetRequired,true,null));
  }
  if (StringUtils.isNotBlank(mrAvroRequired)) {
    hs.add(new DistributionModuleGroup(mrAvroRequired,true,null));
  }
  return hs;
}
Program: 124562
Project: 124562
Buggy source:
public DynamicTemplateAdapter(TemplateBean templateBean,DynamicConfiguration configuration){
  super(templateBean,configuration);
}

Fixed version (ground truth):
public DynamicTemplateAdapter(TemplateBean templateBean,DynamicConfiguration configuration) throws Exception {
  super(templateBean,configuration);
  ObjectMapper om=new ObjectMapper();
  setTemplateBean(om.readValue(om.writeValueAsString(templateBean),TemplateBean.class));
}
Program: 124567
Project: 124567
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HadoopClusterConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HadoopClusterRepositoryNodeType.HADOOPCLUSTER.name()) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HadoopClusterConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HadoopClusterRepositoryNodeType.HADOOPCLUSTER.name()) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124568
Project: 124568
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HCatalogConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HCATALOG) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HCatalogConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HCATALOG) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124569
Project: 124569
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HDFSConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HDFS) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HDFSConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HDFS) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124570
Project: 124570
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof NoSQLConnectionItem)) {
    return neededComponents;
  }
  NoSQLConnection connection=(NoSQLConnection)((NoSQLConnectionItem)item).getConnection();
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,getRepType(connection)) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof NoSQLConnectionItem)) {
    return neededComponents;
  }
  NoSQLConnection connection=(NoSQLConnection)((NoSQLConnectionItem)item).getConnection();
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,getRepType(connection)) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124571
Project: 124571
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HadoopClusterConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HadoopClusterRepositoryNodeType.HADOOPCLUSTER.name()) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HadoopClusterConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HadoopClusterRepositoryNodeType.HADOOPCLUSTER.name()) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124572
Project: 124572
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HCatalogConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HCATALOG) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HCatalogConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HCATALOG) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124573
Project: 124573
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HDFSConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HDFS) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof HDFSConnectionItem)) {
    return neededComponents;
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,HDFS) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124574
Project: 124574
Buggy source:
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof NoSQLConnectionItem)) {
    return neededComponents;
  }
  NoSQLConnection connection=(NoSQLConnection)((NoSQLConnectionItem)item).getConnection();
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,getRepType(connection)) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  if (!(item instanceof NoSQLConnectionItem)) {
    return neededComponents;
  }
  NoSQLConnection connection=(NoSQLConnection)((NoSQLConnectionItem)item).getConnection();
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Collection<IComponent> components=service.getComponentsFactory().readComponents();
  for (  IComponent component : components) {
    if (isValid(item,type,seletetedNode,component,getRepType(connection)) && !neededComponents.contains(component)) {
      neededComponents.add(component);
    }
  }
  return neededComponents;
}
Program: 124575
Project: 124575
Buggy source:
@Test public void testGetHadoopDistributionsDisplay_withCustom__Sorted(){
  String[] hadoopDistributionsDisplay=HadoopDistributionsHelper.HADOOP.getDistributionsDisplay(true);
  Assert.assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},hadoopDistributionsDisplay);
}

Fixed version (ground truth):
@Test public void testGetHadoopDistributionsDisplay_withCustom__Sorted(){
  String[] hadoopDistributionsDisplay=HadoopDistributionsHelper.HADOOP.getDistributionsDisplay(true);
  Assert.assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},hadoopDistributionsDisplay);
}
Program: 124576
Project: 124576
Buggy source:
@Test public void testGetHadoopDistributionsDisplay_Sorted(){
  String[] hadoopDistributionsDisplay=HadoopDistributionsHelper.HADOOP.getDistributionsDisplay(false);
  Assert.assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},hadoopDistributionsDisplay);
}

Fixed version (ground truth):
@Test public void testGetHadoopDistributionsDisplay_Sorted(){
  String[] hadoopDistributionsDisplay=HadoopDistributionsHelper.HADOOP.getDistributionsDisplay(false);
  Assert.assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},hadoopDistributionsDisplay);
}
Program: 124577
Project: 124577
Buggy source:
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKafkaAssemblyModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}

Fixed version (ground truth):
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  results.put(CDH5100Constant.SPARK2_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKafkaAssemblyModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}
Program: 124578
Project: 124578
Buggy source:
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  results.put(CDH5100Constant.SPARK_KAFKA_AVRO_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKafkaAvroModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}

Fixed version (ground truth):
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  results.put(CDH5100Constant.SPARK2_KAFKA_ASSEMBLY_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  results.put(CDH5100Constant.SPARK_KAFKA_AVRO_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKafkaAvroModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}
Program: 124579
Project: 124579
Buggy source:
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KINESIS_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKinesisNodeModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}

Fixed version (ground truth):
@Test public void testModuleGroups() throws Exception {
  Map<String,String> results=new HashMap<>();
  results.put(CDH5100Constant.SPARK_KINESIS_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  results.put(CDH5100Constant.SPARK2_KINESIS_MRREQUIRED_MODULE_GROUP.getModuleName(),"String_Node_Str");
  Set<DistributionModuleGroup> moduleGroups=CDH5100SparkStreamingKinesisNodeModuleGroup.getModuleGroups(CDH5100Distribution.DISTRIBUTION_NAME,CDH5100Distribution.VERSION);
  assertEquals(results.size(),moduleGroups.size());
  moduleGroups.iterator();
  for (  DistributionModuleGroup module : moduleGroups) {
    assertTrue("String_Node_Str" + module.getModuleName(),results.containsKey(module.getModuleName()));
    if (results.get(module.getModuleName()) == null) {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str",results.get(module.getModuleName()) == null);
    }
 else {
      assertTrue("String_Node_Str" + module.getModuleName() + "String_Node_Str"+ results.get(module.getModuleName())+ "String_Node_Str",results.get(module.getModuleName()) != null);
      assertEquals(results.get(module.getModuleName()),module.getRequiredIf().getConditionString());
    }
  }
}
Program: 124582
Project: 124582
Buggy source:
@Override protected String[] getDistributionVersionsDisplay(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
}

Fixed version (ground truth):
@Override protected String[] getDistributionVersionsDisplay(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
}
Program: 124583
Project: 124583
Buggy source:
@Override protected String[] getDistributionVersionsDisplay(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
}

Fixed version (ground truth):
@Override protected String[] getDistributionVersionsDisplay(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
}
Program: 124585
Project: 124585
Buggy source:
@Test public void generateSparkVersionShowIfConditionsTest(){
  assertNull(ComponentConditionUtil.generateSparkVersionShowIfConditions(null));
  Map<ESparkVersion,Set<DistributionVersion>> sparkVersionsMap=new HashMap<>();
  Set<DistributionVersion> distributionVersions=new LinkedHashSet<>();
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  sparkVersionsMap.put(ESparkVersion.SPARK_2_0,distributionVersions);
  distributionVersions=new HashSet<>();
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  sparkVersionsMap.put(ESparkVersion.SPARK_1_6,distributionVersions);
  String[] showIfs=ComponentConditionUtil.generateSparkVersionShowIfConditions(sparkVersionsMap);
  assertTrue(showIfs.length == 2);
  assertThat(Arrays.asList(showIfs),hasItem("String_Node_Str"));
  assertThat(Arrays.asList(showIfs),hasItem("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void generateSparkVersionShowIfConditionsTest(){
  assertNull(ComponentConditionUtil.generateSparkVersionShowIfConditions(null));
  Map<ESparkVersion,Set<DistributionVersion>> sparkVersionsMap=new HashMap<>();
  Set<DistributionVersion> distributionVersions=new LinkedHashSet<>();
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  sparkVersionsMap.put(ESparkVersion.SPARK_2_0,distributionVersions);
  distributionVersions=new LinkedHashSet<>();
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  distributionVersions.add(new DistributionVersion(null,new DistributionBean(ComponentType.SPARKBATCH,"String_Node_Str","String_Node_Str"),"String_Node_Str","String_Node_Str"));
  sparkVersionsMap.put(ESparkVersion.SPARK_1_6,distributionVersions);
  String[] showIfs=ComponentConditionUtil.generateSparkVersionShowIfConditions(sparkVersionsMap);
  assertTrue(showIfs.length == 2);
  assertThat(Arrays.asList(showIfs),hasItem("String_Node_Str"));
  assertThat(Arrays.asList(showIfs),hasItem("String_Node_Str"));
}