auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void buildEntryList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor) { long start = trace.getStartTime().toNanos(); TraceEntry traceEntry = new TraceEntry(trace.getName(), start, start); addToEntryList(parentTrace, Collections.singletonList(traceEntry)); Iterable<@NonNull ITmfAnalysisModuleWithStateSystems> modules = Iterables. filter(trace.getAnalysisModules(), ITmfAnalysisModuleWithStateSystems.class); boolean complete = false; while (!complete) { complete = true; <START> long end = start; <END> for (ITmfAnalysisModuleWithStateSystems module : modules) { ModuleEntry moduleEntry = getOrCreateModuleEntry(traceEntry, module); if (module.isAutomatic()) { module.waitForInitialization(); } for (ITmfStateSystem ss : module.getStateSystems()) { complete &= ss.waitUntilBuilt(0); end = Long.max(end, ss.getCurrentEndTime()); getOrCreateStateSystemEntry(moduleEntry, ss); } } traceEntry.updateEndTime(end); long resolution = Long.max(1, (end - start) / getDisplayWidth()); zoomEntries(flatten(traceEntry), start, end, resolution, monitor); if (parentTrace == getTrace()) { synchronized (this) { setStartTime(Long.min(getStartTime(), start)); setEndTime(Long.max(getEndTime(), end)); } refresh(); } if (!complete) { try { Thread.sleep(ITERATION_WAIT); } catch (InterruptedException e) { Activator.getDefault().logError("Failed to wait", e); } } } }</code><technical_language>This loop I</technical_language>

Target:
protected void buildEntryList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor) { long start = trace.getStartTime().toNanos(); long end = start; TraceEntry traceEntry = new TraceEntry(trace.getName(), start, end); addToEntryList(parentTrace, Collections.singletonList(traceEntry)); Iterable<@NonNull ITmfAnalysisModuleWithStateSystems> modules = Iterables. filter(trace.getAnalysisModules(), ITmfAnalysisModuleWithStateSystems.class); Iterables.filter(modules, IAnalysisModule::isAutomatic) .forEach(ITmfAnalysisModuleWithStateSystems::waitForInitialization); boolean complete = false; while (!complete) { complete = true; for (ITmfAnalysisModuleWithStateSystems module : modules) { ModuleEntry moduleEntry = getOrCreateModuleEntry(traceEntry, module); for (ITmfStateSystem ss : module.getStateSystems()) { complete &= ss.waitUntilBuilt(0); end = Long.max(end, ss.getCurrentEndTime()); getOrCreateStateSystemEntry(moduleEntry, ss); } } traceEntry.updateEndTime(end); long resolution = Long.max(1, (end - start) / getDisplayWidth()); zoomEntries(flatten(traceEntry), start, end, resolution, monitor); if (parentTrace == getTrace()) { synchronized (this) { setStartTime(Long.min(getStartTime(), start)); setEndTime(Long.max(getEndTime(), end)); } refresh(); } if (!complete) { try { Thread.sleep(ITERATION_WAIT); } catch (InterruptedException e) { Activator.getDefault().logError("Failed to wait", e); } } } }
Source:
<code>public void configure(Binder binder) { <START> configBinder(binder).bindConfig(StorageManagerConfig.class); <END> binder.bind(RaptorConnectorId.class).toInstance(new RaptorConnectorId(connectorId)); binder.bind(RaptorConnector.class).in(Scopes.SINGLETON); binder.bind(RaptorMetadataFactory.class).in(Scopes.SINGLETON); binder.bind(RaptorSplitManager.class).in(Scopes.SINGLETON); binder.bind(RaptorPageSourceProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorPageSinkProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorHandleResolver.class).in(Scopes.SINGLETON); binder.bind(RaptorNodePartitioningProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorSessionProperties.class).in(Scopes.SINGLETON); binder.bind(RaptorTableProperties.class).in(Scopes.SINGLETON); Multibinder<SystemTable> tableBinder = newSetBinder(binder, SystemTable.class); tableBinder.addBinding().to(ShardMetadataSystemTable.class).in(Scopes.SINGLETON); tableBinder.addBinding().to(TableMetadataSystemTable.class).in(Scopes.SINGLETON); tableBinder.addBinding().to(TableStatsSystemTable.class).in(Scopes.SINGLETON); }</code><technical_language>move this</technical_language>

Target:
public void configure(Binder binder) { binder.bind(RaptorConnectorId.class).toInstance(new RaptorConnectorId(connectorId)); binder.bind(RaptorConnector.class).in(Scopes.SINGLETON); binder.bind(RaptorMetadataFactory.class).in(Scopes.SINGLETON); binder.bind(RaptorSplitManager.class).in(Scopes.SINGLETON); binder.bind(RaptorPageSourceProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorPageSinkProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorHandleResolver.class).in(Scopes.SINGLETON); binder.bind(RaptorNodePartitioningProvider.class).in(Scopes.SINGLETON); binder.bind(RaptorSessionProperties.class).in(Scopes.SINGLETON); binder.bind(RaptorTableProperties.class).in(Scopes.SINGLETON); Multibinder<SystemTable> tableBinder = newSetBinder(binder, SystemTable.class); tableBinder.addBinding().to(ShardMetadataSystemTable.class).in(Scopes.SINGLETON); tableBinder.addBinding().to(TableMetadataSystemTable.class).in(Scopes.SINGLETON); tableBinder.addBinding().to(TableStatsSystemTable.class).in(Scopes.SINGLETON); }
Source:
<code>public void testIsCheckstyleModule() { assertTrue(ModuleReflectionUtils.isCheckstyleModule(CheckClass.class)); assertTrue(ModuleReflectionUtils.isCheckstyleModule(FileSetModuleClass.class)); assertTrue(ModuleReflectionUtils.isCheckstyleModule(FilterClass.class)); assertTrue(ModuleReflectionUtils.isCheckstyleModule(FileFilterModuleClass.class)); <START> assertTrue(ModuleReflectionUtils.isCheckstyleModule(RootModuleClass.class)); <END> assertTrue(ModuleReflectionUtils.isCheckstyleModule(TreeWalkerFilterClass.class)); }</code><technical_language>move this closer other filters</technical_language>

