Program: 86319
Project: 86319
Buggy source:
public void displaydata(AccountData result,boolean fromcache){
  setContentView(R.layout.account_activity);
  this.fromcache=fromcache;
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  final long tolerance=Long.decode(sp.getString("String_Node_Str","String_Node_Str"));
  ((TextView)findViewById(R.id.tvAccLabel)).setText(account.getLabel());
  ((TextView)findViewById(R.id.tvAccUser)).setText(account.getName());
  TextView tvAccCity=(TextView)findViewById(R.id.tvAccCity);
  Library lib;
  try {
    lib=((OpacClient)getApplication()).getLibrary(account.getLibrary());
    if (lib.getTitle() != null && !lib.getTitle().equals("String_Node_Str")) {
      tvAccCity.setText(lib.getCity() + "String_Node_Str" + lib.getTitle());
    }
 else {
      tvAccCity.setText(lib.getCity());
    }
  }
 catch (  IOException e) {
    ACRA.getErrorReporter().handleException(e);
    e.printStackTrace();
  }
catch (  JSONException e) {
    ACRA.getErrorReporter().handleException(e);
  }
  LinearLayout llLent=(LinearLayout)findViewById(R.id.llLent);
  llLent.removeAllViews();
  boolean notification_on=sp.getBoolean("String_Node_Str",false);
  boolean notification_problems=false;
  if (result.getLent().size() == 0) {
    TextView t1=new TextView(this);
    t1.setText(R.string.entl_none);
    llLent.addView(t1);
  }
 else {
    for (    ContentValues item : result.getLent()) {
      View v=getLayoutInflater().inflate(R.layout.lent_listitem,null);
      if (item.containsKey(AccountData.KEY_LENT_TITLE)) {
        ((TextView)v.findViewById(R.id.tvTitel)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_TITLE)));
      }
      if (item.containsKey(AccountData.KEY_LENT_AUTHOR)) {
        ((TextView)v.findViewById(R.id.tvVerfasser)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_AUTHOR)));
      }
      ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      if (item.containsKey(AccountData.KEY_LENT_STATUS) && !"String_Node_Str".equals(item.containsKey(AccountData.KEY_LENT_STATUS)) && item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_DEADLINE) + "String_Node_Str" + item.getAsString(AccountData.KEY_LENT_STATUS)+ "String_Node_Str"));
      }
 else       if (item.containsKey(AccountData.KEY_LENT_STATUS)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_STATUS)));
      }
 else       if (item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_DEADLINE)));
      }
 else {
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_LENT_FORMAT)) {
        ((TextView)v.findViewById(R.id.tvFmt)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_FORMAT)));
        ((TextView)v.findViewById(R.id.tvFmt)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvFmt)).setVisibility(View.GONE);
      }
      try {
        if (notification_on && item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
          if (!item.getAsString(AccountData.KEY_LENT_DEADLINE).equals("String_Node_Str")) {
            if ((!item.containsKey(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) || item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) < 1) && !"String_Node_Str".equals(item.getAsString(AccountData.KEY_LENT_BRANCH))) {
              notification_problems=true;
            }
          }
        }
      }
 catch (      Exception e) {
        notification_problems=true;
      }
      if (item.containsKey(AccountData.KEY_LENT_DEADLINE_TIMESTAMP)) {
        if (item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) < System.currentTimeMillis()) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.date_overdue));
        }
 else         if ((item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) - System.currentTimeMillis()) <= tolerance) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.date_warning));
        }
 else         if (item.containsKey(AccountData.KEY_LENT_DOWNLOAD)) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.account_downloadable));
        }
      }
      if (item.containsKey(AccountData.KEY_LENT_LENDING_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_LENDING_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_LENT_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_LENT_LINK)) {
        v.findViewById(R.id.ivProlong).setTag(item.getAsString(AccountData.KEY_LENT_LINK));
        ((ImageView)v.findViewById(R.id.ivProlong)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            prolong((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_LENT_DOWNLOAD) && app.getApi() instanceof EbookServiceApi) {
        v.findViewById(R.id.ivDownload).setTag(item.getAsString(AccountData.KEY_LENT_DOWNLOAD));
        ((ImageView)v.findViewById(R.id.ivDownload)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            download((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.GONE);
        ((ImageView)v.findViewById(R.id.ivDownload)).setVisibility(View.VISIBLE);
      }
 else {
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.INVISIBLE);
      }
      llLent.addView(v);
    }
  }
  if (notification_problems) {
    View tvError=findViewById(R.id.tvError);
    if (tvError != null) {
      tvError.setVisibility(View.VISIBLE);
      ((TextView)tvError).setText(R.string.notification_problems);
    }
  }
  LinearLayout llRes=(LinearLayout)findViewById(R.id.llReservations);
  llRes.removeAllViews();
  if (result.getReservations().size() == 0) {
    TextView t1=new TextView(this);
    t1.setText(R.string.reservations_none);
    llRes.addView(t1);
  }
 else {
    for (    ContentValues item : result.getReservations()) {
      View v=getLayoutInflater().inflate(R.layout.reservation_listitem,null);
      if (item.containsKey(AccountData.KEY_RESERVATION_TITLE)) {
        ((TextView)v.findViewById(R.id.tvTitel)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_TITLE)));
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_AUTHOR)) {
        ((TextView)v.findViewById(R.id.tvVerfasser)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_AUTHOR)));
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_READY)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_READY)));
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_RESERVATION_EXPIRE) && item.getAsString(AccountData.KEY_RESERVATION_EXPIRE).length() > 6) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml("String_Node_Str" + item.getAsString(AccountData.KEY_RESERVATION_EXPIRE)));
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_BOOKING)) {
        v.findViewById(R.id.ivBooking).setTag(item.getAsString(AccountData.KEY_RESERVATION_BOOKING));
        ((ImageView)v.findViewById(R.id.ivBooking)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            bookingStart((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.VISIBLE);
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.GONE);
      }
 else       if (item.containsKey(AccountData.KEY_RESERVATION_CANCEL)) {
        v.findViewById(R.id.ivCancel).setTag(item.getAsString(AccountData.KEY_RESERVATION_CANCEL));
        ((ImageView)v.findViewById(R.id.ivCancel)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            cancel((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.VISIBLE);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.GONE);
      }
 else {
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.INVISIBLE);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.GONE);
      }
      llRes.addView(v);
    }
  }
  if (result.getPendingFees() != null) {
    findViewById(R.id.tvPendingFeesLabel).setVisibility(View.VISIBLE);
    findViewById(R.id.tvPendingFees).setVisibility(View.VISIBLE);
    ((TextView)findViewById(R.id.tvPendingFees)).setText(result.getPendingFees());
  }
 else {
    findViewById(R.id.tvPendingFeesLabel).setVisibility(View.GONE);
    findViewById(R.id.tvPendingFees).setVisibility(View.GONE);
  }
  if (result.getValidUntil() != null) {
    findViewById(R.id.tvValidUntilLabel).setVisibility(View.VISIBLE);
    findViewById(R.id.tvValidUntil).setVisibility(View.VISIBLE);
    ((TextView)findViewById(R.id.tvValidUntil)).setText(result.getValidUntil());
  }
 else {
    findViewById(R.id.tvValidUntilLabel).setVisibility(View.GONE);
    findViewById(R.id.tvValidUntil).setVisibility(View.GONE);
  }
  refreshage();
}

