auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public OutputWriter createOutputWriter() { if (file.exists() && overwriteFile) { final String pathname = file.getPath(); final boolean delete = file.delete(); if (delete) { file = new File(pathname); } else { <START> throw new IllegalStateException("The previous file could not be deleted"); <END> } } String[] headers = new String[columns.length]; for (int i = 0; i < headers.length; i++) { headers[i] = columns[i].getName(); } return ExcelOutputWriterFactory.getWriter(file.getPath(), sheetName, columns); }</code><technical_language>small thing, "the existing file" sounds IMHO</technical_language>

Target:
public OutputWriter createOutputWriter() { if (file.exists() && overwriteFileIfExists) { final String pathname = file.getPath(); final boolean delete = file.delete(); if (delete) { file = new File(pathname); } else { throw new IllegalStateException("The existing file could not be deleted"); } } String[] headers = new String[columns.length]; for (int i = 0; i < headers.length; i++) { headers[i] = columns[i].getName(); } return ExcelOutputWriterFactory.getWriter(file.getPath(), sheetName, columns); }
Source:
<code>private static String formatWindowSpecification(WindowSpecification node, Optional<List<Expression>> parameters) { List<String> parts = new ArrayList<>(); if (node.getExistingName().isPresent()) { <START> parts.add(formatIdentifier(node.getExistingName().get()) + " "); <END> } if (!node.getPartitionBy().isEmpty()) { parts.add("PARTITION BY " + joinExpressions(node.getPartitionBy(), parameters)); } if (!node.getOrderBy().isEmpty()) { parts.add("ORDER BY " + formatSortItems(node.getOrderBy(), parameters)); } if (node.getFrame().isPresent()) { parts.add(formatWindowFrame(node.getFrame().get(), parameters)); } return Joiner.on(' ').join(parts); }</code><technical_language>a dumb question, this written a visitWindowSpecification method, remove need pass parameters joinExpressions</technical_language>

Target:
private static String formatWindowSpecification(WindowSpecification node, Optional<List<Expression>> parameters) { List<String> parts = new ArrayList<>(); if (node.getExistingName().isPresent()) { parts.add(formatIdentifier(node.getExistingName().get().getValue()) + " "); } if (!node.getPartitionBy().isEmpty()) { parts.add("PARTITION BY " + joinExpressions(node.getPartitionBy(), parameters)); } if (!node.getOrderBy().isEmpty()) { parts.add("ORDER BY " + formatSortItems(node.getOrderBy(), parameters)); } if (node.getFrame().isPresent()) { parts.add(formatWindowFrame(node.getFrame().get(), parameters)); } return Joiner.on(' ').join(parts); }
Source:
<code><START> public static com.openshift.restclient.model.IProject getProject(IResource resource) { <END> IProject project = null; if (resource instanceof IProject) { project = (IProject) resource; } else if (resource != null) { project = resource.getProject(); } return project; }</code><technical_language>a niggle : point of full class name (including package)</technical_language>

Target:
public static IProject getProject(IResource resource) { IProject project = null; if (resource instanceof IProject) { project = (IProject) resource; } else if (resource != null) { project = resource.getProject(); } return project; }
Source:
<code>private Collection<PluginFQN> parsePluginFQNs(String... plugins) throws InfrastructureException { List<PluginFQN> collectedFQNs = new ArrayList<>(); for (String plugin : plugins) { URI repo = null; String idVersionString; final int idVersionTagDelimiter = plugin.lastIndexOf("/"); idVersionString = plugin.substring(idVersionTagDelimiter + 1); if (idVersionTagDelimiter > -1) { try { repo = new URI(plugin.substring(0, idVersionTagDelimiter)); } catch (URISyntaxException e) { <START> throw new InternalInfrastructureException( <END> "Plugin registry URL is incorrect. Problematic plugin entry:" + plugin); } } String[] idVersion = idVersionString.split(":"); if (idVersion.length != 2 || idVersion[0].isEmpty() || idVersion[1].isEmpty()) { throw new InfrastructureException( "Plugin format is illegal. Problematic plugin entry:" + plugin); } if (collectedFQNs .stream() .anyMatch(p -> p.getId().equals(idVersion[0]) && p.getVersion().equals(idVersion[1]))) { throw new InfrastructureException( format( "Invalid Che tooling plugins configuration: plugin %s is duplicated", idVersion[0] + ":" + idVersion[1])); } collectedFQNs.add(new PluginFQN(repo, idVersion[0], idVersion[1])); } return collectedFQNs; }</code><technical_language>plugin is provided a user, I thatInternalInfrastructureException thrown</technical_language>

Target:
private Collection<PluginFQN> parsePluginFQNs(String... plugins) throws InfrastructureException { List<PluginFQN> collectedFQNs = new ArrayList<>(); for (String plugin : plugins) { URI repo = null; String idVersionString; final int idVersionTagDelimiter = plugin.lastIndexOf("/"); idVersionString = plugin.substring(idVersionTagDelimiter + 1); if (idVersionTagDelimiter > -1) { try { repo = new URI(plugin.substring(0, idVersionTagDelimiter)); } catch (URISyntaxException e) { throw new InfrastructureException( "Plugin registry URL is incorrect. Problematic plugin entry:" + plugin); } } String[] idVersion = idVersionString.split(":"); if (idVersion.length != 2 || idVersion[0].isEmpty() || idVersion[1].isEmpty()) { throw new InfrastructureException( "Plugin format is illegal. Problematic plugin entry:" + plugin); } if (collectedFQNs .stream() .anyMatch(p -> p.getId().equals(idVersion[0]) && p.getVersion().equals(idVersion[1]))) { throw new InfrastructureException( format( "Invalid Che tooling plugins configuration: plugin %s is duplicated", idVersion[0] + ":" + idVersion[1])); } collectedFQNs.add(new PluginFQN(repo, idVersion[0], idVersion[1])); } return collectedFQNs; }
Source:
<code>private static void addBondDeviceToHost(VDS vds, VdsNetworkInterface iface, Object[] interfaces) { vds.getInterfaces().add(iface); if (interfaces != null) { for (Object name : interfaces) { for (VdsNetworkInterface tempInterface : vds.getInterfaces()) { if (tempInterface.getName().equals(name.toString())) { <START> tempInterface.setBondName(iface.getName()); <END> } } } } }</code><technical_language>Please return break</technical_language>