Target:
public void testIsCheckstyleModule() { assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(CheckClass.class)); assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(FileSetModuleClass.class)); assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(FilterClass.class)); assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(TreeWalkerFilterClass.class)); assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(FileFilterModuleClass.class)); assertTrue("Should return true when checkstyle module is passed", ModuleReflectionUtils.isCheckstyleModule(RootModuleClass.class)); }
Source:
<code>private ConnectorPageSinkProvider providerFor(ConnectorId connectorId) { ConnectorPageSinkProvider provider = pageSinkProviders.get(connectorId); <START> checkArgument(provider != null, "No page sink provider for catalog '%s'", connectorId); <END> return provider; }</code><technical_language>This connectorId.getCatalogName() for message. @dain a changed connector ID handling</technical_language>

Target:
private ConnectorPageSinkProvider providerFor(ConnectorId connectorId) { ConnectorPageSinkProvider provider = pageSinkProviders.get(connectorId); checkArgument(provider != null, "No page sink provider for catalog '%s'", connectorId.getCatalogName()); return provider; }
Source:
<code>protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); <START> if (requestCode == 1) { <END> if (resultCode == Activity.RESULT_OK) { updateScenario(); } if (resultCode == Activity.RESULT_CANCELED) { startActivity(new Intent(GameActivity.this, MapActivity.class)); finish(); } } }</code><technical_language>this 1 represent? Is enum holding this reference instead</technical_language>

Target:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == getResources().getInteger(R.integer.display_points_request_code)) { if (resultCode == Activity.RESULT_OK) { updateScenario(); } if (resultCode == Activity.RESULT_CANCELED) { startActivity(new Intent(GameActivity.this, MapActivity.class)); finish(); } } }
Source:
<code>public void prepareTestProject() throws Exception { projectServiceClient.importProject( ws.getId(), Paths.get( getClass() .getResource("/projects/plugins/JavaTestRunnerPlugin/" + JUNIT4_PROJECT) .toURI()), JUNIT4_PROJECT, ProjectTemplates.CONSOLE_JAVA_SIMPLE); ide.open(ws); ide.waitOpenedWorkspaceIsReadyToUse(); projectExplorer.waitItem(JUNIT4_PROJECT); consoles.waitJDTLSProjectResolveFinishedMessage(JUNIT4_PROJECT); notifications.waitProgressPopupPanelClose(); projectExplorer.quickExpandWithJavaScript(); <START> runCompileCommand(); <END> }</code><technical_language>you, please, explain, verification command palette removed</technical_language>

Target:
public void prepareTestProject() throws Exception { CompileCommand compileCommand = new CompileCommand(); testCommandServiceClient.createCommand(DtoConverter.asDto(compileCommand), ws.getId()); projectServiceClient.importProject( ws.getId(), Paths.get( getClass() .getResource("/projects/plugins/JavaTestRunnerPlugin/" + JUNIT4_PROJECT) .toURI()), JUNIT4_PROJECT, ProjectTemplates.CONSOLE_JAVA_SIMPLE); ide.open(ws); ide.waitOpenedWorkspaceIsReadyToUse(); projectExplorer.waitItem(JUNIT4_PROJECT); consoles.waitJDTLSProjectResolveFinishedMessage(JUNIT4_PROJECT); notifications.waitProgressPopupPanelClose(); projectExplorer.quickExpandWithJavaScript(); try { runCompileCommandByPallete(compileCommand); } catch (TimeoutException ex) { fail("Known random failure <LINK_0>"); } }
Source:
<code>public SpongeExecutorService get() { <START> return this.schedulerService.createAsyncExecutor(this.container.getInstance()); <END> }</code><technical_language>need for getInstance(), container passed</technical_language>

