Program: 2334
Project: 2334
Buggy source:
private static LProtocolBlock prune(LProtocolBlock block,Set<RecVar> rvs){
  if (block.isEmpty()) {
    return block;
  }
  List<? extends LInteractionNode> lis=block.getInteractionSeq().getInteractions();
  if (lis.size() > 1) {
    return block;
  }
 else {
    LInteractionNode lin=lis.get(0);
    if (lin instanceof LContinue) {
      if (rvs.contains(((LContinue)lin).recvar.toName())) {
        return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Collections.emptyList()));
      }
 else {
        return block;
      }
    }
 else     if (lin instanceof MessageTransfer<?> || lin instanceof Do<?>) {
      return block;
    }
 else {
      if (lin instanceof LChoice) {
        List<LProtocolBlock> pruned=new LinkedList<LProtocolBlock>();
        for (        LProtocolBlock b : ((LChoice)lin).getBlocks()) {
          if (!prune(b,rvs).isEmpty()) {
            pruned.add(b);
          }
        }
        if (pruned.isEmpty()) {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Collections.emptyList()));
        }
 else {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Arrays.asList(AstFactoryImpl.FACTORY.LChoice(((LChoice)lin).subj,pruned))));
        }
      }
 else       if (lin instanceof LRecursion) {
        rvs=new HashSet<>(rvs);
        LProtocolBlock prune=prune(((LRecursion)lin).getBlock(),rvs);
        if (prune.isEmpty()) {
          return prune;
        }
 else {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Arrays.asList(AstFactoryImpl.FACTORY.LRecursion(((LRecursion)lin).recvar,prune))));
        }
      }
 else {
        throw new RuntimeException("String_Node_Str" + lin);
      }
    }
  }
}

Fixed version (ground truth):
private static LProtocolBlock prune(LProtocolBlock block,Set<RecVar> rvs){
  if (block.isEmpty()) {
    return block;
  }
  List<? extends LInteractionNode> lis=block.getInteractionSeq().getInteractions();
  if (lis.size() > 1) {
    return block;
  }
 else {
    LInteractionNode lin=lis.get(0);
    if (lin instanceof LContinue) {
      if (rvs.contains(((LContinue)lin).recvar.toName())) {
        return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Collections.emptyList()));
      }
 else {
        return block;
      }
    }
 else     if (lin instanceof MessageTransfer<?> || lin instanceof Do<?> || lin instanceof ConnectionAction<?>) {
      return block;
    }
 else {
      if (lin instanceof LChoice) {
        List<LProtocolBlock> pruned=new LinkedList<LProtocolBlock>();
        for (        LProtocolBlock b : ((LChoice)lin).getBlocks()) {
          if (!prune(b,rvs).isEmpty()) {
            pruned.add(b);
          }
        }
        if (pruned.isEmpty()) {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Collections.emptyList()));
        }
 else {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Arrays.asList(AstFactoryImpl.FACTORY.LChoice(((LChoice)lin).subj,pruned))));
        }
      }
 else       if (lin instanceof LRecursion) {
        rvs=new HashSet<>(rvs);
        LProtocolBlock prune=prune(((LRecursion)lin).getBlock(),rvs);
        if (prune.isEmpty()) {
          return prune;
        }
 else {
          return AstFactoryImpl.FACTORY.LProtocolBlock(AstFactoryImpl.FACTORY.LInteractionSeq(Arrays.asList(AstFactoryImpl.FACTORY.LRecursion(((LRecursion)lin).recvar,prune))));
        }
      }
 else {
        throw new RuntimeException("String_Node_Str" + lin);
      }
    }
  }
}