Preconditions.checkState(!anyRunning(new Predicate<Id.Program>() {
@Override
public boolean apply(Id.Program programId) {
return programId.getApplication().equals(appId);
}
<BUG>}, Type.values()), "There are program still running for application " + appId.getId());
store.removeApplication(appId);
Location appArchive = getApplicationLocation(appId);
appArchive.delete();</BUG>
MetricsFrontendServiceImpl mfs = new MetricsFrontendServiceImpl(configuration);

Preconditions.checkState(!anyRunning(new Predicate<Id.Program>() {
@Override
public boolean apply(Id.Program programId) {
return programId.getApplication().equals(appId);
}
}, Type.values()), "There are program still running for application " + appId.getId());
Location appArchive = store.getApplicationArchiveLocation(appId);
appArchive.delete();
store.removeApplication(appId);
MetricsFrontendServiceImpl mfs = new MetricsFrontendServiceImpl(configuration);
