How can I extract these similar codes into only one method?
Simple, with a bit of overhead, calling a run()  

    testInstance("IT", () -&gt; IvoryTower.getInstance());
    testInstance("TSDCL", () -&gt; ThreadSafeDoubleCheckLocking.getInstance());
    testInstance("IODH", () -&gt; InitializationOnDemandHolder.getInstance());
}

private void testInstance(String title, Runnable r) {
    long startTime = getCurrentTime();
    for (int i =  0; i &lt; MAX_ITE; i++) {
        r.run();
    }
    long endTime = getCurrentTime();
    System.out.println(title + ": " + (endTime - startTime));
}


Possibly with testInstance as lambda too if you do not want a second method.

OR

Runnable[] rs = {
    () -&gt; IvoryTower.getInstance(),
    () -&gt; ThreadSafeDoubleCheckLocking.getInstance(),
    () -&gt; InitializationOnDemandHolder.getInstance()
};
for (r : rs) {
    ...
    r.run();
    ...
}