Target:
private static void addBondDeviceToHost(VDS vds, VdsNetworkInterface iface, Object[] interfaces) { vds.getInterfaces().add(iface); if (interfaces != null) { for (Object name : interfaces) { for (VdsNetworkInterface tempInterface : vds.getInterfaces()) { if (tempInterface.getName().equals(name.toString())) { tempInterface.setBondName(iface.getName()); break; } } } } }
Source:
<code>private Exceptions() { <START> throw new AssertionError("No instances."); <END> }</code><technical_language>change AssertionError</technical_language>

Target:
private Exceptions() { throw new IllegalStateException("No instances!"); }
Source:
<code>public boolean isMatch(TreeWalkerAuditEvent event) { final int line = event.getLine(); boolean match = false; if (line >= firstLine && line <= lastLine) { final Matcher tagMatcher = tagCheckRegexp.matcher(event.getSourceName()); if (tagMatcher.find()) { if (tagMessageRegexp == null) { match = true; } else { final Matcher messageMatcher = tagMessageRegexp.matcher(event.getMessage()); match = messageMatcher.find(); } } else if (event.getModuleId() != null) { final Matcher idMatcher = tagCheckRegexp.matcher(event.getModuleId()); <START> match = idMatcher.find(); <END> } } return match; }</code><technical_language>If tests for it, yes</technical_language>

Target:
public boolean isMatch(TreeWalkerAuditEvent event) { return isInScopeOfSuppression(event) && (isCheckMatch(event) || isIdMatch(event)) && isMessageMatch(event); }
Source:
<code>public Upstream<T> apply(Upstream<? extends T> upstream) throws Exception { return down -> { long start; if (circuitBreaker.tryAcquirePermission()) { start = System.nanoTime(); upstream.connect(new Downstream<T>() { @Override public void success(T value) { long durationInNanos = System.nanoTime() - start; circuitBreaker.onSuccess(durationInNanos); down.success(value); } @Override public void error(Throwable throwable) { long durationInNanos = System.nanoTime() - start; circuitBreaker.onError(durationInNanos, throwable); handleRecovery(down, throwable); } @Override public void complete() { <START> down.complete(); <END> } }); } else { Throwable t = new CallNotPermittedException(circuitBreaker); handleRecovery(down, t); } }; }</code><technical_language>This line removed. invoked a call is cancelled</technical_language>

Target:
public Upstream<T> apply(Upstream<? extends T> upstream) throws Exception { return down -> { long start; if (circuitBreaker.tryAcquirePermission()) { start = System.nanoTime(); upstream.connect(new Downstream<T>() { @Override public void success(T value) { long durationInNanos = System.nanoTime() - start; circuitBreaker.onSuccess(durationInNanos); down.success(value); } @Override public void error(Throwable throwable) { long durationInNanos = System.nanoTime() - start; circuitBreaker.onError(durationInNanos, throwable); handleRecovery(down, throwable); } @Override public void complete() { circuitBreaker.releasePermission(); down.complete(); } }); } else { Throwable t = new CallNotPermittedException(circuitBreaker); handleRecovery(down, t); } }; }
Source:
<code>public void setupExecutor() { if (m_executor.get()==null) { ListeningExecutorService es = CoreUtils.getListeningExecutorService( "ExportDataSource gen " + m_generation + " table " + m_tableName + " partition " + m_partitionId, 1); synchronized(m_executorLock) { if (m_queuedActions.size()>0) { for (RunnableWithES queuedR : m_queuedActions) { queuedR.setExecutorService(es); es.submit(queuedR); } m_queuedActions.clear(); } } if (!m_executor.compareAndSet(null, es)) { <START> es.shutdown(); <END> } } }</code><technical_language>Shouldnt compare set done shutdown? !es.isShutdown() end in race</technical_language>

Target:
public void setupExecutor() { if (m_executor!=null) { return; } synchronized(m_executorLock) { if (m_executor==null) { ListeningExecutorService es = CoreUtils.getListeningExecutorService( "ExportDataSource gen " + m_generation + " table " + m_tableName + " partition " + m_partitionId, 1); if (m_queuedActions.size()>0) { for (RunnableWithES queuedR : m_queuedActions) { queuedR.setExecutorService(es); es.submit(queuedR); } m_queuedActions.clear(); } m_executor = es; } } }
Source:
<code>private void writeList(DataOutputStream out, String[] list) throws IOException { if (list == null) { out.writeInt(0); } else { out.writeInt(list.length); for (String <START> list1 : <END> list) { writeStringOrNull(list1, out); } } }</code><technical_language>rename s string</technical_language>

Target:
private void writeList(DataOutputStream out, String[] list) throws IOException { if (list == null) { out.writeInt(0); } else { out.writeInt(list.length); for (String s : list) { writeStringOrNull(s, out); } } }
Source:
<code>private void applyMcastAddition(MacLocation ml) { log.debug("Adding MCAST remote MAC to the VTEP: " + ml); <START> try { List<McastMac> mcasts = vtepDataClient.listMcastMacsRemote(); for (McastMac mc : mcasts) { if (mc.mac.equals(ml.mac().toString())) { log.debug("MCAST remote MAC already in vtep"); return; } } } catch (VtepNotConnectedException e) { log.error("VTEP is not connected", e); return; } <END> Status st = vtepDataClient.addMcastMacRemote(ml.logicalSwitchName(), ml.mac(), ml.vxlanTunnelEndpoint()); if (!st.isSuccess() ) { if (st.getCode().equals(StatusCode.CONFLICT)) { log.info("Conflict writing {}, not expected", ml); } else { throw new VxLanPeerSyncException("OVSDB error: " + st.getCode() + ", " + st.getDescription(), ml, st.getCode()); } } }</code><technical_language>question</technical_language>

