code: void resolveConflictInDocument(String docID) throws CouchbaseLiteException {
          synchronized (lock) {
              boolean commit = false;
              beginTransaction();
              try {
                  // Read local document:
                  final Document localDoc = new Document((Database) this, docID, true);
  
                  // Read the conflicting remote revision:
                  final Document remoteDoc = new Document((Database) this, docID, true);
                  try {
                      if (!remoteDoc.selectConflictingRevision()) {
                          Log.w(DOMAIN, "Unable to select conflicting revision for '%s', skipping...", docID);
                          return;
                      }
                  }
                  catch (LiteCoreException e) {
                      throw CBLStatus.convertException(e);
                  }
  
                  // Resolve conflict:
                  Log.v(DOMAIN, "Resolving doc '%s' (local=%s and remote=%s)", docID,
                      localDoc.getRevID(), remoteDoc.getRevID());
                  final Document resolvedDoc = resolveConflict(localDoc, remoteDoc);
  
                  // Save resolved document:
                  try {
                      saveResolvedDocument(resolvedDoc, localDoc, remoteDoc);
                  }
                  catch (LiteCoreException e) {
                      throw CBLStatus.convertException(e);
                  }
  
                  commit = true;
              }
              finally {
                  endTransaction(commit);
              }
          }
      }
docs: ////// RESOLVING REPLICATED CONFLICTS: