Program: 147631
Project: 147631
Buggy source:
protected void importClusterContents(IProgressMonitor monitor){
  String url=serverDef.getProtocol() + serverDef.getHost() + "String_Node_Str"+ serverDef.getPort()+ "String_Node_Str";
  String userName=serverDef.getUser();
  String password=serverDef.getPasswd();
  Reader reader=null;
  List<File> files=getFilesOrderByRule();
  monitor.beginTask(Messages.ImportDataClusterAction_importProcessTitle,files.size() + 10);
  Map<String,List<String>> conceptMap=new LinkedHashMap<String,List<String>>();
  Unmarshaller unmarshaller=new Unmarshaller(WsItem.class);
  try {
    Mapping mapping=getWSItemMapping();
    unmarshaller.setWhitespacePreserve(true);
    unmarshaller.setMapping(mapping);
  }
 catch (  Exception e) {
    log.error(e.getLocalizedMessage(),e);
    IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,Messages.ImportDataClusterAction_errorTitle,e);
    getResult().add(errStatus);
    return;
  }
  for (  File file : files) {
    String concept="String_Node_Str";
    try {
      reader=new InputStreamReader(new FileInputStream(file),"String_Node_Str");
      WsItem wsItem=(WsItem)unmarshaller.unmarshal(reader);
      String key=wsItem.getWsDataClusterPK().getPk() + "String_Node_Str" + wsItem.getConceptName()+ "String_Node_Str"+ wsItem.getDataModelName();
      List<String> list=null;
      list=conceptMap.get(key);
      if (list == null) {
        list=new ArrayList<String>();
        conceptMap.put(key,list);
      }
      String content=wsItem.getContent();
      list.add(content);
    }
 catch (    Exception e) {
      log.error(e.getLocalizedMessage(),e);
      String msg=Messages.bind(Messages.ImportDataClusterAction_importErrorMsg,concept,dName,e.getLocalizedMessage());
      IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,msg,e);
      getResult().add(errStatus);
      return;
    }
 finally {
      try {
        if (reader != null) {
          reader.close();
        }
      }
 catch (      Exception e) {
      }
    }
    monitor.worked(1);
  }
  for (  Entry<String,List<String>> entry : conceptMap.entrySet()) {
    String[] keys=entry.getKey().split("String_Node_Str");
    String cluster=keys[0];
    String concept=keys[1];
    String datamodel=keys[2];
    BulkloadClient bulkloadClient=new BulkloadClient(url,userName,password,null,cluster,concept,datamodel);
    bulkloadClient.setOptions(new BulkloadOptions(false,false,500));
    StringBuilder sb=new StringBuilder();
    for (    String xml : entry.getValue()) {
      sb.append(xml).append("String_Node_Str");
    }
    try {
      InputStreamMerger manager=bulkloadClient.load();
      InputStream bin=new ByteArrayInputStream(sb.toString().getBytes("String_Node_Str"));
      manager.push(bin);
      manager.close();
    }
 catch (    Exception e) {
      log.error(e.getLocalizedMessage(),e);
      String msg=Messages.bind(Messages.ImportDataClusterAction_importErrorMsg,concept,dName,e.getLocalizedMessage());
      IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,msg,e);
      getResult().add(errStatus);
    }
    monitor.worked(1);
  }
  monitor.done();
  return;
}

Fixed version (ground truth):
protected void importClusterContents(IProgressMonitor monitor){
  String url=serverDef.getProtocol() + serverDef.getHost() + "String_Node_Str"+ serverDef.getPort()+ "String_Node_Str";
  String userName=serverDef.getUser();
  String password=serverDef.getPasswd();
  Reader reader=null;
  List<File> files=getFilesOrderByRule();
  monitor.beginTask(Messages.ImportDataClusterAction_importProcessTitle,files.size() + 10);
  Map<String,List<String>> conceptMap=new LinkedHashMap<String,List<String>>();
  Unmarshaller unmarshaller=new Unmarshaller(WSItem.class);
  try {
    Mapping mapping=getWSItemMapping();
    unmarshaller.setWhitespacePreserve(true);
    unmarshaller.setMapping(mapping);
  }
 catch (  Exception e) {
    log.error(e.getLocalizedMessage(),e);
    IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,Messages.ImportDataClusterAction_errorTitle,e);
    getResult().add(errStatus);
    return;
  }
  for (  File file : files) {
    String concept="String_Node_Str";
    try {
      reader=new InputStreamReader(new FileInputStream(file),"String_Node_Str");
      WSItem wsItem=(WSItem)unmarshaller.unmarshal(reader);
      String key=wsItem.getWsDataClusterPK().getPk() + "String_Node_Str" + wsItem.getConceptName()+ "String_Node_Str"+ wsItem.getDataModelName();
      List<String> list=null;
      list=conceptMap.get(key);
      if (list == null) {
        list=new ArrayList<String>();
        conceptMap.put(key,list);
      }
      String content=wsItem.getContent();
      list.add(content);
    }
 catch (    Exception e) {
      log.error(e.getLocalizedMessage(),e);
      String msg=Messages.bind(Messages.ImportDataClusterAction_importErrorMsg,concept,dName,e.getLocalizedMessage());
      IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,msg,e);
      getResult().add(errStatus);
      return;
    }
 finally {
      try {
        if (reader != null) {
          reader.close();
        }
      }
 catch (      Exception e) {
      }
    }
    monitor.worked(1);
  }
  for (  Entry<String,List<String>> entry : conceptMap.entrySet()) {
    String[] keys=entry.getKey().split("String_Node_Str");
    String cluster=keys[0];
    String concept=keys[1];
    String datamodel=keys[2];
    BulkloadClient bulkloadClient=new BulkloadClient(url,userName,password,null,cluster,concept,datamodel);
    bulkloadClient.setOptions(new BulkloadOptions(false,false,500));
    StringBuilder sb=new StringBuilder();
    for (    String xml : entry.getValue()) {
      sb.append(xml).append("String_Node_Str");
    }
    try {
      InputStreamMerger manager=bulkloadClient.load();
      InputStream bin=new ByteArrayInputStream(sb.toString().getBytes("String_Node_Str"));
      manager.push(bin);
      manager.close();
    }
 catch (    Exception e) {
      log.error(e.getLocalizedMessage(),e);
      String msg=Messages.bind(Messages.ImportDataClusterAction_importErrorMsg,concept,dName,e.getLocalizedMessage());
      IStatus errStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,msg,e);
      getResult().add(errStatus);
    }
    monitor.worked(1);
  }
  monitor.done();
  return;
}