auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void handleChildChange(String parentPath, List<String> currentChilds) { if (logger.isDebugEnabled()) { logger.debug("Data change callback: child changed, path: , current child count: {}", parentPath, currentChilds == null ? 0 : currentChilds.size()); } try { updateNotificationTime(System.nanoTime()); if (parentPath != null && parentPath.startsWith(_path)) { if (currentChilds == null && parentPath.equals(_path)) { _manager.removeListener(_propertyKey, _listener); } else { NotificationContext changeContext = new NotificationContext(_manager); changeContext.setType(NotificationContext.Type.CALLBACK); changeContext.setPathChanged(parentPath); changeContext.setChangeType(_changeType); if (!isReady()) { return; } subscribeForChanges(changeContext.getType(), _path, _watchChild); enqueueTask(changeContext); } } } catch (Exception e) { String msg = "exception in handling child-change. instance: " + _manager.getInstanceName() + ", parentPath: " + parentPath + ", listener: " + _listener; ZKExceptionHandler.getInstance().handle(msg, e); } }

Target:
public void handleChildChange(String parentPath, List<String> currentChilds) { if (logger.isDebugEnabled()) { logger.debug("Data change callback: child changed, path: , current child count: {}", parentPath, currentChilds == null ? 0 : currentChilds.size()); } try { updateNotificationTime(System.nanoTime()); if (parentPath != null && parentPath.startsWith(_path)) { if (currentChilds == null && parentPath.equals(_path)) { _manager.removeListener(_propertyKey, _listener); } else { if (!isReady()) { logger.info("Callbackhandler with path is in reset state. Stop subscription to ZK client to avoid leaking", this, parentPath); return; } NotificationContext changeContext = new NotificationContext(_manager); changeContext.setType(NotificationContext.Type.CALLBACK); changeContext.setPathChanged(parentPath); changeContext.setChangeType(_changeType); subscribeForChanges(changeContext.getType(), _path, _watchChild); enqueueTask(changeContext); } } } catch (Exception e) { String msg = "exception in handling child-change. instance: " + _manager.getInstanceName() + ", parentPath: " + parentPath + ", listener: " + _listener; ZKExceptionHandler.getInstance().handle(msg, e); } }
Source:
private void getNotModifiedBlobAndVerify(String blobId) throws Exception { HttpHeaders headers = new DefaultHttpHeaders(); SimpleDateFormat dateFormat = new SimpleDateFormat(RestUtils.HTTP_DATE_FORMAT, Locale.US); Date date = new Date(System.currentTimeMillis()); String dateStr = dateFormat.format(date); headers.add(RestUtils.Headers.IF_MODIFIED_SINCE, dateStr); FullHttpRequest httpRequest = buildRequest(HttpMethod.GET, blobId, headers, null); Queue<HttpObject> responseParts = nettyClient.sendRequest(httpRequest, null, null).get(); HttpResponse response = (HttpResponse) responseParts.poll(); assertEquals("Unexpected response status", HttpResponseStatus.NOT_MODIFIED, response.getStatus()); assertTrue("No Date header", response.headers().get(RestUtils.Headers.DATE) != null); assertNull("No Last-Modified header expected", response.headers().get("Last-Modified")); assertNull(RestUtils.Headers.BLOB_SIZE + " should have been null ", response.headers().get(RestUtils.Headers.BLOB_SIZE)); assertNull("Content-Type should have been null", response.headers().get(RestUtils.Headers.CONTENT_TYPE)); assertNoContent(responseParts); }

Target:
private void getNotModifiedBlobAndVerify(String blobId) throws Exception { HttpHeaders headers = new DefaultHttpHeaders(); headers.add(RestUtils.Headers.IF_MODIFIED_SINCE, new Date()); FullHttpRequest httpRequest = buildRequest(HttpMethod.GET, blobId, headers, null); Queue<HttpObject> responseParts = nettyClient.sendRequest(httpRequest, null, null).get(); HttpResponse response = (HttpResponse) responseParts.poll(); assertEquals("Unexpected response status", HttpResponseStatus.NOT_MODIFIED, response.getStatus()); assertTrue("No Date header", response.headers().get(RestUtils.Headers.DATE) != null); assertNull("No Last-Modified header expected", response.headers().get("Last-Modified")); assertNull(RestUtils.Headers.BLOB_SIZE + " should have been null ", response.headers().get(RestUtils.Headers.BLOB_SIZE)); assertNull("Content-Type should have been null", response.headers().get(RestUtils.Headers.CONTENT_TYPE)); assertNoContent(responseParts); }
Source:
public void shouldApiResponseRepresentationReturnApiResponseWithValidNameAndJsonFormat() throws Exception { ApiResponse apiResponse = usernamePasswordAuthenticationCredentials.getApiResponseRepresentation(); JSON jsonRepresentation = apiResponse.toJSON(); assertThat(apiResponse, notNullValue()); assertThat(apiResponse.getName(), equalToIgnoringCase("credentials")); assertThat(jsonRepresentation.toString(), containsString("myUsername")); assertThat(jsonRepresentation.toString(), containsString("myPassword")); assertThat(jsonRepresentation.toString(), containsString("type")); }

Target:
public void shouldApiResponseRepresentationReturnApiResponseWithValidNameAndJsonFormat() { ApiResponse apiResponse = usernamePasswordAuthenticationCredentials.getApiResponseRepresentation(); JSON jsonRepresentation = apiResponse.toJSON(); assertThat(apiResponse, notNullValue()); assertThat(apiResponse.getName(), equalToIgnoringCase("credentials")); assertThat(jsonRepresentation.toString(), allOf( containsString("username"), containsString(username), containsString("password"), containsString(password), containsString("type"), containsString("UsernamePasswordAuthenticationCredentials"))); }
Source:
private void updateSync(SyncState sync, SyncState.Status status, int progress, SyncUpdateCallback callback) { try { sync.setStatus(status); if (progress != UNCHANGED) { sync.setProgress(progress); } switch (status) { case NEW: break; case RUNNING: runningSyncIds.add(sync.getId()); break; case DONE: case FAILED: int totalSize = sync.getTotalSize(); final JSONObject attributes = new JSONObject(); try { if (totalSize > 0) { attributes.put("numRecords", totalSize); } attributes.put("syncId", sync.getId()); attributes.put("syncTarget", sync.getTarget().getClass().getName()); if (sync.getEndTime() > 0 && sync.getStartTime() > 0) { attributes.put("runTime", sync.getEndTime() - sync.getStartTime()); } } catch (JSONException e) { SmartSyncLogger.e(TAG, "Exception thrown while building attributes", e); } EventBuilderHelper.createAndStoreEvent(sync.getType().name(), null, TAG, attributes); runningSyncIds.remove(sync.getId()); break; } sync.save(smartStore); } catch (JSONException e) { SmartSyncLogger.e(TAG, "Unexpected JSON error for sync: " + sync.getId(), e); } catch (SmartStoreException e) { SmartSyncLogger.e(TAG, "Unexpected smart store error for sync: " + sync.getId(), e); } finally { callback.onUpdate(sync); } }