Target:
public SpongeExecutorService get() { return this.schedulerService.createAsyncExecutor(this.container); }
Source:
<code>public void visit(NodeTraversal traversal, Node node, Node parent) { <START> Preconditions.checkNotNull(globalNames != null, "Cannot call visit() before process()"); <END> if (isPolymerCall(node)) { if (polymerElementExterns != null) { rewritePolymer1ClassDefinition(node, parent, traversal); } else if (!warnedPolymer1ExternsMissing) { compiler.report(JSError.make(polymerElementExterns, POLYMER_MISSING_EXTERNS)); warnedPolymer1ExternsMissing = true; } } else if (isPolymerClass(node)) { rewritePolymer2ClassDefinition(node, parent, traversal); } }</code><technical_language>checkNotNull(globalNames, ..</technical_language>

Target:
public void visit(NodeTraversal traversal, Node node, Node parent) { Preconditions.checkNotNull(globalNames, "Cannot call visit() before process()"); if (PolymerPassStaticUtils.isPolymerCall(node)) { if (polymerElementExterns != null) { rewritePolymer1ClassDefinition(node, parent, traversal); } else if (!warnedPolymer1ExternsMissing) { compiler.report(JSError.make(polymerElementExterns, POLYMER_MISSING_EXTERNS)); warnedPolymer1ExternsMissing = true; } } else if (PolymerPassStaticUtils.isPolymerClass(node)) { rewritePolymer2ClassDefinition(node, parent, traversal); } }
Source:
<code>public Collection<MongoDBRouter> getRouters() { <START> return FluentIterable.from(getMembers()) <END> .transform(new Function<Entity, MongoDBRouter>() { @Override public MongoDBRouter apply(Entity input) { return (MongoDBRouter)input; } }) .toSet(); }</code><technical_language>return Iterables.filter(getMembers(), MongoDBRouter.class);</technical_language>

Target:
public Collection<MongoDBRouter> getRouters() { return ImmutableList.copyOf(Iterables.filter(getMembers(), MongoDBRouter.class)); }
Source:
<code>public XMLHighlighting(String xmlStrContent) throws XMLStreamException{ content = xmlStrContent; InputStream inputStream = new ByteArrayInputStream(xmlStrContent.getBytes(StandardCharsets.UTF_8)); <START> highlightXML(inputStream, Charset.defaultCharset()); <END> }</code><technical_language>@vilchik-elena works if default charset is StandardCharsets.UTF_8. highlightXML accept a java.io.Reader a java.io.StringReader here</technical_language>

Target:
public XMLHighlighting(String xmlStrContent) throws XMLStreamException{ content = xmlStrContent; highlightXML(new StringReader(xmlStrContent)); }
Source:
<code>default boolean bypassCache() { <START> return true; <END> }</code><technical_language>Default false</technical_language>

Target:
default boolean bypassCache() { return false; }
Source:
<code>private void verifyQuery(String queryResource) throws Exception { String queryResponseTemplate; try { InputStream is = AbstractITBatchIndexTest.class.getResourceAsStream(queryResource); queryResponseTemplate = IOUtils.toString(is, StandardCharsets.UTF_8); } catch (IOException e) { throw new ISE(e, "could not read query file: %s", queryResource); } queryResponseTemplate = StringUtils.replace( queryResponseTemplate, "%%DATASOURCE%%", fullDatasourceName ); <START> queryHelper.testQueriesFromString(queryResponseTemplate, 5); <END> }</code><technical_language>I this help. 'timesToRun' number requires of running pass. If of running failed test fail. Increasing timesToRun test slower retrying intermittent failure. I a PR fix this issue <LINK_0> for trouble intermittent failure</technical_language>

Target:
private void verifyQuery(String queryResource) throws Exception { String queryResponseTemplate; try { InputStream is = AbstractITBatchIndexTest.class.getResourceAsStream(queryResource); queryResponseTemplate = IOUtils.toString(is, StandardCharsets.UTF_8); } catch (IOException e) { throw new ISE(e, "could not read query file: %s", queryResource); } queryResponseTemplate = StringUtils.replace( queryResponseTemplate, "%%DATASOURCE%%", fullDatasourceName ); queryHelper.testQueriesFromString(queryResponseTemplate, 2); }
Source:
<code><START> public void publish(ChatRoom chatRoom, TranslationResult result) { <END> String name = result.getName(); String translation = result.getTranslatedText(); String toSend = name + ": " + translation; super.sendMessage(chatRoom, toSend); }</code><technical_language>If add new JSON published deal front-end of this project, more reasonable me</technical_language>

Target:
public void publish(ChatRoom chatRoom, TranslationResult result) { }
Source:
<code>public MainController(String applicationName, LibraryController libraryController, AppsController appsController, EnginesController enginesController, ContainersController containersController, SettingsController settingsController, ThemeManager themeManager, SettingsManager settingsManager) { super(); this.applicationName = applicationName; this.mainWindow = new MainWindow(applicationName, libraryController.getView(), appsController.getView(), enginesController.getView(), containersController.getView(), settingsController.getView(), themeManager, settingsManager); this.settingsManager = settingsManager; libraryController.setOnTabOpened(mainWindow::showLibrary); appsController.setOnAppLoaded(() -> { enginesController.loadEngines(); containersController.loadContainers(); <START> libraryController.updateLibrary(); <END> }); appsController.loadApps(); }</code><technical_language>Is this method called another location too? asking remove another call updateLibrary</technical_language>

Target:
public MainController(String applicationName, LibraryController libraryController, AppsController appsController, EnginesController enginesController, ContainersController containersController, SettingsController settingsController, ThemeManager themeManager, SettingsManager settingsManager) { super(); this.applicationName = applicationName; this.mainWindow = new MainWindow(applicationName, libraryController.getView(), appsController.getView(), enginesController.getView(), containersController.getView(), settingsController.getView(), themeManager, settingsManager); this.settingsManager = settingsManager; libraryController.setOnTabOpened(mainWindow::showLibrary); appsController.setOnAppLoaded(() -> { enginesController.loadEngines(); containersController.loadContainers(); }); appsController.loadApps(); }
Source:
<code><START> protected String[] loadRoles(String property) { <END> DynamicReadOnlyProperties props = JNDISingleton.getInstance(); String adminRole = props.getProperty(property, ""); if(adminRole == null || adminRole.trim().isEmpty()) { adminRole = DEFAULT_ADMIN_ROLE; } return new String[] {adminRole}; }</code><technical_language>Formatting is weird</technical_language>

Target:
protected String[] loadRoles(String property) { DynamicReadOnlyProperties props = JNDISingleton.getInstance(); String adminRole = props.getProperty(property, ""); if(StringUtils.isBlank(adminRole)) { adminRole = DEFAULT_ADMIN_ROLE; } return new String[] {adminRole}; }
Source:
<code>public RebaseCommand setSkip() { <START> this.abortRebase = false; <END> this.skipRebase = true; this.continueRebase = false; return this; }</code><technical_language>do multiple actions once. this enum selects operation mode, e.g.: enum Operation { BEGIN, CONTINUE, SKIP, ABORT; } individual set methods assign enum field accordingly</technical_language>

Target:
public RebaseCommand setSkip() { this.operation = Operation.SKIP; return this; }
Source:
<code>public RollingUpdateOp start(final DeploymentGroup deploymentGroup, final RollingUpdateReason reason, final ZooKeeperClient client) throws KeeperException { final List<ZooKeeperOperation> ops = Lists.newArrayList(); final List<Map<String, Object>> events = Lists.newArrayList(); final List<RolloutTask> rolloutTasks = tasks.getRolloutTasks(); events.add(eventFactory.rollingUpdateStarted(deploymentGroup, reason)); final Stat tasksStat = client.exists( Paths.statusDeploymentGroupTasks(deploymentGroup.getName())); if (tasksStat == null) { <START> ops.add(create(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()))); <END> } final DeploymentGroupStatus status; if (rolloutTasks.isEmpty()) { status = DeploymentGroupStatus.newBuilder() .setState(DONE) .build(); ops.add(delete(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()))); events.add(eventFactory.rollingUpdateDone(deploymentGroup)); } else { final DeploymentGroupTasks tasks = DeploymentGroupTasks.newBuilder() .setRolloutTasks(rolloutTasks) .setTaskIndex(0) .setDeploymentGroup(deploymentGroup) .build(); status = DeploymentGroupStatus.newBuilder() .setState(ROLLING_OUT) .build(); ops.add(set(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()), tasks)); } ops.add(set(Paths.statusDeploymentGroup(deploymentGroup.getName()), status)); return new RollingUpdateOp(ImmutableList.copyOf(ops), ImmutableList.copyOf(events)); }</code><technical_language>This is a nice fix sense me. missing pass ZookeeperClient this class accomplish that</technical_language>