Target:
private void applyMcastAddition(MacLocation ml) { log.debug("Adding MCAST remote MAC to the VTEP: " + ml); List<McastMac> mcasts = null; try { mcasts = vtepDataClient.listMcastMacsRemote(); } catch (VtepNotConnectedException e) { log.error("VTEP is not connected", e); return; } for (McastMac mc : mcasts) { if (mc.mac.equals(ml.mac().toString())) { log.debug("MCAST remote MAC already in vtep"); return; } } Status st = vtepDataClient.addMcastMacRemote(ml.logicalSwitchName(), ml.mac(), ml.vxlanTunnelEndpoint()); if (!st.isSuccess() ) { if (st.getCode().equals(StatusCode.CONFLICT)) { log.info("Conflict writing {}, not expected", ml); } else { throw new VxLanPeerSyncException("OVSDB error: " + st.getCode() + ", " + st.getDescription(), ml, st.getCode()); } } }
Source:
<code>public Message<?> toMessage(Object payload, MessageHeaders headers) { Assert.isInstanceOf(byte[].class, payload); try { Message<?> decoded = (Message<?>) this.codec.decode((byte[]) payload, messageClass); <START> AbstractIntegrationMessageBuilder<?> builder = MutableMessageBuilder.fromMessage(decoded); <END> if (headers != null) { builder.copyHeaders(headers); } return builder.build(); } catch (IOException e) { throw new MessagingException("Failed to decode", e); } }</code><technical_language>H-m-m. messageClass exposed property, MutableMessage directly</technical_language>

Target:
public Message<?> toMessage(Object payload, MessageHeaders headers) { Assert.isInstanceOf(byte[].class, payload); try { Message<?> decoded = (Message<?>) this.codec.decode((byte[]) payload, messageClass); if (headers != null) { AbstractIntegrationMessageBuilder<?> builder = getMessageBuilderFactory().fromMessage(decoded); builder.copyHeaders(headers); return builder.build(); } else { return decoded; } } catch (IOException e) { throw new MessagingException("Failed to decode", e); } }
Source:
<code>public static String convertToJson(Object value) { if (mapper.canSerialize(value.getClass())) { try { return mapper.writeValueAsString(value); <START> } catch (IOException e) { <END> logger.warn("Error while serializing " + value + " to JSON", e); return null; } } else { throw new IllegalArgumentException("Value of type " + value.getClass().getName() + " can not be serialized to JSON."); } }</code><technical_language>catch new-line</technical_language>

Target:
public static String convertToJson(Object value) { Assert.notNull(value, "The object to convert must not be null."); if (mapper.canSerialize(value.getClass())) { try { return mapper.writeValueAsString(value); } catch (IOException e) { logger.warn("Error while serializing " + value + " to JSON", e); return null; } } else { throw new IllegalArgumentException("Value of type " + value.getClass().getName() + " can not be serialized to JSON."); } }
Source:
<code>public static Migrator createVersionOneToVersionTwoMigrator(Context context, File databasePath, Migrator.Callback callback) { if (!databasePath.exists()) { <START> return new Migrator() { <END> @Override public void migrate() { } }; } SQLiteDatabase sqLiteDatabase = SQLiteDatabase.openDatabase(databasePath.getAbsolutePath(), null, 0); DatabaseWrapper database = new DatabaseWrapper(sqLiteDatabase); MigrationExtractor migrationExtractor = new MigrationExtractor(database); RoomDownloadsPersistence downloadsPersistence = RoomDownloadsPersistence.newInstance(context); InternalFilePersistence internalFilePersistence = new InternalFilePersistence(); internalFilePersistence.initialiseWith(context); return new VersionOneToVersionTwoMigrator(migrationExtractor, downloadsPersistence, internalFilePersistence, database, callback); }</code><technical_language>a static NO_OP migrator defined in interface</technical_language>

Target:
public static Migrator createVersionOneToVersionTwoMigrator(Context context, File databasePath, Migrator.Callback callback) { if (!databasePath.exists()) { return Migrator.NO_OP; } SQLiteDatabase sqLiteDatabase = SQLiteDatabase.openDatabase(databasePath.getAbsolutePath(), null, 0); SqlDatabaseWrapper database = new SqlDatabaseWrapper(sqLiteDatabase); MigrationExtractor migrationExtractor = new MigrationExtractor(database); RoomDownloadsPersistence downloadsPersistence = RoomDownloadsPersistence.newInstance(context); InternalFilePersistence internalFilePersistence = new InternalFilePersistence(); internalFilePersistence.initialiseWith(context); return new VersionOneToVersionTwoMigrator(migrationExtractor, downloadsPersistence, internalFilePersistence, database, callback); }
Source:
<code>public void shouldNotifyEventWhenCreateAnnotation() { try (CapturingEventListener listener = new CapturingEventListener(COMMENT_ADDED)) { Annotation annotation = createAnnotationAndAddSubscription("CommentAdded"); DocumentModel annotationDocumentModel = session.getDocument(new IdRef(annotation.getId())); DocumentModel annotationParentDocumentModel = session.getDocument( new IdRef((String) annotationDocumentModel.getPropertyValue(COMMENT_PARENT_ID))); <START> transactionalFeature.nextTransaction(); <END> Event expectedEvent = listener.streamCapturedEvents() .findFirst() .orElseThrow(() -> new AssertionError("Event wasn't fired")); checkDocumentEventContext(expectedEvent, annotationDocumentModel, annotationParentDocumentModel, annotatedDocumentModel); } }</code><technical_language>I put createAnnotationAndAddSubscription call</technical_language>

Target:
public void shouldNotifyEventWhenCreateAnnotation() { try (CapturingEventListener listener = new CapturingEventListener(COMMENT_ADDED)) { Annotation annotation = createAnnotationAndAddSubscription(COMMENT_ADDED_NOTIFICATION); transactionalFeature.nextTransaction(); DocumentModel annotationDocumentModel = session.getDocument(new IdRef(annotation.getId())); DocumentModel annotationParentDocumentModel = session.getDocument( new IdRef((String) annotationDocumentModel.getPropertyValue(COMMENT_PARENT_ID))); Event expectedEvent = listener.streamCapturedEvents() .findFirst() .orElseThrow(() -> new AssertionError("Event wasn't fired")); checkDocumentEventContext(expectedEvent, annotationDocumentModel, annotationParentDocumentModel, annotatedDocumentModel); } }
Source:
<code>public void testProcessScheduleOn1ColoWhileOtherColoIsDown() throws Exception { try { UA2Bundle.submitProcess(true); Util.shutDownService(cluster2.getProcessHelper()); Util.assertSucceeded(prism.getProcessHelper() .submitAndSchedule(URLS.SUBMIT_AND_SCHEDULE_URL, UA2Bundle.getProcessData())); AssertUtil.checkStatus(cluster1OC, ENTITY_TYPE.PROCESS, UA2Bundle, Job.Status.RUNNING); AssertUtil.checkNotStatus(cluster1OC, ENTITY_TYPE.PROCESS, UA1Bundle, Job.Status.RUNNING); } catch (Exception e) { <START> e.printStackTrace(); <END> throw new TestNGException(e.getMessage()); } finally { Util.restartService(cluster2.getProcessHelper()); } }</code><technical_language>I curious advantage of catching exception re-throwing it</technical_language>