Target:
private void updateSync(SyncState sync, SyncState.Status status, int progress, SyncUpdateCallback callback) { try { sync.setStatus(status); if (progress != UNCHANGED) { sync.setProgress(progress); } switch (status) { case NEW: break; case RUNNING: runningSyncIds.add(sync.getId()); break; case DONE: case FAILED: int totalSize = sync.getTotalSize(); final JSONObject attributes = new JSONObject(); try { if (totalSize > 0) { attributes.put("numRecords", totalSize); } attributes.put("syncId", sync.getId()); attributes.put("syncTarget", sync.getTarget().getClass().getName()); attributes.put(EventBuilderHelper.START_TIME, sync.getStartTime()); attributes.put(EventBuilderHelper.END_TIME, sync.getEndTime()); } catch (JSONException e) { SmartSyncLogger.e(TAG, "Exception thrown while building attributes", e); } EventBuilderHelper.createAndStoreEvent(sync.getType().name(), null, TAG, attributes); runningSyncIds.remove(sync.getId()); break; } sync.save(smartStore); } catch (JSONException e) { SmartSyncLogger.e(TAG, "Unexpected JSON error for sync: " + sync.getId(), e); } catch (SmartStoreException e) { SmartSyncLogger.e(TAG, "Unexpected smart store error for sync: " + sync.getId(), e); } finally { callback.onUpdate(sync); } }
Source:
private void rebuildRules() { final InputStream inputStream; try { inputStream = newClassPathResource("drools/TaupageBuildRuleTemplate.drt") .getInputStream(); } catch (final IOException ex) { throw new ApplicationContextException("Couldn't find the rules template resource!", ex); } final List<RuleEntity> ruleEntities = ruleEntityRepository.findAll(); final RuleDataProvider ruleDataProvider = new RuleDataProvider(ruleEntities); final String droolsFile = new DataProviderCompiler().compile(ruleDataProvider, inputStream); LOG.info("Processed drools file: "); LOG.info(droolsFile); final KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); kieFileSystem.write("src/main/resources/drools/TestRule.drl", droolsFile); kieServices.newKieBuilder(kieFileSystem).buildAll(); }

Target:
private void rebuildRules() { final InputStream inputStream; try { inputStream = newClassPathResource("drools/TaupageBuildRuleTemplate.drt") .getInputStream(); } catch (final IOException ex) { throw new ApplicationContextException("Couldn't find the rules template resource!", ex); } final List<RuleEntity> ruleEntities = ruleEntityRepository.findAll(); final RuleDataProvider ruleDataProvider = new RuleDataProvider(ruleEntities); final String droolsFile = new DataProviderCompiler().compile(ruleDataProvider, inputStream); final KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); kieFileSystem.write("src/main/resources/drools/TaupageBuildRuleTemplate.drl", droolsFile); kieServices.newKieBuilder(kieFileSystem).buildAll(); }
Source:
public List<EncounterTransaction.DrugOrder> getDrugOrders(Encounter encounter) { final OrderType drugOrderType = orderService.getOrderTypeByName(EmrApiConstants.DRUG_ORDER_TYPE); final List<Order> drugOrders = orderService.getOrders(encounter.getPatient(), null, drugOrderType, false); List<EncounterTransaction.DrugOrder> orders = new ArrayList<EncounterTransaction.DrugOrder>(); for (Order drugOrder : drugOrders) { orders.add(drugOrderMapper.map((DrugOrder) drugOrder)); } return orders; }

Target:
public List<EncounterTransaction.DrugOrder> getDrugOrders(Encounter encounter) { OrderType drugOrderType = orderService.getOrderTypeByName(EmrApiConstants.DRUG_ORDER_TYPE); List<EncounterTransaction.DrugOrder> orders = new ArrayList<EncounterTransaction.DrugOrder>(); for (Order order : encounter.getOrders()) { if (drugOrderType.equals(order.getOrderType())) { orders.add(drugOrderMapper.map((DrugOrder) order)); } } return orders; }
Source:
private void addNotification(EmailActionsData data, final AbstractWorkflowArtifact awa, OseeNotificationManager oseeNotificationManager) throws OseeCoreException { Collection<User> recipients = getRecipients(data.getEmailRecipient(), awa); Collection<User> activeEmailUsers = EmailUtil.getActiveEmailUsers(recipients); if (recipients.isEmpty()) { logf("No active " + data.getEmailRecipient() + " for workflow [%s].", awa.toStringWithId()); return; } List<String> emailAddresses = new ArrayList<String>(); for (User basicUser : activeEmailUsers) { if (EmailUtil.isEmailValid(basicUser.getEmail())) { emailAddresses.add(basicUser.getEmail()); } } if (emailAddresses.isEmpty()) { logf("No valid emails for workflow [%s].", awa.toStringWithId()); return; } if (!EmailUtil.isEmailValid(AtsClientService.get().getUserAdmin().getCurrentOseeUser())) { logf("Can't email from user account [%s] cause email not valid.", AtsClientService.get().getUserAdmin().getCurrentUser()); return; } oseeNotificationManager.addNotificationEvent(new OseeNotificationEvent(recipients, getIdString(awa), data.getEmailRecipient().name(), String.format( "You are the " + data.getEmailRecipient().name() + " of [%s] in state [%s] titled [%s] created on [%s]", awa.getArtifactTypeName(), awa.getStateMgr().getCurrentStateName(), awa.getName(), DateUtil.get(awa.getCreatedDate(), DateUtil.MMDDYYHHMM)))); }

