Program: 172267
Project: 172267
Buggy source:
/** 
 * Updates the destination nodes in the AVMDifferences with the source nodes. Normally any conflicts or cases in which the source of an AVMDifference is older than the destination will cause the transaction to roll back.
 * @param diffList A List of AVMDifference structs.
 * @param excluder A possibly null name matcher to exclude unwanted updates.
 * @param ignoreConflicts If this is true the update will skip those AVMDifferences which are in conflict with  the destination.
 * @param ignoreOlder If this is true the update will skip those AVMDifferences which have the source older than the destination.
 * @param overrideConflicts If this is true the update will override conflictingAVMDifferences and replace the destination with the conflicting source.
 * @param overrideOlder If this is true the update will override AVMDifferences
 * @param tag Short update blurb.
 * @param description Full update blurb.in which the source is older than the destination and overwrite the destination.
 */
public void update(List<AVMDifference> diffList,NameMatcher excluder,boolean ignoreConflicts,boolean ignoreOlder,boolean overrideConflicts,boolean overrideOlder,String tag,String description){
  if (fgLogger.isDebugEnabled()) {
    try {
      throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      fgLogger.debug("String_Node_Str",e);
    }
  }
  Map<String,Integer> storeVersions=new HashMap<String,Integer>();
  Set<String> destStores=new HashSet<String>();
  for (  AVMDifference diff : diffList) {
    if (excluder != null && (excluder.matches(diff.getSourcePath()) || excluder.matches(diff.getDestinationPath()))) {
      continue;
    }
    if (!diff.isValid()) {
      throw new AVMSyncException("String_Node_Str");
    }
    if (fgLogger.isDebugEnabled()) {
      fgLogger.debug("String_Node_Str" + diff);
    }
    int version=diff.getSourceVersion();
    if (version < 0) {
      int colonOff=diff.getSourcePath().indexOf(':');
      if (colonOff == -1) {
        throw new AVMBadArgumentException("String_Node_Str");
      }
      String storeName=diff.getSourcePath().substring(0,colonOff);
      if (storeVersions.containsKey(storeName)) {
        version=storeVersions.get(storeName);
      }
 else {
        version=fAVMService.createSnapshot(storeName,"String_Node_Str",null).get(storeName);
      }
    }
    AVMNodeDescriptor srcDesc=fAVMService.lookup(version,diff.getSourcePath(),true);
    String[] dstParts=AVMNodeConverter.SplitBase(diff.getDestinationPath());
    if (dstParts[0] == null || diff.getDestinationVersion() >= 0) {
      throw new AVMSyncException("String_Node_Str" + diff.getDestinationPath());
    }
    AVMNodeDescriptor dstDesc=fAVMService.lookup(-1,diff.getDestinationPath(),true);
    int diffCode=AVMDifference.NEWER;
    if (dstDesc != null) {
      diffCode=compareOne(srcDesc,dstDesc);
    }
    String dstPath=diff.getDestinationPath();
    destStores.add(dstPath.substring(0,dstPath.indexOf(':')));
switch (diffCode) {
case AVMDifference.SAME:
{
        continue;
      }
case AVMDifference.NEWER:
{
      linkIn(dstParts[0],dstParts[1],srcDesc,excluder,dstDesc != null && !dstDesc.isDeleted());
      continue;
    }
case AVMDifference.OLDER:
{
    if (overrideOlder) {
      linkIn(dstParts[0],dstParts[1],srcDesc,excluder,!dstDesc.isDeleted());
      continue;
    }
    if (ignoreOlder) {
      continue;
    }
    throw new AVMSyncException("String_Node_Str");
  }
case AVMDifference.CONFLICT:
{
  if (overrideConflicts) {
    linkIn(dstParts[0],dstParts[1],srcDesc,excluder,true);
    continue;
  }
  if (ignoreConflicts) {
    continue;
  }
  throw new AVMSyncException("String_Node_Str");
}
case AVMDifference.DIRECTORY:
{
if (ignoreConflicts) {
  continue;
}
throw new AVMSyncException("String_Node_Str");
}
default :
{
throw new AVMSyncException("String_Node_Str");
}
}
}
for (String storeName : destStores) {
fAVMService.createSnapshot(storeName,tag,description);
}
}