Target:
public RollingUpdateOp start(final DeploymentGroup deploymentGroup, final RollingUpdateReason reason, final ZooKeeperClient client) throws KeeperException { client.ensurePath(Paths.statusDeploymentGroupTasks()); final List<ZooKeeperOperation> ops = Lists.newArrayList(); final List<Map<String, Object>> events = Lists.newArrayList(); final List<RolloutTask> rolloutTasks = tasks.getRolloutTasks(); events.add(eventFactory.rollingUpdateStarted(deploymentGroup, reason)); final Stat tasksStat = client.exists( Paths.statusDeploymentGroupTasks(deploymentGroup.getName())); if (tasksStat == null) { ops.add(create(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()))); } final DeploymentGroupStatus status; if (rolloutTasks.isEmpty()) { status = DeploymentGroupStatus.newBuilder() .setState(DONE) .build(); ops.add(delete(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()))); events.add(eventFactory.rollingUpdateDone(deploymentGroup)); } else { final DeploymentGroupTasks tasks = DeploymentGroupTasks.newBuilder() .setRolloutTasks(rolloutTasks) .setTaskIndex(0) .setDeploymentGroup(deploymentGroup) .build(); status = DeploymentGroupStatus.newBuilder() .setState(ROLLING_OUT) .build(); ops.add(set(Paths.statusDeploymentGroupTasks(deploymentGroup.getName()), tasks)); } ops.add(set(Paths.statusDeploymentGroup(deploymentGroup.getName()), status)); return new RollingUpdateOp(ImmutableList.copyOf(ops), ImmutableList.copyOf(events)); }
Source:
<code>public void delete(PageId pageId) throws IOException, PageNotFoundException { Path p = getFilePath(pageId); if (!Files.exists(p)) { throw new PageNotFoundException(p.toString()); } Files.delete(p); mSize.decrementAndGet(); <START> Path parent = Preconditions.checkNotNull(p.getParent(), "parent"); <END> try (DirectoryStream<Path> stream = Files.newDirectoryStream(parent)) { if (!stream.iterator().hasNext()) { Files.delete(parent); } } }</code><technical_language>please error message more explicit</technical_language>

Target:
public void delete(PageId pageId) throws IOException, PageNotFoundException { Path p = getFilePath(pageId); if (!Files.exists(p)) { throw new PageNotFoundException(p.toString()); } Files.delete(p); mSize.decrementAndGet(); Path parent = Preconditions.checkNotNull(p.getParent(), "parent of cache file should not be null"); try (DirectoryStream<Path> stream = Files.newDirectoryStream(parent)) { if (!stream.iterator().hasNext()) { Files.delete(parent); } } }
Source:
<code>protected void updateRoutes() { if(this.service == null && !routes.isEmpty()) { List<IRoute> oldRoutes = new ArrayList<>(this.routes); this.routes.clear(); <START> firePropertyChange(PROPERTY_ROUTES, oldRoutes, this.routes); <END> firePropertyChange(PROPERTY_ROUTE, this.route, null); } else if(this.service != null) { List<IRoute> oldRoutes = new ArrayList<>(this.routes); this.routes.clear(); List<IRoute> newRoutes = routeMap.get(this.service.getProject()); if(newRoutes != null) { this.routes.addAll(newRoutes); } IRoute oldRoute = this.route; firePropertyChange(PROPERTY_ROUTES, oldRoutes, this.routes); updateRoute(oldRoute); } }</code><technical_language>updating selected route while method claims update collection of routes. move this #updateRoute get methods unified for added code clarity (ex. try fix issue selected route, dig updateRoute() unexpectely find out route is set in #updateRoutes. ideal imho</technical_language>

Target:
protected void updateRoutes() { IRoute routeToReset = null; if(this.service == null && !routes.isEmpty()) { List<IRoute> oldRoutes = new ArrayList<>(this.routes); this.routes.clear(); firePropertyChange(PROPERTY_ROUTES, oldRoutes, this.routes); routeToReset = null; } else if(this.service != null) { List<IRoute> oldRoutes = new ArrayList<>(this.routes); this.routes.clear(); List<IRoute> newRoutes = routeMap.get(this.service.getProject()); if(newRoutes != null) { this.routes.addAll(newRoutes); } routeToReset = this.route; firePropertyChange(PROPERTY_ROUTES, oldRoutes, this.routes); } else { return; } setRoute(routeToReset); }
Source:
<code>private boolean checkStoragePoolMatchQuota(QuotaConsumptionParametersWrapper parameters, QuotaConsumptionParameter param) { Quota quota = param.getQuota(); if (param instanceof QuotaStorageConsumptionParameter) { QuotaStorageConsumptionParameter paramstorage = (QuotaStorageConsumptionParameter) param; <START> <END> if (paramstorage.getStorageDomainId() == null) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); log.errorFormat("Quota storage parameters from command: {0} are missing storage domain id", parameters.getAuditLogable().getClass().getName()); return false; } boolean storageDomainInQuota = false; if(quota.getGlobalQuotaStorage() != null) { storageDomainInQuota = quota.getGlobalQuotaStorage().getStorageId().equals(paramstorage.getStorageDomainId()); } else { for (QuotaStorage quotaStorage : quota.getQuotaStorages()) { if (quotaStorage.getStorageId().equals(paramstorage.getStorageDomainId())) { storageDomainInQuota = true; break; } } } if (!storageDomainInQuota) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); log.errorFormat("Quota storage parameters from command: {0}. Storage domain does not match quota", parameters.getAuditLogable().getClass().getName()); return false; } } return true; }</code><technical_language>here, passed canDoaACtion().validateInputs()</technical_language>

