Both strings are null or equal.
184958
private static boolean isEqual(String string1, String string2) {
        return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2));
    }
91170
public static String checkNull(String val) {
    if (val == null) {
      return null;
    }

    val = val.trim();
    if (val.length() == 0) {
      return null;
    }

    return val;
  }
1328201
protected void validateEqualString(String s1, String s2, String errorKey, String errorMessage) {
		if (s1 == null || s2 == null || (! s1.equals(s2))) {
			addError(errorKey, errorMessage);
		}
	}
1084500
function (str) {

        if (!str || !str.length || str.length < 2) {
            return null;
        }

        var jsonStr = str.substring(1, str.length - 1);

        return JSON.parse(jsonStr);
    }
1167904
private static String validString(Object data) throws IOException {
        // Null is ok
        if (data == null) {
            return "";
        }
        if (!(data instanceof String)) {
            throw new IOException("Invalid non-String value found!");
        }
        return (String) data;
    }
1298188
public static int compare( String s1, String s2)
	{
		if (s1 == null && s2 == null)
		{
			return 0;
		}
		else if (s1 == null && s2 != null)
		{
			return -1;
		}
		else if (s1 != null && s2 == null)
		{
			return 1;
		}
		else
		{
			return s1.compareTo(s2);
		}
	}
268196
private boolean isEqual(String str1, String str2) {
		if (StringUtils.isEmpty(str1) && StringUtils.isEmpty(str2)) {
			return true;
		} else if (!StringUtils.isEmpty(str1)) {
			return str1.equals(str2);
		} else {
			return false;
		}
	}
245916
public static String emptyToNull(String str) {
        return (str == null || str.length() == 0 ? null : str);
    }
1032341
public int compare(String a, String b) {

        int i;

        if (collator == null) {
            i = a.compareTo(b);
        } else {
            i = collator.compare(a, b);
        }

        return (i == 0) ? 0
                        : (i < 0 ? -1
                                 : 1);
    }
386235
@Override
	public Void visitString(String s, String p) {
		if (inTasks && AnnotationAttributeType.VALUE.getValue().equals(p)) {
			currentValue.value0.add(s);
		}

		return null;
	}
234878
public final void mBOTH() throws RecognitionException {
		try {
			int _type = BOTH;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:14:6: ( 'both' )
			// hql.g:14:8: 'both'
			{
			match("both"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1324515
@Override
  public boolean isEqual(String data1, String data2)
  {
    return LangUtils.isEqual(data1, data2);
  }
422983
public static boolean nullSafeEquals(String text1, String text2) {
        if (text1 == null || text2 == null) {
            return false;
        } else {
            return text1.equals(text2);
        }
    }
968454
function () {
        var value = this.valueOf();

        // returns empty string if the value is
        // null or undefined or does not implement a toString
        return (!_.isNil(value) && _.isFunction(value.toString)) ? value.toString() : E;
    }
1352917
def is_equal(self, string1, string2):
        '''  '''
        return string1.lower().strip() == string2.lower().strip()
1019271
public static boolean isEmpty(String str) {
    return str == null || "".equals(str) || "".equals(str.trim());
  }
88193
@Nullable
    public static String nullableString(@Nullable String str) {
        return str == null || str.isEmpty() ? null : str;
    }