auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean handleBackPressed() { if (mFullScreenDialogFragment != null && mFullScreenDialogFragment.isVisible()) { Fragment contentFragment = mFullScreenDialogFragment.getContent(); <START> if (contentFragment != null && contentFragment instanceof HistoryDetailFullScreenDialogFragment) { <END> AnalyticsTracker.track(Stat.REVISIONS_DETAIL_CANCELLED); } mFullScreenDialogFragment.dismiss(); return false; } Fragment fragment = getSupportFragmentManager().findFragmentByTag( ImageSettingsDialogFragment.IMAGE_SETTINGS_DIALOG_TAG); if (fragment != null && fragment.isVisible()) { if (fragment instanceof ImageSettingsDialogFragment) { ImageSettingsDialogFragment imFragment = (ImageSettingsDialogFragment) fragment; imFragment.dismissFragment(); } return false; } if (mViewPager.getCurrentItem() > PAGE_CONTENT) { if (mViewPager.getCurrentItem() == PAGE_SETTINGS) { mEditorFragment.setFeaturedImageId(mPost.getFeaturedImageId()); } mViewPager.setCurrentItem(PAGE_CONTENT); invalidateOptionsMenu(); } else if (isPhotoPickerShowing()) { hidePhotoPicker(); } else { savePostAndOptionallyFinish(true); } return true; }</code><technical_language>suggestion if (contentFragment instanceof HistoryDetailFullScreenDialogFragment) { remove contentFragment != null condition contentFragment instanceof HistoryDetailFullScreenDialogFragment condition is in statement</technical_language>

Target:
private boolean handleBackPressed() { if (mFullScreenDialogFragment != null && mFullScreenDialogFragment.isVisible()) { Fragment contentFragment = mFullScreenDialogFragment.getContent(); if (contentFragment instanceof HistoryDetailFullScreenDialogFragment) { AnalyticsTracker.track(Stat.REVISIONS_DETAIL_CANCELLED); } mFullScreenDialogFragment.dismiss(); return false; } Fragment fragment = getSupportFragmentManager().findFragmentByTag( ImageSettingsDialogFragment.IMAGE_SETTINGS_DIALOG_TAG); if (fragment != null && fragment.isVisible()) { if (fragment instanceof ImageSettingsDialogFragment) { ImageSettingsDialogFragment imFragment = (ImageSettingsDialogFragment) fragment; imFragment.dismissFragment(); } return false; } if (mViewPager.getCurrentItem() > PAGE_CONTENT) { if (mViewPager.getCurrentItem() == PAGE_SETTINGS) { mEditorFragment.setFeaturedImageId(mPost.getFeaturedImageId()); } mViewPager.setCurrentItem(PAGE_CONTENT); invalidateOptionsMenu(); } else if (isPhotoPickerShowing()) { hidePhotoPicker(); } else { savePostAndOptionallyFinish(true); } return true; }
Source:
<code>public void onDestroyView() { super.onDestroyView(); <START> ((AppCompatActivity) getActivity()) <END> .getSupportActionBar().setTitle(R.string.category_user_bricks); }</code><technical_language>Null-ptr check, please</technical_language>

Target:
public void onDestroyView() { super.onDestroyView(); AppCompatActivity appCompatActivity = (AppCompatActivity) getActivity(); if (appCompatActivity != null && appCompatActivity.getSupportActionBar() != null) { appCompatActivity.getSupportActionBar().setTitle(R.string.category_user_bricks); } }
Source:
<code><START> @Override public String toString() { return "ACES filmic tone mapping"; } <END></code><technical_language>I prefer this single-line style of method declaration. a personal preference, consistent. for example other toString() methods in this file</technical_language>

Target:
@Override public String toString() { return "None"; }
Source:
<code>public void testSetup() { try { zkClient = new ZkClient( new ZkConnection("127.0.0.1:" + zkServer.getPort(), SESSION_TIMEOUT_MS), CONNECTION_TIMEOUT_MS); } catch (Exception e) { Assert.fail("Client connection setup failed. Aborting tests.."); } try { zkClient.createPersistent(KEY_BUILDER.getProcessorsPath(), true); } catch (ZkNodeExistsException e) { } <START> ZkJobCoordinatorMetrics metrics = new ZkJobCoordinatorMetrics(new NoOpMetricsRegistry()); <END> zkUtils = new ZkUtils( KEY_BUILDER, zkClient, SESSION_TIMEOUT_MS, metrics); zkUtils.connect(); }</code><technical_language>nit: avoid a local variable metrics new NoOpMetricsRegistry in ZkUtils constructor</technical_language>

Target:
public void testSetup() { try { zkClient = new ZkClient( new ZkConnection("127.0.0.1:" + zkServer.getPort(), SESSION_TIMEOUT_MS), CONNECTION_TIMEOUT_MS); } catch (Exception e) { Assert.fail("Client connection setup failed. Aborting tests.."); } try { zkClient.createPersistent(KEY_BUILDER.getProcessorsPath(), true); } catch (ZkNodeExistsException e) { } zkUtils = new ZkUtils( KEY_BUILDER, zkClient, SESSION_TIMEOUT_MS, new ZkJobCoordinatorMetrics(new NoOpMetricsRegistry())); zkUtils.connect(); }
Source:
<code>protected AbstractImmutableBooleanData(Key<Value<Boolean>> usedKey, boolean value, boolean defaultValue) { super(usedKey, value, defaultValue); <START> this.immutableValue = Sponge.getRegistry().getValueFactory().createValue(usedKey, defaultValue, value).asImmutable(); <END> }</code><technical_language>this createValue(usedKey, value, defaultValue)</technical_language>

Target:
protected AbstractImmutableBooleanData(Key<Value<Boolean>> usedKey, boolean value, boolean defaultValue) { super(usedKey, value, defaultValue); this.immutableValue = Sponge.getRegistry().getValueFactory().createValue(usedKey, value, defaultValue).asImmutable(); }
Source:
<code>private boolean isConverged(GmmModel oldModel, GmmModel newModel) { A.ensure(oldModel.countOfComponents() == newModel.countOfComponents(), "oldModel.countOfComponents() == newModel.countOfComponents()"); boolean isConverged = true; for (int i = 0; i < oldModel.countOfComponents(); i++) { MultivariateGaussianDistribution d1 = oldModel.distributions().get(i); MultivariateGaussianDistribution d2 = newModel.distributions().get(i); <START> isConverged = isConverged && Math.sqrt(d1.mean().getDistanceSquared(d2.mean())) < eps; <END> } return isConverged; }</code><technical_language>sense return false if converged of loop return true</technical_language>

Target:
private boolean isConverged(GmmModel oldModel, GmmModel newModel) { A.ensure(oldModel.countOfComponents() == newModel.countOfComponents(), "oldModel.countOfComponents() == newModel.countOfComponents()"); for (int i = 0; i < oldModel.countOfComponents(); i++) { MultivariateGaussianDistribution d1 = oldModel.distributions().get(i); MultivariateGaussianDistribution d2 = newModel.distributions().get(i); if (Math.sqrt(d1.mean().getDistanceSquared(d2.mean())) >= eps) return false; } return true; }
Source:
<code><START> public List<IIssue> getStories() { <END> return mStories; }</code><technical_language>List => ArrayList</technical_language>

Target:
public ArrayList<IIssue> getStories() { return mStories; }
Source:
<code>public static List<ManagedCacheMBean> getManagedCache(List<Pair<String,JMXConnector>> mbscArray, List<String> mc) throws MalformedObjectNameException, IOException { List<ManagedCacheMBean> managedCache =new ArrayList<>(); for (Pair<String,JMXConnector> mbsc: mbscArray) { <START> for(int i = 0; i < mc.size(); i++) { <END> managedCache.add(getNewMBeanProxy(mbsc.getSecond(), MANAGED_CACHE + mc.get(i), ManagedCacheMBean.class)); } } return managedCache; }</code><technical_language>maybe: for(String s : mc) { managedCache.add(getNewMBeanProxy(mbsc.getSecond(), MANAGED_CACHE + s, ManagedCacheMBean.class)); }</technical_language>

Target:
public static List<ManagedCacheMBean> getManagedCache(List<Pair<String,JMXConnector>> mbscArray, List<String> mc) throws MalformedObjectNameException, IOException { List<ManagedCacheMBean> managedCache =new ArrayList<>(); for (Pair<String,JMXConnector> mbsc: mbscArray) { for(String s : mc) { managedCache.add(getNewMBeanProxy(mbsc.getSecond(), MANAGED_CACHE + s, ManagedCacheMBean.class)); } } return managedCache; }
Source:
<code>public void testHandlerMBeanRegistration() throws Exception { Set<ObjectName> names = server.queryNames(new ObjectName("test.MBeanRegistration:type=MessageHandler,*"), null); assertEquals(6, names.size()); assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain,bean=endpoint"))); assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain$child.t1,bean=handler"))); <START> assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain$child.t1,bean=handler"))); <END> }</code><technical_language>Hi, Gary! of **f1** :smile: other - LGTM</technical_language>

