code: public static ValidationMessage shiftReferenceLocation(Entry entry,
  			long newSequenceLength) {
  		Collection<Reference> references = entry.getReferences();
  		for (Reference reference : references) {
  			for (Location rlocation : reference.getLocations().getLocations()) {
  				{
  					rlocation.setEndPosition(newSequenceLength);
  					if (rlocation.getBeginPosition().equals(
  							rlocation.getEndPosition())) {
  						return ValidationMessage.message(Severity.WARNING,
  								UTILS_6, rlocation.getBeginPosition(),
  								rlocation.getEndPosition());
  					}
  				}
  			}
  
  		}
  		return null;
  	}
docs: Reference Location shifting