Target:
public void testProcessScheduleOn1ColoWhileOtherColoIsDown() throws Exception { try { bundles[1].submitProcess(true); Util.shutDownService(cluster2.getProcessHelper()); Util.assertSucceeded(prism.getProcessHelper() .submitAndSchedule(URLS.SUBMIT_AND_SCHEDULE_URL, bundles[1].getProcessData())); AssertUtil.checkStatus(cluster1OC, ENTITY_TYPE.PROCESS, bundles[1], Job.Status.RUNNING); AssertUtil.checkNotStatus(cluster1OC, ENTITY_TYPE.PROCESS, bundles[0], Job.Status.RUNNING); } catch (Exception e) { e.printStackTrace(); throw new TestNGException(e.getMessage()); } finally { Util.restartService(cluster2.getProcessHelper()); } }
Source:
<code>public void lunsMismatchDeviceSize() { Guid pvID = Guid.newGuid(); Guid lunID = Guid.newGuid(); LUNs lunFromVG = new LUNs(); lunFromVG.setLUN_id(lunID.toString()); lunFromVG.setphysical_volume_id(pvID.toString()); lunFromVG.setDeviceSize(20); LUNs lunFromDB = new LUNs(); lunFromDB.setLUN_id(lunID.toString()); lunFromDB.setphysical_volume_id(pvID.toString()); lunFromDB.setDeviceSize(10); List<LUNs> lunsFromVgInfo = Collections.singletonList(lunFromVG); List<LUNs> lunsFromDb = Collections.singletonList(lunFromDB); boolean isMismatch = command.isLunsInfoMismatch(lunsFromVgInfo, lunsFromDb); <START> assertTrue(isMismatch); <END> }</code><technical_language>inline this useless boolean</technical_language>

Target:
public void lunsMismatchDeviceSize() { Guid pvID = Guid.newGuid(); Guid lunID = Guid.newGuid(); LUNs lunFromVG = new LUNs(); lunFromVG.setLUN_id(lunID.toString()); lunFromVG.setphysical_volume_id(pvID.toString()); lunFromVG.setDeviceSize(20); LUNs lunFromDB = new LUNs(); lunFromDB.setLUN_id(lunID.toString()); lunFromDB.setphysical_volume_id(pvID.toString()); lunFromDB.setDeviceSize(10); List<LUNs> lunsFromVgInfo = Collections.singletonList(lunFromVG); List<LUNs> lunsFromDb = Collections.singletonList(lunFromDB); assertTrue(command.isLunsInfoMismatch(lunsFromVgInfo, lunsFromDb)); }
Source:
<code>public boolean move(String path, String target) { path = Paths.valid(path); target = Paths.valid(target); File file = Paths.toFile(baseDirectory, path); File dest = Paths.toFile(baseDirectory, target); if (!file.exists() && !dest.exists()) { return true; } if( !file.exists() ){ throw new IllegalStateException("Unable to find " + path + " to move to " + target); <START> } <END> try { dest.getParentFile().mkdirs(); return Files.move(file, dest); } catch (IOException e) { throw new IllegalStateException("Unable to move " + path + " to " + target, e); } }</code><technical_language>This wrong/redundant. check !file.exists() && !dest.exists() return true reaching here. get IllegalStateException if !file.exists() && dest.exists(), catch block Files.move throws exception if in this state anyway</technical_language>

Target:
public boolean move(String path, String target) { path = Paths.valid(path); target = Paths.valid(target); File file = Paths.toFile(baseDirectory, path); File dest = Paths.toFile(baseDirectory, target); if (!file.exists() && !dest.exists()) { return true; } try { dest.getParentFile().mkdirs(); return Files.move(file, dest); } catch (IOException e) { throw new IllegalStateException("Unable to move " + path + " to " + target, e); } }
Source:
<code>protected void setUp() throws Exception { super.setUp(); ((MockSystemReader) SystemReader.getInstance()).setProperty( Constants.GIT_CEILING_DIRECTORIES_KEY, ResourcesPlugin .getWorkspace().getRoot().getLocation().toFile() .getAbsoluteFile().toString()); project = new TestProject(true); <START> if (false) <END> checkNotNested(); gitDir = new File(project.getProject().getWorkspace().getRoot() .getRawLocation().toFile(), ".git"); rmrf(gitDir); }</code><technical_language>this renders next line dead code skip this check</technical_language>

Target:
protected void setUp() throws Exception { super.setUp(); ((MockSystemReader) SystemReader.getInstance()).setProperty( Constants.GIT_CEILING_DIRECTORIES_KEY, ResourcesPlugin .getWorkspace().getRoot().getLocation().toFile() .getAbsoluteFile().toString()); project = new TestProject(true); checkNotNested(); gitDir = new File(project.getProject().getWorkspace().getRoot() .getRawLocation().toFile(), ".git"); rmrf(gitDir); }
Source:
<code>private byte[] createNoteContent(CodeReviewCommit commit) throws UnsupportedEncodingException { try { <START> ReviewNoteHeaderFormatter formatter = new ReviewNoteHeaderFormatter(); <END> formatter.appendChangeId(commit.change.getId()); ResultSet<PatchSetApproval> approvals = schema.patchSetApprovals().byPatchSet(commit.patchsetId); PatchSetApproval submit = null; for (PatchSetApproval a : approvals) { if (ApprovalCategory.SUBMIT.equals(a.getCategoryId())) { submit = a; } else { formatter.appendApproval( schema.approvalCategories().get(a.getCategoryId()), a.getValue(), schema.accounts().get(a.getAccountId())); } } formatter.appendBranch(schema.projects().get(commit.change.getProject()), commit.change.getDest()); formatter.appendSubmittedBy(schema.accounts().get(submit.getAccountId())); formatter.appendSubmittedOn(submit.getGranted()); return formatter.toString().getBytes("UTF-8"); } catch (OrmException e) { throw new RuntimeException(e); } }</code><technical_language>TimeZone author.getTimeZone()</technical_language>