Target:
public void testHandlerMBeanRegistration() throws Exception { Set<ObjectName> names = server.queryNames(new ObjectName("test.MBeanRegistration:type=MessageHandler,*"), null); assertEquals(6, names.size()); assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain,bean=endpoint"))); assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain$child.t1,bean=handler"))); assertTrue(names.contains(new ObjectName("test.MBeanRegistration:type=MessageHandler,name=chain$child.f1,bean=handler"))); }
Source:
<code>public void finish() throws IOException { <START> checkInProduceState(); <END> broadcastEvent(EndOfPartitionEvent.INSTANCE, false); flushCurrentSortBuffer(); synchronized (lock) { checkState(!isReleased()); resultFile = fileWriter.finish(); fileWriter = null; LOG.info("New partitioned file produced: {}.", resultFile); } super.finish(); }</code><technical_language>nit: is redundant done in super#finish</technical_language>

Target:
public void finish() throws IOException { broadcastEvent(EndOfPartitionEvent.INSTANCE, false); flushCurrentSortBuffer(); synchronized (lock) { checkState(!isReleased(), "Result partition is already released."); resultFile = fileWriter.finish(); LOG.info("New partitioned file produced: {}.", resultFile); } super.finish(); }
Source:
<code>private void unloadResources() { ResourceSet rs = transactionalEditingDomain.getResourceSet(); for (Resource resource : getAllSessionResources()) { resource.unload(); rs.getResources().remove(resource); } for (Resource res : Iterables.concat(super.getResources(), getSemanticResources(), super.getControlledResources())) { try { if (!isFromPackageRegistry(rs, res)) { res.unload(); } } catch (final IllegalStateException e) { SiriusPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, SiriusPlugin.ID, <START> "Error while unloading an unaccessible resource")); <END> } rs.getResources().remove(res); } super.getAnalyses().clear(); super.getResources().clear(); super.getControlledResources().clear(); }</code><technical_language>Steve, i this message IllegalStateException,</technical_language>

Target:
private void unloadResources() { ResourceSet rs = transactionalEditingDomain.getResourceSet(); for (Resource resource : getAllSessionResources()) { resource.unload(); rs.getResources().remove(resource); } for (Resource res : Iterables.concat(super.getResources(), getSemanticResources(), super.getControlledResources())) { try { if (!isFromPackageRegistry(rs, res)) { res.unload(); } } catch (final IllegalStateException e) { SiriusPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, SiriusPlugin.ID, "Error while unloading an unaccessible resource:\n" + e.getMessage())); } rs.getResources().remove(res); } super.getAnalyses().clear(); super.getResources().clear(); super.getControlledResources().clear(); }
Source:
<code>private static boolean isNewFileHelper(final String localFileLastModifiedTime, final String serverFileLastModifiedTime, final boolean isPutCommand) { <START> DateTimeFormatter fmt = DateTimeFormat.forPattern("EEE MMM dd H:m:s z Y"); <END> final DateTime localFileDateTime = new DateTime(localFileLastModifiedTime); final DateTime serverFileDateTime = new DateTime(DateTime.parse(serverFileLastModifiedTime, fmt)); if (isPutCommand) { return DateTimeComparator.getInstance().compare(localFileDateTime, serverFileDateTime) > 0; } return DateTimeComparator.getInstance().compare(localFileDateTime, serverFileDateTime) < 0; }</code><technical_language>missing a final</technical_language>

