auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String getPdxDiskStoreName() { <START> Assert.state(!StringUtils.isEmpty(pdxDiskStoreName), "The PDX Disk Store name was not properly initialized!"); <END> return pdxDiskStoreName; }</code><technical_language>Assert required if field is final</technical_language>

Target:
public String getPdxDiskStoreName() { return pdxDiskStoreName; }
Source:
<code>private ObjectId getFirstParent(final ObjectId id, GitClient git) throws GitException, IOException, InterruptedException { return git.withRepository(new RepositoryCallback<ObjectId>() { @Override public ObjectId invoke(Repository repository, VirtualChannel virtualChannel) throws IOException, InterruptedException { RevWalk walk = null; ObjectId result = null; try { walk = new RevWalk(repository); RevCommit commit = walk.parseCommit(id); if (commit.getParentCount() > 0) { result = commit.getParent(0); } else { result = id; } } catch (Exception e) { throw new GitException("Failed to find parent id. ", e); } finally { if (walk != null) { <START> walk.close(); <END> } } return result; } }); }</code><technical_language>is a closeable java 7; I "try resource" form instead</technical_language>

Target:
private ObjectId getFirstParent(final ObjectId id, GitClient git) throws GitException, IOException, InterruptedException { return git.withRepository(new RepositoryCallback<ObjectId>() { @Override public ObjectId invoke(Repository repository, VirtualChannel virtualChannel) throws IOException, InterruptedException { ObjectId result = null; try (RevWalk walk = new RevWalk(repository)) { RevCommit commit = walk.parseCommit(id); if (commit.getParentCount() > 0) { result = commit.getParent(0); } else { result = id; } } catch (Exception e) { throw new GitException("Failed to find parent id. ", e); } return result; } }); }
Source:
<code>public void pauseUntilVisibleTest() throws Exception { long timeout = 10; long startTime = 0; long endTime = 0; iface.go("<LINK_0>"); VControl hideControl = iface.getControl(Strategy.XPATH, " startTime = System.currentTimeMillis(); hideControl.getPause().untilVisible((int)timeout); endTime = System.currentTimeMillis(); Assert.assertTrue((endTime - startTime) / Long.parseLong("1000") < timeout); hideControl.click(); startTime = System.currentTimeMillis(); thrown.expect(TimeoutException.class); hideControl.getPause().untilVisible((int)timeout); <START> endTime = System.currentTimeMillis(); <END> Assert.assertTrue((endTime - startTime) / Long.parseLong("1000") >= timeout); iface.go("<LINK_1>"); }</code><technical_language>This needs reverted. readability 'control pause visible' '... get pause...'? This designed purposely adhere fluent design</technical_language>

Target:
public void pauseUntilVisibleTest() throws Exception { long timeout = 10; long startTime = 0; long endTime = 0; iface.go("<LINK_0>"); VControl hideControl = iface.getControl(Strategy.XPATH, " startTime = System.currentTimeMillis(); hideControl.pause.untilVisible((int)timeout); endTime = System.currentTimeMillis(); Assert.assertTrue((endTime - startTime) / Long.parseLong("1000") < timeout); hideControl.click(); startTime = System.currentTimeMillis(); thrown.expect(TimeoutException.class); hideControl.pause.untilVisible((int)timeout); endTime = System.currentTimeMillis(); Assert.assertTrue((endTime - startTime) / Long.parseLong("1000") >= timeout); iface.go("<LINK_1>"); }
Source:
<code>public void onLoginSuccessful(User user) { Toaster.show(findViewById(android.R.id.content), getString(R.string.toast_welcome) + " " + user.getUsername()); PrefManager.saveUser(user); <START> startActivity(new Intent(this, DashboardActivity.class)); <END> finish(); }</code><technical_language>Do remove these, Token is used, making request login</technical_language>

Target:
public void onLoginSuccessful(User user) { Toaster.show(findViewById(android.R.id.content), getString(R.string.toast_welcome) + " " + user.getUsername()); PrefManager.setUserId(user.getUserId()); PrefManager.saveToken("Basic " + user.getBase64EncodedAuthenticationKey()); PrefManager.saveUser(user); startActivity(new Intent(this, DashboardActivity.class)); finish(); }
Source:
<code>public void restorePreMothballInfo(Unit unit, Campaign campaign) { if (tech != null) { unit.setTech(tech); } for (Person driver : drivers) { <START> if (driver.getStatus().isActive() && driver.getUnitId() == null) { <END> unit.addDriver(driver); } } for (Person gunner : gunners) { if (gunner.getStatus().isActive() && ((gunner.getUnitId() == null) || (gunner.getUnitId() == unit.getId()))) { unit.addGunner(gunner); } } for (Person crew : vesselCrew) { if (crew.getStatus().isActive() && crew.getUnitId() == null) { unit.addVesselCrew(crew); } } if (techOfficer != null && techOfficer.getStatus().isActive() && techOfficer.getUnitId() == null) { unit.setTechOfficer(techOfficer); } if (navigator != null && navigator.getStatus().isActive() && navigator.getUnitId() == null) { unit.setNavigator(navigator); } if (campaign.getForce(forceID) != null) { campaign.addUnitToForce(unit, forceID); } unit.resetEngineer(); }</code><technical_language>suggestion if (driver.getStatus().isActive() && (driver.getUnitId() == null)) {</technical_language>

Target:
public void restorePreMothballInfo(Unit unit, Campaign campaign) { if (tech != null) { unit.setTech(tech); } for (Person driver : drivers) { if (driver.getStatus().isActive() && (driver.getUnitId() == null)) { unit.addDriver(driver); } } for (Person gunner : gunners) { if (gunner.getStatus().isActive() && ((gunner.getUnitId() == null) || (gunner.getUnitId() == unit.getId()))) { unit.addGunner(gunner); } } for (Person crew : vesselCrew) { if (crew.getStatus().isActive() && (crew.getUnitId() == null)) { unit.addVesselCrew(crew); } } if (techOfficer != null && techOfficer.getStatus().isActive() && techOfficer.getUnitId() == null) { unit.setTechOfficer(techOfficer); } if (navigator != null && navigator.getStatus().isActive() && navigator.getUnitId() == null) { unit.setNavigator(navigator); } if (campaign.getForce(forceID) != null) { campaign.addUnitToForce(unit, forceID); } unit.resetEngineer(); }
Source:
<code>public Map<String, Integer> getTasksByPriority() { Map<String, Object> tasksByPriority = (Map<String, Object>) getRealtime().get(TASKS_BY_PRIORITY_PROPERTY); Map<String, Integer> tasksByPriorityMap = new HashMap<String, Integer>(); <START> for (String priorityKey : tasksByPriority.keySet()) { <END> tasksByPriorityMap.put(priorityKey, (Integer) tasksByPriority.get(priorityKey)); } return tasksByPriorityMap; }</code><technical_language>tasksByPriority.entrySet()</technical_language>

Target:
public Map<String, Integer> getTasksByPriority() { Map<String, Object> tasksByPriority = (Map<String, Object>) getRealtime().get(TASKS_BY_PRIORITY_PROPERTY); Map<String, Integer> tasksByPriorityMap = new HashMap<String, Integer>(); for (Entry<String, Object> entry : tasksByPriority.entrySet()) { tasksByPriorityMap.put(entry.getKey(), (Integer) entry.getValue()); } return tasksByPriorityMap; }
Source:
<code>protected void doWriteContent(Content content, @Nullable Content previous) { <START> calledMeter.mark(); <END> try { long id = content.getId().longValue(); MutationBatch batch = keyspace.prepareMutationBatch(); batch.setConsistencyLevel(writeConsistency); marshaller.marshallInto( content.getId(), batch.withRow(mainCf, id), content, java.util.Optional.ofNullable(previous), true ); batch.mergeShallow(aliasIndex.mutateAliases(content, previous)); batch.execute(); log.trace("Written content id " + id); } catch (Exception e) { failureMeter.mark(); throw new CassandraPersistenceException(content.toString(), e); } }</code><technical_language>meters in public methods of store in this case I in abstract stores. a meter for method, for all. persistence.store.<storeName>.<methodName>.etc</technical_language>

Target:
protected void doWriteContent(Content content, @Nullable Content previous) { try { long id = content.getId().longValue(); MutationBatch batch = keyspace.prepareMutationBatch(); batch.setConsistencyLevel(writeConsistency); marshaller.marshallInto( content.getId(), batch.withRow(mainCf, id), content, java.util.Optional.ofNullable(previous), true ); batch.mergeShallow(aliasIndex.mutateAliases(content, previous)); batch.execute(); log.trace("Written content id " + id); } catch (Exception e) { throw new CassandraPersistenceException(content.toString(), e); } }
Source:
<code>private void updateProjectZip(final File zipFile, final File folder) { try { <START> File newZipFile = new File(zipFile.getAbsolutePath().concat(".byte-ray.new")); <END> Utils.zipFolderContent(folder, newZipFile); FileUtils.deleteQuietly(zipFile); FileUtils.moveFile(newZipFile, zipFile); } catch (IOException e) { folder.deleteOnExit(); throw new ProjectManagerException("Error when generating the modified zip.", e); } }</code><technical_language>byte-ray.new a constant here</technical_language>

Target:
private void updateProjectZip(final File zipFile, final File folder) { try { File newZipFile = new File(zipFile.getAbsolutePath().concat(TMP_MODIFIED_ZIP_POSTFIX)); Utils.zipFolderContent(folder, newZipFile); FileUtils.deleteQuietly(zipFile); FileUtils.moveFile(newZipFile, zipFile); } catch (IOException e) { folder.deleteOnExit(); throw new ProjectManagerException("Error when generating the modified zip.", e); } }
Source:
<code>public void setup() { <START> parent .addZone(new Zone("Above ground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), ABOVE_GROUND))) <END> .addZone(new Zone("Ground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), GROUND))) .addZone(new Zone("Low sky", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), LOW_SKY))) .addZone(new Zone("Medium sky", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), MEDIUM_SKY))) .addZone(new Zone("Shallow underground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), SHALLOW_UNDERGROUND))) .addZone(new Zone("Medium underground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), MEDIUM_UNDERGROUND))); parent.setSeed(12345); parent.initialize(); ListMultimap<Class<? extends WorldFacet>, FacetProvider> facetProviderChains = ArrayListMultimap.create(); facetProviderChains.put(SurfaceHeightFacet.class, (generatingRegion) -> { SurfaceHeightFacet facet = new SurfaceHeightFacet(generatingRegion.getRegion(), generatingRegion.getBorderForFacet(SurfaceHeightFacet.class)); for (BaseVector2i pos : facet.getRelativeRegion().contents()) { facet.set(pos, 100); } generatingRegion.setRegionFacet(SurfaceHeightFacet.class, facet); }); Map<Class<? extends WorldFacet>, Border3D> borders = new HashMap<>(); borders.put(SurfaceHeightFacet.class, new Border3D(0, 0, 0)); region = new RegionImpl(Region3i.createFromCenterExtents(new Vector3i(0, 0, 0), 4), facetProviderChains, borders); }</code><technical_language>is a space parent? weird</technical_language>

