Lazy load class variables
First I want to suggest a concrete implementation:

public class ValidateUtil{

    private static Pattern pattern;     
    private static final String REFFERENCE_PATTERN = "The regex pattern here";        

    public static boolean validate(final String reference){           
        return getPattern().matcher(reference).matches();
    }

    public static Pattern getPattern() {
        if (pattern == null) {
            pattern = Pattern.compile(REFFERENCE_PATTERN);
        }   
        return pattern;
    }

    /*
     * Many util Methods here       
     */    

}



  This may lead to increase the line of codes


Lines of code is at the most an indicator of less code quality. Do not ask for lines, do ask for responsibilities. Hypothetically a method/a class can have thousands lines of code and it will not produce any problem if it has only one responsibility. But I'll give you that it becomes more and more probable to violate the SRP (single responsible principle) the more code is available in the scope. And of course you may have other problems can be derived from many lines of code available. But code of lines alone will say you less to nothing.


  and sometime, the performance gain can be neglectable


And here you got a point. In one of my projects I discussed using "synchronized" and the performance issues. We measured a relation about 1:20. So of course it MUST be an issue... We made a second measurement. We iterated over a synchronized method 20.000.000 times and with the available pc configuration it took 20 seconds. BTW, the methods we talk about were called in maximum 20 times a second. What I want to say is: It really depends on the use case. But in MOST use cases you do not need not care about preemptive optimization. And you have to look at both: relative and absolute metrics.


  On the other hand, is this really worth only for heavy, large objects (like Database connections)


A very clear answer in THIS case of LAZY INITIALIZATION: No.

It may be a case of preemptive optimization. But that is not the reason I would prefer it. The reason why I would do so is: If you only use lazy getter-methods within or from outside your object/class you make yourself independent of the order of object creation. You use the getter and you get an object, doesn't matter if it was created before or it was created right now. This is especially useful in component trees. You often play around with the position of an ui element in the ui component tree. A lazy getter saves your ass and time. After all ui components often are heavy and even if they are not you get the optimization for free.