Target:
private static boolean isNewFileHelper(final String localFileLastModifiedTime, final String serverFileLastModifiedTime, final boolean isPutCommand) { final DateTimeFormatter fmt = DateTimeFormat.forPattern("EEE MMM dd H:m:s z Y"); final DateTime localFileDateTime = new DateTime(localFileLastModifiedTime); final DateTime serverFileDateTime = new DateTime(DateTime.parse(serverFileLastModifiedTime, fmt)); if (isPutCommand) { return DateTimeComparator.getInstance().compare(localFileDateTime, serverFileDateTime) > 0; } return DateTimeComparator.getInstance().compare(localFileDateTime, serverFileDateTime) < 0; }
Source:
<code>private static Header readHeader(final BinaryCodec binaryCodec) { final byte[] buffer = new byte[SBI_MAGIC.length]; binaryCodec.readBytes(buffer); if (!Arrays.equals(buffer, SBI_MAGIC)) { throw new RuntimeException("Invalid file header in SBI: " + new String(buffer) + " (" + Arrays.toString(buffer) + ")"); } <START> long fileLength = binaryCodec.readLong(); <END> byte[] md5 = new byte[16]; binaryCodec.readBytes(md5); byte[] uuid = new byte[16]; binaryCodec.readBytes(uuid); long totalNumberOfRecords = binaryCodec.readLong(); long granularity = binaryCodec.readLong(); return new Header(fileLength, md5, uuid, totalNumberOfRecords, granularity); }</code><technical_language>more finals</technical_language>

Target:
private static Header readHeader(final BinaryCodec binaryCodec) { final byte[] buffer = new byte[SBI_MAGIC.length]; binaryCodec.readBytes(buffer); if (!Arrays.equals(buffer, SBI_MAGIC)) { throw new RuntimeException("Invalid file header in SBI: " + new String(buffer) + " (" + Arrays.toString(buffer) + ")"); } final long fileLength = binaryCodec.readLong(); final byte[] md5 = new byte[16]; binaryCodec.readBytes(md5); final byte[] uuid = new byte[16]; binaryCodec.readBytes(uuid); final long totalNumberOfRecords = binaryCodec.readLong(); final long granularity = binaryCodec.readLong(); return new Header(fileLength, md5, uuid, totalNumberOfRecords, granularity); }
Source:
<code>private boolean supportsDeferredPrallocation() { return FeatureSupported.isDeferringFileVolumePreallocationSupported( getStoragePool().getCompatibilityVersion()) && <START> getType() == VolumeType.Preallocated && getStorageDomain().getStorageType().isFileDomain(); <END> }</code><technical_language>Reverse order, isFileDomain Preallocated FeatureSupported</technical_language>

Target:
private boolean supportsDeferredPrallocation() { return getStorageDomain().getStorageType().isFileDomain() && getType() == VolumeType.Preallocated && FeatureSupported.isDeferringFileVolumePreallocationSupported( getStoragePool().getCompatibilityVersion()); }
Source:
<code>public void getDirectorySuffixWithSeparator_ReturnsDirectorySuffixWithSeparator() { String directorySuffix = "test"; Configuration configuration = new Configuration(outputDirectory, projectName); configuration.setDirectorySuffix(directorySuffix); Class<Configuration> configClass = Configuration.class; try { <START> Field suffixSeparator = configClass.getDeclaredField("SUFFIX_SEPARATOR"); <END> suffixSeparator.setAccessible(true); assertThat(configuration.getDirectorySuffixWithSeparator()).isEqualTo(suffixSeparator.get(null) + directorySuffix); } catch (NoSuchFieldException|IllegalAccessException ex) { fail("Unable to retrieve directory suffix separator"); } }</code><technical_language>I get this complicated :)</technical_language>

Target:
public void getDirectorySuffixWithSeparator_ReturnsDirectorySuffixWithSeparator() { String directorySuffix = "test"; Configuration configuration = new Configuration(outputDirectory, projectName); configuration.setDirectorySuffix(directorySuffix); assertThat(configuration.getDirectorySuffixWithSeparator()).isEqualTo("_" + directorySuffix); }
Source:
<code>public void testDirectoryUIOverride() throws Exception { deployContrib("org.nuxeo.ecm.directory.web.tests", "OSGI-INF/test-directory-ui-override-contrib.xml"); applyInlineDeployments(); <START> postSetUp(); <END> List<String> dirs = service.getDirectoryNames(); assertNotNull(dirs); assertEquals(1, dirs.size()); assertEquals("country", dirs.get(0)); DirectoryUI continent = service.getDirectoryInfo("continent"); assertNull(continent); DirectoryUI country = service.getDirectoryInfo("country"); assertNotNull(country); assertEquals("country", country.getName()); assertEquals("country_vocabulary", country.getLayout()); assertEquals("parent", country.getSortField()); assertEquals("foo", country.getView()); List<DirectoryDeleteConstraint> constraints = country.getDeleteConstraints(); assertNotNull(constraints); assertEquals(0, constraints.size()); }</code><technical_language>postSetUp called applyInlineDeployments + pushInlineDeployments</technical_language>

Target:
public void testDirectoryUIOverride() throws Exception { pushInlineDeployments("org.nuxeo.ecm.directory.web.tests:OSGI-INF/test-directory-ui-override-contrib.xml"); List<String> dirs = service.getDirectoryNames(); assertNotNull(dirs); assertEquals(1, dirs.size()); assertEquals("country", dirs.get(0)); DirectoryUI continent = service.getDirectoryInfo("continent"); assertNull(continent); DirectoryUI country = service.getDirectoryInfo("country"); assertNotNull(country); assertEquals("country", country.getName()); assertEquals("country_vocabulary", country.getLayout()); assertEquals("parent", country.getSortField()); assertEquals("foo", country.getView()); List<DirectoryDeleteConstraint> constraints = country.getDeleteConstraints(); assertNotNull(constraints); assertEquals(0, constraints.size()); }
Source:
<code>private void setProxyChainEnabled(boolean isEnabled) { txtProxyChainName.setEnabled(isEnabled); spinnerProxyChainPort.setEnabled(isEnabled); getProxyExcludedDomainsPanel().setComponentEnabled(isEnabled); chkProxyChainAuth.setEnabled(isEnabled); <START> chkShowPassword.setEnabled(isEnabled); <END> setProxyChainAuthEnabled(isEnabled && chkProxyChainAuth.isSelected()); Color color = Color.WHITE; if (!isEnabled) { color = panelProxyChain.getBackground(); } txtProxyChainName.setBackground(color); spinnerProxyChainPort.setBackground(color); }</code><technical_language>This statement removed, enabled stated is set in setProxyChainAuthEnabled</technical_language>