Target:
private ObjectId createNoteContent(CodeReviewCommit commit) throws CodeReviewNoteCreationException, IOException { try { ReviewNoteHeaderFormatter formatter = new ReviewNoteHeaderFormatter(author.getTimeZone()); final List<String> idList = commit.getFooterLines(CHANGE_ID); if (idList.isEmpty()) formatter.appendChangeId(commit.change.getKey()); ResultSet<PatchSetApproval> approvals = schema.patchSetApprovals().byPatchSet(commit.patchsetId); PatchSetApproval submit = null; for (PatchSetApproval a : approvals) { if (ApprovalCategory.SUBMIT.equals(a.getCategoryId())) { submit = a; } else { formatter.appendApproval( approvalTypes.getApprovalType(a.getCategoryId()).getCategory(), a.getValue(), accountCache.get(a.getAccountId()).getAccount()); } } formatter.appendBranch(commit.change.getProject().get(), commit.change.getDest()); formatter.appendSubmittedBy(accountCache.get(submit.getAccountId()).getAccount()); formatter.appendSubmittedOn(submit.getGranted()); return inserter.insert(Constants.OBJ_BLOB, formatter.toString().getBytes("UTF-8")); } catch (OrmException e) { throw new CodeReviewNoteCreationException(commit, e); } }
Source:
<code>protected final static void setUp(String transport) { application = new SingleNodeApplication(); <START> System.out.println(transport); <END> application.run("--transport", transport); context = (AbstractApplicationContext) application.getContainerContext(); streamDefinitionRepository = context.getBean(StreamDefinitionRepository.class); streamRepository = context.getBean(StreamRepository.class); streamDeployer = application.getAdminContext().getBean(StreamDeployer.class); AbstractMessageChannel deployChannel = application.getAdminContext().getBean("deployChannel", AbstractMessageChannel.class); AbstractMessageChannel undeployChannel = application.getAdminContext().getBean("undeployChannel", AbstractMessageChannel.class); deployChannel.addInterceptor(new WireTap(tapChannel)); undeployChannel.addInterceptor(new WireTap(tapChannel)); context.addApplicationListener(moduleEventListener); }</code><technical_language>left a system.out</technical_language>

Target:
protected final static void setUp(String transport) { application = new SingleNodeApplication(); application.run("--transport", transport); context = (AbstractApplicationContext) application.getContainerContext(); streamDefinitionRepository = context.getBean(StreamDefinitionRepository.class); streamRepository = context.getBean(StreamRepository.class); streamDeployer = application.getAdminContext().getBean(StreamDeployer.class); AbstractMessageChannel deployChannel = application.getAdminContext().getBean("deployChannel", AbstractMessageChannel.class); AbstractMessageChannel undeployChannel = application.getAdminContext().getBean("undeployChannel", AbstractMessageChannel.class); deployChannel.addInterceptor(new WireTap(tapChannel)); undeployChannel.addInterceptor(new WireTap(tapChannel)); context.addApplicationListener(moduleEventListener); }
Source:
<code>protected DiskImage getImageInfoFromVdsm(final DiskImage targetImage) { try { VDSReturnValue ret = runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(targetImage.getStoragePoolId(), targetImage.getStorageIds().get(0), targetImage.getId(), targetImage.getImageId())); return (DiskImage) ret.getReturnValue(); <START> } catch (EngineException e) { <END> log.error("Failed to get info of volume '{0}' using GetImageInfo", targetImage.getImageId(), e); return null; } }</code><technical_language>audit log in case engine log</technical_language>

Target:
protected DiskImage getImageInfoFromVdsm(final DiskImage targetImage) { try { VDSReturnValue ret = runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(targetImage.getStoragePoolId(), targetImage.getStorageIds().get(0), targetImage.getId(), targetImage.getImageId())); return (DiskImage) ret.getReturnValue(); } catch (EngineException e) { log.warn("Failed to get info of volume '{0}' using GetImageInfo", targetImage.getImageId(), e); return null; } }
Source:
<code>public void doAfterCompose(final T comp) throws Exception { if (comp.getPage() == null) { ((ComponentCtrl) comp).addCallback(ComponentCtrl.AFTER_PAGE_ATTACHED, new Callback() { public void call(Object data) { try { doAfterCompose(comp); } catch (Exception e) { <START> throw UiException.Aide.wrap(e, e.getMessage()); <END> } } }); return; } _binder.initAnnotatedBindings(); new AbstractAnnotatedMethodInvoker<AfterCompose>(AfterCompose.class, _afterComposeMethodCache) { protected boolean shouldLookupSuperclass(AfterCompose annotation) { return annotation.superclass(); } }.invokeMethod(_binder, getViewModelInitArgs(evalx, comp)); BinderKeeper keeper = BinderKeeper.getInstance(comp); if (keeper.isRootBinder(_binder)) { keeper.loadComponentForAllBinders(); } comp.setAuService(this); final AbstractAnnotatedMethodInvoker<HistoryPopState> historyPopStateInvoker = new AbstractAnnotatedMethodInvoker<HistoryPopState>(HistoryPopState.class, _historyPopStateMethodCache) { protected boolean shouldLookupSuperclass(HistoryPopState annotation) { return false; } }; if (historyPopStateInvoker.hasAnnotatedMethod(_binder)) { Page page = comp.getPage(); if (page != null) { page.addEventListener(Events.ON_HISTORY_POP_STATE, new EventListener<HistoryPopStateEvent>() { public void onEvent(HistoryPopStateEvent event) throws Exception { historyPopStateInvoker.invokeMethod(getBinder(), null, event, true); } }); } } }</code><technical_language>throw UiException.Aide.wrap(e);</technical_language>

Target:
public void doAfterCompose(final T comp) throws Exception { if (comp.getPage() == null) { ((ComponentCtrl) comp).addCallback(ComponentCtrl.AFTER_PAGE_ATTACHED, new Callback() { public void call(Object data) { try { doAfterCompose(comp); } catch (Exception e) { throw UiException.Aide.wrap(e); } } }); return; } _binder.initAnnotatedBindings(); new AbstractAnnotatedMethodInvoker<AfterCompose>(AfterCompose.class, _afterComposeMethodCache) { protected boolean shouldLookupSuperclass(AfterCompose annotation) { return annotation.superclass(); } }.invokeMethod(_binder, getViewModelInitArgs(evalx, comp)); BinderKeeper keeper = BinderKeeper.getInstance(comp); if (keeper.isRootBinder(_binder)) { keeper.loadComponentForAllBinders(); } comp.setAuService(this); final AbstractAnnotatedMethodInvoker<HistoryPopState> historyPopStateInvoker = new AbstractAnnotatedMethodInvoker<HistoryPopState>(HistoryPopState.class, _historyPopStateMethodCache) { protected boolean shouldLookupSuperclass(HistoryPopState annotation) { return false; } }; if (historyPopStateInvoker.hasAnnotatedMethod(_binder)) { Page page = comp.getPage(); if (page != null) { page.addEventListener(Events.ON_HISTORY_POP_STATE, new EventListener<HistoryPopStateEvent>() { public void onEvent(HistoryPopStateEvent event) throws Exception { historyPopStateInvoker.invokeMethod(getBinder(), null, event, true); } }); } } }
Source:
<code>private static boolean isLayout(TagNode node) { String role = node.getAttribute("ROLE"); <START> return role != null && ("PRESENTATION".equalsIgnoreCase(role) || "NONE".equalsIgnoreCase(role)); <END> }</code><technical_language>null check unnecessary, yoda condition</technical_language>