Target:
private void addNotification(EmailActionsData data, final AbstractWorkflowArtifact awa, OseeNotificationManager oseeNotificationManager) throws OseeCoreException { Collection<User> recipients = getRecipients(data.getEmailRecipient(), awa); Collection<User> activeEmailUsers = EmailUtil.getActiveEmailUsers(recipients); if (recipients.isEmpty()) { logf("No active " + data.getEmailRecipient() + " for workflow [%s].", awa.toStringWithId()); return; } List<String> emailAddresses = new ArrayList<String>(); for (User basicUser : activeEmailUsers) { if (EmailUtil.isEmailValid(basicUser.getEmail())) { emailAddresses.add(basicUser.getEmail()); } } if (emailAddresses.isEmpty()) { logf("No valid emails for workflow [%s].", awa.toStringWithId()); return; } if (!EmailUtil.isEmailValid(AtsClientService.get().getUserAdmin().getCurrentOseeUser())) { logf("Can't email from user account [%s] cause email not valid.", AtsClientService.get().getUserAdmin().getCurrentUser()); return; } oseeNotificationManager.addNotificationEvent(new OseeNotificationEvent(recipients, getIdString(awa), data.getEmailRecipient().name(), String.format( "You are the %s of [%s] in state [%s] titled [%s] created on [%s]", data.getEmailRecipient().name(), awa.getArtifactTypeName(), awa.getStateMgr().getCurrentStateName(), awa.getName(), DateUtil.get(awa.getCreatedDate(), DateUtil.MMDDYYHHMM)))); }
Source:
public void testFindWorkingVersionContentlet() throws Exception{ Structure testStructure = APILocator.getStructureAPI().findByVarName("webPageContent", user); Contentlet cont=new Contentlet(); cont.setStructureInode(testStructure.getInode()); cont.setStringProperty("title", "Testing Working"); cont.setStringProperty("body", "TESTING"); cont.setStringProperty("contentHost", host.getIdentifier()); cont.setReviewInterval( "1m" ); cont.setStructureInode( testStructure.getInode() ); cont.setHost( host.getIdentifier() ); cont = APILocator.getContentletAPI().checkin(cont, user, false); Versionable verAPI = APILocator.getVersionableAPI().findWorkingVersion(cont.getIdentifier(), user, false); }

Target:
public void testFindWorkingVersionContentlet() throws Exception{ Structure structure = new StructureDataGen().nextPersisted(); Contentlet contentlet = new ContentletDataGen(structure.getInode()).nextPersisted(); Versionable verAPI = APILocator.getVersionableAPI().findWorkingVersion(contentlet.getIdentifier(), user, false); }
Source:
public MethodOutcome updatePersonByName(@ResourceParam Person person, @IdParam IdDt theId, @ConditionalUrlParam String theConditional) { MethodOutcome methodOutcome = new MethodOutcome(); String name = null; if (theConditional != null) { int startIndex = theConditional.lastIndexOf('='); name = theConditional.substring(startIndex + 1); List<Person> personList = personResource.searchPersons(name, null, null); if (personList != null) { if (personList.size() == 0) { personResource.updateFHIRPerson(person, null); } else if (personList.size() == 1) { personResource.updateFHIRPerson(person, personList.get(0).getId().getIdPart()); } else { throw new PreconditionFailedException("There are more then one person for the given name"); } } } else { updatePersonConditional(person, theId); } return new MethodOutcome(); }

Target:
public MethodOutcome updatePersonByName(@ResourceParam Person person, @IdParam IdDt theId, @ConditionalUrlParam String theConditional) { MethodOutcome methodOutcome = new MethodOutcome(); String name = null; if (theConditional != null) { int startIndex = theConditional.lastIndexOf('='); name = theConditional.substring(startIndex + 1); List<Person> personList = personResource.searchPersons(name, null, null); if (personList != null) { if (personList.size() == 0) { methodOutcome = updatePersonConditional(person, null); } else if (personList.size() == 1) { IdDt id = new IdDt(); id.setValue(personList.get(0).getId().getIdPart()); methodOutcome = updatePersonConditional(person, id); } else { throw new PreconditionFailedException("There are more than one person for the given name"); } } } else { methodOutcome = updatePersonConditional(person, theId); } return methodOutcome; }
Source:
public static String generateFingerPrint(final Certificate cert) { final char[] HEX = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; final StringBuilder buffer = new StringBuilder(60); try { final MessageDigest md = MessageDigest.getInstance("SHA-1"); final byte[] data = md.digest(cert.getEncoded()); for (final byte element : data) { if (buffer.length() > 0) { buffer.append(":"); } buffer.append(HEX[(0xF0 & element) >>> 4]); buffer.append(HEX[0x0F & element]); } } catch (final CertificateEncodingException e) { throw new CloudRuntimeException("Bad certificate encoding"); } catch (final NoSuchAlgorithmException e) { throw new CloudRuntimeException("Bad certificate algorithm"); } return buffer.toString(); }

Target:
public static String generateFingerPrint(final Certificate cert) { Preconditions.checkNotNull(cert, "Certificate cannot be null"); final char[] HEX = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; final StringBuilder buffer = new StringBuilder(60); try { final MessageDigest md = MessageDigest.getInstance("SHA-256"); final byte[] data = md.digest(cert.getEncoded()); for (final byte element : data) { if (buffer.length() > 0) { buffer.append(":"); } buffer.append(HEX[(0xF0 & element) >>> 4]); buffer.append(HEX[0x0F & element]); } } catch (final CertificateEncodingException e) { throw new IllegalStateException("Bad certificate encoding"); } catch (final NoSuchAlgorithmException e) { throw new IllegalStateException("Bad certificate algorithm"); } return buffer.toString(); }
Source:
public void testTimestamp() throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { ______TS("success : created"); FeedbackQuestionAttributes fq = getNewFeedbackQuestionAttributes(); fqDb.deleteEntity(fq); fqDb.createEntity(fq); verifyPresentInDatastore(fq); String feedbackSessionName = fq.feedbackSessionName; String courseId = fq.courseId; int questionNumber = fq.questionNumber; FeedbackQuestionAttributes feedbackQuestion = fqDb.getFeedbackQuestion(feedbackSessionName, courseId, questionNumber); AssertHelper.assertInstantIsNow(feedbackQuestion.getCreatedAt()); AssertHelper.assertInstantIsNow(feedbackQuestion.getUpdatedAt()); ______TS("success : update lastUpdated"); feedbackQuestion.questionNumber++; fqDb.updateFeedbackQuestion(feedbackQuestion); FeedbackQuestionAttributes updatedFq = fqDb.getFeedbackQuestion(feedbackSessionName, courseId, feedbackQuestion.questionNumber); assertFalse(feedbackQuestion.getUpdatedAt().equals(updatedFq.getUpdatedAt())); AssertHelper.assertInstantIsNow(updatedFq.getUpdatedAt()); ______TS("success : keep lastUpdated"); feedbackQuestion.questionNumber++; fqDb.updateFeedbackQuestion(feedbackQuestion); FeedbackQuestionAttributes updatedFqTwo = fqDb.getFeedbackQuestion(feedbackSessionName, courseId, feedbackQuestion.questionNumber); assertNotEquals(updatedFq.getUpdatedAt(), updatedFqTwo.getUpdatedAt()); }

