Program: 39403
Project: 39403
Buggy source:
private synchronized LinkedBlockingQueue<IAtomContainer> multiSolution(){
  LinkedBlockingQueue<IAtomContainer> mcss=new LinkedBlockingQueue<>();
  logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ mcssList.size()+ "String_Node_Str");
  long startTime=Calendar.getInstance().getTimeInMillis();
  IAtomContainer querySeed=mcssList.get(0);
  long calcTime=startTime;
  ConcurrentLinkedQueue<IAtomContainer> seeds=new ConcurrentLinkedQueue<>();
  try {
    Set<Fragment> localSeeds=new TreeSet<>();
    int minSeedSize=querySeed.getAtomCount();
    for (int index=1; index < mcssList.size(); index++) {
      IAtomContainer target=mcssList.get(index);
      Collection<Fragment> fragmentsFromMCS;
      BaseMapping comparison;
      comparison=new Isomorphism(querySeed,target,Algorithm.DEFAULT,matchBonds,matchRings,matchAtomType);
      comparison.setChemFilters(true,true,true);
      fragmentsFromMCS=getMCSS(comparison);
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ fragmentsFromMCS.size()+ "String_Node_Str"+ comparison.getFirstAtomMapping().getCount());
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ querySeed.getAtomCount()+ "String_Node_Str"+ querySeed.getBondCount()+ "String_Node_Str");
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ target.getAtomCount()+ "String_Node_Str"+ target.getBondCount()+ "String_Node_Str");
      long endCalcTime=Calendar.getInstance().getTimeInMillis();
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ index+ "String_Node_Str"+ (endCalcTime - calcTime)+ "String_Node_Str");
      calcTime=endCalcTime;
      if (fragmentsFromMCS.isEmpty()) {
        localSeeds.clear();
        break;
      }
      Iterator<Fragment> iterator=fragmentsFromMCS.iterator();
      while (iterator.hasNext()) {
        Fragment fragment=iterator.next();
        if (minSeedSize > fragment.getContainer().getAtomCount()) {
          localSeeds.clear();
          minSeedSize=fragment.getContainer().getAtomCount();
        }
        if (minSeedSize == fragment.getContainer().getAtomCount()) {
          localSeeds.add(fragment);
        }
      }
    }
    if (!localSeeds.isEmpty()) {
      for (      Fragment f : localSeeds) {
        seeds.add(f.getContainer());
      }
      localSeeds.clear();
    }
    logger.debug("String_Node_Str" + seeds.size());
    minSeedSize=Integer.MAX_VALUE;
    while (!seeds.isEmpty()) {
      IAtomContainer fragmentMCS=seeds.poll();
      localSeeds=new TreeSet<>();
      logger.debug("String_Node_Str" + getMCSSSmiles(fragmentMCS));
      Collection<Fragment> fragmentsFromMCS;
      for (int index=0; index < mcssList.size(); index++) {
        IAtomContainer target=mcssList.get(index);
        Isomorphism comparison=new Isomorphism(fragmentMCS,target,Algorithm.DEFAULT,matchBonds,matchRings,matchAtomType);
        comparison.setChemFilters(true,true,true);
        fragmentsFromMCS=getMCSS(comparison);
        if (fragmentsFromMCS == null || fragmentsFromMCS.isEmpty()) {
          localSeeds.clear();
          break;
        }
        Iterator<Fragment> iterator=fragmentsFromMCS.iterator();
        while (iterator.hasNext()) {
          Fragment fragment=iterator.next();
          if (minSeedSize > fragment.getContainer().getAtomCount()) {
            localSeeds.clear();
            minSeedSize=fragment.getContainer().getAtomCount();
          }
          if (minSeedSize == fragment.getContainer().getAtomCount()) {
            localSeeds.add(fragment);
          }
        }
        fragmentMCS=localSeeds.iterator().next().getContainer();
      }
      if (!localSeeds.isEmpty()) {
        for (        Fragment f : localSeeds) {
          mcss.add(f.getContainer());
        }
        localSeeds.clear();
      }
    }
  }
 catch (  CDKException e) {
    logger.error("String_Node_Str",e);
  }
  long endTime=Calendar.getInstance().getTimeInMillis();
  logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ (endTime - startTime)+ "String_Node_Str");
  logger.debug("String_Node_Str" + querySeed.getAtomCount() + "String_Node_Str"+ querySeed.getBondCount()+ "String_Node_Str");
  return mcss;
}