Target:
private static boolean isLayout(TagNode node) { String role = node.getAttribute("ROLE"); return "PRESENTATION".equalsIgnoreCase(role) || "NONE".equalsIgnoreCase(role); }
Source:
<code><START> public static Properties loadProperties(InputStream resource) { <END> try ( Reader is = new InputStreamReader(resource, Charset.forName("UTF-8")); ) { Properties prop = new Properties(); prop.load(is); return prop; } catch (IOException ioe) { throw new RuntimeException(ioe); } }</code><technical_language>this static</technical_language>

Target:
private static Properties loadProperties(InputStream resource) { try ( Reader is = new InputStreamReader(resource, Charset.forName("UTF-8")); ) { Properties prop = new Properties(); prop.load(is); return prop; } catch (IOException ioe) { throw new RuntimeException(ioe); } }
Source:
<code>public void add(AddParams params) throws GitException { AddCommand addCommand = getGit().add().setUpdate(params.isUpdate()); List<String> filePatterns = params.getFilePattern(); if (filePatterns.isEmpty()) { filePatterns = AddRequest.DEFAULT_PATTERN; } filePatterns.forEach(addCommand::addFilepattern); <START> <END> try { addCommand.call(); Set<String> deletedFiles = getGit().status().call().getMissing(); if (!deletedFiles.isEmpty()) { RmCommand rmCommand = getGit().rm(); if (filePatterns.contains(".")) { deletedFiles.forEach(rmCommand::addFilepattern); } else { filePatterns.forEach(filePattern -> deletedFiles.stream() .filter(deletedFile -> deletedFile.startsWith(filePattern)) .forEach(rmCommand::addFilepattern)); } rmCommand.call(); } } catch (GitAPIException exception) { throw new GitException(exception.getMessage(), exception); } }</code><technical_language>Please add authors</technical_language>

Target:
public void add(AddParams params) throws GitException { AddCommand addCommand = getGit().add().setUpdate(params.isUpdate()); List<String> filePatterns = params.getFilePattern(); if (filePatterns.isEmpty()) { filePatterns = AddRequest.DEFAULT_PATTERN; } filePatterns.forEach(addCommand::addFilepattern); try { addCommand.call(); addDeletedFilesToIndex(filePatterns); } catch (GitAPIException exception) { throw new GitException(exception.getMessage(), exception); } }
Source:
<code>public static void loadBundledModules(ServletContext servletContext) { final org.slf4j.Logger log = LoggerFactory.getLogger(Listener.class); String path = servletContext.getRealPath(""); path += File.separator + "WEB-INF" + File.separator + "bundledModules"; File folder = new File(path); if (!folder.exists()) { log.warn("Bundled module folder doesn't exist: " + folder.getAbsolutePath()); return; } if (!folder.isDirectory()) { log.warn("Bundled module folder isn't really a directory: " + folder.getAbsolutePath()); return; } if (folder.listFiles() != null) { <START> for (File f : Objects.requireNonNull(folder.listFiles())) { <END> if (!f.getName().startsWith(".")) { try { Module mod = ModuleFactory.loadModule(f); log.debug("Loaded bundled module: " + mod + " successfully"); } catch (Exception e) { log.warn("Error while trying to load bundled module " + f.getName() + "", e); } } } } }</code><technical_language>Do need Objects.requireNonNull folder.listFiles() is null</technical_language>

Target:
public static void loadBundledModules(ServletContext servletContext) { final org.slf4j.Logger log = LoggerFactory.getLogger(Listener.class); String path = servletContext.getRealPath(""); path += File.separator + "WEB-INF" + File.separator + "bundledModules"; File folder = new File(path); if (!folder.exists()) { log.warn("Bundled module folder doesn't exist: " + folder.getAbsolutePath()); return; } if (!folder.isDirectory()) { log.warn("Bundled module folder isn't really a directory: " + folder.getAbsolutePath()); return; } if (folder.listFiles() != null) { for (File f : folder.listFiles()) { if (!f.getName().startsWith(".")) { try { Module mod = ModuleFactory.loadModule(f); log.debug("Loaded bundled module: " + mod + " successfully"); } catch (Exception e) { log.warn("Error while trying to load bundled module " + f.getName() + "", e); } } } } }
Source:
<code>public Hardware apply(VMHardware from) { final HardwareBuilder builder = new HardwareBuilder() .name(from.name) .id(from.name) .processors(ImmutableList.of(new Processor(from.numberOfCores, 2))) .ram(from.memoryInMB) .location(from.globallyAvailable ? null : FluentIterable.from(locations.get()) .firstMatch(LocationPredicates.idEquals(from.location)) <START> .orNull()); <END> if (from.resourceDiskSizeInMB != null) { builder.volume(new VolumeBuilder() .size(Float.valueOf(from.resourceDiskSizeInMB)) .type(Volume.Type.LOCAL) .build()); } if (from.osDiskSizeInMB != null) { builder.volume(new VolumeBuilder() .size(Float.valueOf(from.osDiskSizeInMB)) .type(Volume.Type.LOCAL) .build()); } ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder(); metadata.put("maxDataDiskCount", String.valueOf(from.maxDataDiskCount)); builder.userMetadata(metadata.build()); return builder.build(); }</code><technical_language>This orNull a global hardware profile. method in adapter is built, this happen, I fail if is found</technical_language>