Target:
private boolean checkStoragePoolMatchQuota(QuotaConsumptionParametersWrapper parameters, QuotaConsumptionParameter param) { Quota quota = param.getQuota(); QuotaStorageConsumptionParameter paramstorage = (QuotaStorageConsumptionParameter) param; if (paramstorage.getStorageDomainId() == null) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); log.errorFormat("Quota storage parameters from command: {0} are missing storage domain id", parameters.getAuditLogable().getClass().getName()); return false; } boolean storageDomainInQuota = false; if(quota.getGlobalQuotaStorage() != null) { storageDomainInQuota = quota.getGlobalQuotaStorage().getStorageId().equals(paramstorage.getStorageDomainId()); } else { for (QuotaStorage quotaStorage : quota.getQuotaStorages()) { if (quotaStorage.getStorageId().equals(paramstorage.getStorageDomainId())) { storageDomainInQuota = true; break; } } } if (!storageDomainInQuota) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); log.errorFormat("Quota storage parameters from command: {0}. Storage domain does not match quota", parameters.getAuditLogable().getClass().getName()); return false; } return true; }
Source:
<code>protected <D> void startLoad(DataSource<D> dataSource, int loaderId, DataConsumer<D> consumer) { <START> getActivity().getSupportLoaderManager().destroyLoader(loaderId); <END> getActivity().getSupportLoaderManager() .initLoader(loaderId, null, new DataLoader<D>(getActivity(), dataSource, consumer)).forceLoad(); }</code><technical_language>Please add a TODO here. need do smarter a kind of loader. Destroying cached data is want. aim for is invalidating data if underlying data changes. is case in this returns stale data</technical_language>

Target:
protected <D> void startLoad(DataSource<D> dataSource, int loaderId, DataConsumer<D> consumer) { getActivity().getSupportLoaderManager() .initLoader(loaderId, null, new DataLoader<D>(getActivity(), dataSource, consumer)).forceLoad(); }
Source:
<code>public static void init() throws FileNotFoundException, IOException, DBException { Properties props = new Properties(); <START> props.load(new FileReader("src/test/resources/workload_rest")); <END> rc.setProperties(props); rc.init(); ByteArrayOutputStream out = new ByteArrayOutputStream(SUCCESS_RESPONSE.length()); GZIPOutputStream gzip = new GZIPOutputStream(out); gzip.write(SUCCESS_RESPONSE.getBytes("UTF-8")); gzip.close(); GZIP_SUCCESS_REPONSE = out.toByteArray(); while (!Utils.available(port)) { port++; } wireMockRule = new WireMockClassRule(WireMockConfiguration.wireMockConfig().port(port)); wireMockRule.start(); }</code><technical_language>able resources loading instead of a full path</technical_language>

Target:
public static void init() throws IOException, DBException, ServletException, LifecycleException, InterruptedException { String webappDirLocation = IntegrationTest.class.getClassLoader().getResource("WebContent").getPath(); while (!Utils.available(port)) { port++; } tomcat = new Tomcat(); tomcat.setPort(Integer.valueOf(port)); Context context = tomcat.addWebapp("/webService", new File(webappDirLocation).getAbsolutePath()); Tomcat.addServlet(context, "jersey-container-servlet", resourceConfig()); context.addServletMapping("/rest/*", "jersey-container-servlet"); tomcat.start(); Thread.sleep(1000); Properties props = new Properties(); props.load(new FileReader(RestClientTest.class.getClassLoader().getResource("workload_rest").getPath())); props.setProperty("url.prefix", props.getProperty("url.prefix").replaceAll("PORT", port.toString())); rc.setProperties(props); rc.init(); }
Source:
<code>public String getCheckIdUrl(CredentialsStore store) throws UnsupportedEncodingException { ModelObject context = store.getContext(); for (ContextResolver r : ExtensionList.lookup(ContextResolver.class)) { String token = r.getToken(context); if (token != null) { return Jenkins.getActiveInstance().getRootUrlFromRequest() + "/descriptorByName/" + clazz.getName() + "/checkId?provider=" + r.getClass().getName() + "&token=" + URLEncoder.encode(token, "UTF-8"); } } <START> return Jenkins.getActiveInstance().getRootUrlFromRequest() + "/descriptorByName/" + clazz.getName() <END> + "/checkId?provider=null&token=null"; }</code><technical_language>class name escaping</technical_language>

Target:
public String getCheckIdUrl(CredentialsStore store) throws UnsupportedEncodingException { ModelObject context = store.getContext(); for (ContextResolver r : ExtensionList.lookup(ContextResolver.class)) { String token = r.getToken(context); if (token != null) { return Jenkins.getActiveInstance().getRootUrlFromRequest() + "/" + getDescriptorUrl() + "/checkId?provider=" + r.getClass().getName() + "&token=" + URLEncoder.encode(token, "UTF-8"); } } return Jenkins.getActiveInstance().getRootUrlFromRequest() + "/" + getDescriptorUrl() + "/checkId?provider=null&token=null"; }
Source:
<code><START> private static String toHiveType(int sqlType) { <END> switch (sqlType) { case Types.INTEGER: case Types.SMALLINT: return HIVE_TYPE_INT; case Types.VARCHAR: case Types.CHAR: case Types.LONGVARCHAR: case Types.NVARCHAR: case Types.NCHAR: case Types.LONGNVARCHAR: case Types.DATE: case Types.TIME: case Types.TIMESTAMP: case Types.CLOB: return HIVE_TYPE_STRING; case Types.NUMERIC: case Types.DECIMAL: case Types.FLOAT: case Types.DOUBLE: case Types.REAL: return HIVE_TYPE_DOUBLE; case Types.BIT: case Types.BOOLEAN: return HIVE_TYPE_BOOLEAN; case Types.TINYINT: return HIVE_TYPE_TINYINT; case Types.BIGINT: return HIVE_TYPE_BIGINT; default: return null; } }</code><technical_language>If touch this class+method mind modifying underlying design in a return null value? error prone e.g. in case of TableDefWriter if FileLayout is Parquet mistake type of a column is mapped execution path end in "not supported" exception, TableDefWriter try create table "NULL" datatype. IMHO this a great improvement here. I standardize in a throw IOException (e.g. getHiveColumnTypeForTextTable) RuntimeException for problem, RuntimeException</technical_language>