Fixed version (ground truth):
/** 
 * Updates the destination nodes in the AVMDifferences with the source nodes. Normally any conflicts or cases in which the source of an AVMDifference is older than the destination will cause the transaction to roll back.
 * @param diffList A List of AVMDifference structs.
 * @param excluder A possibly null name matcher to exclude unwanted updates.
 * @param ignoreConflicts If this is true the update will skip those AVMDifferences which are in conflict with  the destination.
 * @param ignoreOlder If this is true the update will skip those AVMDifferences which have the source older than the destination.
 * @param overrideConflicts If this is true the update will override conflictingAVMDifferences and replace the destination with the conflicting source.
 * @param overrideOlder If this is true the update will override AVMDifferences
 * @param tag Short update blurb.
 * @param description Full update blurb.in which the source is older than the destination and overwrite the destination.
 */
public void update(List<AVMDifference> diffList,NameMatcher excluder,boolean ignoreConflicts,boolean ignoreOlder,boolean overrideConflicts,boolean overrideOlder,String tag,String description){
  if (fgLogger.isDebugEnabled()) {
    try {
      throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      fgLogger.debug("String_Node_Str",e);
    }
  }
  Map<String,Integer> storeVersions=new HashMap<String,Integer>();
  Set<String> destStores=new HashSet<String>();
  for (  AVMDifference diff : diffList) {
    if (excluder != null && (excluder.matches(diff.getSourcePath()) || excluder.matches(diff.getDestinationPath()))) {
      continue;
    }
    if (!diff.isValid()) {
      throw new AVMSyncException("String_Node_Str");
    }
    if (fgLogger.isDebugEnabled()) {
      fgLogger.debug("String_Node_Str" + diff);
    }
    int version=diff.getSourceVersion();
    if (version < 0) {
      int colonOff=diff.getSourcePath().indexOf(':');
      if (colonOff == -1) {
        throw new AVMBadArgumentException("String_Node_Str");
      }
      String storeName=diff.getSourcePath().substring(0,colonOff);
      if (storeVersions.containsKey(storeName)) {
        version=storeVersions.get(storeName);
      }
 else {
        version=fAVMService.createSnapshot(storeName,"String_Node_Str",null).get(storeName);
        storeVersions.put(storeName,version);
      }
    }
    AVMNodeDescriptor srcDesc=fAVMService.lookup(version,diff.getSourcePath(),true);
    String[] dstParts=AVMNodeConverter.SplitBase(diff.getDestinationPath());
    if (dstParts[0] == null || diff.getDestinationVersion() >= 0) {
      throw new AVMSyncException("String_Node_Str" + diff.getDestinationPath());
    }
    AVMNodeDescriptor dstDesc=fAVMService.lookup(-1,diff.getDestinationPath(),true);
    int diffCode=AVMDifference.NEWER;
    if (dstDesc != null) {
      diffCode=compareOne(srcDesc,dstDesc);
    }
    String dstPath=diff.getDestinationPath();
    destStores.add(dstPath.substring(0,dstPath.indexOf(':')));
switch (diffCode) {
case AVMDifference.SAME:
{
        continue;
      }
case AVMDifference.NEWER:
{
      linkIn(dstParts[0],dstParts[1],srcDesc,excluder,dstDesc != null && !dstDesc.isDeleted());
      continue;
    }
case AVMDifference.OLDER:
{
    if (overrideOlder) {
      linkIn(dstParts[0],dstParts[1],srcDesc,excluder,!dstDesc.isDeleted());
      continue;
    }
    if (ignoreOlder) {
      continue;
    }
    throw new AVMSyncException("String_Node_Str");
  }
case AVMDifference.CONFLICT:
{
  if (overrideConflicts) {
    linkIn(dstParts[0],dstParts[1],srcDesc,excluder,true);
    continue;
  }
  if (ignoreConflicts) {
    continue;
  }
  throw new AVMSyncException("String_Node_Str");
}
case AVMDifference.DIRECTORY:
{
if (ignoreConflicts) {
  continue;
}
throw new AVMSyncException("String_Node_Str");
}
default :
{
throw new AVMSyncException("String_Node_Str");
}
}
}
for (String storeName : destStores) {
fAVMService.createSnapshot(storeName,tag,description);
}
}