Program: 69777
Project: 69777
Buggy source:
private Properties LTIProperties(UserRequest ureq){
  final Identity ident=ureq.getIdentity();
  final Locale loc=ureq.getLocale();
  User u=ident.getUser();
  final String lastName=u.getProperty(UserConstants.LASTNAME,loc);
  final String firstName=u.getProperty(UserConstants.FIRSTNAME,loc);
  final String email=u.getProperty(UserConstants.EMAIL,loc);
  String custom=(String)config.get(LTIConfigForm.CONFIG_KEY_CUSTOM);
  boolean sendname=Boolean.valueOf((String)config.get(LTIConfigForm.CONFIG_KEY_SENDNAME));
  boolean sendemail=Boolean.valueOf((String)config.get(LTIConfigForm.CONFIG_KEY_SENDEMAIL));
  Properties props=new Properties();
  setProperty(props,"String_Node_Str",courseNode.getIdent());
  setProperty(props,"String_Node_Str",courseNode.getShortTitle());
  setProperty(props,"String_Node_Str",courseNode.getLongTitle());
  setProperty(props,"String_Node_Str",u.getKey() + "String_Node_Str");
  String personSourceId=(String)ureq.getUserSession().getEntry("String_Node_Str");
  if (!StringHelper.containsNonWhitespace(personSourceId)) {
    personSourceId=Settings.getServerconfig("String_Node_Str") + "String_Node_Str" + ident.getKey();
  }
  setProperty(props,"String_Node_Str",personSourceId);
  setProperty(props,"String_Node_Str",loc.toString());
  setProperty(props,"String_Node_Str","String_Node_Str");
  if (sendname) {
    setProperty(props,"String_Node_Str",firstName);
    setProperty(props,"String_Node_Str",lastName);
    setProperty(props,"String_Node_Str",firstName + "String_Node_Str" + lastName);
  }
  if (sendemail) {
    setProperty(props,"String_Node_Str",email);
  }
  setProperty(props,"String_Node_Str",setRoles(ureq.getUserSession().getRoles()));
  setProperty(props,"String_Node_Str",courseEnv.getCourseResourceableId().toString());
  setProperty(props,"String_Node_Str",courseEnv.getCourseTitle());
  setProperty(props,"String_Node_Str",courseEnv.getCourseTitle());
  setProperty(props,"String_Node_Str","String_Node_Str");
  if (custom != null) {
    String[] params=custom.split("String_Node_Str");
    for (int i=0; i < params.length; i++) {
      String param=params[i];
      if (param == null)       continue;
      if (param.length() < 1)       continue;
      int pos=param.indexOf("String_Node_Str");
      if (pos < 1)       continue;
      if (pos + 1 > param.length())       continue;
      String key=BasicLTIUtil.mapKeyName(param.substring(0,pos));
      if (key == null)       continue;
      String value=param.substring(pos + 1);
      value=value.trim();
      if (value.length() < 1)       continue;
      if (value == null)       continue;
      setProperty(props,"String_Node_Str" + key,value);
    }
  }
  setProperty(props,"String_Node_Str",Settings.getServerconfig("String_Node_Str"));
  setProperty(props,"String_Node_Str",WebappHelper.getInstanceId());
  setProperty(props,"String_Node_Str",WebappHelper.getMailConfig("String_Node_Str"));
  return props;
}

Fixed version (ground truth):
private Properties LTIProperties(UserRequest ureq){
  final Identity ident=ureq.getIdentity();
  final Locale loc=ureq.getLocale();
  User u=ident.getUser();
  final String lastName=u.getProperty(UserConstants.LASTNAME,loc);
  final String firstName=u.getProperty(UserConstants.FIRSTNAME,loc);
  final String email=u.getProperty(UserConstants.EMAIL,loc);
  String custom=(String)config.get(LTIConfigForm.CONFIG_KEY_CUSTOM);
  boolean sendname=Boolean.valueOf((String)config.get(LTIConfigForm.CONFIG_KEY_SENDNAME));
  boolean sendemail=Boolean.valueOf((String)config.get(LTIConfigForm.CONFIG_KEY_SENDEMAIL));
  Properties props=new Properties();
  setProperty(props,"String_Node_Str",courseNode.getIdent());
  setProperty(props,"String_Node_Str",courseNode.getShortTitle());
  setProperty(props,"String_Node_Str",courseNode.getLongTitle());
  setProperty(props,"String_Node_Str",u.getKey() + "String_Node_Str");
  setProperty(props,"String_Node_Str",createPersonSourceId());
  setProperty(props,"String_Node_Str",loc.toString());
  setProperty(props,"String_Node_Str","String_Node_Str");
  if (sendname) {
    setProperty(props,"String_Node_Str",firstName);
    setProperty(props,"String_Node_Str",lastName);
    setProperty(props,"String_Node_Str",firstName + "String_Node_Str" + lastName);
  }
  if (sendemail) {
    setProperty(props,"String_Node_Str",email);
  }
  setProperty(props,"String_Node_Str",setRoles(ureq.getUserSession().getRoles()));
  setProperty(props,"String_Node_Str",courseEnv.getCourseResourceableId().toString());
  setProperty(props,"String_Node_Str",courseEnv.getCourseTitle());
  setProperty(props,"String_Node_Str",courseEnv.getCourseTitle());
  setProperty(props,"String_Node_Str","String_Node_Str");
  if (custom != null) {
    String[] params=custom.split("String_Node_Str");
    for (int i=0; i < params.length; i++) {
      String param=params[i];
      if (param == null)       continue;
      if (param.length() < 1)       continue;
      int pos=param.indexOf("String_Node_Str");
      if (pos < 1)       continue;
      if (pos + 1 > param.length())       continue;
      String key=BasicLTIUtil.mapKeyName(param.substring(0,pos));
      if (key == null)       continue;
      String value=param.substring(pos + 1);
      value=value.trim();
      if (value.length() < 1)       continue;
      if (value == null)       continue;
      setProperty(props,"String_Node_Str" + key,value);
    }
  }
  setProperty(props,"String_Node_Str",Settings.getServerconfig("String_Node_Str"));
  setProperty(props,"String_Node_Str",WebappHelper.getInstanceId());
  setProperty(props,"String_Node_Str",WebappHelper.getMailConfig("String_Node_Str"));
  return props;
}