auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static void main(String[] argv) throws Exception{ Args args = new Args(); CmdLineParser parser = new CmdLineParser(args, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(argv); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); return; } final IndexUtils util = new IndexUtils(args.index); if (args.stats) { util.printIndexStats(); } if (args.term != null) { util.printTermCounts(args.term); } if (args.docvectorDocid != null) { util.printDocumentVector(args.docvectorDocid); } if (args.docVectors != null) { <START> if (args.docVectorWeight != null) { <END> util.dumpDocumentVectors(args.docVectors, args.docVectorWeight); } else { util.dumpDocumentVectors(args.docVectors, null); } } if (args.dumpAllDocids != null) { util.getAllDocids(args.dumpAllDocids); } if (args.rawDoc != null) { System.out.println(util.getRawDocument(args.rawDoc)); } if (args.rawDocs != null) { util.dumpRawDocuments(args.rawDocs, false); } if (args.rawDocsWithDocid != null) { util.dumpRawDocuments(args.rawDocs, true); } if (args.transformedDoc != null) { System.out.println(util.getTransformedDocument(args.transformedDoc)); } if (args.sentDoc != null) { for (Sentence sent: util.getSentDocument(args.sentDoc)){ System.out.println(sent); } } if (args.lookupDocid != null) { System.out.println(util.convertDocidToLuceneDocid(args.lookupDocid)); } if (args.lookupLuceneDocid > 0) { System.out.println(util.convertLuceneDocidToDocid(args.lookupLuceneDocid)); } }</code><technical_language>check for valid weight scheme instead - convert ENUM</technical_language>

Target:
public static void main(String[] argv) throws Exception{ Args args = new Args(); CmdLineParser parser = new CmdLineParser(args, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(argv); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); return; } final IndexUtils util = new IndexUtils(args.index); if (args.stats) { util.printIndexStats(); } if (args.term != null) { util.printTermCounts(args.term); } if (args.docvectorDocid != null) { util.printDocumentVector(args.docvectorDocid); } if (args.docVectors != null) { if (args.docVectorWeight == null) { args.docVectorWeight = DocVectorWeight.NONE; } util.dumpDocumentVectors(args.docVectors, args.docVectorWeight); } if (args.dumpAllDocids != null) { util.getAllDocids(args.dumpAllDocids); } if (args.rawDoc != null) { System.out.println(util.getRawDocument(args.rawDoc)); } if (args.rawDocs != null) { util.dumpRawDocuments(args.rawDocs, false); } if (args.rawDocsWithDocid != null) { util.dumpRawDocuments(args.rawDocs, true); } if (args.transformedDoc != null) { System.out.println(util.getTransformedDocument(args.transformedDoc)); } if (args.sentDoc != null) { for (Sentence sent: util.getSentDocument(args.sentDoc)){ System.out.println(sent); } } if (args.lookupDocid != null) { System.out.println(util.convertDocidToLuceneDocid(args.lookupDocid)); } if (args.lookupLuceneDocid > 0) { System.out.println(util.convertLuceneDocidToDocid(args.lookupLuceneDocid)); } }
Source:
<code>public void testFilterNoColumns() { PageProcessor pageProcessor = new PageProcessor(Optional.of(new TestingPageFilter(positionsRange(0, 50))), ImmutableList.of()); <START> Page inputPage = new Page(createLongSequenceBlock(0, 100)); <END> AggregatedMemoryContext memoryContext = newSimpleAggregatedMemoryContext(); Iterator<Optional<Page>> output = pageProcessor.process(SESSION, new DriverYieldSignal(), memoryContext, inputPage); assertEquals(memoryContext.getBytes(), inputPage.getRetainedSizeInBytes()); List<Optional<Page>> outputPages = ImmutableList.copyOf(output); assertEquals(outputPages.size(), 1); Page outputPage = outputPages.get(0).orElse(null); assertEquals(outputPage.getChannelCount(), 0); assertEquals(outputPage.getPositionCount(), 50); }</code><technical_language>3 lines get repeated a lot. Perhaps, extract a helper method</technical_language>

Target:
public void testFilterNoColumns() { PageProcessor pageProcessor = new PageProcessor(Optional.of(new TestingPageFilter(positionsRange(0, 50))), ImmutableList.of()); Page inputPage = new Page(createLongSequenceBlock(0, 100)); LocalMemoryContext memoryContext = newSimpleAggregatedMemoryContext().newLocalMemoryContext(PageProcessor.class.getSimpleName()); Iterator<Optional<Page>> output = pageProcessor.process(SESSION, new DriverYieldSignal(), memoryContext, inputPage); assertEquals(memoryContext.getBytes(), 0); List<Optional<Page>> outputPages = ImmutableList.copyOf(output); assertEquals(outputPages.size(), 1); Page outputPage = outputPages.get(0).orElse(null); assertEquals(outputPage.getChannelCount(), 0); assertEquals(outputPage.getPositionCount(), 50); }
Source:
<code>public ForkPoint find() throws IOException { try (RevWalk walk = new RevWalk(repo)) { Branch currentBranch = new Branch(walk.parseCommit(repo.exactRef("HEAD").getObjectId()), "HEAD"); <START> Set<Branch> refs = allRefsExceptCurrent(walk, currentBranch.head); <END> init(walk, currentBranch, refs); RevCommit next; while ((next = queue.next()) != null) { List<Branch> origins = commitOrigins.get(next); if (origins.size() > 1 && origins.contains(currentBranch)) { return matchFound(next, origins); } for (RevCommit p : next.getParents()) { if (p.equals(currentBranch.head)) { continue; } registerOrigins(p, origins); if (!p.has(RevFlag.SEEN)) { parse(walk, p); p.add(RevFlag.SEEN); queue.add(p); } } commitOrigins.remove(next); } } return null; }</code><technical_language>refs a meaning in git/JGit, this named otherBranches similar. for allRefsExceptCurrent, name findOtherBranches</technical_language>

