Program: 182142
Project: 182142
Buggy source:
/** 
 * Write all account information to the account file.
 */
private void writeAccountInfoLocked(){
  if (DEBUG_FILE)   Log.v(TAG,"String_Node_Str" + mAccountInfoFile.getBaseFile());
  FileOutputStream fos=null;
  try {
    fos=mAccountInfoFile.startWrite();
    XmlSerializer out=new FastXmlSerializer();
    out.setOutput(fos,"String_Node_Str");
    out.startDocument(null,true);
    out.setFeature("String_Node_Str",true);
    out.startTag(null,"String_Node_Str");
    out.attribute(null,"String_Node_Str",Integer.toString(ACCOUNTS_VERSION));
    if (!mMasterSyncAutomatically) {
      out.attribute(null,"String_Node_Str","String_Node_Str");
    }
    final int N=mAuthorities.size();
    for (int i=0; i < N; i++) {
      AuthorityInfo authority=mAuthorities.valueAt(i);
      out.startTag(null,"String_Node_Str");
      out.attribute(null,"String_Node_Str",Integer.toString(authority.ident));
      out.attribute(null,"String_Node_Str",authority.account.name);
      out.attribute(null,"String_Node_Str",authority.account.type);
      out.attribute(null,"String_Node_Str",authority.authority);
      if (!authority.enabled) {
        out.attribute(null,"String_Node_Str","String_Node_Str");
      }
      if (authority.syncable < 0) {
        out.attribute(null,"String_Node_Str","String_Node_Str");
      }
 else       if (authority.syncable == 0) {
        out.attribute(null,"String_Node_Str","String_Node_Str");
      }
      for (      Pair<Bundle,Long> periodicSync : authority.periodicSyncs) {
        out.startTag(null,"String_Node_Str");
        out.attribute(null,"String_Node_Str",Long.toString(periodicSync.second));
        final Bundle extras=periodicSync.first;
        for (        String key : extras.keySet()) {
          out.startTag(null,"String_Node_Str");
          out.attribute(null,"String_Node_Str",key);
          final Object value=extras.get(key);
          if (value instanceof Long) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Integer) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Boolean) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Float) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Double) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof String) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Account) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",((Account)value).name);
            out.attribute(null,"String_Node_Str",((Account)value).type);
          }
          out.endTag(null,"String_Node_Str");
        }
        out.endTag(null,"String_Node_Str");
      }
      out.endTag(null,"String_Node_Str");
    }
    out.endTag(null,"String_Node_Str");
    out.endDocument();
    mAccountInfoFile.finishWrite(fos);
  }
 catch (  java.io.IOException e1) {
    Log.w(TAG,"String_Node_Str",e1);
    if (fos != null) {
      mAccountInfoFile.failWrite(fos);
    }
  }
}

Fixed version (ground truth):
/** 
 * Write all account information to the account file.
 */
private void writeAccountInfoLocked(){
  if (DEBUG_FILE)   Log.v(TAG,"String_Node_Str" + mAccountInfoFile.getBaseFile());
  FileOutputStream fos=null;
  try {
    fos=mAccountInfoFile.startWrite();
    XmlSerializer out=new FastXmlSerializer();
    out.setOutput(fos,"String_Node_Str");
    out.startDocument(null,true);
    out.setFeature("String_Node_Str",true);
    out.startTag(null,"String_Node_Str");
    out.attribute(null,"String_Node_Str",Integer.toString(ACCOUNTS_VERSION));
    if (!mMasterSyncAutomatically) {
      out.attribute(null,"String_Node_Str","String_Node_Str");
    }
    final int N=mAuthorities.size();
    for (int i=0; i < N; i++) {
      AuthorityInfo authority=mAuthorities.valueAt(i);
      out.startTag(null,"String_Node_Str");
      out.attribute(null,"String_Node_Str",Integer.toString(authority.ident));
      out.attribute(null,"String_Node_Str",authority.account.name);
      out.attribute(null,"String_Node_Str",authority.account.type);
      out.attribute(null,"String_Node_Str",authority.authority);
      out.attribute(null,"String_Node_Str",Boolean.toString(authority.enabled));
      if (authority.syncable < 0) {
        out.attribute(null,"String_Node_Str","String_Node_Str");
      }
 else {
        out.attribute(null,"String_Node_Str",Boolean.toString(authority.syncable != 0));
      }
      for (      Pair<Bundle,Long> periodicSync : authority.periodicSyncs) {
        out.startTag(null,"String_Node_Str");
        out.attribute(null,"String_Node_Str",Long.toString(periodicSync.second));
        final Bundle extras=periodicSync.first;
        for (        String key : extras.keySet()) {
          out.startTag(null,"String_Node_Str");
          out.attribute(null,"String_Node_Str",key);
          final Object value=extras.get(key);
          if (value instanceof Long) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Integer) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Boolean) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Float) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Double) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof String) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",value.toString());
          }
 else           if (value instanceof Account) {
            out.attribute(null,"String_Node_Str","String_Node_Str");
            out.attribute(null,"String_Node_Str",((Account)value).name);
            out.attribute(null,"String_Node_Str",((Account)value).type);
          }
          out.endTag(null,"String_Node_Str");
        }
        out.endTag(null,"String_Node_Str");
      }
      out.endTag(null,"String_Node_Str");
    }
    out.endTag(null,"String_Node_Str");
    out.endDocument();
    mAccountInfoFile.finishWrite(fos);
  }
 catch (  java.io.IOException e1) {
    Log.w(TAG,"String_Node_Str",e1);
    if (fos != null) {
      mAccountInfoFile.failWrite(fos);
    }
  }
}