Target:
public void setup() { parent.addZone(new Zone("Medium sky", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), MEDIUM_SKY))) .addZone(new Zone("Low sky", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), LOW_SKY))) .addZone(new Zone("Above ground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), ABOVE_GROUND))) .addZone(new Zone("Ground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), GROUND))) .addZone(new Zone("Shallow underground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), SHALLOW_UNDERGROUND))) .addZone(new Zone("Medium underground", new LayeredZoneRegionFunction(new MinMaxLayerThickness(100, 100), MEDIUM_UNDERGROUND))); parent.setSeed(12345); parent.initialize(); ListMultimap<Class<? extends WorldFacet>, FacetProvider> facetProviderChains = ArrayListMultimap.create(); facetProviderChains.put(SurfaceHeightFacet.class, (generatingRegion) -> { SurfaceHeightFacet facet = new SurfaceHeightFacet(generatingRegion.getRegion(), generatingRegion.getBorderForFacet(SurfaceHeightFacet.class)); for (BaseVector2i pos : facet.getRelativeRegion().contents()) { facet.set(pos, 100); } generatingRegion.setRegionFacet(SurfaceHeightFacet.class, facet); }); Map<Class<? extends WorldFacet>, Border3D> borders = new HashMap<>(); borders.put(SurfaceHeightFacet.class, new Border3D(0, 0, 0)); region = new RegionImpl(Region3i.createFromCenterExtents(new Vector3i(0, 0, 0), 4), facetProviderChains, borders); }
Source:
<code>public void testPendingBulkIsNotCancelled() throws InterruptedException, ExecutionException { <START> final PhysicalSlotRequestBulkWithCancellationTracking bulk = new PhysicalSlotRequestBulkWithCancellationTracking(ResourceProfile.ANY); <END> bulkChecker.schedulePendingRequestBulkTimeoutCheck(bulk, TIMEOUT); bulk.checkNotCancelledAfter(TIMEOUT.toMilliseconds() + 10); }</code><technical_language>I ResourceProfile.ANY is for slot size only. For resource requirements, ResourceProfile.UNKNOWN</technical_language>

Target:
public void testPendingBulkIsNotCancelled() throws InterruptedException, ExecutionException { final CompletableFuture<SlotRequestId> cancellationFuture = new CompletableFuture<>(); final PhysicalSlotRequestBulk bulk = createPhysicalSlotRequestBulkWithCancellationFuture(cancellationFuture, new SlotRequestId()); bulkChecker.schedulePendingRequestBulkTimeoutCheck(bulk, TIMEOUT); checkNotCancelledAfter(cancellationFuture, 2 * TIMEOUT.toMilliseconds()); }
Source:
<code>public void run() { int delayTime = getRegistry().getDelay(); <START> if (this.time < listener.lastEventTime) { <END> return; } else if (delayTime <= 0) { listener.doNotify(listener.rawAddresses); listener.lastExecuteTime = System.currentTimeMillis(); } else if (System.currentTimeMillis() - listener.lastExecuteTime < delayTime) { scheduler.schedule(new NotificationTask(this.listener, this.time), System.currentTimeMillis() - listener.lastExecuteTime, TimeUnit.MILLISECONDS); } else { listener.doNotify(listener.rawAddresses); listener.lastExecuteTime = System.currentTimeMillis(); } }</code><technical_language>Corner case: Continuing notification registry listener nerver notified.(lastEventTime is greater this.time). running listener.doNotifyTask task :P</technical_language>

Target:
public void run() { if (this.time == listener.lastEventTime) { listener.doNotify(listener.rawAddresses); listener.lastExecuteTime = System.currentTimeMillis(); } }
Source:
<code>public VMImage getImage(final String id) { String[] fields = VMImageToImage.decodeFieldsFromUniqueId(id); <START> if (fields[2].substring(0, CUSTOM_IMAGE_PREFIX.length()).equals(CUSTOM_IMAGE_PREFIX)) { <END> String storage = fields[2].substring(CUSTOM_IMAGE_PREFIX.length()); String vhd = fields[3]; VMImage ref = new VMImage(CUSTOM_IMAGE_PREFIX + azureGroup, CUSTOM_IMAGE_PREFIX + storage, vhd, null, fields[0]); return ref; } Iterable<VMImage> images = listImages(); for (VMImage image : images) { String imageId = VMImageToImage.encodeFieldsToUniqueId(image); if (id.equals(imageId)){ return image; } } return null; }</code><technical_language>startsWith</technical_language>

Target:
public VMImage getImage(final String id) { String[] fields = VMImageToImage.decodeFieldsFromUniqueId(id); if (fields[2].startsWith(CUSTOM_IMAGE_PREFIX)) { String storage = fields[2].substring(CUSTOM_IMAGE_PREFIX.length()); String vhd = fields[3]; VMImage ref = VMImage.create(CUSTOM_IMAGE_PREFIX + azureGroup, CUSTOM_IMAGE_PREFIX + storage, vhd, null, fields[0], false); return ref; } Iterable<VMImage> images = listImages(); for (VMImage image : images) { String imageId = VMImageToImage.encodeFieldsToUniqueId(image); if (id.equals(imageId)){ return image; } } return null; }
Source:
<code>public static void setUp() throws Exception { WAL_UTIL.startMiniCluster(3); Configuration conf = HFILE_UTIL.getConfiguration(); conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false); CHORE_SERVICE = new ChoreService("TestLocalRegionOnTwoFileSystems"); CLEANER_POOL = new DirScanPool(conf); Server server = mock(Server.class); when(server.getConfiguration()).thenReturn(conf); when(server.getServerName()) .thenReturn(ServerName.valueOf("localhost", 12345, System.currentTimeMillis())); when(server.getChoreService()).thenReturn(CHORE_SERVICE); Path rootDir = HFILE_UTIL.getDataTestDir(); CommonFSUtils.setRootDir(conf, rootDir); Path walRootDir = WAL_UTIL.getDataTestDirOnTestFS(); FileSystem walFs = WAL_UTIL.getTestFileSystem(); CommonFSUtils.setWALRootDir(conf, walRootDir.makeQualified(walFs.getUri(), walFs.getWorkingDirectory())); LocalRegionParams params = new LocalRegionParams(); params.server(server).regionDirName(REGION_DIR_NAME).tableDescriptor(TD) .flushSize(TableDescriptorBuilder.DEFAULT_MEMSTORE_FLUSH_SIZE).flushPerChanges(1_000_000) .flushIntervalMs(TimeUnit.MINUTES.toMillis(15)).compactMin(COMPACT_MIN).maxWals(32) .useHsync(false).ringBufferSlotCount(16).rollPeriodMs(TimeUnit.MINUTES.toMillis(15)) .archivedWalSuffix(LocalStore.ARCHIVED_WAL_SUFFIX) .archivedHFileSuffix(LocalStore.ARCHIVED_HFILE_SUFFIX); <START> REGION = LocalRegion.create(params); <END> }</code><technical_language>Good</technical_language>

Target:
public static void setUp() throws Exception { WAL_UTIL.startMiniCluster(3); Configuration conf = HFILE_UTIL.getConfiguration(); conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false); Path rootDir = HFILE_UTIL.getDataTestDir(); CommonFSUtils.setRootDir(conf, rootDir); Path walRootDir = WAL_UTIL.getDataTestDirOnTestFS(); FileSystem walFs = WAL_UTIL.getTestFileSystem(); CommonFSUtils.setWALRootDir(conf, walRootDir.makeQualified(walFs.getUri(), walFs.getWorkingDirectory())); }
Source:
<code>private Optional<String> uriFor(BtVodDataRow row) { String brandId = row.getColumnValue(BtVodFileColumn.BRANDIA_ID); if (!shouldSynthesizeBrand(row) && brandId == null) { return Optional.absent(); } if (shouldSynthesizeBrand(row)) { return Optional.of(uriPrefix + "synthesized/brands/" + ensureSynthesizedKey(row)); } <START> return Optional.of(uriPrefix + "brands/" + row.getColumnValue(BtVodFileColumn.BRANDIA_ID)); <END> }</code><technical_language>if brandId is null this point</technical_language>