Target:
private void setProxyChainEnabled(boolean isEnabled) { txtProxyChainName.setEnabled(isEnabled); spinnerProxyChainPort.setEnabled(isEnabled); getProxyExcludedDomainsPanel().setComponentEnabled(isEnabled); chkProxyChainAuth.setEnabled(isEnabled); setProxyChainAuthEnabled(isEnabled && chkProxyChainAuth.isSelected()); Color color = Color.WHITE; if (!isEnabled) { color = panelProxyChain.getBackground(); } txtProxyChainName.setBackground(color); spinnerProxyChainPort.setBackground(color); }
Source:
<code>public boolean advance() { if (!isRunning()) { return false; } URI nextUri = currentStatusInfo().getNextUri(); if (nextUri == null) { state.compareAndSet(State.RUNNING, State.FINISHED); return false; } Request request = prepareRequest(HttpUrl.get(nextUri)).build(); Exception cause = null; long start = System.nanoTime(); long attempts = 0; while (true) { Duration sinceStart = Duration.nanosSince(start); if (sinceStart.compareTo(requestTimeoutNanos) > 0) { state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw new RuntimeException(format("Error fetching next (attempts: %s, duration: %s)", attempts, sinceStart), cause); } <START> <END> if (isClientAborted()) { return false; } if (attempts > 0) { try { MILLISECONDS.sleep(attempts * 100); } catch (InterruptedException e) { try { close(); } finally { Thread.currentThread().interrupt(); } state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw new RuntimeException("StatementClient thread was interrupted"); } } attempts++; JsonResponse<QueryResults> response; try { response = JsonResponse.execute(QUERY_RESULTS_CODEC, httpClient, request); } catch (RuntimeException e) { cause = e; continue; } if ((response.getStatusCode() == HTTP_OK) && response.hasValue()) { processResponse(response.getHeaders(), response.getValue()); return true; } if (response.getStatusCode() != HTTP_UNAVAILABLE) { state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw requestFailedException("fetching next", request, response); } } }</code><technical_language>This is fine leave top</technical_language>

Target:
public boolean advance() { if (!isRunning()) { return false; } URI nextUri = currentStatusInfo().getNextUri(); if (nextUri == null) { state.compareAndSet(State.RUNNING, State.FINISHED); return false; } Request request = prepareRequest(HttpUrl.get(nextUri)).build(); Exception cause = null; long start = System.nanoTime(); long attempts = 0; while (true) { if (isClientAborted()) { return false; } Duration sinceStart = Duration.nanosSince(start); if (attempts > 0 && sinceStart.compareTo(requestTimeoutNanos) > 0) { state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw new RuntimeException(format("Error fetching next (attempts: %s, duration: %s)", attempts, sinceStart), cause); } if (attempts > 0) { try { MILLISECONDS.sleep(attempts * 100); } catch (InterruptedException e) { try { close(); } finally { Thread.currentThread().interrupt(); } state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw new RuntimeException("StatementClient thread was interrupted"); } } attempts++; JsonResponse<QueryResults> response; try { response = JsonResponse.execute(QUERY_RESULTS_CODEC, httpClient, request); } catch (RuntimeException e) { cause = e; continue; } if ((response.getStatusCode() == HTTP_OK) && response.hasValue()) { processResponse(response.getHeaders(), response.getValue()); return true; } if (response.getStatusCode() != HTTP_UNAVAILABLE) { state.compareAndSet(State.RUNNING, State.CLIENT_ERROR); throw requestFailedException("fetching next", request, response); } } }
Source:
<code>public PageTitle titleForInternalLink(String internalLink) { <START> return new PageTitle(internalLink.replaceFirst("/wiki/", "").replaceAll("_", " "), this); <END> }</code><technical_language>replaceAll() need done here. done automatically in PageTitle.getDisplayText(). Instead, modify DisambigListAdapter:132 getDisplayText instead of getPrefixedText</technical_language>

Target:
public PageTitle titleForInternalLink(String internalLink) { return new PageTitle(internalLink.replaceFirst("/wiki/", ""), this); }
Source:
<code>public T getTargetFileSystem() throws IOException { if (isSingleLink && targetFileSystem == null) { targetFileSystem = initFileSystemFunction.apply(targetDirLinkList[0]); if (targetFileSystem == null) { throw new IOException("Could not initialize " <START> + "target File System for URI : " + targetDirLinkList[0]); <END> } } return targetFileSystem; }</code><technical_language>a PathIOException path</technical_language>

Target:
public T getTargetFileSystem() throws IOException { if (targetFileSystem != null) return targetFileSystem; if (targetDirLinkList.length == 1) { synchronized (this) { targetFileSystem = fileSystemInitFunc.apply(targetDirLinkList[0]); } } return targetFileSystem; }
Source:
<code>public void writePacketData(RailcraftOutputStream data) throws IOException { super.writePacketData(data); <START> tankManager.writePacketData(data); <END> data.writeBoolean(boiler.isBurning()); }</code><technical_language>This is required in render FluidStack in a TESR</technical_language>

Target:
public void writePacketData(RailcraftOutputStream data) throws IOException { super.writePacketData(data); data.writeBoolean(boiler.isBurning()); }
Source:
<code>private void applyInterfaceRules() { final List<? extends TypeMirror> interfaces = typeElement.getInterfaces(); final Stream<? extends TypeMirror> subInterfaces = interfaces.stream() .map(i -> (DeclaredType) i) .map(i -> (TypeElement) i.asElement()) <START> .flatMap(i -> i.getInterfaces().stream()); <END> Stream.concat(interfaces.stream(), subInterfaces).distinct().forEach(i -> interfaceRules.stream() .filter(r -> r.accept((ReferenceType)i)) .findFirst()); }</code><technical_language>Need more recursive in order obtain subinterfaces</technical_language>