Target:
public static String toHiveType(int sqlType) { switch (sqlType) { case Types.INTEGER: case Types.SMALLINT: return HIVE_TYPE_INT; case Types.VARCHAR: case Types.CHAR: case Types.LONGVARCHAR: case Types.NVARCHAR: case Types.NCHAR: case Types.LONGNVARCHAR: case Types.DATE: case Types.TIME: case Types.TIMESTAMP: case Types.CLOB: return HIVE_TYPE_STRING; case Types.NUMERIC: case Types.DECIMAL: case Types.FLOAT: case Types.DOUBLE: case Types.REAL: return HIVE_TYPE_DOUBLE; case Types.BIT: case Types.BOOLEAN: return HIVE_TYPE_BOOLEAN; case Types.TINYINT: return HIVE_TYPE_TINYINT; case Types.BIGINT: return HIVE_TYPE_BIGINT; default: return null; } }
Source:
<code>Bitmap decodeAsset(Uri uri, PicassoBitmapOptions bitmapOptions) throws IOException { <START> String path = Utils.cropScheme(uri.toString(), SCHEME_ASSETS); <END> AssetManager assets = context.getAssets(); if (bitmapOptions != null && bitmapOptions.inJustDecodeBounds) { BitmapFactory.decodeStream(assets.open(path), null, bitmapOptions); calculateInSampleSize(bitmapOptions); } return decodeStream(assets.open(path), bitmapOptions); }</code><technical_language>Is uri.getPath() sufficient</technical_language>

Target:
Bitmap decodeAsset(Uri uri, PicassoBitmapOptions bitmapOptions) throws IOException { String path = uri.getPath().substring(1); AssetManager assets = context.getAssets(); if (bitmapOptions != null && bitmapOptions.inJustDecodeBounds) { BitmapFactory.decodeStream(assets.open(path), null, bitmapOptions); calculateInSampleSize(bitmapOptions); } return decodeStream(assets.open(path), bitmapOptions); }
Source:
<code>public String getTableToolContent(@ApiParam(hidden = true) @Parameter(hidden = true, name = "user")@Auth Optional<User> user, @ApiParam(value = "workflowId", required = true) @PathParam("workflowId") Long workflowId, @ApiParam(value = "workflowVersionId", required = true) @PathParam("workflowVersionId") Long workflowVersionId) { Workflow workflow = workflowDAO.findById(workflowId); checkEntry(workflow); checkOptionalAuthRead(user, workflow); WorkflowVersion workflowVersion = getWorkflowVersion(workflow, workflowVersionId); if (workflowVersion == null) { throw new CustomWebApplicationException("workflow version " + workflowVersionId + " does not exist", HttpStatus.SC_BAD_REQUEST); } if (workflowVersion.getToolTableJson() != null) { return workflowVersion.getToolTableJson(); } SourceFile mainDescriptor = getMainDescriptorFile(workflowVersion); if (mainDescriptor != null) { Set<SourceFile> secondaryDescContent = extractDescriptorAndSecondaryFiles(workflowVersion); LanguageHandlerInterface lInterface = LanguageHandlerFactory.getInterface(workflow.getFileType()); final String toolTableJson = lInterface.getContent(workflowVersion.getWorkflowPath(), mainDescriptor.getContent(), secondaryDescContent, LanguageHandlerInterface.Type.TOOLS, toolDAO); if (workflowVersion.isFrozen()) { <START> LOG.warn("workflow version " + workflowVersionId + " is frozen without a mainDescriptor"); <END> } else { workflowVersion.setToolTableJson(toolTableJson); } return toolTableJson; } return null; }</code><technical_language>wait, based convo, this message change</technical_language>

Target:
public String getTableToolContent(@ApiParam(hidden = true) @Parameter(hidden = true, name = "user")@Auth Optional<User> user, @ApiParam(value = "workflowId", required = true) @PathParam("workflowId") Long workflowId, @ApiParam(value = "workflowVersionId", required = true) @PathParam("workflowVersionId") Long workflowVersionId) { Workflow workflow = workflowDAO.findById(workflowId); checkEntry(workflow); checkOptionalAuthRead(user, workflow); WorkflowVersion workflowVersion = getWorkflowVersion(workflow, workflowVersionId); if (workflowVersion == null) { throw new CustomWebApplicationException("workflow version " + workflowVersionId + " does not exist", HttpStatus.SC_BAD_REQUEST); } if (workflowVersion.getToolTableJson() != null) { return workflowVersion.getToolTableJson(); } SourceFile mainDescriptor = getMainDescriptorFile(workflowVersion); if (mainDescriptor != null) { Set<SourceFile> secondaryDescContent = extractDescriptorAndSecondaryFiles(workflowVersion); LanguageHandlerInterface lInterface = LanguageHandlerFactory.getInterface(workflow.getFileType()); final String toolTableJson = lInterface.getContent(workflowVersion.getWorkflowPath(), mainDescriptor.getContent(), secondaryDescContent, LanguageHandlerInterface.Type.TOOLS, toolDAO); if (workflowVersion.isFrozen()) { LOG.warn("workflow version " + workflowVersionId + " is frozen without toolTableJson"); } else { workflowVersion.setToolTableJson(toolTableJson); } return toolTableJson; } return null; }
Source:
<code>public void notifyCacheEntryCreated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command) { <START> if (!cacheEntryCreatedListeners.isEmpty() && (clusteringDependentLogic == null || clusteringDependentLogic.shouldCommit(command, ctx, key, false).isLocal())) { <END> EventImpl<K, V> e = EventImpl.createEvent(cache, CACHE_ENTRY_CREATED); configureEvent(e, key, value, metadata, pre, ctx, command, null, null); boolean isLocalNodePrimaryOwner = clusteringDependentLogic.localNodeIsPrimaryOwner(key); boolean sendEvents = !ctx.isInTxScope(); try { for (CacheEntryListenerInvocation<K, V> listener : cacheEntryCreatedListeners) { listener.invoke(e, isLocalNodePrimaryOwner); } if (sendEvents) { eventManager.sendEvents(); sendEvents = false; } } finally { if (sendEvents) { eventManager.dropEvents(); } } } }</code><technical_language>clusteringDependentLogic == null is false clusteringDependentLogic is null</technical_language>