Target:
public ForkPoint find() throws IOException { try (RevWalk walk = new RevWalk(repo)) { walk.setRetainBody(false); RevCommit currentBranch = walk.parseCommit(repo.exactRef("HEAD").getObjectId()); List<RevCommit> otherBranches = findOtherBranches(repo, walk, currentBranch); return internalFind(walk, currentBranch, otherBranches); } }
Source:
<code>protected void initMaxCnxns() { <START> String mxCxnProp = System.getProperty(ZOOKEEPER_MAX_CONNECTION); maxCnxns = ZOOKEEPER_MAX_CONNECTION_DEFAULT; if (null != mxCxnProp) { LOG.info("maxCnxns configured value is {}.", mxCxnProp); try { maxCnxns = Integer.parseInt(mxCxnProp.trim()); } catch (NumberFormatException e) { LOG.warn("maxCnxns configured value '{}' can not be parsed to integer, using default value {}.", mxCxnProp, ZOOKEEPER_MAX_CONNECTION_DEFAULT); } <END> if (maxCnxns < 0) { maxCnxns = 0; LOG.warn("maxCnxns should be greater than or equal to 0, using default vlaue {}.", ZOOKEEPER_MAX_CONNECTION_DEFAULT); } } else { LOG.warn("maxCnxns is not configured, using default value {}.", ZOOKEEPER_MAX_CONNECTION_DEFAULT); } }</code><technical_language>This simplified maxCnxns = Integer.getInteger(ZOOKEEPER_MAX_CONNECTION, ZOOKEEPER_MAX_CONNECTION_DEFAULT)</technical_language>

Target:
protected void initMaxCnxns() { maxCnxns = Integer.getInteger(ZOOKEEPER_MAX_CONNECTION, ZOOKEEPER_MAX_CONNECTION_DEFAULT); if (maxCnxns < 0) { maxCnxns = ZOOKEEPER_MAX_CONNECTION_DEFAULT; LOG.warn("maxCnxns should be greater than or equal to 0, using default vlaue {}.", ZOOKEEPER_MAX_CONNECTION_DEFAULT); } else if (maxCnxns == ZOOKEEPER_MAX_CONNECTION_DEFAULT) { LOG.warn("maxCnxns is not configured, using default value {}.", ZOOKEEPER_MAX_CONNECTION_DEFAULT); } else { LOG.info("maxCnxns configured value is {}.", maxCnxns); } }
Source:
<code>public void testAdapter() throws Exception { deployContrib("org.nuxeo.ecm.platform.pictures.tiles", "OSGI-INF/pictures-tiles-adapter-contrib.xml"); applyInlineDeployments(); <START> postSetUp(); <END> }</code><technical_language>postSetUp called applyInlineDeployments + pushInlineDeployments</technical_language>

Target:
public void testAdapter() throws Exception { pushInlineDeployments("org.nuxeo.ecm.platform.pictures.tiles:OSGI-INF/pictures-tiles-adapter-contrib.xml"); }
Source:
<code>public void updateFile(DrawableFile f) { try { DrawableTransaction trans = beginTransaction(); CaseDbTransaction caseDbTransaction = tskCase.beginTransaction(); updateFile(f, trans, caseDbTransaction); commitTransaction(trans, true); caseDbTransaction.commit(); } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, "Error updating file", ex); <START> } <END> }</code><technical_language>Another place deal rolling transaction in case of error</technical_language>

Target:
public void updateFile(DrawableFile f) { DrawableTransaction trans = null; CaseDbTransaction caseDbTransaction = null; try { trans = beginTransaction(); caseDbTransaction = tskCase.beginTransaction(); updateFile(f, trans, caseDbTransaction); commitTransaction(trans, true); caseDbTransaction.commit(); } catch (TskCoreException ex) { if (null != trans) { rollbackTransaction(trans); } if (null != caseDbTransaction) { try { caseDbTransaction.rollback(); } catch (TskCoreException ex2) { LOGGER.log(Level.SEVERE, "Error in trying to rollback transaction", ex2); } } LOGGER.log(Level.SEVERE, "Error updating file", ex); } }
Source:
<code>private static List<String> getUriList(WikibaseUris uris, Collection<String> prefixes) { List<String> uriList = new <START> LinkedList<>(uris.entityURIs()); <END> uris.entityInitials().forEach(s -> uriList.add(uris.entityIdToURI(s))); uriList.add(uris.statement()); uriList.add(uris.reference()); uriList.add(uris.value()); for (String p: prefixes) { uriList.add(uris.property(p) + "P"); } return uriList; }</code><technical_language>This ImmutableList. more BaseVocabularyDecl iterates indices (LinkedList is a SequentialList RandomAccess). (yes, I know, this is minor is called once)</technical_language>

Target:
private static List<String> getUriList(WikibaseUris uris, Collection<String> prefixes) { ImmutableList.Builder<String> uriList = ImmutableList.<String>builder(); uriList.addAll(uris.entityURIs()); uris.entityInitials().forEach(s -> uriList.add(uris.entityIdToURI(s))); uriList.add(uris.statement()); uriList.add(uris.reference()); uriList.add(uris.value()); for (String p: prefixes) { uriList.add(uris.property(p) + "P"); } return uriList.build(); }
Source:
<code>public PageLayoutApi getPageLayoutApiForRef(SpaceReference layoutSpaceRef) { <START> if (layoutSpaceRef != null) { <END> return getPageLayoutApiForDocRef(getPageLayoutCmd().standardPropDocRef(layoutSpaceRef)); } return null; }</code><technical_language>script services cope nullable values. layoutExists is nullable please null check additonaly layoutExists check</technical_language>

Target:
public PageLayoutApi getPageLayoutApiForRef(SpaceReference layoutSpaceRef) { return getPageLayoutCmd().resolveValidLayoutSpace(layoutSpaceRef) .map(PageLayoutApi::new) .orElse(null); }
Source:
<code>private void updateGameStatus() { if (chatUser == null) { return; } Optional<Player> playerOptional = chatUser.getPlayer(); if (!playerOptional.isPresent()) { playerStatusIndicator.setVisible(false); playerMapIndicator.setVisible(false); return; } Player player = playerOptional.get(); switch (player.getStatus()) { case IDLE: <START> playerStatusIndicator.setVisible(false); <END> break; case HOSTING: playerStatusIndicator.setImage(playerStatusHosting); playerStatusIndicator.setVisible(true); break; case LOBBYING: playerStatusIndicator.setImage(playerStatusLobby); playerStatusIndicator.setVisible(true); break; case PLAYING: playerStatusIndicator.setImage(playerStatusPlaying); playerStatusIndicator.setVisible(true); break; } }</code><technical_language>If do initialize update</technical_language>