Target:
private void applyInterfaceRules() { final List<? extends TypeMirror> interfaces = typeElement.getInterfaces(); final Stream<? extends TypeMirror> subInterfaces = interfaces.stream() .map(_interface -> (DeclaredType) _interface) .map(_interface -> (TypeElement) _interface.asElement()) .flatMap(_interface -> _interface.getInterfaces().stream()); Stream.concat(interfaces.stream(), subInterfaces).distinct().forEach(_interface -> interfaceRules.stream() .filter(rule -> rule.accept((ReferenceType)_interface)) .findFirst()); }
Source:
<code>public static void setup() throws IOException { FileUtils.deleteDirectory(new File(ODO_CACHE_DIR)); <START> UsageReportPreferences.setEnabled(false); <END> UsageReportPreferences.setAskUser(false); }</code><technical_language>needed, is env variable wich is set jobs</technical_language>

Target:
public static void setup() throws IOException { FileUtils.deleteDirectory(new File(ODO_CACHE_DIR)); }
Source:
<code>public void setChmod(int chmod) { Assert.isTrue(chmod <= 0777, "'chmod' must be between 0 and 0777 (octal)"); <START> BitSet bits = BitSet.valueOf(new byte[] { (byte) chmod, (byte) (chmod >> 8) }); <END> final Set<PosixFilePermission> permissions = new HashSet<>(); bits.stream().forEach(b -> { switch (b) { case 0: permissions.add(PosixFilePermission.OTHERS_EXECUTE); break; case 1: permissions.add(PosixFilePermission.OTHERS_WRITE); break; case 2: permissions.add(PosixFilePermission.OTHERS_READ); break; case 3: permissions.add(PosixFilePermission.GROUP_EXECUTE); break; case 4: permissions.add(PosixFilePermission.GROUP_WRITE); break; case 5: permissions.add(PosixFilePermission.GROUP_READ); break; case 6: permissions.add(PosixFilePermission.OWNER_EXECUTE); break; case 7: permissions.add(PosixFilePermission.OWNER_WRITE); break; case 8: permissions.add(PosixFilePermission.OWNER_READ); break; } }); this.permissions = permissions; }</code><technical_language>complain about, ignorance in bit operation this part (and switch) clear . mind explain a bit works? share some doc investigate Thanks</technical_language>

Target:
public void setChmod(int chmod) { Assert.isTrue(chmod <= 0777, "'chmod' must be between 0 and 0777 (octal)"); if (!FileUtils.IS_POSIX) { this.logger.error("'chmod' setting ignored - the file system does not support Posix attributes"); return; } BitSet bits = BitSet.valueOf(new byte[] { (byte) chmod, (byte) (chmod >> 8) }); final Set<PosixFilePermission> permissions = new HashSet<>(); bits.stream().forEach(b -> { switch (b) { case 0: permissions.add(PosixFilePermission.OTHERS_EXECUTE); break; case 1: permissions.add(PosixFilePermission.OTHERS_WRITE); break; case 2: permissions.add(PosixFilePermission.OTHERS_READ); break; case 3: permissions.add(PosixFilePermission.GROUP_EXECUTE); break; case 4: permissions.add(PosixFilePermission.GROUP_WRITE); break; case 5: permissions.add(PosixFilePermission.GROUP_READ); break; case 6: permissions.add(PosixFilePermission.OWNER_EXECUTE); break; case 7: permissions.add(PosixFilePermission.OWNER_WRITE); break; case 8: permissions.add(PosixFilePermission.OWNER_READ); break; } }); this.permissions = permissions; }
Source:
<code>public void afterApplicationName() { <START> datastorePath.setValue(dsPath + "/" + applicationName.getValue()); <END> }</code><technical_language>Strange naming. is datastorePath dsPath ? store dsPath Path dsPath.resolve(applicationName.getValue()) dsPath.toAbsolutePath().toString() needed</technical_language>

Target:
public void afterApplicationName() { datastorePath.setValue(dsPath.resolve(applicationName.getValue()).toAbsolutePath().toString()); }
Source:
<code>private void fillIn(List<HasMetadata> target, List<HasMetadata> objects) throws DevfileFormatException { <START> Set<String> uniqueNames = new HashSet<>(); <END> for (HasMetadata existingMeta : target) { uniqueNames.add(existingMeta.getKind() + '#' + existingMeta.getMetadata().getName()); } for (HasMetadata hasMeta : objects) { if (!uniqueNames.add(hasMeta.getKind() + '#' + hasMeta.getMetadata().getName())) { throw new DevfileFormatException( format( "Tools can not have objects with the same name and kind but there are multiple objects with kind '%s' and name '%s'", hasMeta.getKind(), hasMeta.getMetadata().getName())); } target.add(hasMeta); } }</code><technical_language>Map<Set<String>> instead of string concatenation</technical_language>

Target:
private void fillIn(List<HasMetadata> target, List<HasMetadata> objects) throws DevfileFormatException { Set<Pair<String, String>> uniqueKindToName = new HashSet<>(); for (HasMetadata existingMeta : target) { uniqueKindToName.add( new Pair<>(existingMeta.getKind(), existingMeta.getMetadata().getName())); } for (HasMetadata hasMeta : objects) { if (!uniqueKindToName.add(new Pair<>(hasMeta.getKind(), hasMeta.getMetadata().getName()))) { throw new DevfileFormatException( format( "Tools can not have objects with the same name and kind but there are multiple objects with kind '%s' and name '%s'", hasMeta.getKind(), hasMeta.getMetadata().getName())); } target.add(hasMeta); } }
Source:
<code>Set<StoreKey> getMissingStoreKeys() { <START> return missingStoreMessages == null ? Collections.emptySet() <END> : missingStoreMessages.stream().map(MessageInfo::getStoreKey).collect(Collectors.toSet()); }</code><technical_language>I impression stream collect set is deep copy, this ok (better confirm it)</technical_language>

Target:
synchronized Set<StoreKey> getMissingStoreKeys() { return missingStoreMessages == null ? Collections.emptySet() : missingStoreMessages.stream().map(MessageInfo::getStoreKey).collect(Collectors.toSet()); }
Source:
<code><START> public void testWithNonZeroFraction() throws SemanticException { <END> if (intType) { testNullCase("100.1"); } }</code><technical_language>nit: in case throwing exception a testcase: throw plain Exception -</technical_language>