Target:
public void testTimestamp() throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { ______TS("success : created"); FeedbackQuestionAttributes fq = getNewFeedbackQuestionAttributes(); fqDb.deleteEntity(fq); fqDb.createEntity(fq); verifyPresentInDatastore(fq); String feedbackSessionName = fq.feedbackSessionName; String courseId = fq.courseId; int questionNumber = fq.questionNumber; FeedbackQuestionAttributes feedbackQuestion = fqDb.getFeedbackQuestion(feedbackSessionName, courseId, questionNumber); AssertHelper.assertInstantIsNow(feedbackQuestion.getCreatedAt()); AssertHelper.assertInstantIsNow(feedbackQuestion.getUpdatedAt()); ______TS("success : update lastUpdated"); feedbackQuestion.questionNumber++; fqDb.updateFeedbackQuestion(feedbackQuestion); FeedbackQuestionAttributes updatedFq = fqDb.getFeedbackQuestion(feedbackSessionName, courseId, feedbackQuestion.questionNumber); assertFalse(feedbackQuestion.getUpdatedAt().equals(updatedFq.getUpdatedAt())); AssertHelper.assertInstantIsNow(updatedFq.getUpdatedAt()); }
Source:
void writeLogsOnLocalAndRemote(List<StateLogComponents> servers, int startingLogSeq, int latestLogSequence) { servers.stream().forEach(server -> writeLogsOnServer(server, startingLogSeq, latestLogSequence)); }

Target:
static void writeLogsOnLocalAndRemote(List<StateLogComponents> servers, int startingLogSeq, int latestLogSequence) { servers.forEach(server -> writeLogsOnServer(server, startingLogSeq, latestLogSequence)); }
Source:
public Environment env() { Environment environment = new Environment( Collections.<String, List<Dispatcher>>singletonMap("foo", Collections.<Dispatcher>singletonList(new ThreadPoolExecutorDispatcher(100, 1))), new PropertiesConfigurationReader()); return environment; }

Target:
public Environment env() { return new Environment(); }
Source:
public void getStrategyQueriesKvsOnlyOnceForEachTable() { for (int i = 0; i < 5; i++) { partitioner.getStrategy(getWriteInfoWithFixedCellHash(NOTHING, i)); partitioner.getStrategy(getWriteInfoWithFixedCellHash(CONSERVATIVE, i)); } verify(mockKvs, times(1)).getMetadataForTable(NOTHING); verify(mockKvs, times(1)).getMetadataForTable(CONSERVATIVE); verify(mockKvs, times(2)).getMetadataForTable(any()); }

Target:
public void getStrategyQueriesKvsOnlyOnceForEachTable() { for (int i = 0; i < 5; i++) { partitioner.getStrategy(getWriteInfoWithFixedCellHash(NOTHING, i)); partitioner.getStrategy(getWriteInfoWithFixedCellHash(CONSERVATIVE, i)); } verify(mockKvs, times(1)).getMetadataForTable(NOTHING); verify(mockKvs, times(1)).getMetadataForTable(CONSERVATIVE); verifyNoMoreInteractions(mockKvs); }
Source:
public void onClick(View v) { if (context != null) { Intent intent = new Intent(context, SystemStatusResultsActivity.class); intent.putExtra(Constants.ROUTE_NAME, routeName); intent.putExtra(Constants.ROUTE_ID, routeId); intent.putExtra(Constants.TRANSIT_TYPE, transitType); intent.putExtra(statusType, Boolean.TRUE); if (NextToArriveResultsActivity.class.equals(context.getClass())) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_NTA, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else if (TransitViewResultsActivity.class.equals(context.getClass())) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_TRANSITVIEW, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else if (MainActivity.class.equals(context.getClass())) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_FAVORITES, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else { Log.e(TAG, String.format("Could not track event analytics for target class: %s", context.getClass())); } context.startActivity(intent); } }

Target:
public void onClick(View v) { if (context != null) { Intent intent = new Intent(context, SystemStatusResultsActivity.class); intent.putExtra(Constants.ROUTE_NAME, routeName); intent.putExtra(Constants.ROUTE_ID, routeId); intent.putExtra(Constants.TRANSIT_TYPE, transitType); intent.putExtra(statusType, Boolean.TRUE); if (ActivityClass.NEXT_TO_ARRIVE.equals(origin)) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_NTA, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else if (ActivityClass.TRANSITVIEW.equals(origin)) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_TRANSITVIEW, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else if (ActivityClass.MAIN.equals(origin)) { AnalyticsManager.logContentViewEvent(TAG, AnalyticsManager.CONTENT_VIEW_EVENT_SYSTEM_STATUS_FROM_FAVORITES, AnalyticsManager.CONTENT_ID_SYSTEM_STATUS, null); } else { Log.e(TAG, String.format("Could not track event analytics for target class: %s", origin)); } context.startActivity(intent); } }
Source:
public void selectCategory(int categoryId) { wait.forElementVisible(wikiCategoryDropdown); wikiCategoryDropdown.click(); WebElement selectedCategory = wikiCategoryList.findElement(By.id(String.valueOf(categoryId))); wait.forElementClickable(selectedCategory); String selectedCategoryText = selectedCategory.getText(); selectedCategory.click(); PageObjectLogging.log("selectCategory", "selected " + selectedCategoryText + " category", true, driver); }

