code: protected void markStatementsForDeletion(StatementDocument currentDocument,
  			List<Statement> deleteStatements) {
  		for (Statement statement : deleteStatements) {
  			boolean found = false;
  			for (StatementGroup sg : currentDocument.getStatementGroups()) {
  				if (!sg.getProperty().equals(statement.getMainSnak().getPropertyId())) {
  					continue;
  				}
  
  				Statement changedStatement = null;
  				for (Statement existingStatement : sg) {
  					if (existingStatement.equals(statement)) {
  						found = true;
  						toDelete.add(statement.getStatementId());
  					} else if (existingStatement.getStatementId().equals(
  							statement.getStatementId())) {
  						// (we assume all existing statement ids to be nonempty
  						// here)
  						changedStatement = existingStatement;
  						break;
  					}
  				}
  
  				if (!found) {
  					StringBuilder warning = new StringBuilder();
  					warning.append("Cannot delete statement (id ")
  							.append(statement.getStatementId())
  							.append(") since it is not present in data. Statement was:\n")
  							.append(statement);
  
  					if (changedStatement != null) {
  						warning.append(
  								"\nThe data contains another statement with the same id: maybe it has been edited? Other statement was:\n")
  								.append(changedStatement);
  					}
  					logger.warn(warning.toString());
  				}
  			}
  		}
  	}
docs: Marks the given list of statements for deletion. It is verified that the
  current document actually contains the statements before doing so. This
  check is based on exact statement equality, including qualifier order and
  statement id.
  
  @param currentDocument
  the document with the current statements
  @param deleteStatements
  the list of statements to be deleted