Fixed version (ground truth):
public void displaydata(AccountData result,boolean fromcache){
  setContentView(R.layout.account_activity);
  this.fromcache=fromcache;
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  final long tolerance=Long.decode(sp.getString("String_Node_Str","String_Node_Str"));
  ((TextView)findViewById(R.id.tvAccLabel)).setText(account.getLabel());
  ((TextView)findViewById(R.id.tvAccUser)).setText(account.getName());
  TextView tvAccCity=(TextView)findViewById(R.id.tvAccCity);
  Library lib;
  try {
    lib=((OpacClient)getApplication()).getLibrary(account.getLibrary());
    if (lib.getTitle() != null && !lib.getTitle().equals("String_Node_Str")) {
      tvAccCity.setText(lib.getCity() + "String_Node_Str" + lib.getTitle());
    }
 else {
      tvAccCity.setText(lib.getCity());
    }
  }
 catch (  IOException e) {
    ACRA.getErrorReporter().handleException(e);
    e.printStackTrace();
  }
catch (  JSONException e) {
    ACRA.getErrorReporter().handleException(e);
  }
  LinearLayout llLent=(LinearLayout)findViewById(R.id.llLent);
  llLent.removeAllViews();
  boolean notification_on=sp.getBoolean("String_Node_Str",false);
  boolean notification_problems=false;
  if (result.getLent().size() == 0) {
    TextView t1=new TextView(this);
    t1.setText(R.string.entl_none);
    llLent.addView(t1);
  }
 else {
    for (    ContentValues item : result.getLent()) {
      View v=getLayoutInflater().inflate(R.layout.lent_listitem,null);
      if (item.containsKey(AccountData.KEY_LENT_TITLE)) {
        ((TextView)v.findViewById(R.id.tvTitel)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_TITLE)));
      }
      if (item.containsKey(AccountData.KEY_LENT_AUTHOR)) {
        ((TextView)v.findViewById(R.id.tvVerfasser)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_AUTHOR)));
      }
      ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      if (item.containsKey(AccountData.KEY_LENT_STATUS) && !"String_Node_Str".equals(item.containsKey(AccountData.KEY_LENT_STATUS)) && item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_DEADLINE) + "String_Node_Str" + item.getAsString(AccountData.KEY_LENT_STATUS)+ "String_Node_Str"));
      }
 else       if (item.containsKey(AccountData.KEY_LENT_STATUS)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_STATUS)));
      }
 else       if (item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_DEADLINE)));
      }
 else {
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_LENT_FORMAT)) {
        ((TextView)v.findViewById(R.id.tvFmt)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_FORMAT)));
        ((TextView)v.findViewById(R.id.tvFmt)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvFmt)).setVisibility(View.GONE);
      }
      try {
        if (notification_on && item.containsKey(AccountData.KEY_LENT_DEADLINE)) {
          if (!item.getAsString(AccountData.KEY_LENT_DEADLINE).equals("String_Node_Str")) {
            if ((!item.containsKey(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) || item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) < 1) && !"String_Node_Str".equals(item.getAsString(AccountData.KEY_LENT_BRANCH))) {
              notification_problems=true;
            }
          }
        }
      }
 catch (      Exception e) {
        notification_problems=true;
      }
      if (item.containsKey(AccountData.KEY_LENT_DEADLINE_TIMESTAMP)) {
        if (item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) < System.currentTimeMillis()) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.date_overdue));
        }
 else         if ((item.getAsLong(AccountData.KEY_LENT_DEADLINE_TIMESTAMP) - System.currentTimeMillis()) <= tolerance) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.date_warning));
        }
 else         if (item.containsKey(AccountData.KEY_LENT_DOWNLOAD)) {
          v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.account_downloadable));
        }
      }
 else       if (item.containsKey(AccountData.KEY_LENT_DOWNLOAD)) {
        v.findViewById(R.id.vStatusColor).setBackgroundColor(getResources().getColor(R.color.account_downloadable));
      }
      if (item.containsKey(AccountData.KEY_LENT_LENDING_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_LENDING_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_LENT_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_LENT_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_LENT_LINK)) {
        v.findViewById(R.id.ivProlong).setTag(item.getAsString(AccountData.KEY_LENT_LINK));
        ((ImageView)v.findViewById(R.id.ivProlong)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            prolong((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_LENT_DOWNLOAD) && app.getApi() instanceof EbookServiceApi) {
        v.findViewById(R.id.ivDownload).setTag(item.getAsString(AccountData.KEY_LENT_DOWNLOAD));
        ((ImageView)v.findViewById(R.id.ivDownload)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            download((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.GONE);
        ((ImageView)v.findViewById(R.id.ivDownload)).setVisibility(View.VISIBLE);
      }
 else {
        ((ImageView)v.findViewById(R.id.ivProlong)).setVisibility(View.INVISIBLE);
      }
      llLent.addView(v);
    }
  }
  if (notification_problems) {
    View tvError=findViewById(R.id.tvError);
    if (tvError != null) {
      tvError.setVisibility(View.VISIBLE);
      ((TextView)tvError).setText(R.string.notification_problems);
    }
  }
  LinearLayout llRes=(LinearLayout)findViewById(R.id.llReservations);
  llRes.removeAllViews();
  if (result.getReservations().size() == 0) {
    TextView t1=new TextView(this);
    t1.setText(R.string.reservations_none);
    llRes.addView(t1);
  }
 else {
    for (    ContentValues item : result.getReservations()) {
      View v=getLayoutInflater().inflate(R.layout.reservation_listitem,null);
      if (item.containsKey(AccountData.KEY_RESERVATION_TITLE)) {
        ((TextView)v.findViewById(R.id.tvTitel)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_TITLE)));
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_AUTHOR)) {
        ((TextView)v.findViewById(R.id.tvVerfasser)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_AUTHOR)));
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_READY)) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_READY)));
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      }
 else       if (item.containsKey(AccountData.KEY_RESERVATION_EXPIRE) && item.getAsString(AccountData.KEY_RESERVATION_EXPIRE).length() > 6) {
        ((TextView)v.findViewById(R.id.tvStatus)).setText(Html.fromHtml("String_Node_Str" + item.getAsString(AccountData.KEY_RESERVATION_EXPIRE)));
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvStatus)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_BRANCH)) {
        ((TextView)v.findViewById(R.id.tvZst)).setText(Html.fromHtml(item.getAsString(AccountData.KEY_RESERVATION_BRANCH)));
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.VISIBLE);
      }
 else {
        ((TextView)v.findViewById(R.id.tvZst)).setVisibility(View.GONE);
      }
      if (item.containsKey(AccountData.KEY_RESERVATION_BOOKING)) {
        v.findViewById(R.id.ivBooking).setTag(item.getAsString(AccountData.KEY_RESERVATION_BOOKING));
        ((ImageView)v.findViewById(R.id.ivBooking)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            bookingStart((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.VISIBLE);
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.GONE);
      }
 else       if (item.containsKey(AccountData.KEY_RESERVATION_CANCEL)) {
        v.findViewById(R.id.ivCancel).setTag(item.getAsString(AccountData.KEY_RESERVATION_CANCEL));
        ((ImageView)v.findViewById(R.id.ivCancel)).setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View arg0){
            cancel((String)arg0.getTag());
          }
        }
);
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.VISIBLE);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.GONE);
      }
 else {
        ((ImageView)v.findViewById(R.id.ivCancel)).setVisibility(View.INVISIBLE);
        ((ImageView)v.findViewById(R.id.ivBooking)).setVisibility(View.GONE);
      }
      llRes.addView(v);
    }
  }
  if (result.getPendingFees() != null) {
    findViewById(R.id.tvPendingFeesLabel).setVisibility(View.VISIBLE);
    findViewById(R.id.tvPendingFees).setVisibility(View.VISIBLE);
    ((TextView)findViewById(R.id.tvPendingFees)).setText(result.getPendingFees());
  }
 else {
    findViewById(R.id.tvPendingFeesLabel).setVisibility(View.GONE);
    findViewById(R.id.tvPendingFees).setVisibility(View.GONE);
  }
  if (result.getValidUntil() != null) {
    findViewById(R.id.tvValidUntilLabel).setVisibility(View.VISIBLE);
    findViewById(R.id.tvValidUntil).setVisibility(View.VISIBLE);
    ((TextView)findViewById(R.id.tvValidUntil)).setText(result.getValidUntil());
  }
 else {
    findViewById(R.id.tvValidUntilLabel).setVisibility(View.GONE);
    findViewById(R.id.tvValidUntil).setVisibility(View.GONE);
  }
  refreshage();
}