public static void addRecordsAtRandom(WorkflowTrace trace,ConnectionEnd messageIssuer){
  List<ProtocolMessage> protocolMessages=trace.getProtocolMessages();
  Random random=RandomHelper.getRandom();
  int recordsNumber=random.nextInt(4);
  int i=0;
  while (recordsNumber > 0 && i < MAX_MODIFICATION_COUNT) {
    i++;
    int randomPM=random.nextInt(protocolMessages.size());
    ProtocolMessage pm=protocolMessages.get(randomPM);
    if (pm.getMessageIssuer() == messageIssuer) {
      Record r=new Record();
      r.setMaxRecordLengthConfig(random.nextInt(50));
      pm.addRecord(r);
      recordsNumber--;
      LOGGER.debug("Adding a new record to {}",pm.getClass());
    }
  }
}

public static void addRecordsAtRandom ( WorkflowTrace trace , ConnectionEnd messageIssuer ) { List < ProtocolMessage > protocolMessages = trace . getProtocolMessages ( ) ; Random random = RandomHelper . getRandom ( ) ; int recordsNumber = random . nextInt ( 4 ) ; int i = 0 ; while ( recordsNumber > 0 && i < MAX_MODIFICATION_COUNT ) { i ++ ; int randomPM = random . nextInt ( protocolMessages . size ( ) ) ; ProtocolMessage pm = protocolMessages . get ( randomPM ) ; if ( pm . getMessageIssuer ( ) == messageIssuer ) { Record r = new Record ( ) ; r . setMaxRecordLengthConfig ( random . nextInt ( 50 ) ) ; pm . addRecord ( r ) ; recordsNumber -- ; LOGGER . debug ( "Adding a new record to {}" , pm . getClass ( ) ) ; } } }
adds random records to the workflow trace