Target:
private void updateGameStatus() { if (chatUser == null) { return; } Optional<Player> playerOptional = chatUser.getPlayer(); if (!playerOptional.isPresent()) { playerStatusIndicator.setVisible(false); return; } Player player = playerOptional.get(); if (player.getStatus() == PlayerStatus.IDLE) { playerStatusIndicator.setVisible(false); } else { playerStatusIndicator.setVisible(true); playerStatusIndicator.setImage(getPlayerStatusIcon(player.getStatus())); } }
Source:
<code>public SonarLintEngineManager() { this(new SonarLintEngineFactory()); <START> if (!ApplicationManager.getApplication().isUnitTestMode()) { startSonarLintWebServer(); } <END> }</code><technical_language>avoid this if ? this is sign start happen here, in a place reach unit tests</technical_language>

Target:
public SonarLintEngineManager() { this(new SonarLintEngineFactory()); startSonarLintWebServer(); }
Source:
<code>void doRun() { ObjectTransitionSafepoint.INSTANCE.register(); <START> ActorProcessingThread t = (ActorProcessingThread) Thread.currentThread(); <END> WebDebugger dbg = null; if (VmSettings.TRUFFLE_DEBUGGER_ENABLED) { dbg = vm.getWebDebugger(); assert dbg != null; } t.currentlyExecutingActor = actor; if (VmSettings.UNIFORM_TRACING) { ActorExecutionTrace.recordActivityContext(actor, tracer); } else if (VmSettings.KOMPOS_TRACING) { KomposTrace.currentActivity(actor); } try { while (getCurrentMessagesOrCompleteExecution()) { processCurrentMessages(t, dbg); } } finally { ObjectTransitionSafepoint.INSTANCE.unregister(); } if (VmSettings.UNIFORM_TRACING || VmSettings.KOMPOS_TRACING) { t.swapTracingBufferIfRequestedUnsync(); } t.currentlyExecutingActor = null; }</code><technical_language>this cast TracingActor unnecessary in place? I catch a change explain is needed anymore</technical_language>

Target:
void doRun() { if (VmSettings.DYNAMIC_METRICS) { numTurnBatches.incrementAndGet(); } ObjectTransitionSafepoint.INSTANCE.register(); ActorProcessingThread t = (ActorProcessingThread) Thread.currentThread(); try { doRunWithObjectSafepoints(t); } finally { ObjectTransitionSafepoint.INSTANCE.unregister(); if (VmSettings.UNIFORM_TRACING || VmSettings.KOMPOS_TRACING) { t.swapTracingBufferIfRequestedUnsync(); } t.currentlyExecutingActor = null; } }
Source:
<code>public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.clone().process() .doOnNext(HttpResponse::close) .map(res -> res.headerValue(WWW_AUTHENTICATE)) .map(header -> extractChallenge(header, BEARER_TOKEP_REFIX)) .flatMap(map -> { <START> cache.scopes(map.get("resource")+"/.default"); <END> return cache.getToken(); }) .flatMap(token -> { context.httpRequest().header(AUTHORIZATION, BEARER_TOKEP_REFIX + token.token()); return next.process(); }); }</code><technical_language>nit: missing spaces +</technical_language>

Target:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.clone().process() .doOnNext(HttpResponse::close) .map(res -> res.headerValue(WWW_AUTHENTICATE)) .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX)) .flatMap(map -> { cache.scopes(map.get("resource") + "/.default"); return cache.getToken(); }) .flatMap(token -> { context.httpRequest().header(AUTHORIZATION, BEARER_TOKEN_PREFIX + token.token()); return next.process(); }); }
Source:
<code>private static List<String> replaceElementsSuffix(List<String> bcp, String originalSuffix, String newSuffix) { for (int i=0; i<bcp.size(); i++) { String entry = bcp.get(i); if (entry.endsWith(originalSuffix)) { <START> bcp.set(i, entry.substring(0, entry.length() - 4) + newSuffix); <END> } } return bcp; }</code><technical_language>entry.length() - originalSuffix.length()</technical_language>

Target:
private static List<String> replaceElementsSuffix(List<String> bcp, String originalSuffix, String newSuffix) { for (int i=0; i<bcp.size(); i++) { String entry = bcp.get(i); if (entry.endsWith(originalSuffix)) { bcp.set(i, entry.substring(0, entry.length() - originalSuffix.length()) + newSuffix); } } return bcp; }
Source:
<code>public void immutableSources() { new InfoboxBuilderPage().open("InfoboxBuilderImmutableRows") <START> .switchToIFrame() <END> .setAndVerifyRowLabelWithIndex(0, "AutomatedTest") .save(); String invocationLabelText = new PortableInfobox().open("InfoboxBuilderImmutableExample") .getDataLabelTextWithIndex(0); Assertion.assertEquals("AutomatedTest", invocationLabelText); }</code><technical_language>I move this .switchToIFrame() InfoboxBuilderPage method</technical_language>

Target:
public void immutableSources() { new InfoboxBuilderPage().open("InfoboxBuilderImmutableRows") .setAndVerifyRowLabel(0, "AutomatedTest") .save(); String invocationLabelText = new PortableInfobox().open("InfoboxBuilderImmutableExample") .getDataLabelTextWithIndex(0); Assertion.assertEquals("AutomatedTest", invocationLabelText); }
Source:
<code>public KeyValue getByLanguageAndContentType(final String key, final long languageId, final String contentTypeId) { try { @SuppressWarnings("unchecked") Map<Long, Map<String, KeyValue>> cachedValues = Map.class.cast(this.cache.get(key, BY_LANGUAGE_CONTENT_TYPE_GROUP)); if (null != cachedValues) { <START> if (cachedValues.containsKey(languageId)) { <END> return cachedValues.get(languageId).get(contentTypeId); } } } catch (DotCacheException e) { Logger.debug(this, String.format("Cache entry with key %s was not found.", key), e); } return null; }</code><technical_language>elses I merge suggested</technical_language>

