Buggy code:
public class KevoreeCLKernel implements BootstrapService { private Bootstrap bs ; public KevoreeCLKernel ( Bootstrap b ) { } private Boolean offline = false ; public void setInjector ( KevoreeInjector injector ) { } private KevoreeInjector injector = null ; public String buildKernelKey ( DeployUnit deployUnit ) { } @ Override public FlexyClassLoader get ( DeployUnit deployUnit ) { } public FlexyClassLoader installDeployUnit ( DeployUnit deployUnit ) { FlexyClassLoader resolvedKCL = get ( deployUnit ) ; if ( resolvedKCL != null ) { return resolvedKCL ; } else { HashSet < String > urls = new HashSet < String > ( ) ; if ( ! ( offline ) ) { ContainerRoot root = KModelHelper . root ( deployUnit ) ; File resolved ; for ( Repository repo : root . getRepositories ( ) ) { urls . add ( repo . getUrl ( ) ) ; } <START_BUG> if ( ( deployUnit . getVersion ( ) . contains ( "SNAPSHOT" ) ) || ( deployUnit . getVersion ( ) . contains ( "LATEST" ) ) ) { <END_BUG> urls . add ( "http:////oss.sonatype.org//content//groups//public//" ) ; } else { urls . add ( "http:////repo1.maven.org//maven2" ) ; } Log . info ( ( "Resolving<seq2seq4repair_space>.............<seq2seq4repair_space>" + ( deployUnit . path ( ) ) ) ) ; long before = System . currentTimeMillis ( ) ; if ( ( ( deployUnit . getUrl ( ) ) == null ) || ( "" . equals ( deployUnit . getUrl ( ) ) ) ) { resolved = bs . getKernel ( ) . getResolver ( ) . resolve ( KModelHelper . fqnGroup ( deployUnit ) , deployUnit . getName ( ) , deployUnit . getVersion ( ) , "jar" , urls ) ; } else { resolved = bs . getKernel ( ) . getResolver ( ) . resolve ( deployUnit . getUrl ( ) , urls ) ; if ( ( resolved == null ) && ( new File ( deployUnit . getUrl ( ) ) . exists ( ) ) ) { resolved = new File ( deployUnit . getUrl ( ) ) ; } } Log . info ( "Resolved<seq2seq4repair_space>in<seq2seq4repair_space>{}ms" , ( ( System . currentTimeMillis ( ) ) - before ) ) ; if ( resolved != null ) { FlexyClassLoader installed = bs . getKernel ( ) . put ( buildKernelKey ( deployUnit ) , resolved ) ; return installed ; } else { Log . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>resolve<seq2seq4repair_space>{}" , deployUnit . path ( ) ) ; } } } return null ; } @ Override public void removeDeployUnit ( DeployUnit deployUnit ) { } public FlexyClassLoader recursiveInstallDeployUnit ( DeployUnit du ) { } @ Nullable @ Override public FlexyClassLoader installTypeDefinition ( TypeDefinition tdef ) { } public boolean filter ( DeployUnit du ) { } @ Override public void setOffline ( boolean b ) { } private String nodeName ; public void setNodeName ( String nName ) { } public KevoreeCoreBean core ; public void setCore ( KevoreeCoreBean core ) { } @ Override public Object createInstance ( final Instance instance , FlexyClassLoader classLoader ) { } @ NotNull @ Override public void injectDictionary ( Instance instance , Object target , boolean defaultOnly ) { } @ NotNull @ Override public void injectDictionaryValue ( Value dictionaryValue , Object target ) { } private boolean internalInjectField ( String fieldName , String value , Object target ) { } public Method lookupSetter ( String name , Class clazz ) { } public Field lookup ( String name , Class clazz ) { } @ Override public void injectService ( Class < ? extends Object > aClass , Object o , Object o2 ) { } @ Nullable @ Override public File resolve ( String url , Set < ? extends String > repos ) { } }

Fix:
if ( ( deployUnit . getVersion ( ) . toLowerCase ( ) . contains ( "snapshot" ) ) || ( deployUnit . getVersion ( ) . toLowerCase ( ) . contains ( "latest" ) ) ) {