<awangdev>Longest Common Substring_3.java
public int longestCommonSubstring(String A, String B) {
    	if (A == null || B == null || A.length() == 0 || B.length() == 0) {
    		return 0;
    	}
    	int n = A.length();
    	
    	int max = 0;
    	for (int i = 0; i < n; i++) {
    		for(int j = 0; j <= i; j++) {
    		    String subStr = A.substring(j, i + 1);
        		if (B.contains(subStr)) {
        		    max = Math.max(max, subStr.length());
        		}
    		}
    	}
    	return max;
    }
public int sample_funcname ( String var_1 , String var_2 ) {
  if ( var_1 == null || var_2 == null || var_1 . length ( ) == 0 || var_2 . length ( ) == 0 ) {
    return 0 ;
  }
  int var_6 = var_1 . length ( ) ;
  int max = 0 ;
  for ( int var_8 = 0 ;
  var_8 < var_6 ;
  var_8 ++ ) {
    for ( int var_9 = 0 ;
    var_9 <= var_8 ;
    var_9 ++ ) {
      String var_12 = var_1 . substring ( var_9 , var_8 + 1 ) ;
      if ( var_2 . contains ( var_12 ) ) {
        max = Math . max ( max , var_12 . length ( ) ) ;
      }
    }
  }
  return max ;
}