Target:
public KeyValue getByLanguageAndContentType(final String key, final long languageId, final String contentTypeId) { KeyValue keyValue = null; try { @SuppressWarnings("unchecked") final Map<Long, Map<String, KeyValue>> cachedValues = Map.class.cast(this.cache.get(key, BY_LANGUAGE_CONTENT_TYPE_GROUP)); keyValue = (null != cachedValues && cachedValues.containsKey(languageId))? cachedValues.get(languageId).get(contentTypeId):null; } catch (DotCacheException e) { Logger.debug(this, String.format("Cache entry with key %s was not found.", key), e); } return keyValue; }
Source:
<code>static void showLicense(@Nullable final Context context, @NonNull final License license) { if (context == null) { return; } <START> Observable.fromCallable(() -> getFormattedLicense(context, license)) <END> .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(formattedLicense -> { final String webViewData = Base64.encodeToString(formattedLicense .getBytes(StandardCharsets.UTF_8), Base64.NO_PADDING); final WebView webView = new WebView(context); webView.loadData(webViewData, "text/html; charset=UTF-8", "base64"); final AlertDialog.Builder alert = new AlertDialog.Builder(context); alert.setTitle(license.getName()); alert.setView(webView); assureCorrectAppLanguage(context); alert.setNegativeButton(context.getString(R.string.finish), (dialog, which) -> dialog.dismiss()); alert.show(); }); }</code><technical_language>Please return this a Disposable add a CompositeDisposable in LicenseFragment</technical_language>

Target:
static Disposable showLicense(@Nullable final Context context, @NonNull final License license) { if (context == null) { return Disposables.empty(); } return Observable.fromCallable(() -> getFormattedLicense(context, license)) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(formattedLicense -> { final String webViewData = Base64.encodeToString(formattedLicense .getBytes(StandardCharsets.UTF_8), Base64.NO_PADDING); final WebView webView = new WebView(context); webView.loadData(webViewData, "text/html; charset=UTF-8", "base64"); final AlertDialog.Builder alert = new AlertDialog.Builder(context); alert.setTitle(license.getName()); alert.setView(webView); assureCorrectAppLanguage(context); alert.setNegativeButton(context.getString(R.string.finish), (dialog, which) -> dialog.dismiss()); alert.show(); }); }
Source:
<code><START> private static ImagePredicate localMediaIdPredicate(String id) { <END> return new ImagePredicate(id, "data-wpid"); }</code><technical_language>this breaks anything, need change scope of methods leave package-private originally were</technical_language>

Target:
static ImagePredicate localMediaIdPredicate(String id) { return new ImagePredicate(id, "data-wpid"); }
Source:
<code>List<UsageConsumableInArrearTierUnitDetail> getBilledDetailsForUnitType(final Iterable<InvoiceItem> billedItems, final String unitType) { final Map<Integer, UsageConsumableInArrearTierUnitDetail> resultMap = new TreeMap<Integer, UsageConsumableInArrearTierUnitDetail>(Ordering.<Integer>natural()); for (final InvoiceItem bi : billedItems) { final UsageConsumableInArrearDetail usageDetail = fromJson(bi.getItemDetails()); for (final UsageConsumableInArrearTierUnitDetail curDetail : usageDetail.getTierDetails()) { if (curDetail.getTierUnit().equals(unitType)) { if (!resultMap.containsKey(curDetail.getTier())) { resultMap.put(curDetail.getTier(), curDetail); } else { final UsageConsumableInArrearTierUnitDetail perTierDetail = resultMap.get(curDetail.getTier()); <START> perTierDetail.updateQuantityAndAmount(perTierDetail.getQuantity() + curDetail.getQuantity()); <END> } } } } return ImmutableList.copyOf(resultMap.values()); }</code><technical_language>Nit: updateQuantityAndAmount(perTierDetail.getQuantity() + curDetail.getQuantity()) call simplified updateQuantityAndAmount(curDetail.getQuantity()) (i.e. additional in UsageConsumableInArrearTierUnitDetail)</technical_language>

Target:
List<UsageConsumableInArrearTierUnitDetail> getBilledDetailsForUnitType(final Iterable<InvoiceItem> billedItems, final String unitType) { final Map<Integer, UsageConsumableInArrearTierUnitDetail> resultMap = new TreeMap<Integer, UsageConsumableInArrearTierUnitDetail>(Ordering.<Integer>natural()); for (final InvoiceItem bi : billedItems) { final UsageConsumableInArrearDetail usageDetail = fromJson(bi.getItemDetails()); for (final UsageConsumableInArrearTierUnitDetail curDetail : usageDetail.getTierDetails()) { if (curDetail.getTierUnit().equals(unitType)) { if (!resultMap.containsKey(curDetail.getTier())) { resultMap.put(curDetail.getTier(), curDetail); } else { final UsageConsumableInArrearTierUnitDetail perTierDetail = resultMap.get(curDetail.getTier()); perTierDetail.updateQuantityAndAmount(curDetail.getQuantity()); } } } } return ImmutableList.copyOf(resultMap.values()); }
Source:
<code>private void startWebMetrics() throws Exception { WebMetrics.INSTANCE.addExecutorManagerMetrics(getExecutorManager()); MetricRegistry registry = MetricsManager.INSTANCE.getRegistry(); MetricsUtility.addGauge("JETTY-NumIdleThreads", registry, queuedThreadPool::getIdleThreads); MetricsUtility.addGauge("JETTY-NumTotalThreads", registry, queuedThreadPool::getThreads); <START> MetricsUtility.addGauge("JETTY-NumQueuedThreads", registry, queuedThreadPool::getQueueSize); <END> logger.info("starting reporting Web Server Metrics"); MetricsManager.INSTANCE.startReporting("AZ-WEB", props); }</code><technical_language>This is number of threads. is queue size. metric name right</technical_language>

Target:
private void startWebMetrics() throws Exception { MetricRegistry registry = MetricsManager.INSTANCE.getRegistry(); MetricsUtility.addGauge("JETTY-NumIdleThreads", registry, queuedThreadPool::getIdleThreads); MetricsUtility.addGauge("JETTY-NumTotalThreads", registry, queuedThreadPool::getThreads); MetricsUtility.addGauge("JETTY-NumQueueSize", registry, queuedThreadPool::getQueueSize); MetricsUtility.addGauge("WEB-NumQueuedFlows", registry, executorManager::getQueuedFlowSize); MetricsUtility.addGauge("WEB-NumRunningFlows", registry, () -> executorManager.getRunningFlows().size()); logger.info("starting reporting Web Server Metrics"); MetricsManager.INSTANCE.startReporting("AZ-WEB", props); }
Source:
<code>public Resource getResource(String path) throws ZebedeeException, IOException { try { return findResource(path); } catch (BadRequestException e) { <START> return findResource(path + "/index.html"); <END> } }</code><technical_language>Do want check if uri starts /visualisations? limit this applied to? if is index.html? do get a 404</technical_language>

