Performance of the String searching algorithm
int i;
    for(i=1;i&lt;pattern.length();)
    {
        if(pattern.charAt(i)==pattern.charAt(index))
        {
            lsp[i]=lsp[index]+1;
            i++;
            index++;
        }
        else
        {
            if(index!=0)
            {
                index=lsp[i-1];
            }
            else
            {
                lsp[i]=0;
                i++;
            }
        }
    }


That's a while loop. There's no need to use for here.

    int i = 1;
    while(i&lt;pattern.length())
    {
        if(pattern.charAt(i)==pattern.charAt(index))
        {
            lsp[i]=lsp[index]+1;
            i++;
            index++;
        }
        else
        {
            if(index!=0)
            {
                index=lsp[i-1];
            }
            else
            {
                lsp[i]=0;
                i++;
            }
        }
    }


You might want to use more descriptive variables in your code, because I have the hardest time trying to understand what lsp is. The i and j variables aren't helping either: are you traversing two collections? In what way?

Your class names are weird, what does Gogl mean?

More descriptive variables and classnames will help you when you view your code at a later point in time. If you don't feel like explaining the algorithm in code, at least put the name of the algorithm together with a link as a comment in the code.