Program: 2331
Project: 2331
Buggy source:
private void constructSessionClass(){
  String packname=getEndpointApiRootPackageName(this.gpn);
  String simpname=getSessionClassName(this.gpn);
  this.cb.setName(simpname);
  this.cb.setPackage(packname);
  this.cb.addImports("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.cb.addImports("String_Node_Str");
  this.cb.addImports(getRolesPackageName(this.gpn) + "String_Node_Str",getOpsPackageName(this.gpn) + "String_Node_Str");
  this.cb.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.FINAL);
  this.cb.setSuperClass(SessionApiGenerator.SESSION_CLASS);
  FieldBuilder fb1=this.cb.newField(SessionApiGenerator.IMPATH_FIELD);
  fb1.setType("String_Node_Str");
  fb1.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb1.setExpression("String_Node_Str");
  FieldBuilder fb2=this.cb.newField(SessionApiGenerator.SOURCE_FIELD);
  fb2.setType("String_Node_Str");
  fb2.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb2.setExpression("String_Node_Str");
  FieldBuilder fb3=this.cb.newField(SessionApiGenerator.PROTO_FIELD);
  fb3.setType(SessionApiGenerator.GPROTOCOLNAME_CLASS);
  fb3.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb3.setExpression(SessionApiGenerator.SESSIONTYPEFACTORY_CLASS + "String_Node_Str" + gpn+ "String_Node_Str");
  this.roles.stream().forEach((r) -> addRoleField(this.cb,r));
  this.mids.stream().forEach((mid) -> addOpField(this.cb,mid));
  ConstructorBuilder ctor=this.cb.newConstructor();
  ctor.addModifiers(JavaBuilder.PUBLIC);
  ctor.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + simpname+ "String_Node_Str"+ SessionApiGenerator.IMPATH_FIELD+ "String_Node_Str"+ simpname+ "String_Node_Str"+ SessionApiGenerator.SOURCE_FIELD+ "String_Node_Str"+ simpname+ "String_Node_Str"+ SessionApiGenerator.PROTO_FIELD+ "String_Node_Str");
  FieldBuilder fb4=this.cb.newField("String_Node_Str");
  fb4.setType("String_Node_Str");
  fb4.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  String roles="String_Node_Str";
  roles+=this.roles.stream().map((r) -> r.toString()).collect(Collectors.joining("String_Node_Str"));
  roles+="String_Node_Str";
  fb4.setExpression(roles);
  MethodBuilder mb=this.cb.newMethod("String_Node_Str");
  mb.addAnnotations("String_Node_Str");
  mb.addModifiers(JavaBuilder.PUBLIC);
  mb.setReturn("String_Node_Str");
  mb.addParameters();
  mb.addBodyLine(JavaBuilder.RETURN + "String_Node_Str" + simpname+ "String_Node_Str");
}

Fixed version (ground truth):
private void constructSessionClass(){
  String packname=getEndpointApiRootPackageName(this.gpn);
  String simpname=getSessionClassName(this.gpn);
  this.cb.setName(simpname);
  this.cb.setPackage(packname);
  this.cb.addImports("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.cb.addImports("String_Node_Str");
  this.cb.addImports(getRolesPackageName(this.gpn) + "String_Node_Str");
  if (!this.mids.isEmpty()) {
    this.cb.addImports(getOpsPackageName(this.gpn) + "String_Node_Str");
  }
  this.cb.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.FINAL);
  this.cb.setSuperClass(SessionApiGenerator.SESSION_CLASS);
  FieldBuilder fb1=this.cb.newField(SessionApiGenerator.IMPATH_FIELD);
  fb1.setType("String_Node_Str");
  fb1.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb1.setExpression("String_Node_Str");
  FieldBuilder fb2=this.cb.newField(SessionApiGenerator.SOURCE_FIELD);
  fb2.setType("String_Node_Str");
  fb2.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb2.setExpression("String_Node_Str");
  FieldBuilder fb3=this.cb.newField(SessionApiGenerator.PROTO_FIELD);
  fb3.setType(SessionApiGenerator.GPROTOCOLNAME_CLASS);
  fb3.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  fb3.setExpression(SessionApiGenerator.SESSIONTYPEFACTORY_CLASS + "String_Node_Str" + gpn+ "String_Node_Str");
  this.roles.stream().forEach((r) -> addRoleField(this.cb,r));
  this.mids.stream().forEach((mid) -> addOpField(this.cb,mid));
  ConstructorBuilder ctor=this.cb.newConstructor();
  ctor.addModifiers(JavaBuilder.PUBLIC);
  ctor.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + simpname+ "String_Node_Str"+ SessionApiGenerator.IMPATH_FIELD+ "String_Node_Str"+ simpname+ "String_Node_Str"+ SessionApiGenerator.SOURCE_FIELD+ "String_Node_Str"+ simpname+ "String_Node_Str"+ SessionApiGenerator.PROTO_FIELD+ "String_Node_Str");
  FieldBuilder fb4=this.cb.newField("String_Node_Str");
  fb4.setType("String_Node_Str");
  fb4.addModifiers(JavaBuilder.PUBLIC,JavaBuilder.STATIC,JavaBuilder.FINAL);
  String roles="String_Node_Str";
  roles+=this.roles.stream().map((r) -> r.toString()).collect(Collectors.joining("String_Node_Str"));
  roles+="String_Node_Str";
  fb4.setExpression(roles);
  MethodBuilder mb=this.cb.newMethod("String_Node_Str");
  mb.addAnnotations("String_Node_Str");
  mb.addModifiers(JavaBuilder.PUBLIC);
  mb.setReturn("String_Node_Str");
  mb.addParameters();
  mb.addBodyLine(JavaBuilder.RETURN + "String_Node_Str" + simpname+ "String_Node_Str");
}