Target:
public Hardware apply(VMHardware from) { final HardwareBuilder builder = new HardwareBuilder() .name(from.name) .id(from.name) .processors(ImmutableList.of(new Processor(from.numberOfCores, 2))) .ram(from.memoryInMB) .location(from.globallyAvailable ? null : FluentIterable.from(locations.get()) .firstMatch(LocationPredicates.idEquals(from.location)) .get()); if (from.resourceDiskSizeInMB != null) { builder.volume(new VolumeBuilder() .size(Float.valueOf(from.resourceDiskSizeInMB)) .type(Volume.Type.LOCAL) .build()); } if (from.osDiskSizeInMB != null) { builder.volume(new VolumeBuilder() .size(Float.valueOf(from.osDiskSizeInMB)) .type(Volume.Type.LOCAL) .build()); } ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder(); metadata.put("maxDataDiskCount", String.valueOf(from.maxDataDiskCount)); builder.userMetadata(metadata.build()); return builder.build(); }
Source:
<code>public void testField01() { SWTBotView viewBot = fBot.viewById(FilterView.ID); viewBot.setFocus(); <START> SWTBot filterBot = viewBot.bot(); <END> SWTBotTree treeBot = filterBot.tree(); viewBot.toolbarButton("Add new filter").click(); treeBot.getTreeItem("FILTER <name>").select(); SWTBotText textBot = filterBot.text(); textBot.setFocus(); String filterName = "field"; textBot.setText(filterName); SWTBotTreeItem filterNodeBot = treeBot.getTreeItem(FILTER_TEST + filterName); filterNodeBot.click(); filterNodeBot.contextMenu("TRACETYPE").click(); filterNodeBot.expand(); SWTBotCombo comboBot = filterBot.comboBox(); comboBot.setSelection(TRACETYPE); filterNodeBot.getNode(WITH_TRACETYPE).expand(); filterNodeBot.getNode(WITH_TRACETYPE).contextMenu(COMPARE).click(); SWTBotTreeItem contentNode = filterNodeBot.getNode(WITH_TRACETYPE).getNode("<select aspect> " + "=" + " <value>"); contentNode.expand(); comboBot = selectCombo(filterBot); comboBot.setSelection(comboBot.itemCount() - 1); textBot = filterBot.text(0); textBot.setFocus(); textBot.setText(filterName); textBot = filterBot.text(1); textBot.setFocus(); textBot.setText("1.5"); filterBot.radio(2).click(); viewBot.toolbarButton("Save filters").click(); String ret = applyFilter(fBot, filterName); assertEquals("50/100", ret); }</code><technical_language>fBot</technical_language>

Target:
public void testField01() { SWTBotView viewBot = fBot.viewById(FilterView.ID); viewBot.setFocus(); SWTBot filterBot = viewBot.bot(); SWTBotTree treeBot = filterBot.tree(); viewBot.toolbarButton("Add new filter").click(); treeBot.getTreeItem("FILTER <name>").select(); SWTBotText textBot = filterBot.text(); textBot.setFocus(); String filterName = "field"; textBot.setText(filterName); SWTBotTreeItem filterNodeBot = treeBot.getTreeItem(FILTER_TEST + filterName); filterNodeBot.click(); filterNodeBot.contextMenu("TRACETYPE").click(); filterNodeBot.expand(); SWTBotCombo comboBot = filterBot.comboBox(); comboBot.setSelection(TRACETYPE); filterNodeBot.getNode(WITH_TRACETYPE).expand(); filterNodeBot.getNode(WITH_TRACETYPE).contextMenu(COMPARE).click(); SWTBotTreeItem contentNode = filterNodeBot.getNode(WITH_TRACETYPE).getNode("<select aspect> " + "=" + " <value>"); contentNode.expand(); comboBot = filterBot.comboBox(); comboBot.setSelection(comboBot.itemCount() - 1); textBot = filterBot.text(0); textBot.setFocus(); textBot.setText(filterName); textBot = filterBot.text(1); textBot.setFocus(); textBot.setText("1.5"); filterBot.radio(2).click(); viewBot.toolbarButton("Save filters").click(); String ret = applyFilter(fBot, filterName); assertEquals("50/100", ret); }
Source:
<code>public void run() { final long start = System.nanoTime(); final Map<String, String> tags = MetricsConstants.newSuccessTagsMap(); try { this.jobSubmitterService.submitJob( this.jobRequest, this.cluster, this.command, this.applications, this.memory ); } catch (final GenieException e) { log.error("Unable to submit job due to exception: {}", e.getMessage(), e); MetricsConstants.addFailureTagsWithException(tags, e); <START> } catch (Throwable t) { <END> MetricsConstants.addFailureTagsWithException(tags, t); throw t; } finally { final long finish = System.nanoTime(); this.registry.timer( submitTimerId.withTags(tags) ).record(finish - start, TimeUnit.NANOSECONDS); } }</code><technical_language>For this re-wrap in a GenieServerException throwing again? reason propagate a random runtime exception? final</technical_language>

Target:
public void run() { final long start = System.nanoTime(); final Map<String, String> tags = MetricsUtils.newSuccessTagsMap(); try { this.jobSubmitterService.submitJob( this.jobRequest, this.cluster, this.command, this.applications, this.memory ); } catch (final GenieException e) { log.error("Unable to submit job due to exception: {}", e.getMessage(), e); MetricsUtils.addFailureTagsWithException(tags, e); } catch (Throwable t) { MetricsUtils.addFailureTagsWithException(tags, t); throw t; } finally { final long finish = System.nanoTime(); this.registry.timer( submitTimerId.withTags(tags) ).record(finish - start, TimeUnit.NANOSECONDS); } }
Source:
<code>public void serverAboutToStart(GameAboutToStartServerEvent event) { if (this.platform != null) { <START> logger.warning("FMLServerStartingEvent occurred when FMLServerStoppingEvent hasn't"); <END> WorldEdit.getInstance().getPlatformManager().unregister(platform); } this.platform = new SpongePlatform(this); this.provider = new SpongePermissionsProvider(); WorldEdit.getInstance().getPlatformManager().register(platform); }</code><technical_language>Typo</technical_language>