Target:
public void selectCategory(int categoryId) { wait.forElementClickable(wikiCategoryDropdown); wikiCategoryDropdown.click(); WebElement selectedCategory = wikiCategoryList.findElement(By.id(String.valueOf(categoryId))); wait.forElementClickable(selectedCategory); String selectedCategoryText = selectedCategory.getText(); selectedCategory.click(); PageObjectLogging.log("selectCategory", "selected " + selectedCategoryText + " category", true, driver); }
Source:
public static void applyHyperlinkDetectorStyleRanges( ITextViewer textViewer, IHyperlinkDetector[] hyperlinkDetectors) { StyleRange[] styleRanges = getHyperlinkDetectorStyleRanges(textViewer, hyperlinkDetectors); StyledText styledText = textViewer.getTextWidget(); for (StyleRange styleRange : styleRanges) { styledText.setStyleRange(styleRange); } }

Target:
public static void applyHyperlinkDetectorStyleRanges( ITextViewer textViewer, IHyperlinkDetector[] hyperlinkDetectors) { StyleRange[] styleRanges = getHyperlinkDetectorStyleRanges(textViewer, hyperlinkDetectors); StyledText styledText = textViewer.getTextWidget(); for (StyleRange styleRange : styleRanges) styledText.setStyleRange(styleRange); }
Source:
private void parseEventList(final EList<Event> eventList, final String eventListName, boolean isInput) throws TypeImportException, XMLStreamException { final String eventName = getEventElement(); processChildren(eventListName, name -> { if (name.equals(eventName)) { Event e = parseEvent(eventName); e.setIsInput(isInput); if (isInput) { inputEvents.put(e.getName(), e); } else { outputEvents.put(e.getName(), e); } eventList.add(e); return true; } return false; }); }

Target:
private void parseEventList(final EList<Event> eventList, final String eventListName, boolean isInput) throws TypeImportException, XMLStreamException { final String eventName = getEventElement(); processChildren(eventListName, name -> { if (eventName.equals(name)) { Event e = parseEvent(eventName); e.setIsInput(isInput); if (isInput) { inputEvents.put(e.getName(), e); } else { outputEvents.put(e.getName(), e); } eventList.add(e); return true; } return false; }); }
Source:
public static Document getDocument(File file) throws IOException, ParseException { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); String path; try { path = env.getPathRelativeToSourceRoot(file); } catch (ForbiddenSymlinkException e) { LOGGER.log(Level.FINER, e.getMessage()); return null; } path = path.replace("\\", "/"); IndexReader ireader = getIndexReader(path); if (ireader == null) { return null; } Document doc; try { Query q = new QueryBuilder().setPath(path).build(); IndexSearcher searcher = new IndexSearcher(ireader); TopDocs top = searcher.search(q, 1); if (top.totalHits.value == 0) { return null; } doc = searcher.doc(top.scoreDocs[0].doc); String foundPath = doc.get(QueryBuilder.PATH); if (!path.equals(foundPath)) { return null; } } finally { ireader.close(); } return doc; }

Target:
public static Document getDocument(File file) throws IOException, ParseException { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); String path; try { path = env.getPathRelativeToSourceRoot(file); } catch (ForbiddenSymlinkException e) { LOGGER.log(Level.FINER, e.getMessage()); return null; } path = path.replace("\\", "/"); IndexReader ireader = getIndexReader(path); if (ireader == null) { return null; } try { Document doc; Query q = new QueryBuilder().setPath(path).build(); IndexSearcher searcher = new IndexSearcher(ireader); TopDocs top = searcher.search(q, 1); if (top.totalHits.value == 0) { return null; } doc = searcher.doc(top.scoreDocs[0].doc); String foundPath = doc.get(QueryBuilder.PATH); if (!path.equals(foundPath)) { return null; } return doc; } finally { ireader.close(); } }
Source:
private void notifyAboutPendingChangesIfNotInTransaction() { final Set<Changes> changesSet; if (numberOfRunningTransactions.get() == 0) { synchronized (lock) { changesSet = pendingChanges; pendingChanges = new HashSet<Changes>(5); } } else { changesSet = null; } if (changesSet != null && changesSet.size() > 0) { final Changes changesToSend; if (changesSet.size() > 1) { final Set<String> affectedTables = new HashSet<String>(); for (Changes change : changesSet) { affectedTables.addAll(change.affectedTables()); } changesToSend = Changes.newInstance(affectedTables); } else { changesToSend = changesSet.iterator().next(); } changesBus.onNext(changesToSend); } }

Target:
private void notifyAboutPendingChangesIfNotInTransaction() { final Set<Changes> changesToSend; if (numberOfRunningTransactions.get() == 0) { synchronized (lock) { changesToSend = pendingChanges; pendingChanges = new HashSet<Changes>(5); } } else { changesToSend = null; } if (changesToSend != null && changesToSend.size() > 0) { final Set<String> affectedTables = new HashSet<String>(3); for (Changes changes : changesToSend) { affectedTables.addAll(changes.affectedTables()); } changesBus.onNext(Changes.newInstance(affectedTables)); } }
Source:
public Action0 clearCompletedTasks() { return new Action0() { @Override public void call() { Event<Tasks> tasksEvent = taskRelay.getValue(); Tasks value = tasksEvent.data().or(Tasks.empty()); Tasks uncompletedTasks = Tasks.from(ImmutableList.copyOf(Iterables.transform(value.all(), markCompletedAsDeleted()))); remoteDataSource.clearCompletedTasks() .map(asSyncedTasksNow()) .onErrorReturn(markAllAsSyncError(value)) .startWith(uncompletedTasks) .flatMap(persistTasks()) .compose(asValidatedEvent(tasksEvent.updateData(uncompletedTasks))) .subscribe(taskRelay); } }; }

Target:
public Action0 clearCompletedTasks() { return new Action0() { @Override public void call() { long actionTimestamp = clock.timeInMillis(); Event<Tasks> tasksEvent = taskRelay.getValue(); Tasks tasksFromEvent = tasksEvent.data().or(Tasks.empty()); Tasks uncompletedTasks = mapFunctionToTasks(tasksFromEvent, markCompletedAsDeleted()); remoteDataSource.clearCompletedTasks() .compose(clearLocallyThenConfirmOrRevert(tasksFromEvent, uncompletedTasks, actionTimestamp)) .flatMap(persistTasks()) .compose(asValidatedEvent(tasksEvent.updateData(uncompletedTasks))) .subscribe(taskRelay); } }; }
Source:
public String getName() { return NonNullUtils.checkNotNull(fModule.name()); }

