Program: 24737
Project: 24737
Buggy source:
/** 
 * This methods is used from the entry point class to load the state from the cookies after the user hit refresh. When the user hits refresh in the browser all the client state is lost.
 */
public void loadStateFromCookies(){
  this.userName=Cookies.getCookie("String_Node_Str");
  this.fullName=Cookies.getCookie("String_Node_Str");
  this.sessionID=Cookies.getCookie("String_Node_Str");
  this.currentView=Cookies.getCookie("String_Node_Str");
  this.projectName=Cookies.getCookie("String_Node_Str");
  this.projectInspectionStatus=Cookies.getCookie("String_Node_Str");
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.isSiteAdministrator=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.isSiteAdministrator=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.skipTeachStep=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.skipTeachStep=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.isAuthenticated=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.isAuthenticated=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.mode=GwtModesType.valueOf(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.mode=GwtModesType.NoAccess;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.userProjectRole=ProjectRole.valueOf(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.userProjectRole=ProjectRole.None;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.projectID=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.projectID=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.userId=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.userId=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.totalPrioritizations=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.totalPrioritizations=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.currentRiskID=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.riskCommand=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * This methods is used from the entry point class to load the state from the cookies after the user hit refresh. When the user hits refresh in the browser all the client state is lost.
 */
public void loadStateFromCookies(){
  this.userName=Cookies.getCookie("String_Node_Str");
  this.fullName=Cookies.getCookie("String_Node_Str");
  this.sessionID=Cookies.getCookie("String_Node_Str");
  this.currentView=Cookies.getCookie("String_Node_Str");
  this.projectName=Cookies.getCookie("String_Node_Str");
  this.caseName=Cookies.getCookie("String_Node_Str");
  this.caseID=Integer.valueOf(Cookies.getCookie("String_Node_Str"));
  this.projectInspectionStatus=Cookies.getCookie("String_Node_Str");
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.isSiteAdministrator=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.isSiteAdministrator=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.skipTeachStep=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.skipTeachStep=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.isAuthenticated=Boolean.parseBoolean(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.isAuthenticated=false;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.mode=GwtModesType.valueOf(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.mode=GwtModesType.NoAccess;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.userProjectRole=ProjectRole.valueOf(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.userProjectRole=ProjectRole.None;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.projectID=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.projectID=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.userId=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.userId=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.totalPrioritizations=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
 else {
    this.totalPrioritizations=-1;
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.currentRiskID=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
  if (Cookies.getCookie("String_Node_Str") != null) {
    this.riskCommand=Integer.parseInt(Cookies.getCookie("String_Node_Str"));
  }
}