Target:
public void notifyCacheEntryCreated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command) { if (!cacheEntryCreatedListeners.isEmpty() && clusteringDependentLogic.commitType(command, ctx, key, false).isLocal()) { EventImpl<K, V> e = EventImpl.createEvent(cache, CACHE_ENTRY_CREATED); configureEvent(e, key, value, metadata, pre, ctx, command, null, null); boolean isLocalNodePrimaryOwner = clusteringDependentLogic.localNodeIsPrimaryOwner(key); boolean sendEvents = !ctx.isInTxScope(); try { for (CacheEntryListenerInvocation<K, V> listener : cacheEntryCreatedListeners) { listener.invoke(new EventWrapper<>(e.getKey(), e), isLocalNodePrimaryOwner); } if (sendEvents) { eventManager.sendEvents(); sendEvents = false; } } finally { if (sendEvents) { eventManager.dropEvents(); } } } }
Source:
<code>protected Set<Guid> validateAndUpdateHostsInPlacementPolicy(VmPlacementPolicy placementPolicy) { Set<Guid> hostsGuidsSet = new HashSet<Guid>(); if (placementPolicy.isSetHost()) { Host host = placementPolicy.getHost(); if(host.isSetId() || host.isSetName()) { <START> validateParameters(placementPolicy, "host.id|name"); <END> updateIdForSingleHost(host, hostsGuidsSet); } } if (placementPolicy.isSetHosts() && placementPolicy.getHosts().getHosts().size() > 0) { for (Host host : placementPolicy.getHosts().getHosts()) { validateParameters(host, "id|name"); updateIdForSingleHost(host, hostsGuidsSet); } } return hostsGuidsSet; }</code><technical_language>Id sense validate existence of host.id host.name right checked in 'if' statement. need this validation</technical_language>

Target:
protected Set<Guid> validateAndUpdateHostsInPlacementPolicy(VmPlacementPolicy placementPolicy) { Set<Guid> hostsGuidsSet = new HashSet<Guid>(); if (placementPolicy.isSetHost()) { Host host = placementPolicy.getHost(); if(host.isSetId() || host.isSetName()) { updateIdForSingleHost(host, hostsGuidsSet); } } if (placementPolicy.isSetHosts() && placementPolicy.getHosts().getHosts().size() > 0) { for (Host host : placementPolicy.getHosts().getHosts()) { validateParameters(host, "id|name"); updateIdForSingleHost(host, hostsGuidsSet); } } return hostsGuidsSet; }
Source:
<code><START> public List<Exception> getExceptions() { <END> List<Exception> exceptions = new ArrayList<Exception>(); Throwable currentThrowable = throwable; while (currentThrowable != null) { exceptions.add(new Exception(config, currentThrowable)); currentThrowable = currentThrowable.getCause(); } return exceptions; }</code><technical_language>This needs protected Exception needs public</technical_language>

Target:
protected List<Exception> getExceptions() { List<Exception> exceptions = new ArrayList<Exception>(); Throwable currentThrowable = throwable; while (currentThrowable != null) { exceptions.add(new Exception(config, currentThrowable)); currentThrowable = currentThrowable.getCause(); } return exceptions; }
Source:
<code>protected void populateModel(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { super.populateModel(context, operation, resource); final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); <START> final String connectorName = address.getLastElement().getValue(); <END> validateDuplicatedResources(context, address, connectorName, resource); }</code><technical_language>shortcut for this is, context.getCurrentAddressValue();</technical_language>

Target:
protected void populateModel(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { super.populateModel(context, operation, resource); context.addStep(operation, HttpConnectorValidationStep.INSTANCE, OperationContext.Stage.MODEL); }
Source:
<code>private SetRequestParameter getSeasonsRequest(final ClientConnection conn, final List<SeasonProfile> seasonProfileList) throws IOException { final RequestParameterFactory factory = new RequestParameterFactory(CLASS_ID, OBIS_CODE, 7); final DataObject seasonsArray = this.seasonProfileConverter.convert(seasonProfileList); LOGGER.info("getSeasonsRequest: debug output: {}", this.dlmsHelperService.getDebugInfo(seasonsArray)); <START> final AccessResultCode accesResultCode = AccessResultCode.SUCCESS; <END> final SetRequestParameter request = factory.createSetRequestParameter(seasonsArray); return request; }</code><technical_language>remove unused variable accesResultCode. fixes typo in name ;-)</technical_language>

Target:
private SetRequestParameter getSeasonsRequest(final ClientConnection conn, final List<SeasonProfile> seasonProfileList) throws IOException { final RequestParameterFactory factory = new RequestParameterFactory(CLASS_ID, OBIS_CODE, 7); final DataObject seasonsArray = this.seasonProfileConverter.convert(seasonProfileList); LOGGER.info("getSeasonsRequest: debug output: {}", this.dlmsHelperService.getDebugInfo(seasonsArray)); final SetRequestParameter request = factory.createSetRequestParameter(seasonsArray); return request; }
Source:
<code>ElasticsearchBackendImpl(ElasticsearchClientImplementor client, GsonProvider gsonProvider, String name, ElasticsearchWorkBuilderFactory workFactory, Gson userFacingGson, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, MultiTenancyStrategy multiTenancyStrategy) { this.client = client; this.name = name; this.orchestratorFactory = new ElasticsearchWorkOrchestratorFactory( new LogErrorHandler(), client, gsonProvider, workFactory ); this.analysisDefinitionRegistry = analysisDefinitionRegistry; this.multiTenancyStrategy = multiTenancyStrategy; <START> this.queryOrchestrator = orchestratorFactory.createStreamOrchestrator( name ); <END> this.eventContext = EventContexts.fromBackendName( name ); this.indexingContext = new IndexingBackendContext( eventContext, workFactory, multiTenancyStrategy, orchestratorFactory ); this.searchContext = new SearchBackendContext( eventContext, workFactory, userFacingGson, ( String elasticsearchIndexName ) -> { String result = hibernateSearchIndexNamesByElasticsearchIndexNames.get( elasticsearchIndexName ); if ( result == null ) { throw log.elasticsearchResponseUnknownIndexName( elasticsearchIndexName, eventContext ); } return result; }, multiTenancyStrategy, queryOrchestrator ); }</code><technical_language>pass a more meaningful name for orchestrator. "Elasticsearch query orchestrator for backend " + name</technical_language>