Target:
public void testWithNonZeroFraction() throws Exception { if (intType) { testNullCase("100.1"); } }
Source:
<code>public void start(Method method, Object[] data) { Configuration.clearCustomTestProperties(); <START> Class<?> methodClass = method.getDeclaringClass(); <END> if (methodClass.isAnnotationPresent(Execute.class)) { setTestProperty("wikiName", methodClass.getAnnotation(Execute.class).onWikia()); setTestProperty("disableFlash", methodClass.getAnnotation(Execute.class).disableFlash()); setTestProperty("browser", methodClass.getAnnotation(Execute.class).browser()); setTestProperty("browserSize", methodClass.getAnnotation(Execute.class).browserSize()); setTestProperty("onDevice", methodClass.getAnnotation(Execute.class).onDevice()); } if (method.isAnnotationPresent(Execute.class)) { setTestProperty("wikiName", method.getAnnotation(Execute.class).onWikia()); setTestProperty("disableFlash", method.getAnnotation(Execute.class).disableFlash()); setTestProperty("browser", method.getAnnotation(Execute.class).browser()); setTestProperty("browserSize", method.getAnnotation(Execute.class).browserSize()); setTestProperty("onDevice", method.getAnnotation(Execute.class).onDevice()); } prepareURLs(); if(isTestExcludedFromEnv(method)){ throw new SkipException( "Test can't be run on " + Configuration.getEnv() + " environment"); } runProxyServerIfNeeded(method); if (method.isAnnotationPresent(UserAgent.class)) { setBrowserUserAgent(method.getAnnotation(UserAgent.class).userAgent()); } if (method.isAnnotationPresent(UseUnstablePageLoadStrategy.class)) { NewDriverProvider.setUnstablePageLoadStrategy(true); } startBrowser(); setWindowSize(); if (method.isAnnotationPresent(Execute.class)) { if (method.getAnnotation(Execute.class).asUser() == User.ANONYMOUS) { loadFirstPage(); } } else { loadFirstPage(); } NewDriverProvider.setUnstablePageLoadStrategy(false); }</code><technical_language>methodClass class</technical_language>

Target:
public void start(Method method, Object[] data) { Configuration.clearCustomTestProperties(); Class<?> declaringClass = method.getDeclaringClass(); String browser = Configuration.getBrowser(); setPropertiesFromAnnotationsOnDeclaringClass(declaringClass); setPropertiesFromAnnotationsOnMethod(method); String currentBrowser = Configuration.getBrowser(); if (!browser.equals(currentBrowser)) { PageObjectLogging .logWarning("Parameter override", "Browser parameter changed by annotation" + ", old value: " + browser + ", new value: " + currentBrowser); } prepareURLs(); if (isTestExcludedFromEnv(method)) { throw new SkipException( "Test can't be run on " + Configuration.getEnv() + " environment"); } runProxyServerIfNeeded(method); if (method.isAnnotationPresent(UserAgent.class)) { setBrowserUserAgent(method.getAnnotation(UserAgent.class).userAgent()); } if (method.isAnnotationPresent(UseUnstablePageLoadStrategy.class)) { NewDriverProvider.setUnstablePageLoadStrategy(true); } startBrowser(); setWindowSize(); if (!isNonAnonUserOnDeclaringClass(declaringClass) && !isNonAnonUserOnMethod(method)) { loadFirstPage(); } NewDriverProvider.setUnstablePageLoadStrategy(false); }
Source:
<code>public boolean isValidAuthority(URL authorizationEndpoint) { if (authorizationEndpoint != null && !StringExtensions.IsNullOrBlank(authorizationEndpoint.getHost()) && authorizationEndpoint.getProtocol().equals("https") && StringExtensions.IsNullOrBlank(authorizationEndpoint.getQuery()) && StringExtensions.IsNullOrBlank(authorizationEndpoint.getRef()) && !StringExtensions.IsNullOrBlank(authorizationEndpoint.getPath())) { if (UrlExtensions.isADFSAuthority(authorizationEndpoint)) { Logger.e(TAG, "Instance validation returned error", "", ADALError.DEVELOPER_AUTHORITY_CAN_NOT_BE_VALIDED, new AuthenticationException(ADALError.DISCOVERY_NOT_SUPPORTED)); return false; <START> } <END> return (sValidHosts.contains(authorizationEndpoint.getHost().toLowerCase(Locale.US))) || queryInstance(authorizationEndpoint); } return false; }</code><technical_language>combining it? logic clearer</technical_language>

