Buggy code:
public class JVMDebuggerConnection { private ILaunch launch ; private OsgiClient osgiClient ; public JVMDebuggerConnection ( OsgiClient osgiClient ) { } boolean connectInDebugMode ( ILaunch launch , IServer iServer , IProgressMonitor monitor ) throws CoreException { long start = System . currentTimeMillis ( ) ; this . launch = launch ; boolean success = false ; IVMConnector connector = null ; connector = JavaRuntime . getVMConnector ( "org.eclipse.jdt.launching.socketAttachConnector" ) ; if ( connector == null ) { connector = JavaRuntime . getDefaultVMConnector ( ) ; } if ( connector == null ) { throw new CoreException ( new Status ( IStatus . ERROR , "org.apache.sling.ide.eclipse.wst" , "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>jvm<seq2seq4repair_space>connctor" ) ) ; } ISlingLaunchpadServer launchpadServer = ( ( ISlingLaunchpadServer ) ( iServer . loadAdapter ( SlingLaunchpadServer . class , monitor ) ) ) ; ISlingLaunchpadConfiguration configuration = launchpadServer . getConfiguration ( ) ; int debugPort = configuration . getDebugPort ( ) ; if ( debugPort <= 0 ) { throw new CoreException ( new Status ( IStatus . ERROR , "org.apache.sling.ide.eclipse.wst" , "debug<seq2seq4repair_space>port<seq2seq4repair_space>not<seq2seq4repair_space>configured" ) ) ; } Map < String , String > connectMap = new HashMap < > ( ) ; connectMap . put ( "hostname" , iServer . getHost ( ) ) ; connectMap . put ( "port" , String . valueOf ( debugPort ) ) ; int connectTimeout = JavaRuntime . getPreferences ( ) . getInt ( PREF_CONNECT_TIMEOUT ) ; connectMap . put ( "timeout" , Integer . toString ( connectTimeout ) ) ; @ SuppressWarnings ( "restriction" ) ISourceLookupDirector sourceLocator = new JavaSourceLookupDirector ( ) ; sourceLocator . setSourcePathComputer ( DebugPlugin . getDefault ( ) . getLaunchManager ( ) . getSourcePathComputer ( "org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer" ) ) ; List < IRuntimeClasspathEntry > classpathEntries = new ArrayList < > ( ) ; for ( IJavaProject javaProject : ProjectHelper . getAllJavaProjects ( ) ) { classpathEntries . add ( JavaRuntime . newProjectRuntimeClasspathEntry ( javaProject ) ) ; } ProgressUtils . advance ( monitor , 10 ) ; SourceReferenceResolver resolver = Activator . getDefault ( ) . getSourceReferenceResolver ( ) ; if ( resolver != null ) { try { List < SourceReference > references = osgiClient . findSourceReferences ( ) ; <START_BUG> SubMonitor subMonitor = SubMonitor . convert ( monitor , "Resolving<seq2seq4repair_space>source<seq2seq4repair_space>references" , 29 ) . setWorkRemaining ( references . size ( ) ) ; <END_BUG> for ( SourceReference reference : references ) { try { subMonitor . setTaskName ( ( "Resolving<seq2seq4repair_space>source<seq2seq4repair_space>reference:<seq2seq4repair_space>" + reference ) ) ; IRuntimeClasspathEntry classpathEntry = resolver . resolve ( reference ) ; if ( classpathEntry != null ) { classpathEntries . add ( classpathEntry ) ; } ProgressUtils . advance ( subMonitor , 1 ) ; } catch ( CoreException e ) { Activator . getDefault ( ) . getPluginLogger ( ) . warn ( "Failed<seq2seq4repair_space>resolving<seq2seq4repair_space>source<seq2seq4repair_space>reference" , e ) ; } } subMonitor . done ( ) ; } catch ( OsgiClientException e1 ) { throw new CoreException ( new Status ( Status . ERROR , Activator . PLUGIN_ID , e1 . getMessage ( ) , e1 ) ) ; } } classpathEntries . add ( JavaRuntime . computeJREEntry ( launch . getLaunchConfiguration ( ) ) ) ; IRuntimeClasspathEntry [ ] resolved = JavaRuntime . resolveSourceLookupPath ( classpathEntries . toArray ( new IRuntimeClasspathEntry [ 0 ] ) , launch . getLaunchConfiguration ( ) ) ; sourceLocator . setSourceContainers ( JavaRuntime . getSourceContainers ( resolved ) ) ; sourceLocator . initializeParticipants ( ) ; launch . setSourceLocator ( sourceLocator ) ; try { connector . connect ( connectMap , monitor , launch ) ; success = true ; long elapsedMillis = ( System . currentTimeMillis ( ) ) - start ; Activator . getDefault ( ) . getPluginLogger ( ) . tracePerformance ( "Debug<seq2seq4repair_space>connection<seq2seq4repair_space>to<seq2seq4repair_space>{0}" , elapsedMillis , iServer . getName ( ) ) ; } catch ( Exception e ) { throw new CoreException ( new Status ( IStatus . ERROR , "org.apache.sling.ide.eclipse.wst" , ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>establish<seq2seq4repair_space>debug<seq2seq4repair_space>connection<seq2seq4repair_space>to<seq2seq4repair_space>" + ( iServer . getHost ( ) ) ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + debugPort ) , e ) ) ; } return success ; } public void stop ( boolean force ) { } }

Fix:
SubMonitor subMonitor = SubMonitor . convert ( monitor , "Resolving<seq2seq4repair_space>source<seq2seq4repair_space>references" , 24 ) . setWorkRemaining ( references . size ( ) ) ;