comefrom: <awangdev>Longest Common Substring_1.java
code: public int longestCommonSubstring(String A, String B) {
      	if (A == null || B == null || A.length() == 0 || B.length() == 0) {
      		return 0;
      	}
      	int m = A.length();
      	int n = B.length();
      	int[][] dp = new int[m + 1][n + 1];
      	int max = 0;
      	for (int i = 0; i <= m; i++) {
      		for(int j = 0; j <= n; j++) {
      		    if (i == 0 || j == 0) {
      		        dp[i][j] = 0;
      		        continue;
      		    }
      			if (A.charAt(i - 1) == B.charAt(j - 1)) {
      				dp[i][j] = dp[i - 1][j - 1] + 1;
      			} else {
      				dp[i][j] = 0;
      			}
          		max = Math.max(max, dp[i][j]);
      		}
      	}
      	return max;
      }
masked: 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 var_7 = var_2 . length ( ) ;
    int [ ] [ ] var_9 = new int [ var_6 + 1 ] [ var_7 + 1 ] ;
    int max = 0 ;
    for ( int var_11 = 0 ;
    var_11 <= var_6 ;
    var_11 ++ ) {
      for ( int var_12 = 0 ;
      var_12 <= var_7 ;
      var_12 ++ ) {
        if ( var_11 == 0 || var_12 == 0 ) {
          var_9 [ var_11 ] [ var_12 ] = 0 ;
          continue ;
        }
        if ( var_1 . charAt ( var_11 - 1 ) == var_2 . charAt ( var_12 - 1 ) ) {
          var_9 [ var_11 ] [ var_12 ] = var_9 [ var_11 - 1 ] [ var_12 - 1 ] + 1 ;
        }
        else {
          var_9 [ var_11 ] [ var_12 ] = 0 ;
        }
        max = Math . max ( max , var_9 [ var_11 ] [ var_12 ] ) ;
      }
    }
    return max ;
  }
  