Target:
private Optional<String> uriFor(BtVodDataRow row) { if (!shouldSynthesizeBrand(row) && !isBrand(row)) { return Optional.absent(); } else if (shouldSynthesizeBrand(row)) { return Optional.of(uriPrefix + "synthesized/brands/" + ensureSynthesizedKey(row)); } else if (isBrand(row)) { return Optional.of(uriPrefix + "brands/" + getBrandId(row)); } return Optional.absent(); }
Source:
<code>public void shouldExecuteAsBlockingAfterSubscription() { final PreparedWriteOperation preparedOperation = mock(PreparedWriteOperation.class); TestSubscriber testSubscriber = new TestSubscriber(); Completable.create(OnSubscribeExecuteAsBlockingCompletable.newInstance(preparedOperation)) .subscribe(testSubscriber); testSubscriber.assertNoErrors(); testSubscriber.assertCompleted(); <START> verify(preparedOperation).executeAsBlocking(); <END> verify(preparedOperation, times(0)).asRxObservable(); verify(preparedOperation, times(0)).asRxSingle(); verify(preparedOperation, times(0)).asRxComletable(); }</code><technical_language>please check invoked subscribe()</technical_language>

Target:
public void shouldExecuteAsBlockingAfterSubscription() { final PreparedWriteOperation preparedOperation = mock(PreparedWriteOperation.class); TestSubscriber testSubscriber = new TestSubscriber(); verifyZeroInteractions(preparedOperation); Completable completable = Completable.create(OnSubscribeExecuteAsBlockingCompletable.newInstance(preparedOperation)); verifyZeroInteractions(preparedOperation); completable.subscribe(testSubscriber); testSubscriber.assertNoErrors(); testSubscriber.assertCompleted(); verify(preparedOperation).executeAsBlocking(); verify(preparedOperation, times(0)).asRxObservable(); verify(preparedOperation, times(0)).asRxSingle(); verify(preparedOperation, times(0)).asRxComletable(); }
Source:
<code>public String showPage(Model model) { PublicSiteUser user = currentUserService.getCurrentUser(); boolean userLoggedIn = (user != null); <START> boolean userIsSEEG = userLoggedIn && expertService.getExpertById(user.getId()).isSeegMember(); <END> Integer diseaseOccurrenceReviewCount = 0; Integer adminUnitReviewCount = 0; if (userLoggedIn) { int expertId = user.getId(); diseaseOccurrenceReviewCount = expertService.getDiseaseOccurrenceReviewCount(expertId).intValue(); adminUnitReviewCount = expertService.getAdminUnitReviewCount(expertId).intValue(); List<ValidatorDiseaseGroup> diseaseInterests = expertService.getDiseaseInterests(expertId); model.addAttribute("diseaseInterests", diseaseInterests); model.addAttribute("allOtherDiseases", getAllValidatorDiseaseGroupsExcludingDiseaseInterests(diseaseInterests)); model.addAttribute("validatorDiseaseGroupMap", diseaseService.getValidatorDiseaseGroupMap(userIsSEEG)); } else { model.addAttribute("defaultValidatorDiseaseGroupName", DEFAULT_VALIDATOR_DISEASE_GROUP_NAME); model.addAttribute("defaultDiseaseGroupShortName", DEFAULT_DISEASE_GROUP_SHORT_NAME); } model.addAttribute("userLoggedIn", userLoggedIn); model.addAttribute("diseaseOccurrenceReviewCount", diseaseOccurrenceReviewCount); model.addAttribute("adminUnitReviewCount", adminUnitReviewCount); return "datavalidation/content"; }</code><technical_language>I extract "expertService.getExpertById(user.getId()).isSeegMember();" a method, that: - occurs line 184 - add null protection if Expert exist ID for some reason</technical_language>