Target:
ElasticsearchBackendImpl(ElasticsearchClientImplementor client, GsonProvider gsonProvider, String name, ElasticsearchWorkBuilderFactory workFactory, Gson userFacingGson, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, MultiTenancyStrategy multiTenancyStrategy) { this.client = client; this.name = name; this.orchestratorFactory = new ElasticsearchWorkOrchestratorFactory( new LogErrorHandler(), client, gsonProvider, workFactory ); this.userFacingGson = userFacingGson; this.analysisDefinitionRegistry = analysisDefinitionRegistry; this.multiTenancyStrategy = multiTenancyStrategy; this.queryOrchestrator = orchestratorFactory.createStreamOrchestrator( "Elasticsearch query orchestrator for backend " + name ); this.eventContext = EventContexts.fromBackendName( name ); this.indexingContext = new IndexingBackendContext( eventContext, workFactory, multiTenancyStrategy, orchestratorFactory ); this.searchContext = new SearchBackendContext( eventContext, workFactory, userFacingGson, ( String elasticsearchIndexName ) -> { String result = hibernateSearchIndexNamesByElasticsearchIndexNames.get( elasticsearchIndexName ); if ( result == null ) { throw log.elasticsearchResponseUnknownIndexName( elasticsearchIndexName, eventContext ); } return result; }, multiTenancyStrategy, queryOrchestrator ); }
Source:
<code>public void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { leftHashTable = new TupleHashTable(getLeft().getSchema(), leftCompareColumns); rightHashTable = new TupleHashTable(getRight().getSchema(), rightCompareColumns); <START> leftHashTable.name = "op" + getOpId() + "left"; <END> rightHashTable.name = "op" + getOpId() + "right"; ans = new TupleBatchBuffer(getSchema()); nonBlocking = (QueryExecutionMode) execEnvVars.get(MyriaConstants.EXEC_ENV_VAR_EXECUTION_MODE) == QueryExecutionMode.NON_BLOCKING; }</code><technical_language>I guess I a . left right a bit more readable</technical_language>

Target:
public void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { leftHashTable = new TupleHashTable(getLeft().getSchema(), leftCompareColumns); rightHashTable = new TupleHashTable(getRight().getSchema(), rightCompareColumns); leftHashTable.name = "op" + getOpId() + ".left"; rightHashTable.name = "op" + getOpId() + ".right"; ans = new TupleBatchBuffer(getSchema()); nonBlocking = (QueryExecutionMode) execEnvVars.get(MyriaConstants.EXEC_ENV_VAR_EXECUTION_MODE) == QueryExecutionMode.NON_BLOCKING; }
Source:
<code>public void setUp() { Properties prop = new Properties(); <START> String propFileName = "config.properties"; <END> InputStream inputStream = App.class.getClassLoader().getResourceAsStream(propFileName); if (inputStream != null) { try { prop.load(inputStream); } catch (IOException e) { System.out.println(propFileName + " was not found. Defaulting to non-interactive mode."); } String property = prop.getProperty("INTERACTIVE_MODE"); if (property.equalsIgnoreCase("YES")) { interactiveMode = true; } } }</code><technical_language>this string a constant</technical_language>

Target:
public void setUp() { Properties prop = new Properties(); InputStream inputStream = App.class.getClassLoader().getResourceAsStream(PROP_FILE_NAME); if (inputStream != null) { try { prop.load(inputStream); } catch (IOException e) { System.out.println(PROP_FILE_NAME + " was not found. Defaulting to non-interactive mode."); } String property = prop.getProperty("INTERACTIVE_MODE"); if (property.equalsIgnoreCase("YES")) { interactiveMode = true; } } }
Source:
<code>public void add(final int index, final T element) { try { this.origin.add(index, element); } catch (final IndexOutOfBoundsException ex) { <START> throw new IllegalArgumentException(this.message, ex); <END> } }</code><technical_language>@Happy-Neko here, IndexOutOfBoundsException custom message</technical_language>

Target:
public void add(final int index, final T element) { try { this.origin.add(index, element); } catch (final IndexOutOfBoundsException ex) { throw this.wrapException(ex); } }
Source:
<code>public void should_notGenerateOpenApi_when_EndpointIsNotUsed() throws Exception { File generatedOpenApiJson = Paths .get(baseDir, DEFAULT_CONNECT_OPENAPI_JSON_FILE).toFile(); <START> Assert.assertFalse(generatedOpenApiJson.exists()); <END> devModeInitializer.onStartup(classes, servletContext); Assert.assertFalse( "Should not generate OpenAPI spec if Endpoint is not used.", generatedOpenApiJson.exists()); }</code><technical_language>test removed ? moved else ? some replacement ? E.g. is need check functionality (integration: is generated on). check some methods of classes in lookup called: e.g. factory is called. objects produced factory called (doesn't matter do called)</technical_language>

Target:
public void should_notGenerateOpenApi_when_EndpointIsNotUsed() throws Exception { File generatedOpenApiJson = Paths .get(baseDir, DEFAULT_CONNECT_OPENAPI_JSON_FILE).toFile(); Assert.assertFalse(generatedOpenApiJson.exists()); devModeInitializer.onStartup(classes, servletContext); Mockito.verify(taskGenerateConnect, times(0)).execute(); }