Target:
public Resource getResource(String path) throws ZebedeeException, IOException { try { return findResource(path); } catch (BadRequestException e) { if(path.startsWith("/visualisations/")) { return findResource(path + "/index.html"); } throw e; } }
Source:
<code>protected void authenticate(BasicMessage basicMessage, Session session) throws WebsocketAuthenticationException { log.tracef("About to authenticate message [%s] from WebSocket session [%s] of [%s]", <START> basicMessage.getClass().getSimpleName(), session.getId(), endpoint); <END> String username = null; String password = null; String token = null; String persona = null; if (basicMessage instanceof AuthMessage) { AuthMessage authMessage = (AuthMessage) basicMessage; Authentication auth = authMessage.getAuthentication(); if (auth != null) { username = auth.getUsername(); password = auth.getPassword(); token = auth.getToken(); persona = auth.getPersona(); authMessage.setAuthentication(null); } } try { boolean hasToken = (token != null && !token.isEmpty()); if (hasToken) { log.tracef("authenticating token [%s/%s], session=[%s]", token, persona, session.getId()); authenticator.authenticateWithToken(token, persona, session); } else { log.tracef("authenticating user [%s/%s/%s], session=[%s]", username, password, persona, session.getId()); authenticator.authenticateWithCredentials(username, password, persona, session); } } catch (WebsocketAuthenticationException wae) { throw wae; } catch (Exception e) { throw new WebsocketAuthenticationException("Unauthorized!", e); } return; }</code><technical_language>is example of endpoint is log a message want want. log "feed/123456789" "123456789" is feed Id, instead I showing "feed/{feedId}" - want</technical_language>

Target:
protected void authenticate(BasicMessage basicMessage, Session session) throws WebsocketAuthenticationException { log.tracef("About to authenticate message [%s] from WebSocket session [%s] of [%s]", basicMessage.getClass().getName(), session.getId(), endpoint); String username = null; String password = null; String token = null; String persona = null; if (basicMessage instanceof AuthMessage) { AuthMessage authMessage = (AuthMessage) basicMessage; Authentication auth = authMessage.getAuthentication(); if (auth != null) { username = auth.getUsername(); password = auth.getPassword(); token = auth.getToken(); persona = auth.getPersona(); authMessage.setAuthentication(null); } } try { boolean hasToken = (token != null && !token.isEmpty()); if (hasToken) { log.tracef("authenticating token [%s/%s], session=[%s]", token, persona, session.getId()); authenticator.authenticateWithToken(token, persona, session); } else { log.tracef("authenticating user [%s/%s/%s], session=[%s]", username, password, persona, session.getId()); authenticator.authenticateWithCredentials(username, password, persona, session); } } catch (WebsocketAuthenticationException wae) { throw wae; } catch (Exception e) { throw new WebsocketAuthenticationException("Unauthorized!", e); } return; }
Source:
<code>public void testLockAfterTaskComplete() throws InterruptedException { Task task = NoopTask.create(); <START> exception.expect(IllegalStateException.class); <END> lockbox.add(task); lockbox.remove(task); lockbox.lock(task, new Interval("2015-01-01/2015-01-02")); }</code><technical_language>This ISE. Also, check exception message well. Please refer AppenderatorDriverFailTest example</technical_language>

Target:
public void testLockAfterTaskComplete() throws InterruptedException { Task task = NoopTask.create(); exception.expect(ISE.class); exception.expectMessage("Unable to grant lock to inactive Task"); lockbox.add(task); lockbox.remove(task); lockbox.lock(task, new Interval("2015-01-01/2015-01-02")); }
Source:
<code>List<Pair<Map<String, String>, List<ClusterNode>>> findFromAllShards() { final NodeRegistry registry = this.registry.get(); if (registry == null) { throw new IllegalStateException("Registry not ready"); } final List<Pair<Map<String, String>, List<ClusterNode>>> shards = registry.findFromAllShards(OptionalLimit.empty()); if (expectedShards.isPresent()) { final Set<Map<String, String>> foundShards = new HashSet<>(shards .stream() .map(mapListPair -> mapListPair.getKey()) .collect(Collectors.toList())); final List<Map<String, String>> shardsWithNoNodes = new ArrayList<>(); for (final Map<String, String> expected : expectedShards.get()) { if (!foundShards.contains(expected)) { shardsWithNoNodes.add(expected); } } <START> if (shardsWithNoNodes.size() > 0) { <END> for (final Map<String, String> shard : shardsWithNoNodes) { shards.add(Pair.of(shard, ImmutableList.of())); } } } return shards; }</code><technical_language>Dead statement? Loop loop if empty</technical_language>

Target:
List<Pair<Map<String, String>, List<ClusterNode>>> findFromAllShards() { final NodeRegistry registry = this.registry.get(); if (registry == null) { throw new IllegalStateException("Registry not ready"); } final List<Pair<Map<String, String>, List<ClusterNode>>> shards = registry.findFromAllShards(OptionalLimit.empty()); final Set<Map<String, String>> foundShards = new HashSet<>(shards.stream().map(Pair::getKey).collect(Collectors.toList())); final List<Map<String, String>> shardsWithNoNodes = expectedTopology .stream() .filter(e -> !foundShards.contains(e)) .collect(Collectors.toList()); if (shardsWithNoNodes.isEmpty()) { return shards; } final List<Pair<Map<String, String>, List<ClusterNode>>> withExpected = new ArrayList<>(); withExpected.addAll(shards); for (final Map<String, String> shard : shardsWithNoNodes) { withExpected.add(Pair.of(shard, ImmutableList.of())); } return withExpected; }
Source:
<code>protected @Nullable ZoomThread createZoomThread(long startTime, long endTime, long resolution, boolean restart) { return new <START> ZoomThreadByEntry(fVisibleEntries, startTime, <END> endTime, resolution); }</code><technical_language>send visible entries this method in parameter, thread safer</technical_language>