Target:
public String showPage(Model model) { PublicSiteUser user = currentUserService.getCurrentUser(); boolean userLoggedIn = (user != null); boolean userIsSEEG = userLoggedIn && checkIfSeegMember(user); Integer diseaseOccurrenceReviewCount = 0; Integer adminUnitReviewCount = 0; if (userLoggedIn) { int expertId = user.getId(); diseaseOccurrenceReviewCount = expertService.getDiseaseOccurrenceReviewCount(expertId).intValue(); adminUnitReviewCount = expertService.getAdminUnitReviewCount(expertId).intValue(); List<ValidatorDiseaseGroup> diseaseInterests = expertService.getDiseaseInterests(expertId); model.addAttribute("diseaseInterests", diseaseInterests); model.addAttribute("allOtherDiseases", getAllValidatorDiseaseGroupsExcludingDiseaseInterests(diseaseInterests)); model.addAttribute("validatorDiseaseGroupMap", diseaseService.getValidatorDiseaseGroupMap(userIsSEEG)); } else { model.addAttribute("defaultValidatorDiseaseGroupName", DEFAULT_VALIDATOR_DISEASE_GROUP_NAME); model.addAttribute("defaultDiseaseGroupShortName", DEFAULT_DISEASE_GROUP_SHORT_NAME); } model.addAttribute("userLoggedIn", userLoggedIn); model.addAttribute("diseaseOccurrenceReviewCount", diseaseOccurrenceReviewCount); model.addAttribute("adminUnitReviewCount", adminUnitReviewCount); return "datavalidation/content"; }
Source:
<code>private void visitTypeAlias( JSType registryType, String unqualifiedName, boolean emitNeverBrand) { emit("type"); emit(unqualifiedName); emit("="); visitType(registryType, true, false); <START> if (emitNeverBrand) emit("&{brand: never}"); <END> emit(";"); emitBreak(); }</code><technical_language>'brand' is short sweet a collision somewhere. 'clutzBrand', clear this is a synthetic field introduced clutz. a user sees error trace clutz find 'brand' in codebase</technical_language>