Target:
public boolean isValidAuthority(URL authorizationEndpoint) { if (authorizationEndpoint != null && !StringExtensions.IsNullOrBlank(authorizationEndpoint.getHost()) && authorizationEndpoint.getProtocol().equals("https") && StringExtensions.IsNullOrBlank(authorizationEndpoint.getQuery()) && StringExtensions.IsNullOrBlank(authorizationEndpoint.getRef()) && !StringExtensions.IsNullOrBlank(authorizationEndpoint.getPath())) { if (UrlExtensions.isADFSAuthority(authorizationEndpoint)) { Logger.e(TAG, "Instance validation returned error", "", ADALError.DEVELOPER_AUTHORITY_CAN_NOT_BE_VALIDED, new AuthenticationException(ADALError.DISCOVERY_NOT_SUPPORTED)); } else if (sValidHosts.contains(authorizationEndpoint.getHost().toLowerCase(Locale.US))) { return true; } else { return queryInstance(authorizationEndpoint); } } return false; }
Source:
<code>private void updateModuleDefinitions() { if (this.zkConnection.getClient() != null) { try { CuratorFramework client = this.zkConnection.getClient(); if (client.checkExists().forPath(Paths.STREAMS) != null) { Iterable<StreamDefinition> streamDefinitions = findAll(); <START> for (StreamDefinition definition : streamDefinitions) { <END> setModuleDefinitions(client, definition); } } } catch (Exception e) { logger.error("Exception migrating stream definitions. This migration is done when the existing " + "stream definitions that don't have module definitions set. " + e); } } }</code><technical_language>lines simplified to: for (StreamDefinition definition : findAll()) {</technical_language>

Target:
private void updateModuleDefinitions() { if (this.zkConnection.getClient() != null) { try { CuratorFramework client = this.zkConnection.getClient(); if (client.checkExists().forPath(Paths.STREAMS) != null) { for (StreamDefinition definition : findAll()) { setModuleDefinitions(client, definition); } } } catch (Exception e) { logger.error("Exception migrating stream definitions. This migration is done when the existing " + "stream definitions that don't have module definitions set." , e); } } }
Source:
<code>public static SCMHeadCategory union(List<SCMHeadCategory> categories) { <START> if (categories.size() == 1) { <END> return categories.get(0); } boolean includesCatchAll = false; final List<SCMHeadCategory> _categories = new ArrayList<SCMHeadCategory>(categories); for (SCMHeadCategory c : _categories) { if (c.isUncategorized()) { includesCatchAll = true; break; } } if (includesCatchAll) { final Localizable displayName = toDisplayName(_categories); return new SCMHeadCategory(displayName) { @NonNull @Override protected Localizable defaultDisplayName() { return displayName; } @Override public boolean isMatch(@NonNull SCMHead instance) { return true; } }; } else { final Localizable displayName = toDisplayName(_categories); String name = toShortUrl(_categories); return new SCMHeadCategory(name, displayName) { @NonNull @Override protected Localizable defaultDisplayName() { return displayName; } @Override public boolean isMatch(@NonNull SCMHead instance) { for (SCMHeadCategory c : _categories) { if (c.isMatch(instance)) { return true; } } return false; } }; } }</code><technical_language>Is empty list permitted</technical_language>

Target:
public static SCMHeadCategory union(List<SCMHeadCategory> categories) { if (categories.isEmpty()) { throw new IllegalArgumentException("Cannot reduce an empty list"); } if (categories.size() == 1) { return categories.get(0); } boolean includesCatchAll = false; final List<SCMHeadCategory> _categories = new ArrayList<SCMHeadCategory>(categories); for (SCMHeadCategory c : _categories) { if (c.isUncategorized()) { includesCatchAll = true; break; } } if (includesCatchAll) { final Localizable displayName = toDisplayName(_categories); return new SCMHeadCategory(displayName) { @NonNull @Override protected Localizable defaultDisplayName() { return displayName; } @Override public boolean isMatch(@NonNull SCMHead instance) { return true; } }; } else { final Localizable displayName = toDisplayName(_categories); String name = toShortUrl(_categories); return new SCMHeadCategory(name, displayName) { @NonNull @Override protected Localizable defaultDisplayName() { return displayName; } @Override public boolean isMatch(@NonNull SCMHead instance) { for (SCMHeadCategory c : _categories) { if (c.isMatch(instance)) { return true; } } return false; } }; } }
Source:
<code><START> private void notifyUsersDatasetPublishStatus(CommandContext ctxt, DvObject subject, UserNotification.Type type) { <END> ctxt.roles().rolesAssignments(subject).stream() .filter( ra -> ra.getRole().permissions().contains(Permission.ViewUnpublishedDataset) || ra.getRole().permissions().contains(Permission.DownloadFile)) .flatMap( ra -> ctxt.roleAssignees().getExplicitUsers(ctxt.roleAssignees().getRoleAssignee(ra.getAssigneeIdentifier())).stream() ) .distinct() .forEach( au -> ctxt.notifications().sendNotification(au, getTimestamp(), type, getDataset().getLatestVersion().getId()) ); }</code><technical_language>I thought I understood in transaction version of sendNotification needed (to send email if command transaction rolling back), this - is correct is? (If so, I missing?)</technical_language>

Target:
private void notifyUsersDatasetPublishStatus(CommandContext ctxt, DvObject subject, UserNotification.Type type) { ctxt.roles().rolesAssignments(subject).stream() .filter( ra -> ra.getRole().permissions().contains(Permission.ViewUnpublishedDataset) || ra.getRole().permissions().contains(Permission.DownloadFile)) .flatMap( ra -> ctxt.roleAssignees().getExplicitUsers(ctxt.roleAssignees().getRoleAssignee(ra.getAssigneeIdentifier())).stream() ) .distinct() .forEach( au -> ctxt.notifications().sendNotificationInNewTransaction(au, getTimestamp(), type, getDataset().getLatestVersion().getId()) ); }
Source:
<code>public int hashCode() { int result = 1; result = 37 * result + getName().hashCode(); result = 37 * result + getValueType().hashCode(); <START> result = 37 * result + (!this.isInfinite() ? Arrays.hashCode(Iterables.toArray(this, Object.class)) : 0); <END> return result; }</code><technical_language>I Arrays.hashCode(Iterables.toArray(...)) faster manually calculating hashcode a simple foreach loop. avoid allocating a new array</technical_language>

Target:
public int hashCode() { if(this.isInfinite()) return System.identityHashCode(this); int result = 1; result = 37 * result + getName().hashCode(); result = 37 * result + getValueType().hashCode(); for(Object obj : this) { result = 37 * result + (obj != null ? obj.hashCode() : 0); } return result; }
Source:
<code>Response forget(URI lraId, URI parentId) { <START> return invokeParticipantMethod(forgetMethod, lraId, parentId, FORGET); <END> }</code><technical_language>clearing out entry in participantStatusMap. Similarly compensate complete callbacks finish successfully</technical_language>

Target:
synchronized Response forget(URI lraId, URI parentId) { return invokeParticipantMethod(forgetMethod, lraId, parentId, FORGET); }
Source:
<code>public static float convertRawToCO2(final int co2Raw) { if (co2Raw <= 0) { return 0.0f; } if (co2Raw > MAX_CO2) { <START> final Random random = new Random(); <END> final int wnoise = (int) (random.nextGaussian() * Math.sqrt(CO2_VARIANCE)); return (float) MAX_CO2 + wnoise; } return (float) co2Raw; }</code><technical_language>convinced adding random numbers sensor is a good idea Moreover, this right do it, random numbers change time this method is called. If wanted do it, "randomness" deterministic time (i.e. hashing timestamp somehow). do this, please</technical_language>

Target:
public static float convertRawToCO2(final int co2Raw) { if (co2Raw <= 0) { return 0.0f; } return (float) co2Raw; }
Source:
<code>public RemoteCacheManagerAdmin administration() { OperationsFactory operationsFactory = new OperationsFactory(transportFactory, codec, asyncExecutorService, configuration); <START> return new RemoteCacheManagerAdminImpl(operationsFactory, EnumSet.noneOf(CacheContainerAdmin.AdminFlag.class)); <END> }</code><technical_language>NONE</technical_language>

Target:
public RemoteCacheManagerAdmin administration() { OperationsFactory operationsFactory = new OperationsFactory(transportFactory, codec, asyncExecutorService, configuration); return new RemoteCacheManagerAdminImpl(operationsFactory, EnumSet.noneOf(CacheContainerAdmin.AdminFlag.class), name -> { synchronized (cacheName2RemoteCache) { cacheName2RemoteCache.remove(new RemoteCacheKey(name, true)); cacheName2RemoteCache.remove(new RemoteCacheKey(name, false)); } }); }
Source:
<code>private void handleMultipleRepositoryCheckoutError( Map<Repository, CheckoutResult> results) { <START> PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { <END> @Override public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); new MultiBranchOperationResultDialog(shell, results).open(); } }); }</code><technical_language>Lambda</technical_language>