Target:
public void serverAboutToStart(GameAboutToStartServerEvent event) { if (this.platform != null) { logger.warn("GameAboutToStartServerEvent occurred when GameStoppingServerEvent hasn't"); WorldEdit.getInstance().getPlatformManager().unregister(platform); } this.platform = new SpongePlatform(this); this.provider = new SpongePermissionsProvider(); WorldEdit.getInstance().getPlatformManager().register(platform); }
Source:
<code>private long grabLocksAndRun(SweepLocks locks) throws InterruptedException { boolean sweptSuccessfully = false; try { locks.lockOrRefresh(); if (locks.haveLocks()) { sweptSuccessfully = runOnce(); } else { log.debug("Skipping sweep because sweep is running elsewhere."); } } catch (InsufficientConsistencyException e) { log.warn("Could not sweep because not all nodes of the database are online.", e); } catch (RuntimeException e) { specificTableSweeper.getSweepMetrics().sweepError(); if (checkAndRepairTableDrop()) { log.info("The table being swept by the background sweeper was dropped, moving on..."); } else { SweepBatchConfig lastBatchConfig = getAdjustedBatchConfig(); <START> log.warn("The background sweep job failed unexpectedly with batch config {}." <END> + " Attempting to continue with a lower batch size...", SafeArg.of("candidateBatchSize", lastBatchConfig.candidateBatchSize()), SafeArg.of("deleteBatchSize", lastBatchConfig.deleteBatchSize()), SafeArg.of("maxCellTsPairsToExamine", lastBatchConfig.maxCellTsPairsToExamine()), e); batchSizeMultiplier = Math.max(batchSizeMultiplier / 2, 1.5 / lastBatchConfig.candidateBatchSize()); } } if (sweptSuccessfully) { batchSizeMultiplier = Math.min(1.0, batchSizeMultiplier * 1.01); return sweepPauseMillis.get(); } else { return getBackoffTimeWhenSweepHasNotRun(); } }</code><technical_language>this line number of need equivalent change</technical_language>

Target:
private long grabLocksAndRun(SweepLocks locks) throws InterruptedException { boolean sweptSuccessfully = false; try { locks.lockOrRefresh(); if (locks.haveLocks()) { sweptSuccessfully = runOnce(); } else { log.debug("Skipping sweep because sweep is running elsewhere."); } } catch (InsufficientConsistencyException e) { log.warn("Could not sweep because not all nodes of the database are online.", e); } catch (RuntimeException e) { specificTableSweeper.getSweepMetrics().sweepError(); if (checkAndRepairTableDrop()) { log.info("The table being swept by the background sweeper was dropped, moving on..."); } else { SweepBatchConfig lastBatchConfig = getAdjustedBatchConfig(); log.warn("The background sweep job failed unexpectedly with batch config {}." + " Attempting to continue with a lower batch size...", SafeArg.of("sweepBatchConfig", lastBatchConfig.toString()), e); batchSizeMultiplier = Math.max(batchSizeMultiplier / 2, 1.5 / lastBatchConfig.candidateBatchSize()); } } if (sweptSuccessfully) { batchSizeMultiplier = Math.min(1.0, batchSizeMultiplier * 1.01); return sweepPauseMillis.get(); } else { return getBackoffTimeWhenSweepHasNotRun(); } }
Source:
<code>private void checkAssignmentExpression(SubscriptionContext ctx) { AssignmentExpression assignmentExpression = (AssignmentExpression) ctx.syntaxNode(); <START> if (shouldReportIssue(assignmentExpression.lhsName(), assignmentExpression.lhsName())) { <END> ctx.addIssue(assignmentExpression.lhsName(), String.format(MESSAGE, VRBL_ISSUE_TYPE)); } }</code><technical_language>_minor_ I define a variable for assignmentExpression.lhsName()</technical_language>

Target:
private void checkAssignmentExpression(SubscriptionContext ctx) { AssignmentExpression assignmentExpression = (AssignmentExpression) ctx.syntaxNode(); Name lhsName = assignmentExpression.lhsName(); if (shouldReportIssue(lhsName)) { ctx.addIssue(lhsName, String.format(MESSAGE, VRBL_ISSUE_TYPE)); } }
Source:
<code>private static boolean findColumnName(String tableName, String columnName, Connection connection) throws SQLException { Statement statement = connection.createStatement(); ResultSet results = statement.executeQuery("SELECT * FROM " + tableName + " LIMIT 0"); ResultSetMetaData metadata = results.getMetaData(); int columnCount = metadata.getColumnCount(); <START> for (int i = 1; i <= columnCount; i++) { <END> if (columnName.equalsIgnoreCase(metadata.getColumnName(i))) { return true; } } return false; }</code><technical_language>i = 0; i < columnCount</technical_language>

Target:
private static boolean findColumnName(String tableName, String columnName, Connection connection) throws SQLException { Statement statement = connection.createStatement(); ResultSet results = statement.executeQuery("SELECT * FROM " + tableName + " LIMIT 0"); ResultSetMetaData metadata = results.getMetaData(); int columnCount = metadata.getColumnCount(); for (int i = 0; i < columnCount; i++) { if (columnName.equalsIgnoreCase(metadata.getColumnName(i + 1))) { return true; } } return false; }
Source:
<code>private DefaultInputFile inputFile(String relativePath) { DefaultInputFile inputFile = new DefaultInputFile("moduleKey", relativePath) .setModuleBaseDir(baseDir.toPath()) .setType(Type.MAIN) .setLanguage(JavaScriptLanguage.KEY); context.fileSystem().add(inputFile); <START> return inputFile.initMetadata(new FileMetadata().readMetadata(inputFile.file(), Charset.defaultCharset())); <END> }</code><technical_language>@vilchik-elena Charset.defaultCharset() replaced a charset</technical_language>

Target:
private DefaultInputFile inputFile(String relativePath) { DefaultInputFile inputFile = new DefaultInputFile("moduleKey", relativePath) .setModuleBaseDir(baseDir.toPath()) .setType(Type.MAIN) .setLanguage(JavaScriptLanguage.KEY); context.fileSystem().add(inputFile); return inputFile.initMetadata(new FileMetadata().readMetadata(inputFile.file(), Charsets.UTF_8)); }
Source:
<code>public VisualEditorReviewChangesDialog clickReviewYourChanges() { waitForElementVisibleByElement(reviewChangesButton); <START> waitForElementClickableByElement(reviewChangesButton); <END> reviewChangesButton.click(); PageObjectLogging.log("clickReviewYourChanges", "Review Your Changes Button is clicked", true); return new VisualEditorReviewChangesDialog(driver); }</code><technical_language>double wait</technical_language>

Target:
public VisualEditorReviewChangesDialog clickReviewYourChanges() { waitForElementVisibleByElement(reviewChangesButton); waitForElementClickableByElement(reviewChangesButton); reviewChangesButton.click(); return new VisualEditorReviewChangesDialog(driver); }