Target:
private void visitTypeAlias( JSType registryType, String unqualifiedName, boolean emitNeverBrand) { emit("type"); emit(unqualifiedName); emit("="); visitType(registryType, true, false); if (emitNeverBrand) emit("&{clutzEnumBrand: never}"); emit(";"); emitBreak(); }
Source:
<code>public InstallModel() { setUserPassword(new EntityModel()); setOVirtISO(new ListModel()); setHostVersion(new EntityModel()); setOverrideIpTables(new EntityModel()); getOverrideIpTables().setEntity(false); setUserName(new EntityModel()); <START> getUserName().setEntity(RootUserName); <END> getUserName().setIsChangable(false); setPublicKey(new EntityModel()); getPublicKey().setEntity(constants.empty()); fetchPublicKey(); setNetworkProviderModel(new HostNetworkProviderModel()); }</code><technical_language>reuse constant in HostModel.</technical_language>

Target:
public InstallModel() { setUserPassword(new EntityModel()); setOVirtISO(new ListModel()); setHostVersion(new EntityModel()); setOverrideIpTables(new EntityModel()); getOverrideIpTables().setEntity(false); setUserName(new EntityModel()); getUserName().setEntity(HostModel.RootUserName); getUserName().setIsChangable(false); setPublicKey(new EntityModel()); getPublicKey().setEntity(constants.empty()); fetchPublicKey(); setNetworkProviderModel(new HostNetworkProviderModel()); }
Source:
<code>public void handleQuotaColumnVisibility() { isQuotaVisible = false; SystemTreeItemModel treeItem = (SystemTreeItemModel) CommonModel.getInstance().getSystemTree().getSelectedItem(); if (treeItem != null <START> && SystemTreeItemType.DataCenter.equals(treeItem.getType())) { <END> StoragePool storagePool = (StoragePool) treeItem.getEntity(); if (!QuotaEnforcementTypeEnum.DISABLED.equals(storagePool.getQuotaEnforcementType())) { isQuotaVisible = true; } } onDiskViewTypeChanged(); }</code><technical_language>I know, enums ==/!= operators. a matter of style, I prefer (since instance of enum is referenced entity enum constant). However, do like, is fine me</technical_language>