Target:
private void handleMultipleRepositoryCheckoutError( Map<Repository, CheckoutResult> results) { PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); new MultiBranchOperationResultDialog(shell, results).open(); } ); }
Source:
<code>public int requestSizeInBytes(ProtocolVersion protocolVersion, CodecRegistry codecRegistry) { int size = Header.lengthFor(protocolVersion); <START> try { <END> switch (protocolVersion) { case V1: size += CBUtil.sizeOfConsistencyLevel(getConsistencyLevel()); break; case V2: case V3: case V4: case V5: size += CBUtil.sizeOfConsistencyLevel(getConsistencyLevel()); size += QueryFlag.serializedSize(protocolVersion); if (hasValues()) { if (usesNamedValues()) { size += CBUtil.sizeOfNamedValueList(getNamedValues(protocolVersion, codecRegistry)); } else { size += CBUtil.sizeOfValueList(Arrays.asList(getValues(protocolVersion, codecRegistry))); } } if (getFetchSize() > 0) { size += 4; } if (getPagingState() != null) { size += CBUtil.sizeOfValue(getPagingState()); } if (getSerialConsistencyLevel() != null) { size += CBUtil.sizeOfConsistencyLevel(getSerialConsistencyLevel()); } if (getDefaultTimestamp() > Long.MIN_VALUE) { size += 8; } if (ProtocolFeature.CUSTOM_PAYLOADS.isSupportedBy(protocolVersion) && getOutgoingPayload() != null) { size += CBUtil.sizeOfBytesMap(getOutgoingPayload()); } break; default: throw protocolVersion.unsupported(); } } catch (Exception e) { size = -1; } return size; }</code><technical_language>I query string is missing: java size += CBUtil.sizeOfLongString(getQueryString(codecRegistry));</technical_language>

Target:
public int requestSizeInBytes(ProtocolVersion protocolVersion, CodecRegistry codecRegistry) { int size = Header.lengthFor(protocolVersion); try { size += CBUtil.sizeOfLongString(getQueryString(codecRegistry)); switch (protocolVersion) { case V1: size += CBUtil.sizeOfConsistencyLevel(getConsistencyLevel()); break; case V2: case V3: case V4: case V5: size += CBUtil.sizeOfConsistencyLevel(getConsistencyLevel()); size += QueryFlag.serializedSize(protocolVersion); if (hasValues()) { if (usesNamedValues()) { size += CBUtil.sizeOfNamedValueList(getNamedValues(protocolVersion, codecRegistry)); } else { size += CBUtil.sizeOfValueList(Arrays.asList(getValues(protocolVersion, codecRegistry))); } } size += 4; if (getPagingState() != null) { size += CBUtil.sizeOfValue(getPagingState()); } size += CBUtil.sizeOfConsistencyLevel(getSerialConsistencyLevel()); if (ProtocolFeature.CLIENT_TIMESTAMPS.isSupportedBy(protocolVersion)) { size += 8; } if (ProtocolFeature.CUSTOM_PAYLOADS.isSupportedBy(protocolVersion) && getOutgoingPayload() != null) { size += CBUtil.sizeOfBytesMap(getOutgoingPayload()); } break; default: throw protocolVersion.unsupported(); } } catch (Exception e) { size = -1; } return size; }
Source:
<code>static public LocalDateTime stringToLocalDate(String s) { if (s.endsWith("Z")) { Instant instant = Instant.parse(s); return LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); <START> } else <END> return LocalDateTime.parse(s, DateTimeFormatter.ISO_LOCAL_DATE_TIME); }</code><technical_language>Missing brace</technical_language>

Target:
static public LocalDateTime stringToLocalDate(String s) { if (s.endsWith("Z")) { Instant instant = Instant.parse(s); return LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); } else { return LocalDateTime.parse(s, DateTimeFormatter.ISO_LOCAL_DATE_TIME); } }
Source:
<code>private void updateRwtEligiblityYear(CertifiedProductSearchDetails detail) { try { CertifiedProductDTO dto = certifiedProductDAO.getById(detail.getId()); dto.setRwtEligiblityYear(getEligibilityYear()); <START> certifiedProductDAO.update(dto); <END> LOGGER.info("Listing: " + detail.getId() + " - Added eligibility"); } catch (EntityRetrievalException e) { LOGGER.error("Listing: " + detail.getId() + " - Error setting eligibility", e); } }</code><technical_language>This work, I wondering field added main update method in DAO if a separate method (maybe in this job DAO class?) specific updating RWT Date. thinking a field updating in other scenario (is right?)</technical_language>

Target:
private void updateRwtEligiblityYear(CertifiedProductSearchDetails detail) { try { rwtEligibilityYearDAO.updateRwtEligibilityYear(detail.getId(), getEligibilityYear()); LOGGER.info("Listing: " + detail.getId() + " - Added eligibility"); } catch (EntityRetrievalException e) { LOGGER.error("Listing: " + detail.getId() + " - Error setting eligibility", e); } }