comefrom: <awangdev>Longest Common Substring_4.java
code: public int longestCommonSubstring(String A, String B) {
      	if (A == null || B == null || A.length() == 0 || B.length() == 0) {
      		return 0;
      	}   
      	int [][] D = new int[A.length() + 1][B.length() + 1];
      	int max = 0;
      	for (int i = 0; i <= A.length(); i++) {
      		for(int j = 0; j <= B.length(); j++) {
      		    if (i == 0 || j == 0) {
      		        D[i][j] = 0;
      		    } else {
          			if (A.charAt(i - 1) == B.charAt(j - 1)) {
          				D[i][j] = D[i - 1][j - 1] + 1;
          			} else {
          				D[i][j] = 0;
          			}
          			max = Math.max(max, D[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_7 = new int [ var_1 . length ( ) + 1 ] [ var_2 . length ( ) + 1 ] ;
    int max = 0 ;
    for ( int var_9 = 0 ;
    var_9 <= var_1 . length ( ) ;
    var_9 ++ ) {
      for ( int var_10 = 0 ;
      var_10 <= var_2 . length ( ) ;
      var_10 ++ ) {
        if ( var_9 == 0 || var_10 == 0 ) {
          var_7 [ var_9 ] [ var_10 ] = 0 ;
        }
        else {
          if ( var_1 . charAt ( var_9 - 1 ) == var_2 . charAt ( var_10 - 1 ) ) {
            var_7 [ var_9 ] [ var_10 ] = var_7 [ var_9 - 1 ] [ var_10 - 1 ] + 1 ;
          }
          else {
            var_7 [ var_9 ] [ var_10 ] = 0 ;
          }
          max = Math . max ( max , var_7 [ var_9 ] [ var_10 ] ) ;
        }
      }
    }
    return max ;
  }
  