Program: 6736
Project: 6736
Buggy source:
@Override public void configureAdapter(String adapterName,T etlConfig,AdapterConfigurer configurer) throws Exception {
  ETLStage sourceConfig=etlConfig.getSource();
  ETLStage sinkConfig=etlConfig.getSink();
  List<ETLStage> transformConfigs=etlConfig.getTransforms();
  String sourcePluginId=String.format("String_Node_Str",Constants.Source.PLUGINTYPE,Constants.ID_SEPARATOR,sourceConfig.getName());
  String sinkPluginId=String.format("String_Node_Str",Constants.Sink.PLUGINTYPE,Constants.ID_SEPARATOR,sinkConfig.getName());
  PluginProperties sourceProperties=getPluginProperties(sourceConfig);
  PipelineConfigurable source=configurer.usePlugin(Constants.Source.PLUGINTYPE,sourceConfig.getName(),sourcePluginId,sourceProperties);
  if (source == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Source.PLUGINTYPE,sourceConfig.getName()));
  }
  PluginProperties sinkProperties=getPluginProperties(sinkConfig);
  PipelineConfigurable sink=configurer.usePlugin(Constants.Sink.PLUGINTYPE,sinkConfig.getName(),sinkPluginId,sinkProperties);
  if (sink == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Sink.PLUGINTYPE,sinkConfig.getName()));
  }
  List<String> transformIds=Lists.newArrayListWithCapacity(transformConfigs.size());
  List<Transformation> transforms=Lists.newArrayListWithCapacity(transformConfigs.size());
  for (int i=0; i < transformConfigs.size(); i++) {
    ETLStage transformConfig=transformConfigs.get(i);
    String transformId=String.format("String_Node_Str",transformConfig.getName(),Constants.ID_SEPARATOR,i);
    PluginProperties transformProperties=getPluginProperties(transformConfig);
    Transform transformObj=configurer.usePlugin(Constants.Transform.PLUGINTYPE,transformConfig.getName(),transformId,transformProperties);
    if (transformObj == null) {
      throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Transform.PLUGINTYPE,transformConfig.getName()));
    }
    transformIds.add(transformId);
    transforms.add(transformObj);
  }
  validateStages(source,sink,transforms);
  configure(source,configurer,sourcePluginId);
  configure(sink,configurer,sinkPluginId);
  configurer.addRuntimeArgument(Constants.ADAPTER_NAME,adapterName);
  configurer.addRuntimeArgument(Constants.Source.PLUGINID,sourcePluginId);
  configurer.addRuntimeArgument(Constants.Sink.PLUGINID,sinkPluginId);
  configurer.addRuntimeArgument(Constants.Transform.PLUGINIDS,GSON.toJson(transformIds));
  Resources resources=etlConfig.getResources();
  if (resources != null) {
    configurer.setResources(resources);
  }
}

Fixed version (ground truth):
@Override public void configureAdapter(String adapterName,T etlConfig,AdapterConfigurer configurer) throws Exception {
  ETLStage sourceConfig=etlConfig.getSource();
  ETLStage sinkConfig=etlConfig.getSink();
  List<ETLStage> transformConfigs=etlConfig.getTransforms();
  String sourcePluginId=PluginID.from(Constants.Source.PLUGINTYPE,sourceConfig.getName(),1).getID();
  String sinkPluginId=PluginID.from(Constants.Sink.PLUGINTYPE,sinkConfig.getName(),2 + transformConfigs.size()).getID();
  PluginProperties sourceProperties=getPluginProperties(sourceConfig);
  PipelineConfigurable source=configurer.usePlugin(Constants.Source.PLUGINTYPE,sourceConfig.getName(),sourcePluginId,sourceProperties);
  if (source == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Source.PLUGINTYPE,sourceConfig.getName()));
  }
  PluginProperties sinkProperties=getPluginProperties(sinkConfig);
  PipelineConfigurable sink=configurer.usePlugin(Constants.Sink.PLUGINTYPE,sinkConfig.getName(),sinkPluginId,sinkProperties);
  if (sink == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Sink.PLUGINTYPE,sinkConfig.getName()));
  }
  List<String> transformIds=Lists.newArrayListWithCapacity(transformConfigs.size());
  List<Transformation> transforms=Lists.newArrayListWithCapacity(transformConfigs.size());
  for (int i=0; i < transformConfigs.size(); i++) {
    ETLStage transformConfig=transformConfigs.get(i);
    String transformId=PluginID.from(Constants.Transform.PLUGINTYPE,transformConfig.getName(),2 + i).getID();
    PluginProperties transformProperties=getPluginProperties(transformConfig);
    Transform transformObj=configurer.usePlugin(Constants.Transform.PLUGINTYPE,transformConfig.getName(),transformId,transformProperties);
    if (transformObj == null) {
      throw new IllegalArgumentException(String.format("String_Node_Str",Constants.Transform.PLUGINTYPE,transformConfig.getName()));
    }
    transformIds.add(transformId);
    transforms.add(transformObj);
  }
  validateStages(source,sink,transforms);
  configure(source,configurer,sourcePluginId);
  configure(sink,configurer,sinkPluginId);
  configurer.addRuntimeArgument(Constants.ADAPTER_NAME,adapterName);
  configurer.addRuntimeArgument(Constants.Source.PLUGINID,sourcePluginId);
  configurer.addRuntimeArgument(Constants.Sink.PLUGINID,sinkPluginId);
  configurer.addRuntimeArgument(Constants.Transform.PLUGINIDS,GSON.toJson(transformIds));
  Resources resources=etlConfig.getResources();
  if (resources != null) {
    configurer.setResources(resources);
  }
}