Target:
public String getName() { return checkNotNull(fModule.name()); }
Source:
public synchronized void close() { if (closed) { return; } closed = true; if (parentMemoryContext != null) { parentMemoryContext.updateBytes(-usedBytes); } long oldLocalUsedBytes = this.usedBytes; usedBytes = 0; if (notificationListener != null) { notificationListener.memoryUsageUpdated(oldLocalUsedBytes, usedBytes); } }

Target:
public synchronized void close() { if (closed) { return; } closed = true; if (parentMemoryContext != null) { parentMemoryContext.updateBytes(-usedBytes); usedBytes = 0; return; } if (reservationHandler != null) { reservationHandler.reserveMemory(-usedBytes); } usedBytes = 0; }
Source:
private void updatePlayer(PlayerWrapper entry, long oldAddress, long newAddress) { TLongSet cubesToRemove = new TLongHashSet(); TLongSet cubesToLoad = new TLongHashSet(); TLongSet columnsToRemove = new TLongHashSet(); TLongSet columnsToLoad = new TLongHashSet(); this.cubeSelector.findChanged(oldAddress, newAddress, horizontalViewDistance, cubesToRemove, cubesToLoad, columnsToRemove, columnsToLoad); columnsToLoad.forEach(address -> { this.getOrCreateColumnWatcher(address).addPlayer(entry.playerEntity); return true; }); cubesToLoad.forEach(address -> { this.getOrCreateCubeWatcher(address).addPlayer(entry.playerEntity); return true; }); cubesToRemove.forEach(address -> { PlayerCubeMapEntry cubeWatcher = this.getCubeWatcher(address); if (cubeWatcher != null) { cubeWatcher.removePlayer(entry.playerEntity); } return true; }); columnsToRemove.forEach(address -> { PlayerCubeMapColumnEntry playerCubeMapColumnEntry = this.getColumnWatcher(cubeToColumn(address)); if (playerCubeMapColumnEntry != null) { playerCubeMapColumnEntry.removePlayer(entry.playerEntity); } return true; }); }

Target:
private void updatePlayer(PlayerWrapper entry, long oldAddress, long newAddress) { TLongSet cubesToRemove = new TLongHashSet(); TLongSet cubesToLoad = new TLongHashSet(); TLongSet columnsToRemove = new TLongHashSet(); TLongSet columnsToLoad = new TLongHashSet(); this.cubeSelector.findChanged(oldAddress, newAddress, horizontalViewDistance, verticalViewDistance, cubesToRemove, cubesToLoad, columnsToRemove, columnsToLoad); columnsToLoad.forEach(address -> { this.getOrCreateColumnWatcher(address).addPlayer(entry.playerEntity); return true; }); cubesToLoad.forEach(address -> { this.getOrCreateCubeWatcher(address).addPlayer(entry.playerEntity); return true; }); cubesToRemove.forEach(address -> { PlayerCubeMapEntry cubeWatcher = this.getCubeWatcher(address); if (cubeWatcher != null) { cubeWatcher.removePlayer(entry.playerEntity); } return true; }); columnsToRemove.forEach(address -> { PlayerCubeMapColumnEntry playerCubeMapColumnEntry = this.getColumnWatcher(cubeToColumn(address)); if (playerCubeMapColumnEntry != null) { playerCubeMapColumnEntry.removePlayer(entry.playerEntity); } return true; }); }
Source:
public synchronized void removeMiniThumbDataFile() { String path = randomAccessFilePath(MINI_THUMB_DATA_FILE_VERSION); File file = new File(path); if (file.exists()) { try { file.delete(); } catch (SecurityException ex) { } } }

Target:
public synchronized void removeMiniThumbDataFile() { String path = randomAccessFilePath(MINI_THUMB_DATA_FILE_VERSION); File file = new File(path); try { file.delete(); } catch (SecurityException ex) { } }
Source:
public IndexWriters(Configuration conf) { ObjectCache objectCache = ObjectCache.get(conf); synchronized (objectCache) { this.indexWriters = (HashMap<String, IndexWriterWrapper>) objectCache .getObject(IndexWriterWrapper.class.getName()); if (this.indexWriters == null) { try { ExtensionPoint point = PluginRepository.get(conf).getExtensionPoint( IndexWriter.X_POINT_ID); if (point == null) { throw new RuntimeException(IndexWriter.X_POINT_ID + " not found."); } Extension[] extensions = point.getExtensions(); HashMap<String, Extension> extensionMap = new HashMap<>(); for (Extension extension : extensions) { LOG.info("Index writer " + extension.getClazz() + " identified."); extensionMap.putIfAbsent(extension.getClazz(), extension); } IndexWriterConfig[] indexWriterConfigs = loadWritersConfiguration(conf); HashMap<String, IndexWriterWrapper> indexWriters = new HashMap<>(); for (IndexWriterConfig indexWriterConfig : indexWriterConfigs) { final String clazz = indexWriterConfig.getClazz(); if (extensionMap.containsKey(clazz)) { IndexWriterWrapper writerWrapper = new IndexWriterWrapper(); writerWrapper.setIndexWriterConfig(indexWriterConfig); writerWrapper.setIndexWriter((IndexWriter) extensionMap.get(clazz).getExtensionInstance()); indexWriters.put(indexWriterConfig.getId(), writerWrapper); } } objectCache.setObject(IndexWriterWrapper.class.getName(), indexWriters); } catch (PluginRuntimeException e) { throw new RuntimeException(e); } this.indexWriters = (HashMap<String, IndexWriterWrapper>) objectCache .getObject(IndexWriterWrapper.class.getName()); } } }