Target:
protected @Nullable ZoomThread createZoomThread(long startTime, long endTime, long resolution, boolean restart) { final List<TimeGraphEntry> entryList = fEntryList; if (entryList == null) { return null; } return new ZoomThreadByEntry(entryList, startTime, endTime, resolution); }
Source:
<code>public void compareResultsCount(int limit){ if(limit==0){ waitForElementNotPresent(listOfLinksSelector); PageObjectLogging.log( "verifyNoPagenameFounded", "Not existing pagename is not founded", true, driver ); } <START> else{ <END> waitForElementByElement(listOfLinks.get(0)); int amountOfLinks = listOfLinks.size(); Assertion.assertTrue(amountOfLinks <= limit); } }</code><technical_language>space else {</technical_language>

Target:
public void compareResultsCount(int limit){ if(limit==0) { waitForElementNotPresent(listOfLinksSelector); PageObjectLogging.log( "verifyNoPagenameFounded", "Not existing pagename is not founded", true, driver ); } else { waitForElementByElement(listOfLinks.get(0)); Assertion.assertTrue(listOfLinks.size() <= limit); } }
Source:
<code>public void shouldRunAndPrintItself() throws Exception { String message = String.format( "%s#shouldRunAndPrintItself() %d.", getClass().getSimpleName(), counter.incrementAndGet() ); TimeUnit.SECONDS.sleep( 1 ); <START> synchronized ( System.out ) <END> { System.out.println( message ); } }</code><technical_language>This sounds strange, please explain do need this synchronized block</technical_language>

Target:
public void shouldRunAndPrintItself() throws Exception { String message = String.format( "%s#shouldRunAndPrintItself() %d.", getClass().getSimpleName(), COUNTER.incrementAndGet() ); synchronized ( System.out ) { System.out.println( message ); TimeUnit.SECONDS.sleep( 2 ); } }
Source:
<code>private void onImportFromServiceSelected(int serviceId) { FragmentManager fragmentManager; <START> if (getParentFragment() == null) <END> { fragmentManager = getFragmentManager(); } else { fragmentManager = getParentFragment().getFragmentManager(); } NavigationHelper.openSubscriptionsImportFragment(fragmentManager, serviceId); }</code><technical_language>This code block is repeated times in file, please extract method</technical_language>

Target:
private void onImportFromServiceSelected(int serviceId) { FragmentManager fragmentManager = getFM(); NavigationHelper.openSubscriptionsImportFragment(fragmentManager, serviceId); }
Source:
<code>public void run() { List<LuceneWork> filteredQueue = new ArrayList<LuceneWork>(queue); for ( LuceneWork work : queue ) { if ( work instanceof OptimizeLuceneWork ) { filteredQueue.remove( work ); } } if ( filteredQueue.size() == 0 ) { return; } LuceneWorkSerializer serializer = indexManager.getSerializer(); byte[] data = serializer.toSerializedModel( filteredQueue ); QueueSender sender; QueueSession session = null; QueueConnection connection = null; try { connection = processor.getJMSConnection(); if ( processor.isTransactional() ) { <START> session = connection.createQueueSession( true, QueueSession.SESSION_TRANSACTED ); <END> } else { session = connection.createQueueSession( false, QueueSession.AUTO_ACKNOWLEDGE ); } ObjectMessage message = session.createObjectMessage(); message.setObject( data ); message.setStringProperty( Environment.INDEX_NAME_JMS_PROPERTY, indexName ); sender = session.createSender( processor.getJmsQueue() ); sender.send( message ); session.close(); } catch (JMSException e) { throw log.unableToSendJMSWork( indexName, processor.getJmsQueueName(), e ); } finally { processor.releaseJMSConnection( connection ); } }</code><technical_language>motivation TX</technical_language>

Target:
public void run() { List<LuceneWork> filteredQueue = new ArrayList<LuceneWork>(queue); for ( LuceneWork work : queue ) { if ( work instanceof OptimizeLuceneWork ) { filteredQueue.remove( work ); } } if ( filteredQueue.size() == 0 ) { return; } LuceneWorkSerializer serializer = indexManager.getSerializer(); byte[] data = serializer.toSerializedModel( filteredQueue ); QueueSender sender; QueueSession session = null; QueueConnection connection = null; try { connection = processor.getJMSConnection(); if ( processor.isTransactional() ) { session = connection.createQueueSession( true, QueueSession.SESSION_TRANSACTED ); } else { session = connection.createQueueSession( false, QueueSession.AUTO_ACKNOWLEDGE ); } ObjectMessage message = session.createObjectMessage(); message.setObject( data ); message.setStringProperty( Environment.INDEX_NAME_JMS_PROPERTY, indexName ); sender = session.createSender( processor.getJmsQueue() ); sender.send( message ); sender.close(); session.close(); } catch (JMSException e) { throw log.unableToSendJMSWork( indexName, processor.getJmsQueueName(), e ); } finally { processor.releaseJMSConnection( connection ); } }
Source:
<code>public void example61(Vertx vertx) { HttpServerOptions options = new HttpServerOptions() .setUseProxyProtocol(true); <START> HttpServer server = vertx.createHttpServer(options); <END> }</code><technical_language>I add: java server.requestHandler(request -> { // Print actual client address provided HA proxy protocol instead of proxy address System.out.println(request.remoteAddress()); });</technical_language>

Target:
public void example61(Vertx vertx) { HttpServerOptions options = new HttpServerOptions() .setUseProxyProtocol(true); HttpServer server = vertx.createHttpServer(options); server.requestHandler(request -> { System.out.println(request.remoteAddress()); System.out.println(request.localAddress()); }); }
Source:
<code>public void shouldCompileCleanlyWhenAllRulesAreFollowedInSubTemplate() throws FileNotFoundException { final List<Diagnostic<? extends JavaFileObject>> diagnostics = compile( <START> "org/jboss/errai/processor/testcase/DateFieldNoWarningsSubtemplate.java"); <END> assertSuccessfulCompilation(diagnostics); }</code><technical_language>Typo a test failure (DateField vs. DataField)</technical_language>

Target:
public void shouldCompileCleanlyWhenAllRulesAreFollowedInSubTemplate() throws FileNotFoundException { final List<Diagnostic<? extends JavaFileObject>> diagnostics = compile( "org/jboss/errai/processor/testcase/DataFieldNoWarningsSubtemplate.java"); assertSuccessfulCompilation(diagnostics); }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Event)) return false; Event event = (Event) o; <START> return id == event.id; <END> }</code><technical_language>is not, this change reverted</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Event)) return false; Event event = (Event) o; return id == event.id && registrationLimit == event.registrationLimit && Objects.equals(title, event.title) && Objects.equals(description, event.description) && Objects.equals(start, event.start) && Objects.equals(end, event.end) && Objects.equals(registrationStart, event.registrationStart) && Objects.equals(registrationEnd, event.registrationEnd); }
Source:
<code>public void shouldNotifyWithTheRightAnnotatedDocument() { try (CapturingEventListener listener = new CapturingEventListener(COMMENT_ADDED, DOCUMENT_CREATED)) { Comment createdAnnotation = createAnnotationAndAddSubscription("CommentAdded", "Creation"); DocumentModel annotationDocumentModel = session.getDocument(new IdRef(createdAnnotation.getId())); transactionalFeature.nextTransaction(); assertTrue(listener.hasBeenFired(COMMENT_ADDED)); assertTrue(listener.hasBeenFired(DOCUMENT_CREATED)); List<Event> handledEvents = listener.streamCapturedEvents() .filter(e -> COMMENT_ADDED.equals(e.getName())) .collect(Collectors.toList()); assertEquals(1, handledEvents.size()); checkDocumentEventContext(handledEvents.get(0), annotationDocumentModel, annotatedDocumentModel, annotatedDocumentModel); checkReceivedMail(emailsResult.getMails(), annotationDocumentModel, annotatedDocumentModel, handledEvents.get(0), COMMENT_ADDED); <START> <END> Comment reply = createAnnotation(annotationDocumentModel); DocumentModel replyDocumentModel = session.getDocument(new IdRef(reply.getId())); transactionalFeature.nextTransaction(); handledEvents = listener.streamCapturedEvents() .filter(e -> COMMENT_ADDED.equals(e.getName())) .collect(Collectors.toList()); assertEquals(2, handledEvents.size()); checkDocumentEventContext(handledEvents.get(1), replyDocumentModel, annotationDocumentModel, annotatedDocumentModel); checkReceivedMail(emailsResult.getMails(), replyDocumentModel, annotatedDocumentModel, handledEvents.get(1), COMMENT_ADDED); } }</code><technical_language>this is i tried. I empty previous mails I get clear. If this works fine for me</technical_language>

