Source:
<code>public static List<String> executeChangelog(String changeLogFile, String contexts, Map<String, Object> userInput, ChangeSetExecutorCallback callback, ClassLoader cl) throws Exception { final class OpenmrsUpdateVisitor extends UpdateVisitor { private ChangeSetExecutorCallback callback; private int numChangeSetsToRun; public OpenmrsUpdateVisitor(Database database, ChangeSetExecutorCallback callback, int numChangeSetsToRun) { super(database); this.callback = callback; this.numChangeSetsToRun = numChangeSetsToRun; } @Override public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) throws LiquibaseException { if (callback != null) { callback.executing(changeSet, numChangeSetsToRun); } super.visit(changeSet, databaseChangeLog, database); } } if (cl == null) { cl = OpenmrsClassLoader.getInstance(); } log.debug("Setting up liquibase object to run changelog: " + changeLogFile); Liquibase liquibase = getLiquibase(changeLogFile, cl); int numChangeSetsToRun = liquibase.listUnrunChangeSets(contexts).size(); Database database = null;. lockHandler = null; try { database = liquibase.getDatabase(); <START> lockHandler = LockServiceFactory.getInstance().getLockService; <END> lockHandler.waitForLock(); ResourceAccessor openmrsFO = new ClassLoaderFileOpener(cl); ResourceAccessor fsFO = new FileSystemResourceAccessor(); DatabaseChangeLog changeLog = new XMLChangeLogSAXParser().parse(changeLogFile, new ChangeLogParameters(), new CompositeResourceAccessor(openmrsFO, fsFO)); changeLog.setChangeLogParameters(liquibase.getChangeLogParameters()); changeLog.validate(database); ChangeLogIterator logIterator = new ChangeLogIterator(changeLog, new ShouldRunChangeSetFilter(database), new ContextChangeSetFilter(contexts), new DbmsChangeSetFilter(database)); database.checkDatabaseChangeLogTable(true, changeLog, new String[] { contexts }); logIterator.run(new OpenmrsUpdateVisitor(database, callback, numChangeSetsToRun), database); } catch (LiquibaseException e) { throw e; } finally { try { lockHandler.releaseLock(); } catch (Exception e) { log.error("Could not release lock", e); } try { database.getConnection().close(); } catch (Exception e) { } } return updateWarnings; }</code><technical_language>Is this compiling ? i **getLockService** is a method</technical_language>

Target:
public static List<String> executeChangelog(String changeLogFile, String contexts, Map<String, Object> userInput, ChangeSetExecutorCallback callback, ClassLoader cl) throws Exception { final class OpenmrsUpdateVisitor extends UpdateVisitor { private ChangeSetExecutorCallback callback; private int numChangeSetsToRun; public OpenmrsUpdateVisitor(Database database, ChangeSetExecutorCallback callback, int numChangeSetsToRun) { super(database); this.callback = callback; this.numChangeSetsToRun = numChangeSetsToRun; } @Override public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) throws LiquibaseException { if (callback != null) { callback.executing(changeSet, numChangeSetsToRun); } super.visit(changeSet, databaseChangeLog, database); } } if (cl == null) { cl = OpenmrsClassLoader.getInstance(); } log.debug("Setting up liquibase object to run changelog: " + changeLogFile); Liquibase liquibase = getLiquibase(changeLogFile, cl); int numChangeSetsToRun = liquibase.listUnrunChangeSets(contexts).size(); Database database = null; LockService lockHandler = null; try { database = liquibase.getDatabase(); lockHandler = LockServiceFactory.getInstance().getLockService(); lockHandler.waitForLock(); ResourceAccessor openmrsFO = new ClassLoaderFileOpener(cl); ResourceAccessor fsFO = new FileSystemResourceAccessor(); DatabaseChangeLog changeLog = new XMLChangeLogSAXParser().parse(changeLogFile, new ChangeLogParameters(), new CompositeResourceAccessor(openmrsFO, fsFO)); changeLog.setChangeLogParameters(liquibase.getChangeLogParameters()); changeLog.validate(database); ChangeLogIterator logIterator = new ChangeLogIterator(changeLog, new ShouldRunChangeSetFilter(database), new ContextChangeSetFilter(contexts), new DbmsChangeSetFilter(database)); database.checkDatabaseChangeLogTable(true, changeLog, new String[] { contexts }); logIterator.run(new OpenmrsUpdateVisitor(database, callback, numChangeSetsToRun), database); } catch (LiquibaseException e) { throw e; } finally { try { lockHandler.releaseLock(); } catch (Exception e) { log.error("Could not release lock", e); } try { database.getConnection().close(); } catch (Exception e) { } } return updateWarnings; }