Target:
private IndexWriters(Configuration conf) { if (this.indexWriters == null) { try { ExtensionPoint point = PluginRepository.get(conf) .getExtensionPoint(IndexWriter.X_POINT_ID); if (point == null) { throw new RuntimeException(IndexWriter.X_POINT_ID + " not found."); } Extension[] extensions = point.getExtensions(); HashMap<String, Extension> extensionMap = new HashMap<>(); for (Extension extension : extensions) { LOG.info("Index writer identified.", extension.getClazz()); extensionMap.putIfAbsent(extension.getClazz(), extension); } IndexWriterConfig[] indexWriterConfigs = loadWritersConfiguration( conf); this.indexWriters = new HashMap<>(); for (IndexWriterConfig indexWriterConfig : indexWriterConfigs) { final String clazz = indexWriterConfig.getClazz(); if (extensionMap.containsKey(clazz)) { IndexWriterWrapper writerWrapper = new IndexWriterWrapper(); writerWrapper.setIndexWriterConfig(indexWriterConfig); writerWrapper.setIndexWriter( (IndexWriter) extensionMap.get(clazz).getExtensionInstance()); indexWriters.put(indexWriterConfig.getId(), writerWrapper); } } } catch (PluginRuntimeException e) { throw new RuntimeException(e); } } }
Source:
public void onStart() { super.onStart(); PushLinkManager.INSTANCE.checkIfReceiveNotification(this, getIntent()); if (Config.FabricBranchConfig.isBranchEnabled(config.getFabricConfig())) { Branch.getInstance().initSession((referringParams, error) -> { if (error == null) { if (referringParams.optBoolean(BranchLinkManager.KEY_CLICKED_BRANCH_LINK)) { try { BranchLinkManager.INSTANCE.didReceiveLink(this, referringParams); } catch (Exception e) { logger.error(e, true); } } } else { if (NetworkUtil.isConnected(getApplicationContext())) { logger.error(new Exception("Branch not configured properly, error:\n" + error.getMessage()), true); } } }, this.getIntent().getData(), this); finish(); } }

Target:
public void onStart() { super.onStart(); PushLinkManager.INSTANCE.checkAndReactIfFCMNotificationReceived(this, getIntent().getExtras()); if (Config.FabricBranchConfig.isBranchEnabled(config.getFabricConfig())) { Branch.getInstance().initSession((referringParams, error) -> { if (error == null) { if (referringParams.optBoolean(BranchLinkManager.KEY_CLICKED_BRANCH_LINK)) { try { BranchLinkManager.INSTANCE.checkAndReactIfReceivedLink(this, referringParams); } catch (Exception e) { logger.error(e, true); } } } else { if (NetworkUtil.isConnected(getApplicationContext())) { logger.error(new Exception("Branch not configured properly, error:\n" + error.getMessage()), true); } } }, this.getIntent().getData(), this); } finish(); }
Source:
public LocalPortForwarder newLocalPortForwarder(LocalPortForwarder.Parameters parameters, ServerSocket serverSocket) { if (forwarders == null) { forwarders = new ArrayList<LocalPortForwarder>(); } LocalPortForwarder forwarder = new LocalPortForwarder(conn, parameters, serverSocket); forwarders.add(forwarder); return forwarder; }

Target:
public LocalPortForwarder newLocalPortForwarder(LocalPortForwarder.Parameters parameters, ServerSocket serverSocket) { LocalPortForwarder forwarder = new LocalPortForwarder(conn, parameters, serverSocket); forwarders.add(forwarder); return forwarder; }
Source:
public String generateModuleRewriteLog( Set<String> filesToConvert, Map<String, CollectModuleMetadata.FileModule> namespaceMap) { StringBuilder builder = new StringBuilder(); for (String s : namespaceMap.keySet()) { CollectModuleMetadata.FileModule tsModule = namespaceMap.get(s); String file = tsModule.file; String defaultRename = tsModule.exportedNamespacesToSymbols.getOrDefault("exports", ""); if (filesToConvert.contains(file)) { builder.append(gson.toJson(new LogItem(s, file, defaultRename))); builder.append("\n"); } } return builder.toString(); }

Target:
String generateModuleRewriteLog( Set<String> filesToConvert, Map<String, CollectModuleMetadata.FileModule> namespaceMap) { StringBuilder builder = new StringBuilder(); for (Map.Entry<String, CollectModuleMetadata.FileModule> entry : namespaceMap.entrySet()) { String file = entry.getValue().file; String defaultRename = entry.getValue().exportedNamespacesToSymbols.getOrDefault("exports", ""); if (filesToConvert.contains(file)) { builder.append(gson.toJson(new LogItem(entry.getKey(), file, defaultRename))); builder.append("\n"); } } return builder.toString(); }
Source:
private void restoreSnapshot() { if (getSelectedItem() == null) { return; } ConfirmationModel model = new ConfirmationModel(); setConfirmWindow(model); model.setTitle(ConstantsManager.getInstance().getMessages().confirmRestoreSnapshot(getEntity().getName())); model.setHelpTag(HelpTag.volume_restore_snapshot_confirmation); model.setHashName("volume_restore_snapshot_confirmation"); model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreMesage()); UICommand okCommand = UICommand.createDefaultOkUiCommand("onRestoreSnapshot", this); model.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("cancelConfirmation", this); model.getCommands().add(cancelCommand); }

Target:
private void restoreSnapshot() { if (getSelectedItem() == null) { return; } ConfirmationModel model = new ConfirmationModel(); setConfirmWindow(model); model.setTitle(ConstantsManager.getInstance().getMessages().confirmRestoreSnapshot(getEntity().getName())); model.setHelpTag(HelpTag.volume_restore_snapshot_confirmation); model.setHashName("volume_restore_snapshot_confirmation"); model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreWithStopMessage()); UICommand okCommand = UICommand.createDefaultOkUiCommand("onRestoreSnapshot", this); model.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("cancelConfirmation", this); model.getCommands().add(cancelCommand); }
Source:
public void execute() throws Exception { if (!initialized) maybeSetupPaths(); Path structuredPathTmp = structuredPath.resolveSibling(structuredPath.getFileName() + ".tmp"); File output = structuredPathTmp.toFile(); output.createNewFile(); Files.setPosixFilePermissions(structuredPathTmp, PosixFilePermissions.fromString("rw-------")); Map<String, Object> structuredConfiguration = config.getStructuredConfiguration("all"); ObjectMapper mapper = new ObjectMapper(); ObjectWriter structuredPathTmpWriter = mapper.writer(new MinimalPrettyPrinter()); structuredPathTmpWriter.writeValue(output, structuredConfiguration); if (!structuredPathTmp.toFile().renameTo(structuredPath.toFile())) logger.warn("Failed to persist structured Priam configuration"); }