Target:
public void shouldNotifyWithTheRightAnnotatedDocument() { Annotation createdAnnotation = createAnnotation(annotatedDocumentModel); DocumentModel createdAnnotationDocModel = session.getDocument(new IdRef(createdAnnotation.getId())); transactionalFeature.nextTransaction(); captureAndVerifyAnnotationEventNotification(() -> { addSubscriptions("CommentAdded"); Comment reply = createAnnotation(createdAnnotationDocModel); DocumentModel replyDocumentModel = session.getDocument(new IdRef(reply.getId())); return session.getDocument(new IdRef(replyDocumentModel.getId())); }, COMMENT_ADDED, DOCUMENT_CREATED); }
Source:
<code>public void loadTabGroupItems(CTabFolder tabgroup, String curProviderId) { for (CTabItem item : tabgroup.getItems()) { <START> item.dispose(); <END> } ProfileLaunchConfigurationTabGroup tabGroupConfig; if (curProviderId == null || "".equals(curProviderId)) { curProviderId = ProviderLaunchConfigurationDelegate .getProviderIdToRun(getProfilingType()); } initialized.put(curProviderId, false); tabGroupConfig = ProfileLaunchConfigurationTabGroup .getTabGroupProviderFromId(curProviderId); if (tabGroupConfig == null) { return; } tabs = tabGroupConfig.getProfileTabs(); setProvider(curProviderId); int itemIndex = getComboItemIndexFromId(curProviderId); providerCombo.select(itemIndex); for (ILaunchConfigurationTab tab : tabs) { tab.setLaunchConfigurationDialog(getLaunchConfigurationDialog()); CTabItem item = new CTabItem(tabgroup, SWT.NONE); item.setText(tab.getName()); item.setImage(tab.getImage()); tab.createControl(tabgroup); item.setControl(tab.getControl()); tabgroup.setSelection(0); } }</code><technical_language>If tabs destroyed, providerids represent removed initialized list well</technical_language>

Target:
public void loadTabGroupItems(CTabFolder tabgroup, String curProviderId) { for (CTabItem item : tabgroup.getItems()) { item.dispose(); } initialized.clear(); ProfileLaunchConfigurationTabGroup tabGroupConfig; if (curProviderId == null || "".equals(curProviderId)) { curProviderId = ProviderLaunchConfigurationDelegate .getProviderIdToRun(getProfilingType()); } initialized.put(curProviderId, false); tabGroupConfig = ProfileLaunchConfigurationTabGroup .getTabGroupProviderFromId(curProviderId); if (tabGroupConfig == null) { return; } tabs = tabGroupConfig.getProfileTabs(); setProvider(curProviderId); int itemIndex = getComboItemIndexFromId(curProviderId); providerCombo.select(itemIndex); for (ILaunchConfigurationTab tab : tabs) { tab.setLaunchConfigurationDialog(getLaunchConfigurationDialog()); CTabItem item = new CTabItem(tabgroup, SWT.NONE); item.setText(tab.getName()); item.setImage(tab.getImage()); tab.createControl(tabgroup); item.setControl(tab.getControl()); tabgroup.setSelection(0); } }
Source:
<code>private Configuration(Builder builder) { this.context = builder.context; this.applicationId = builder.applicationId; this.clientKey = builder.clientKey; this.localDataStoreEnabled = builder.localDataStoreEnabled; <START> this.interceptors = builder.interceptors; <END> }</code><technical_language>want Collections.unmodifiableList() null check</technical_language>

Target:
private Configuration(Builder builder) { this.context = builder.context; this.applicationId = builder.applicationId; this.clientKey = builder.clientKey; this.localDataStoreEnabled = builder.localDataStoreEnabled; this.interceptors = builder.interceptors != null ? Collections.unmodifiableList(new ArrayList<>(builder.interceptors)) : null; }
Source:
<code>public void spec210_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall() throws Throwable { subscriberTest(new TestStageTestRun() { @Override public void run(WhiteboxTestStage stage) throws InterruptedException { <START> Exception ex = new RuntimeException("Test Exception: Boom!"); <END> stage.sendError(ex); stage.probe.expectError(ex); env.verifyNoAsyncErrors(); } }); }</code><technical_language>new Throwable new RuntimeException other times. do sense a common type for it</technical_language>