Fixed version (ground truth):
private synchronized LinkedBlockingQueue<IAtomContainer> multiSolution(){
  LinkedBlockingQueue<IAtomContainer> mcss=new LinkedBlockingQueue<>();
  logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ mcssList.size()+ "String_Node_Str");
  long startTime=Calendar.getInstance().getTimeInMillis();
  IAtomContainer querySeed=mcssList.get(0);
  long calcTime=startTime;
  ConcurrentLinkedQueue<IAtomContainer> seeds=new ConcurrentLinkedQueue<>();
  try {
    Set<Fragment> localSeeds=new TreeSet<>();
    int minSeedSize=querySeed.getAtomCount();
    for (int index=1; index < mcssList.size(); index++) {
      IAtomContainer target=mcssList.get(index);
      Collection<Fragment> fragmentsFromMCS;
      BaseMapping comparison;
      comparison=new Isomorphism(querySeed,target,Algorithm.DEFAULT,matchBonds,matchRings,matchAtomType);
      comparison.setChemFilters(true,true,true);
      fragmentsFromMCS=getMCSS(comparison);
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ fragmentsFromMCS.size()+ "String_Node_Str"+ comparison.getFirstAtomMapping().getCount());
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ querySeed.getAtomCount()+ "String_Node_Str"+ querySeed.getBondCount()+ "String_Node_Str");
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ target.getAtomCount()+ "String_Node_Str"+ target.getBondCount()+ "String_Node_Str");
      long endCalcTime=Calendar.getInstance().getTimeInMillis();
      logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ index+ "String_Node_Str"+ (endCalcTime - calcTime)+ "String_Node_Str");
      calcTime=endCalcTime;
      if (fragmentsFromMCS.isEmpty()) {
        localSeeds.clear();
        break;
      }
      Iterator<Fragment> iterator=fragmentsFromMCS.iterator();
      while (iterator.hasNext()) {
        Fragment fragment=iterator.next();
        if (minSeedSize > fragment.getContainer().getAtomCount()) {
          localSeeds.clear();
          minSeedSize=fragment.getContainer().getAtomCount();
        }
        if (minSeedSize == fragment.getContainer().getAtomCount()) {
          localSeeds.add(fragment);
        }
      }
    }
    if (!localSeeds.isEmpty()) {
      for (      Fragment f : localSeeds) {
        seeds.add(f.getContainer());
      }
      localSeeds.clear();
    }
    logger.debug("String_Node_Str" + seeds.size());
    minSeedSize=Integer.MAX_VALUE;
    while (!seeds.isEmpty()) {
      IAtomContainer fragmentMCS=seeds.poll();
      localSeeds=new TreeSet<>();
      logger.debug("String_Node_Str" + getMCSSSmiles(fragmentMCS));
      Collection<Fragment> fragmentsFromMCS;
      for (      IAtomContainer target : mcssList) {
        Isomorphism comparison=new Isomorphism(fragmentMCS,target,Algorithm.DEFAULT,matchBonds,matchRings,matchAtomType);
        comparison.setChemFilters(true,true,true);
        fragmentsFromMCS=getMCSS(comparison);
        if (fragmentsFromMCS == null || fragmentsFromMCS.isEmpty()) {
          localSeeds.clear();
          break;
        }
        Iterator<Fragment> iterator=fragmentsFromMCS.iterator();
        while (iterator.hasNext()) {
          Fragment fragment=iterator.next();
          if (minSeedSize > fragment.getContainer().getAtomCount()) {
            localSeeds.clear();
            minSeedSize=fragment.getContainer().getAtomCount();
          }
          if (minSeedSize == fragment.getContainer().getAtomCount()) {
            localSeeds.add(fragment);
          }
        }
        fragmentMCS=localSeeds.iterator().next().getContainer();
      }
      if (!localSeeds.isEmpty()) {
        for (        Fragment f : localSeeds) {
          mcss.add(f.getContainer());
        }
        localSeeds.clear();
      }
    }
  }
 catch (  CDKException e) {
    logger.error("String_Node_Str",e);
  }
  long endTime=Calendar.getInstance().getTimeInMillis();
  logger.debug("String_Node_Str" + taskNumber + "String_Node_Str"+ (endTime - startTime)+ "String_Node_Str");
  logger.debug("String_Node_Str" + querySeed.getAtomCount() + "String_Node_Str"+ querySeed.getBondCount()+ "String_Node_Str");
  return mcss;
}