Target:
public void handleQuotaColumnVisibility() { isQuotaVisible = false; SystemTreeItemModel treeItem = (SystemTreeItemModel) CommonModel.getInstance().getSystemTree().getSelectedItem(); if (treeItem != null && SystemTreeItemType.DataCenter == treeItem.getType()) { StoragePool storagePool = (StoragePool) treeItem.getEntity(); if (QuotaEnforcementTypeEnum.DISABLED != storagePool.getQuotaEnforcementType()) { isQuotaVisible = true; } } onDiskViewTypeChanged(); }
Source:
<code>public static boolean isScriptRunSuccessfully(String directory, String[] cmdArray, String expectedString) throws IOException { boolean isFoundTheMessage = false; BufferedReader br = null; Process process = null; try { File commandDir = new File(directory); process = Runtime.getRuntime().exec(cmdArray, null, commandDir); String line; long startTime = System.currentTimeMillis(); while ((System.currentTimeMillis() - startTime) < TIMEOUT) { br = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")); while ((line = br.readLine()) != null) { log.info(line); if (line.contains(expectedString)) { <START> log.info("found the string " + expectedString + " in line " + line); <END> isFoundTheMessage = true; break; } } if (isFoundTheMessage) { break; } } return isFoundTheMessage; } catch (IOException ex) { log.error("Error when reading the InputStream when running shell script " + ex.getMessage(), ex); throw new IOException("Error when reading the InputStream when running shell script " + ex.getMessage(), ex); } finally { if (br != null) { br.close(); } if (process != null) { process.destroy(); } } }</code><technical_language>more descriptive log message</technical_language>

Target:
public static boolean isScriptRunSuccessfully(String directory, String[] cmdArray, String expectedString) throws CarbonToolsIntegrationTestException { boolean isFoundTheMessage = false; BufferedReader br = null; Process process = null; try { File commandDir = new File(directory); process = Runtime.getRuntime().exec(cmdArray, null, commandDir); String line; long startTime = System.currentTimeMillis(); while ((System.currentTimeMillis() - startTime) < TIMEOUT) { br = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")); while ((line = br.readLine()) != null) { log.info(line); if (line.contains(expectedString)) { log.info("found the string " + expectedString + " in line " + line); isFoundTheMessage = true; break; } } if (isFoundTheMessage) { break; } } return isFoundTheMessage; } catch (IOException ex) { log.error("Error when reading the InputStream when running shell script ", ex); throw new CarbonToolsIntegrationTestException("Error when reading the InputStream when " + "running shell script ", ex); } finally { if (br != null) { try { br.close(); } catch (IOException e) { log.error("Error when closing BufferedReader ", e); } } if (process != null) { process.destroy(); } } }
Source:
<code>public void run() { try { synchronized (lock) { cdl.countDown(); while <START> (true) { <END> lock.wait(); } } } catch (InterruptedException ex) { synchronized (lock) { wasInterrupted = true; } } }</code><technical_language>Is this for spurious wake up? Is return InterruptedException</technical_language>

Target:
public void run() { synchronized (lock) { try { cdl.countDown(); while (true) { lock.wait(); } } catch (InterruptedException ex) { wasInterrupted = true; } } }
Source:
<code>public void configure(ResourceServerSecurityConfigurer resources) { resources .resourceId("oauth2res") .tokenServices(accessTokenValidationService) <START> .expressionHandler(new DefaultWebSecurityExpressionHandler()); <END> }</code><technical_language>need OAuth-extended SecurityExpressionHandler, please remove this line</technical_language>

Target:
public void configure(ResourceServerSecurityConfigurer resources) { resources.resourceId("oauth2res") .tokenServices(accessTokenValidationService) .expressionHandler(new OsiamMethodSecurityExpressionHandler()); }
Source:
<code>private String getSerializedInput(Block block, boolean craftLast) { BlockMenu menu = BlockStorage.getInventory(block); StringBuilder builder = new StringBuilder(); int i = 0; boolean lastIteration = false; for (int j = 0; j < 9; j++) { if (i > 0) { builder.append(" </slot> "); } ItemStack item = menu.getItemInSlot(getInputSlots()[j]); if (craftLast) { <START> if (item != null && item.getAmount() == 1) lastIteration = true; <END> } else { if (item != null && item.getAmount() == 1) return ""; } builder.append(CustomItemSerializer.serialize(item, ItemFlag.MATERIAL, ItemFlag.ITEMMETA_DISPLAY_NAME, ItemFlag.ITEMMETA_LORE)); i++; } if (craftLast && !lastIteration) return ""; return builder.toString(); }</code><technical_language>I get changed this introduced this variable. pretty before</technical_language>

Target:
private String getSerializedInput(Block block, boolean craftLast) { BlockMenu menu = BlockStorage.getInventory(block); StringBuilder builder = new StringBuilder(); int i = 0; boolean lastIteration = false; for (int j = 0; j < 9; j++) { if (i > 0) { builder.append(" </slot> "); } ItemStack item = menu.getItemInSlot(getInputSlots()[j]); if (item != null && item.getAmount() == 1) { if (craftLast) lastIteration = true; else return ""; } builder.append(CustomItemSerializer.serialize(item, ItemFlag.MATERIAL, ItemFlag.ITEMMETA_DISPLAY_NAME, ItemFlag.ITEMMETA_LORE)); i++; } if (craftLast && !lastIteration) return ""; return builder.toString(); }
Source:
<code>public E username(String username) { <START> this.username = username; <END> return (E) this; }</code><technical_language>explicitly prevent nulls (and for password) Misc.checkNotNull(username, "username") exact syntax is</technical_language>

Target:
public E username(String username) { Misc.checkNotNull(username, "username"); this.username = username; return (E) this; }
Source:
<code><START> public Bitstream setLogo(Context context, Collection collection, MultipartFile uploadfile) <END> throws IOException, AuthorizeException, SQLException { if (collection.getLogo() != null) { throw new UnprocessableEntityException( "The collection with the given uuid already has a logo: " + collection.getID()); } Bitstream bitstream = cs.setLogo(context, collection, uploadfile.getInputStream()); cs.update(context, collection); bitstreamService.update(context, bitstream); return bitstream; }</code><technical_language>RestRepositories generally return JPA entity objects. return RestModels. in this example, BitstreamRest returned</technical_language>

Target:
public BitstreamRest setLogo(Context context, Collection collection, MultipartFile uploadfile) throws IOException, AuthorizeException, SQLException { if (collection.getLogo() != null) { throw new UnprocessableEntityException( "The collection with the given uuid already has a logo: " + collection.getID()); } Bitstream bitstream = cs.setLogo(context, collection, uploadfile.getInputStream()); cs.update(context, collection); bitstreamService.update(context, bitstream); return bitstreamConverter.fromModel(context.reloadEntity(bitstream)); }
Source:
<code>public SearchResult query(SearchQuery query) { final List<Requisition> requisitions = Lists.newArrayList(requisitionAccessService.getRequisitions()) .stream() .filter(r -> QueryUtils.matches(r.getForeignSource(), query.getInput())) .sorted(Comparator.comparing(Requisition::getForeignSource)) .limit(query.getMaxResults()) .collect(Collectors.toList()); final List<SearchResultItem> resultItems = requisitions.stream().map(r -> { final SearchResultItem searchResultItem = new SearchResultItem(); searchResultItem.setIdentifier(r.getForeignSource()); <START> searchResultItem.setUrl(String.format("admin/ng-requisitions/index.jsp#/requisitions/%s",r.getForeignSource())); <END> searchResultItem.setLabel(String.format("Edit Requisition '%s'", r.getForeignSource())); searchResultItem.setIcon("fa fa-pencil"); return searchResultItem; }) .collect(Collectors.toList()); final SearchResult searchResult = new SearchResult(Contexts.Action) .withMore(requisitions, resultItems) .withResults(resultItems); return searchResult; }</code><technical_language>URL encoding</technical_language>

Target:
public SearchResult query(SearchQuery query) { final List<Requisition> requisitions = Lists.newArrayList(requisitionAccessService.getRequisitions()) .stream() .filter(r -> QueryUtils.matches(r.getForeignSource(), query.getInput())) .sorted(Comparator.comparing(Requisition::getForeignSource)) .limit(query.getMaxResults()) .collect(Collectors.toList()); final List<SearchResultItem> resultItems = requisitions.stream().map(r -> { final SearchResultItem searchResultItem = new SearchResultItem(); searchResultItem.setIdentifier(r.getForeignSource()); searchResultItem.setUrl(String.format("admin/ng-requisitions/index.jsp#/requisitions/%s", UrlUtils.encode(r.getForeignSource()))); searchResultItem.setLabel(String.format("Edit Requisition '%s'", r.getForeignSource())); searchResultItem.setIcon("fa fa-pencil"); return searchResultItem; }) .collect(Collectors.toList()); final SearchResult searchResult = new SearchResult(Contexts.Action) .withMore(requisitions, resultItems) .withResults(resultItems); return searchResult; }
Source:
<code>public static ZkMetadataStoreDirectory getInstance(String namespace, String zkAddress) throws InvalidRoutingDataException { <START> if (_zkMetadataStoreDirectoryInstance == null) { synchronized (ZkMetadataStoreDirectory.class) { if (_zkMetadataStoreDirectoryInstance == null) { _zkMetadataStoreDirectoryInstance = new ZkMetadataStoreDirectory(); } } } _zkMetadataStoreDirectoryInstance.init(namespace, zkAddress); <END> return _zkMetadataStoreDirectoryInstance; }</code><technical_language>do getInstance().init(namespace, zkAddress); cut duplicate code</technical_language>

Target:
public static ZkMetadataStoreDirectory getInstance(String namespace, String zkAddress) throws InvalidRoutingDataException { getInstance().init(namespace, zkAddress); return _zkMetadataStoreDirectoryInstance; }
Source:
<code><START> public void testReadMultivalueXmlCsvJson() throws IOException { <END> testReadMultivalue( ResultsReaderXml.class, "resultsMV.xml"); testReadMultivalue( ResultsReaderCsv.class, "resultsMV.csv"); testReadMultivalue( ResultsReaderJson.class, "resultsMV4.json"); testReadMultivalue( ResultsReaderJson.class, "resultsMV5.json"); testReadMultivalue( ResultsReaderXml.class, "resultsMVOneshot.xml"); testReadMultivalue( ResultsReaderCsv.class, "resultsMVOneshot.csv"); testReadMultivalue( ResultsReaderJson.class, "resultsMVOneshot4.json"); testReadMultivalue( ResultsReaderJson.class, "resultsMVOneshot5.json"); }</code><technical_language>some tests get live Splunk results, this ensure remain compliant change</technical_language>

Target:
public void testReadMultivalueXmlCsvJson() throws IOException { String search = "search index=_internal | head 1"; testReadMultivalue( ResultsReaderXml.class, "resultsMV.xml"); testReadMultivalue( ResultsReaderCsv.class, "resultsMV.csv"); testReadMultivalue( ResultsReaderJson.class, "resultsMV4.json"); testReadMultivalue( ResultsReaderJson.class, "resultsMV5.json"); testReadMultivalue( ResultsReaderXml.class, "resultsMVOneshot.xml"); testReadMultivalue( ResultsReaderCsv.class, "resultsMVOneshot.csv"); testReadMultivalue( ResultsReaderJson.class, "resultsMVOneshot4.json"); testReadMultivalue( ResultsReaderJson.class, "resultsMVOneshot5.json"); testReadMultivalue( ResultsReaderXml.class, "splunk_search:blocking/xml/" + search); testReadMultivalue( ResultsReaderCsv.class, "splunk_search:blocking/csv/" + search); testReadMultivalue( ResultsReaderJson.class, "splunk_search:blocking/json/" + search); testReadMultivalue( ResultsReaderXml.class, "splunk_search:oneshot/xml/" + search); testReadMultivalue( ResultsReaderCsv.class, "splunk_search:oneshot/csv/" + search); testReadMultivalue( ResultsReaderJson.class, "splunk_search:oneshot/json/" + search); }
Source:
<code>public void projectDirectoryRenameSlashTest() throws IOException { <START> String absoluteRenamedDirectoryPath = defaultProject.getDirectory().getParent() + "/" + slashEncodedRenamedProject; <END> File renamedDirectory = ProjectRenameTask.task(defaultProject.getDirectory(), slashRenamedProject); assertEquals(renamedDirectory.getAbsolutePath(), absoluteRenamedDirectoryPath); }</code><technical_language>use: File expectedDirectory = new File(defaultProject.getDirectory().getParent(), slashEncodedRenamedProject); then: assertEquals(expectedDirectory, renamedDirectory);</technical_language>

Target:
public void projectDirectoryRenameSlashTest() throws IOException { File expectedDirectory = new File(defaultProject.getDirectory().getParent(), slashEncodedRenamedProject); File renamedDirectory = ProjectRenameTask.task(defaultProject.getDirectory(), slashRenamedProject); assertEquals(expectedDirectory, renamedDirectory); }
Source:
<code>private static boolean decodeStatus(int statusCode, String pluginName) { switch (statusCode) { case HttpURLConnection.HTTP_OK: logger.info("Gerrit Plugin " + pluginName + " is installed"); return true; case HttpURLConnection.HTTP_NOT_FOUND: logger.info("Gerrit Plugin " + pluginName + " is NOT installed"); return false; <START> case HttpURLConnection.HTTP_UNAUTHORIZED: <END> logger.warn(NOT_ABLE_TO_VERIFY_IF_GERRIT_PLUGIN + pluginName + " is installed. User is not NOT AUTHORIZED! Error: " + Messages.HttpConnectionUnauthorized()); return false; case HttpURLConnection.HTTP_FORBIDDEN: logger.warn(NOT_ABLE_TO_VERIFY_IF_GERRIT_PLUGIN + pluginName + " is installed. User is Forbidden! Error: " + Messages.HttpConnectionUnauthorized()); return false; default: logger.warn(NOT_ABLE_TO_VERIFY_IF_GERRIT_PLUGIN + pluginName + " is installed. Error: " + Messages.HttpConnectionError(statusCode)); return false; } }</code><technical_language>simplify parameterized messages. Messages.PluginHttpConnectionUnauthorized(pluginName)</technical_language>

Target:
private static boolean decodeStatus(int statusCode, String pluginName) { switch (statusCode) { case HttpURLConnection.HTTP_OK: logger.info(Messages.PluginInstalled(pluginName)); return true; case HttpURLConnection.HTTP_NOT_FOUND: logger.info(Messages.PluginNotInstalled(pluginName)); return false; case HttpURLConnection.HTTP_UNAUTHORIZED: logger.warn(Messages.PluginHttpConnectionUnauthorized(pluginName, Messages.HttpConnectionUnauthorized())); return false; case HttpURLConnection.HTTP_FORBIDDEN: logger.warn(Messages.PluginHttpConnectionForbidden(pluginName, Messages.HttpConnectionUnauthorized())); return false; default: logger.warn(Messages.PluginHttpConnectionGeneralError(pluginName, Messages.HttpConnectionError(statusCode))); return false; } }
Source:
<code>@Override public void handleClick(MonthCellDescriptor cell) { Date clickedDate = cell.getDate(); if (!betweenDates(clickedDate, minCal, maxCal) || !isDateSelectable(clickedDate)) { if (invalidDateListener != null) { invalidDateListener.onInvalidDateSelected(clickedDate); } } else { boolean wasSelected = doSelectDate(clickedDate, cell); if (wasSelected && dateListener != null) { dateListener.onDateSelected(clickedDate); <START> } else if (!wasSelected && dateListener != null) { <END> dateListener.onDateUnselected(clickedDate); } } }</code><technical_language>Wrap this block in dateListener != null do a simple if (wasSelected) { .. } else { .. } inside</technical_language>

Target:
@Override public void handleClick(MonthCellDescriptor cell) { Date clickedDate = cell.getDate(); if (!betweenDates(clickedDate, minCal, maxCal) || !isDateSelectable(clickedDate)) { if (invalidDateListener != null) { invalidDateListener.onInvalidDateSelected(clickedDate); } } else if (dateListener != null) { boolean wasSelected = doSelectDate(clickedDate, cell); if (wasSelected) { dateListener.onDateSelected(clickedDate); } else { dateListener.onDateUnselected(clickedDate); } } }
Source:
<code>public void run(String[] args) { if (0 == args.length) { System.out.println(getHelp()); } else { LanguageDetectorModel model = new LanguageDetectorModelLoader().load(new File(args[0])); LanguageDetector langDetectME = new LanguageDetectorME(model); ObjectStream<String> documentStream; PerformanceMonitor perfMon = new PerformanceMonitor(System.err, "doc"); perfMon.start(); <START> try { <END> documentStream = new ParagraphStream(new PlainTextByLineStream( new SystemInputStreamFactory(), SystemInputStreamFactory.encoding())); String document; while ((document = documentStream.read()) != null) { Language lang = langDetectME.predictLanguage(document); LanguageDetectorSample sample = new LanguageDetectorSample(lang, document); System.out.println(sample.toString()); perfMon.incrementCounter(); } } catch (IOException e) { CmdLineUtil.handleStdinIoError(e); } perfMon.stopAndPrintFinalResult(); } }</code><technical_language>try resources</technical_language>

Target:
public void run(String[] args) { if (0 == args.length) { System.out.println(getHelp()); } else { LanguageDetectorModel model = new LanguageDetectorModelLoader().load(new File(args[0])); LanguageDetector langDetectME = new LanguageDetectorME(model); ObjectStream<String> documentStream; PerformanceMonitor perfMon = new PerformanceMonitor(System.err, "doc"); perfMon.start(); try { documentStream = new ParagraphStream(new PlainTextByLineStream( new SystemInputStreamFactory(), SystemInputStreamFactory.encoding())); String document; while ((document = documentStream.read()) != null) { Language lang = langDetectME.predictLanguage(document); LanguageSample sample = new LanguageSample(lang, document); System.out.println(sample.toString()); perfMon.incrementCounter(); } } catch (IOException e) { CmdLineUtil.handleStdinIoError(e); } perfMon.stopAndPrintFinalResult(); } }
Source:
<code>public void clickModerationHintButton() { <START> click(By.id("moderationHintButton")); <END> }</code><technical_language>This a class variable instead, @FindBy annotation; especially this element is in another method</technical_language>

Target:
public void clickModerationHintButton() { click(moderationHintButton); }
Source:
<code>public TemporaryJobJsonReports(final Path outputDir) { this.outputDir = outputDir; <START> this.outputDir.toFile().mkdirs(); <END> }</code><technical_language>sense catch this returns false throw some sort of IllegalStateException</technical_language>

Target:
public TemporaryJobJsonReports(final Path outputDir) { this.outputDir = outputDir; final File path = this.outputDir.toFile(); if (!path.mkdirs() && !path.isDirectory()) { throw new IllegalStateException(format("failed to create directory \"%s\"", outputDir)); } }
Source:
<code><START> private static boolean isForEachReturningFirstElement(Tree loop, Tree jump) { <END> if (!loop.is(Tree.Kind.FOREACH_STATEMENT) || !jump.is(Tree.Kind.RETURN_STATEMENT)) { return false; } ReturnStatementTree returnTree = (ReturnStatementTree) jump; ForEachStatementTree forEachTree = (ForEachStatementTree) loop; return areSyntacticallyEquivalent(returnTree.expression(), forEachTree.value()) || areSyntacticallyEquivalent(returnTree.expression(), forEachTree.key()); }</code><technical_language>check this return is statement of loop</technical_language>

Target:
private static boolean isForEachReturningFirstElement(Tree loop, Tree jump) { if (!loop.is(Tree.Kind.FOREACH_STATEMENT, Tree.Kind.ALTERNATIVE_FOREACH_STATEMENT) || !jump.is(Tree.Kind.RETURN_STATEMENT)) { return false; } ReturnStatementTree returnTree = (ReturnStatementTree) jump; ForEachStatementTree forEachTree = (ForEachStatementTree) loop; if (hasMoreThanOneStatement(forEachTree)) { return false; } return areSyntacticallyEquivalent(returnTree.expression(), forEachTree.value()) || areSyntacticallyEquivalent(returnTree.expression(), forEachTree.key()); }
Source:
<code>public void startTestFor(Activity activity) { ViewGroup view = (ViewGroup) activity.findViewById(android.R.id.content); ImageView qrCodeImageView = new ImageView(activity); view.addView(qrCodeImageView); int randomIndex = RANDOM.nextInt(listOfUrls.length); String url = listOfUrls[randomIndex]; int color = listOfColors[randomIndex]; try { <START> BitMatrix qrCode = new QRCodeWriter().encode(url, BarcodeFormat.QR_CODE, 1000, 1000); <END> int width = qrCode.getWidth(); int height = qrCode.getHeight(); Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { bmp.setPixel(x, y, qrCode.get(x, y) ? color : Color.WHITE); } } qrCodeImageView.setImageBitmap(bmp); } catch (WriterException e) { e.printStackTrace(); } }</code><technical_language>cool :100:</technical_language>

Target:
public void startTestFor(Activity activity) { ViewGroup view = getParent(activity); ImageView qrCodeImageView = new ImageView(activity); view.addView(qrCodeImageView); int randomIndex = RANDOM.nextInt(listOfUrls.length); String url = listOfUrls[randomIndex]; int color = listOfColors[randomIndex]; int qrCodeSizeInPixels = 1000; try { BitMatrix qrCode = new QRCodeWriter().encode(url, BarcodeFormat.QR_CODE, qrCodeSizeInPixels, qrCodeSizeInPixels); int width = qrCode.getWidth(); int height = qrCode.getHeight(); Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { bmp.setPixel(x, y, qrCode.get(x, y) ? color : Color.WHITE); } } qrCodeImageView.setImageBitmap(bmp); } catch (WriterException e) { assertThat(e).isNull(); } }
Source:
<code>public void onDestroyView() { super.onDestroyView(); <START> ((PageActivity)getActivity()).getDrawerToggle().setDrawerIndicatorEnabled(true); <END> app.getBus().unregister(this); }</code><technical_language>I put this in Pause</technical_language>

Target:
public void onDestroyView() { super.onDestroyView(); app.getBus().unregister(this); }
Source:
<code>public ViewerTestCase(String name) { super(name); disableTestsBug347491 = Util.isCocoa(); final String <START> GTK_VERSION_PROPERTY = <END> "org.eclipse.swt.internal.gtk.version"; String value = System.getProperty(GTK_VERSION_PROPERTY); if (value != null) { if (value.startsWith("3")) { disableTestsBug493357 = true; } } }</code><technical_language>This a static reduced this: System.getProperty("org.eclipse.swt.internal.gtk.version", "").startsWith("3."); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$</technical_language>

Target:
public ViewerTestCase(String name) { super(name); disableTestsBug347491 = Util.isCocoa(); }