Target:
public void spec210_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall() throws Throwable { subscriberTest(new TestStageTestRun() { @Override public void run(WhiteboxTestStage stage) throws InterruptedException { Exception ex = new TestException(); stage.sendError(ex); stage.probe.expectError(ex); env.verifyNoAsyncErrors(); } }); }
Source:
<code>public BiConsumer<SolutionBusiness<ConferenceSolution>, SolutionPanel<ConferenceSolution>> getConsumer() { return (solutionBusiness, solutionPanel) -> { String[] cfpArray = {"cfp-devoxx"}; JComboBox<String> cfpConferenceBox = new JComboBox<>(cfpArray); JTextField cfpRestUrlTextField = new JTextField("<LINK_0>"); String[] timeslotsEndpointArray = {"/slots", "/schedules/"}; JComboBox<String> timeslotsEndpointBox = new JComboBox<>(timeslotsEndpointArray); Object[] dialogue = { "Choose conference:", cfpConferenceBox, "Enter CFP REST Url:", cfpRestUrlTextField, <START> "Choose timeslots endpoint", timeslotsEndpointBox, <END> }; int option = JOptionPane.showConfirmDialog(solutionPanel, dialogue, "Import", JOptionPane.OK_CANCEL_OPTION); if (option == JOptionPane.OK_OPTION) { String conferenceBaseUrl = cfpRestUrlTextField.getText(); String timeslotsEndpoint = timeslotsEndpointBox.getSelectedItem().toString(); new ConferenceCFPImportWorker(solutionBusiness, solutionPanel, conferenceBaseUrl, timeslotsEndpoint) .executeAndShowDialog(); } }; }</code><technical_language>user need get a choice? Choosing is losing. /slots work for DevoxxBe? If so, standarize that. If not, try "/slots" fall "/tuesday" etc</technical_language>

Target:
public BiConsumer<SolutionBusiness<ConferenceSolution>, SolutionPanel<ConferenceSolution>> getConsumer() { return (solutionBusiness, solutionPanel) -> { String[] cfpArray = {"cfp-devoxx"}; JComboBox<String> cfpConferenceBox = new JComboBox<>(cfpArray); JTextField cfpRestUrlTextField = new JTextField("<LINK_0>"); Object[] dialogue = { "Choose conference:", cfpConferenceBox, "Enter CFP REST Url:", cfpRestUrlTextField, }; int option = JOptionPane.showConfirmDialog(solutionPanel, dialogue, "Import", JOptionPane.OK_CANCEL_OPTION); if (option == JOptionPane.OK_OPTION) { String conferenceBaseUrl = cfpRestUrlTextField.getText(); new ConferenceCFPImportWorker(solutionBusiness, solutionPanel, conferenceBaseUrl) .executeAndShowDialog(); } }; }
Source:
<code>public void getRelatedLinear() throws Exception { add(git, "a.txt", "1"); Commit c1 = createCommit(git, admin.getIdent(), "subject: 1"); add(git, "b.txt", "2"); Commit c2 = createCommit(git, admin.getIdent(), "subject: 2"); pushHead(git, "refs/for/master", false); for (Commit c : ImmutableList.of(c2, c1)) { List<ChangeAndCommit> related = getRelated(getPatchSetId(c)); <START> assertThat(related.size()).isEqualTo(2); <END> assertThat(related.get(0).changeId) .named("related to " + c.getChangeId()).isEqualTo(c2.getChangeId()); assertThat(related.get(1).changeId) .named("related to " + c.getChangeId()).isEqualTo(c1.getChangeId()); } }</code><technical_language>assertThat(related).hasSize(2); for occurances</technical_language>

Target:
public void getRelatedLinear() throws Exception { add(git, "a.txt", "1"); Commit c1 = createCommit(git, admin.getIdent(), "subject: 1"); add(git, "b.txt", "2"); Commit c2 = createCommit(git, admin.getIdent(), "subject: 2"); pushHead(git, "refs/for/master", false); for (Commit c : ImmutableList.of(c2, c1)) { List<ChangeAndCommit> related = getRelated(getPatchSetId(c)); assertThat(related).hasSize(2); assertThat(related.get(0).changeId) .named("related to " + c.getChangeId()).isEqualTo(c2.getChangeId()); assertThat(related.get(1).changeId) .named("related to " + c.getChangeId()).isEqualTo(c1.getChangeId()); } }
Source:
<code>private boolean isUserMisMatch(final String user, final TokenCacheItem tokenCacheItem) { if (!StringExtensions.IsNullOrBlank(user)) { <START> return !user.equalsIgnoreCase(tokenCacheItem.getUserInfo().getDisplayableId()) <END> && !user.equalsIgnoreCase(tokenCacheItem.getUserInfo().getUserId()); } return false; }</code><technical_language>tokenCacheItem.getUserInfo checked for null earlier. add</technical_language>

Target:
private boolean isUserMisMatch(final String user, final TokenCacheItem tokenCacheItem) { if (StringExtensions.IsNullOrBlank(user) || tokenCacheItem.getUserInfo() == null) { return false; } return !user.equalsIgnoreCase(tokenCacheItem.getUserInfo().getDisplayableId()) && !user.equalsIgnoreCase(tokenCacheItem.getUserInfo().getUserId()); }
Source:
<code>protected Class<?> findClass(String name) throws ClassNotFoundException { for ( ClassLoader classLoader : individualClassLoaders ) { try { return classLoader.loadClass( name ); } catch (Exception | LinkageError ignore) { } } <START> throw new ClassNotFoundException( "Could not loadBlocking requested class : " + name ); <END> }</code><technical_language>here. OK, well, a lot of :)</technical_language>

Target:
protected Class<?> findClass(String name) throws ClassNotFoundException { for ( ClassLoader classLoader : individualClassLoaders ) { try { return classLoader.loadClass( name ); } catch (Exception | LinkageError ignore) { } } throw new ClassNotFoundException( "Could not load requested class : " + name ); }