Target:
public void execute() throws Exception { ensurePaths(); Path tempPath = null; try { File output = File.createTempFile(structuredPath.getFileName().toString(), ".tmp", mergedConfigDirectory.toFile()); tempPath = output.toPath(); Files.setPosixFilePermissions(tempPath, PosixFilePermissions.fromString("rw-------")); Map<String, Object> structuredConfiguration = config.getStructuredConfiguration("all"); ObjectMapper mapper = new ObjectMapper(); ObjectWriter structuredPathTmpWriter = mapper.writer(new MinimalPrettyPrinter()); structuredPathTmpWriter.writeValue(output, structuredConfiguration); if (!output.renameTo(structuredPath.toFile())) logger.error("Failed to persist structured Priam configuration"); } finally { if (tempPath != null) Files.deleteIfExists(tempPath); } }
Source:
public void onProjectRestoreFromDisk() { if (hasErrors(myProject)) { addOpenSdkManagerLink(); return; } findAndShowVariantConflicts(); addOpenSdkManagerLink(); TemplateManager.getInstance().refreshDynamicTemplateMenu(myProject); }

Target:
public void onProjectRestoreFromDisk() { if (hasErrors(myProject)) { addSdkLinkIfNecessary(); return; } findAndShowVariantConflicts(); addSdkLinkIfNecessary(); TemplateManager.getInstance().refreshDynamicTemplateMenu(myProject); }
Source:
public <E extends Throwable> E expectError(Class<E> expected, long timeoutMillis) throws Exception { return expectError(expected, timeoutMillis, "Expected onError(" + expected.getName() + ")"); }

Target:
public <E extends Throwable> E expectError(Class<E> expected, long timeoutMillis) throws Exception { return expectError(expected, timeoutMillis, String.format("Expected onError(%s)", expected.getName())); }
Source:
public void triggered(Trigger trigger, Map<String, ?> outputs) { if (executor != null) { synchronized (executor) { feature = executor.submit(new TriggerData(trigger, outputs)); } } }

Target:
public void triggered(Trigger trigger, Map<String, ?> outputs) { if (executor != null) { synchronized (executor) { if (executor != null) { feature = executor.submit(new TriggerData(trigger, outputs)); } } } }
Source:
protected static void startCollectStatistics() throws Exception { List<Ignite> grids = G.allGrids(); assertFalse(grids.isEmpty()); IgniteEx ignite = (IgniteEx)grids.get(0); ignite.context().performanceStatistics().startCollectStatistics(); waitForStatisticsEnabled(true); }

Target:
protected static void startCollectStatistics() throws Exception { List<Ignite> grids = G.allGrids(); assertFalse(grids.isEmpty()); statisticsMBean(grids.get(0).name()).start(); waitForStatisticsEnabled(true); }
Source:
public void run() { while (deletedCount.get() < putCount) { try { final String blobIdStr = deleteBlobIds.poll(50, TimeUnit.MILLISECONDS); if (blobIdStr != null) { deletedCount.incrementAndGet(); logger.trace("Deleting blob " + blobIdStr); FutureResult futureResult = new FutureResult(); Callback<Void> callback = new Callback<Void>() { @Override public void onCompletion(Void result, Exception exception) { logger.trace("Deletion completed for " + blobIdStr); countDownLatch.countDown(); if (exception != null) { logger.error("Deletion of " + blobIdStr + " failed with " + exception.getStackTrace()); } } }; deleteConsumerJob.deleteBlobAndValidate(blobIdStr, deleteConsumerJob.getErrorCodeForNoError(), futureResult, callback); } } catch (InterruptedException e) { logger.error(" Interrupted Exception thrown in , exception " + e.getStackTrace()); } } try { countDownLatch.await(); } catch (InterruptedException e) { logger.error( " Interrupted Exception thrown while waiting for deletion to complete , exception " + e.getStackTrace()); } }

Target:
public void run() { while (deletedCount.get() < putCount) { try { final String blobIdStr = deleteBlobIds.poll(50, TimeUnit.MILLISECONDS); if (blobIdStr != null) { deletedCount.incrementAndGet(); logger.trace("Deleting blob " + blobIdStr); Callback<Void> callback = new Callback<Void>() { @Override public void onCompletion(Void result, Exception exception) { logger.trace("Deletion completed for " + blobIdStr); countDownLatch.countDown(); if (exception != null) { logger.error("Deletion of " + blobIdStr + " failed with ", exception); } } }; deleteHelper.deleteBlobAndValidate(blobIdStr, deleteHelper.getErrorCodeForNoError(), callback); } } catch (InterruptedException e) { logger.error(" Interrupted Exception thrown in , exception ", e); } } try { countDownLatch.await(); } catch (InterruptedException e) { logger.error( " Interrupted Exception thrown while waiting for deletion to complete , exception ", e); } }
Source:
public ImmutableEntityType(Class<? extends Entity> clazz) { super(clazz, null); }

Target:
public ImmutableEntityType(Class<? extends Entity> clazz) { super(clazz); }
Source:
private void testStudentResultsPage() throws Exception { ______TS("test rubric question simple student results page"); StudentFeedbackResultsPage simpleResultsPage = loginToStudentFeedbackResultsPage("alice.tmms@FRubricQnUiT.CS2104", "openSession2"); simpleResultsPage.verifyHtmlMainContent("/studentFeedbackResultsPageRubric.html"); ______TS("test rubric question: Check functionality of 'Excluding Self` option"); assertTrue(simpleResultsPage.checkIfExcludingSelfTableHidden()); assertTrue(simpleResultsPage.isExcludingSelfOptionVisible()); simpleResultsPage.clickExcludingSelfCheckbox(); assertTrue(simpleResultsPage.checkIfExcludingSelfTableShown()); ______TS("test rubric question extended student results page"); StudentFeedbackResultsPage extendedResultsPage = loginToStudentFeedbackResultsPage("alice.tmms@FRubricQnUiT.CS2104", "openSession4"); extendedResultsPage.verifyHtmlMainContent("/studentExtendedFeedbackResultsPageRubric.html"); }

Target:
private void testStudentResultsPage() throws Exception { ______TS("test rubric question simple student results page"); StudentFeedbackResultsPage simpleResultsPage = loginToStudentFeedbackResultsPage("alice.tmms@FRubricQnUiT.CS2104", "openSession2"); simpleResultsPage.verifyHtmlMainContent("/studentFeedbackResultsPageRubric.html"); ______TS("test rubric question extended student results page"); StudentFeedbackResultsPage extendedResultsPage = loginToStudentFeedbackResultsPage("alice.tmms@FRubricQnUiT.CS2104", "openSession4"); extendedResultsPage.verifyHtmlMainContent("/studentExtendedFeedbackResultsPageRubric.html"); }