auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>@Config(reportSdk = GINGERBREAD) @Test public void responseSourceHeaderSetsResponseValue() <START> throws Exception { <END> server.enqueue(new MockResponse()); Downloader.Response response1 = loader.load(URL, false); assertThat(response1.cached).isFalse(); server.enqueue(new MockResponse().addHeader(RESPONSE_SOURCE, "CACHE 200")); Downloader.Response response2 = loader.load(URL, true); assertThat(response2.cached).isTrue(); }</code><technical_language>Revert. Add // prevent this</technical_language>

Target:
@Test public void responseSourceHeaderSetsResponseValue() throws Exception { server.enqueue(new MockResponse()); Downloader.Response response1 = loader.load(URL, false); assertThat(response1.cached).isFalse(); server.enqueue(new MockResponse().addHeader(RESPONSE_SOURCE, "CACHE 200")); Downloader.Response response2 = loader.load(URL, true); assertThat(response2.cached).isTrue(); }
Source:
<code>public void testSetGetDeleteField() { final String uuid = UUID.randomUUID().toString(); factory.set(uuid, DepositField.contactName, "Boxy"); factory.set(uuid, DepositField.fileName, "boxys_file.txt"); Map<String,String> status = factory.get(uuid); <START> assertTrue(status.size() == 2); <END> assertEquals("Boxy", status.get(DepositField.contactName.toString())); assertEquals("boxys_file.txt", status.get(DepositField.fileName.toString())); factory.deleteField(uuid, DepositField.fileName); status = factory.get(uuid); assertNull(status.get(DepositField.fileName.toString())); assertTrue(status.size() == 1); final String uuid2 = UUID.randomUUID().toString(); factory.set(uuid2, DepositField.depositorName, "FriendOfBoxy"); Set<Map<String,String>> statuses = factory.getAll(); assertEquals(statuses.size(), 2); }</code><technical_language>want search test for ==, want assertEquals instead</technical_language>

Target:
public void testSetGetDeleteField() { final String uuid = UUID.randomUUID().toString(); factory.set(uuid, DepositField.contactName, "Boxy"); factory.set(uuid, DepositField.fileName, "boxys_file.txt"); Map<String,String> status = factory.get(uuid); assertEquals(status.size(), 2); assertEquals("Boxy", status.get(DepositField.contactName.toString())); assertEquals("boxys_file.txt", status.get(DepositField.fileName.toString())); factory.deleteField(uuid, DepositField.fileName); status = factory.get(uuid); assertNull(status.get(DepositField.fileName.toString())); assertEquals(status.size(), 1); final String uuid2 = UUID.randomUUID().toString(); factory.set(uuid2, DepositField.depositorName, "FriendOfBoxy"); Set<Map<String,String>> statuses = factory.getAll(); assertEquals(statuses.size(), 2); }
Source:
<code>private void updateIrisListeningState() { <START> boolean screenOn = isScreenOn(); <END> mHandler.removeCallbacks(mRetryIrisAuthentication); boolean shouldListenForIris = shouldListenForIris(); if (shouldListenForIris && mIrisRunningState != IRIS_STATE_RUNNING) { startListeningForIris(); } else if (!shouldListenForIris && mIrisRunningState == IRIS_STATE_RUNNING) { stopListeningForIris(); } }</code><technical_language>Remove.. unused</technical_language>

Target:
private void updateIrisListeningState() { mHandler.removeCallbacks(mRetryIrisAuthentication); boolean shouldListenForIris = shouldListenForIris(); Log.e(TAG, "updateIrisListeningState: shouldListenForIris: " + shouldListenForIris); if (shouldListenForIris && mIrisRunningState != IRIS_STATE_RUNNING) { startListeningForIris(); } else if (!shouldListenForIris && mIrisRunningState == IRIS_STATE_RUNNING) { stopListeningForIris(); } }
Source:
<code>public void update() throws CTFException { Set<CTFStreamInputReader> readers = new HashSet<>(); for (ICTFStream stream : fTrace.getStreams()) { Set<CTFStreamInput> streamInputs = stream.getStreamInputs(); for (CTFStreamInput streamInput : streamInputs) { try (CTFStreamInputReader streamInputReader = new CTFStreamInputReader(checkNotNull(streamInput))) { if (!fStreamInputReaders.contains(streamInputReader)) { CTFStreamInputReader streamInputReaderToAdd = new CTFStreamInputReader(checkNotNull(streamInput)); streamInputReaderToAdd.readNextEvent(); fStreamInputReaders.add(streamInputReaderToAdd); readers.add(streamInputReaderToAdd); } } catch (IOException e) { Activator.logError(e.getMessage(), e); } } } long[] temp = fEventCountPerTraceFile; fEventCountPerTraceFile = new long[readers.size() + temp.length]; for (CTFStreamInputReader reader : readers) { fPrio.add(reader); } for (int i = 0; i < temp.length; i++) { fEventCountPerTraceFile[i] = temp[i]; } <START> System.arraycopy(temp,0,fEventCountPerTraceFile,0,temp.length); <END> }</code><technical_language>Please add a space comma</technical_language>

Target:
public void update() throws CTFException { Set<CTFStreamInputReader> readers = new HashSet<>(); for (ICTFStream stream : fTrace.getStreams()) { Set<CTFStreamInput> streamInputs = stream.getStreamInputs(); for (CTFStreamInput streamInput : streamInputs) { try (CTFStreamInputReader streamInputReader = new CTFStreamInputReader(checkNotNull(streamInput))) { if (!fStreamInputReaders.contains(streamInputReader)) { CTFStreamInputReader streamInputReaderToAdd = new CTFStreamInputReader(checkNotNull(streamInput)); streamInputReaderToAdd.readNextEvent(); fStreamInputReaders.add(streamInputReaderToAdd); readers.add(streamInputReaderToAdd); } } catch (IOException e) { Activator.logError(e.getMessage(), e); } } } long[] temp = fEventCountPerTraceFile; fEventCountPerTraceFile = new long[readers.size() + temp.length]; for (CTFStreamInputReader reader : readers) { fPrio.add(reader); } System.arraycopy(temp, 0, fEventCountPerTraceFile, 0, temp.length); }
Source:
<code>public ServiceOfferingVO findServiceOffering(final Long vmId, final long serviceOfferingId) { final short opendb = TransactionLegacy.currentTxn().getDatabaseId(); ServiceOfferingVO result = null; try (TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB)) { result = findById(vmId, serviceOfferingId); } catch (Exception e) { <START> s_logger.error("Quota ServiceOfferingDaoImpl::findServiceOffering() failed due to: " + e.getMessage()); <END> throw new CloudRuntimeException("Unable to find service offering for quota calculations"); } finally { TransactionLegacy.open(opendb).close(); } return result; }</code><technical_language>exception passed error call capture stack trace of exception</technical_language>

Target:
public ServiceOfferingVO findServiceOffering(final Long vmId, final long serviceOfferingId) { return Transaction.execute(TransactionLegacy.CLOUD_DB, new TransactionCallback<ServiceOfferingVO>() { @Override public ServiceOfferingVO doInTransaction(final TransactionStatus status) { ServiceOfferingVO offering = findById(serviceOfferingId); if (offering.isDynamic()) { if (vmId == null) { throw new CloudRuntimeException("missing argument vmId"); } offering.setDynamicFlag(true); Map<String, String> dynamicOffering = userVmDetailsDao.listDetailsKeyPairs(vmId); return getcomputeOffering(offering, dynamicOffering); } return offering; } }); }
Source:
<code>DeploymentToNodeMetadata(@Memoized Supplier<Set<? extends Location>> locations, GroupNamingConvention.Factory namingConvention, OSImageToImage osImageToImage, RoleSizeToHardware roleSizeToHardware, Map<String, Credentials> credentialStore) { this.nodeNamingConvention = checkNotNull(namingConvention, "namingConvention").createWithoutPrefix(); this.locations = checkNotNull(locations, "locations"); this.osImageToImage = checkNotNull(osImageToImage, "osImageToImage"); this.roleSizeToHardware = checkNotNull(roleSizeToHardware, "roleSizeToHardware"); <START> this.credentialStore = checkNotNull(credentialStore, "credentialStore cannot be null"); <END> }</code><technical_language>constructor is package private Guice injector able call it, remove null checks. injector fail if parameter is missing</technical_language>

Target:
DeploymentToNodeMetadata(@Memoized Supplier<Set<? extends Location>> locations, GroupNamingConvention.Factory namingConvention, OSImageToImage osImageToImage, RoleSizeToHardware roleSizeToHardware, Map<String, Credentials> credentialStore) { this.nodeNamingConvention = namingConvention.createWithoutPrefix(); this.locations = locations; this.osImageToImage = osImageToImage; this.roleSizeToHardware = roleSizeToHardware; this.credentialStore = credentialStore; }
Source:
<code>List<T> newInstancesFromHeteroList(StaplerRequest req, Object formData, Collection<? extends Descriptor<T>> descriptors) throws FormException { List<T> items = new ArrayList<T>(); if (formData!=null) { for (Object o : JSONArray.fromObject(formData)) { JSONObject jo = (JSONObject)o; String kind = jo.optString("$class", null); if (kind == null) { kind = jo.getString("kind"); } Descriptor<T> d = find(descriptors, kind); if (d != null) { items.add(d.newInstance(req, jo)); } <START> LOGGER.warning("Received unexpected formData for descriptor " + kind); <END> } } return items; }</code><technical_language>in else-clause</technical_language>

Target:
List<T> newInstancesFromHeteroList(StaplerRequest req, Object formData, Collection<? extends Descriptor<T>> descriptors) throws FormException { List<T> items = new ArrayList<T>(); if (formData!=null) { for (Object o : JSONArray.fromObject(formData)) { JSONObject jo = (JSONObject)o; Descriptor<T> d = null; String kind = jo.optString("kind", null); if (kind != null) { d = findById(descriptors, kind); } if (d == null) { kind = jo.getString("$class"); d = findByDescribableClassName(descriptors, kind); if (d == null) d = findByClassName(descriptors, kind); } if (d != null) { items.add(d.newInstance(req, jo)); } else { LOGGER.warning("Received unexpected formData for descriptor " + kind); } } } return items; }
Source:
<code>public String init(String jsonData) { JSONObject enabledJsApi = new JSONObject(); JSONObject data = new JSONObject(jsonData); <START> mCardSuppliedApiVersion = data.getString("version"); <END> mCardSuppliedDeveloperContact = data.getString("developer"); if (TextUtils.isEmpty(mCardSuppliedApiVersion) && TextUtils.isEmpty(mCardSuppliedDeveloperContact )) { enabledJsApi.put("toggleFlag", "disabled"); enabledJsApi.put("markCard", "disabled"); } else if (requireApiVersion(mCardSuppliedApiVersion)) { enabledJsApi.put("toggleFlag", "enabled"); enabledJsApi.put("markCard", "enabled"); } else { enabledJsApi.put("toggleFlag", "disabled"); enabledJsApi.put("markCard", "disabled"); } return String.valueOf(enabledJsApi); }</code><technical_language>user pass invalid data a crash suggestion mCardSuppliedApiVersion = data.optString("version", "");</technical_language>

Target:
public String init(String jsonData) { JSONObject enabledJsApi = new JSONObject(); JSONObject data = new JSONObject(); try { data = new JSONObject(jsonData); if (!(data == JSONObject.NULL)) { mCardSuppliedApiVersion = data.optString("version", ""); mCardSuppliedDeveloperContact = data.optString("developer", ""); } } catch (JSONException j) { UIUtils.showThemedToast(AbstractFlashcardViewer.this, getString(R.string.invalid_json_data, j.getLocalizedMessage()), false); } if (TextUtils.isEmpty(mCardSuppliedApiVersion) && TextUtils.isEmpty(mCardSuppliedDeveloperContact)) { enabledJsApi.put("toggleFlag", "disabled"); enabledJsApi.put("markCard", "disabled"); } else if (requireApiVersion(mCardSuppliedApiVersion)) { enabledJsApi.put("toggleFlag", "enabled"); enabledJsApi.put("markCard", "enabled"); } else { enabledJsApi.put("toggleFlag", "disabled"); enabledJsApi.put("markCard", "disabled"); } return String.valueOf(enabledJsApi); }
Source:
<code>protected Boolean getIsReadonlyFromXMLNode(Element elem) { return elem.attribute("readonly") != null ? Boolean.parseBoolean(elem.attribute("readonly").getValue()) : null; <START> } <END></code><technical_language>Put elem.attribute("readonly") in a local variable. below</technical_language>

Target:
protected Boolean getIsReadonlyFromXMLNode(Element elem) { Attribute readonly = elem.attribute("readonly"); return readonly != null ? Boolean.parseBoolean(readonly.getValue()) : null; }
Source:
<code>public static Object item(Object object, Object index) { if (object instanceof Map) { return mapItem((Map) object, index); } if (object instanceof List && index instanceof Number) { return arrayItem((List) object, ((Number) index).intValue()); } if (index instanceof Number) { return structAccess(object, ((Number) index).intValue() - 1, ""); } <START> if (index instanceof String) { <END> String indexAsStr = index.toString(); try { return structAccess(object, Integer.parseInt(indexAsStr) - 1, ""); } catch (NumberFormatException e) { return structAccess(object, -1, indexAsStr); } } return null; }</code><technical_language>support this if statement? Is pattern? person['1'] person[1] if is a string denotes access field name if is int is access field index? tests for this</technical_language>

Target:
public static Object item(Object object, Object index) { if (object instanceof Map) { return mapItem((Map) object, index); } if (object instanceof List && index instanceof Number) { return arrayItem((List) object, ((Number) index).intValue()); } if (index instanceof Number) { return structAccess(object, ((Number) index).intValue() - 1, null); } if (index instanceof String) { return structAccess(object, -1, index.toString()); } return null; }
Source:
<code>public static GerritTableView getActiveView() { IViewPart viewPart = null; if (rtv != null) { return rtv; } else { IWorkbench workbench = GerritUi.getDefault().getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IWorkbenchPage page = null; if (window != null ) { page = workbench.getActiveWorkbenchWindow() .getActivePage(); } if (page != null) { viewPart = page.findView(VIEW_ID); if (viewPart == null) { try { viewPart = page.showView(VIEW_ID, null, org.eclipse.ui.IWorkbenchPage.VIEW_CREATE); } catch (PartInitException e) { <START> StatusHandler.log(new Status(IStatus.WARNING, GerritCorePlugin.PLUGIN_ID, NLS.bind( "PartInitException: ''{0}'' ", e.getLocalizedMessage()))); <END> } GerritUi.Ftracer.traceWarning("getActiveView() SHOULD (JUST) CREATED A NEW Table:" + viewPart ); } } return (GerritTableView) viewPart; } }</code><technical_language>logging a status, please pass exception Status constructor. a stack trace easier find source of error</technical_language>

Target:
public static GerritTableView getActiveView() { IViewPart viewPart = null; if (rtv != null) { return rtv; } else { IWorkbench workbench = GerritUi.getDefault().getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IWorkbenchPage page = null; if (window != null ) { page = workbench.getActiveWorkbenchWindow() .getActivePage(); } if (page != null) { viewPart = page.findView(VIEW_ID); if (viewPart == null) { try { viewPart = page.showView(VIEW_ID, null, org.eclipse.ui.IWorkbenchPage.VIEW_CREATE); } catch (PartInitException e) { StatusHandler.log(new Status(IStatus.WARNING, GerritCorePlugin.PLUGIN_ID, NLS.bind( "PartInitException: ''{0}'' ", e))); } GerritUi.Ftracer.traceWarning("getActiveView() SHOULD (JUST) CREATED A NEW Table:" + viewPart ); } } return (GerritTableView) viewPart; } }
Source:
<code>public AdvancedCache<K, V> withFlags(final Flag... flags) { if (flags == null || flags.length == 0) return this; else { <START> boolean containsAll = false; <END> if (this.flags != null) { containsAll = true; for (Flag flag : flags) { if (!this.flags.contains(flag)) { containsAll = false; } } } if (containsAll) { return this; } else { EnumSet<Flag> newFlags = this.flags != null ? EnumSet.copyOf(this.flags) : EnumSet.noneOf(Flag.class); Collections.addAll(newFlags, flags); return new DecoratedCache<K, V>(this.cacheImplementation, this.classLoader.get(), newFlags); } } }</code><technical_language>do this assignment in else block line 105 well</technical_language>

Target:
public AdvancedCache<K, V> withFlags(final Flag... flags) { if (flags == null || flags.length == 0) return this; else { boolean containsAll; if (this.flags != null) { containsAll = true; for (Flag flag : flags) { if (!this.flags.contains(flag)) { containsAll = false; } } } else { containsAll = false; } if (containsAll) { return this; } else { EnumSet<Flag> newFlags = this.flags != null ? EnumSet.copyOf(this.flags) : EnumSet.noneOf(Flag.class); Collections.addAll(newFlags, flags); return new DecoratedCache<K, V>(this.cacheImplementation, this.classLoader.get(), newFlags); } } }
Source:
<code>public BlobProperties getBlobProperties(BlobId blobId, ClusterMap map, boolean expiredBlobs) { List<ReplicaId> replicas = blobId.getPartition().getReplicaIds(); BlobProperties blobProperties = null; for (ReplicaId replicaId : replicas) { try { blobProperties = getBlobProperties(blobId, map, replicaId.getDataNodeId().getHostname(), replicaId.getDataNodeId().getPort(), expiredBlobs); break; <START> } catch (MessageFormatException e) { } <END> catch (IOException e) { } } return blobProperties; }</code><technical_language>formatting</technical_language>

Target:
public BlobProperties getBlobProperties(BlobId blobId, ClusterMap map, boolean expiredBlobs) { List<ReplicaId> replicas = blobId.getPartition().getReplicaIds(); BlobProperties blobProperties = null; for (ReplicaId replicaId : replicas) { try { blobProperties = getBlobProperties(blobId, map, replicaId.getDataNodeId().getHostname(), replicaId.getDataNodeId().getPort(), expiredBlobs); break; } catch (Exception e) { } } return blobProperties; }
Source:
<code>private TestingSlotPoolImpl createAndSetUpSlotPoolWithoutResourceManager() throws Exception { <START> final TestingSlotPoolImpl slotPool = new TestingSlotPoolImpl(new JobID()); <END> slotPool.start(JobMasterId.generate(), "foobar", mainThreadExecutor); return slotPool; }</code><technical_language>SlotPoolBuilder do this setting resourceManagerGateway null</technical_language>

Target:
private TestingSlotPoolImpl createAndSetUpSlotPoolWithoutResourceManager() throws Exception { return SlotPoolUtils.createAndSetUpSlotPool(null); }
Source:
<code>public static void main(String[] args) { String connectionString = "Endpoint={fully-qualified-namespace};SharedAccessKeyName={policy-name};" + "SharedAccessKey={key}"; ServiceBusReceiverAsyncClient receiverAsyncClient = new ServiceBusClientBuilder() .connectionString(connectionString) .receiver() .receiveMode(ReceiveMode.PEEK_LOCK) .queueName("<<queue-name>>") .buildAsyncClient(); final ReceiveAsyncOptions options = new ReceiveAsyncOptions() .setEnableAutoComplete(false) .setMaxAutoRenewDuration(Duration.ofSeconds(2)); Disposable subscription = receiverAsyncClient.receive(options) .flatMap(message -> { boolean messageProcessed = false; if (messageProcessed) { return receiverAsyncClient.complete(message).then(); } else { return receiverAsyncClient.abandon(message).then(); } }).subscribe(); try { Thread.sleep(Duration.ofSeconds(60).toMillis()); } catch (InterruptedException ignored) { } subscription.dispose(); receiverAsyncClient.close(); <START> <END> try { Thread.sleep(30000); } catch (Exception ee ) }</code><technical_language>is this thread.sleep here</technical_language>

Target:
public static void main(String[] args) { String connectionString = "Endpoint={fully-qualified-namespace};SharedAccessKeyName={policy-name};" + "SharedAccessKey={key}"; ServiceBusReceiverAsyncClient receiverAsyncClient = new ServiceBusClientBuilder() .connectionString(connectionString) .receiver() .receiveMode(ReceiveMode.PEEK_LOCK) .queueName("<<queue-name>>") .buildAsyncClient(); final ReceiveAsyncOptions options = new ReceiveAsyncOptions() .setEnableAutoComplete(false) .setMaxAutoRenewDuration(Duration.ofSeconds(2)); Disposable subscription = receiverAsyncClient.receive(options) .flatMap(message -> { boolean messageProcessed = false; if (messageProcessed) { return receiverAsyncClient.complete(message).then(); } else { return receiverAsyncClient.abandon(message).then(); } }).subscribe(); try { Thread.sleep(Duration.ofSeconds(60).toMillis()); } catch (InterruptedException ignored) { } subscription.dispose(); receiverAsyncClient.close(); }
Source:
<code><START> private static Object getErrorResult(final Cell cell) { <END> String errorResult; try { errorResult = FormulaError.forInt(cell.getErrorCellValue()).getString(); } catch (final RuntimeException e) { logger .debug("Getting error code for ({},{}) failed!: {}", cell.getRowIndex(), cell.getColumnIndex(), e .getMessage()); if (cell instanceof XSSFCell) { errorResult = ((XSSFCell) cell).getErrorCellString(); } else { logger .error("Couldn't handle unexpected error scenario in cell: ({},{})", cell.getRowIndex(), cell .getColumnIndex()); throw e; } } return errorResult; }</code><technical_language>This method returns a String (unless throws Exception of course), change return signature String</technical_language>

Target:
private static String getErrorResult(final Cell cell) { try { return FormulaError.forInt(cell.getErrorCellValue()).getString(); } catch (final RuntimeException e) { logger .debug("Getting error code for ({},{}) failed!: {}", cell.getRowIndex(), cell.getColumnIndex(), e .getMessage()); if (cell instanceof XSSFCell) { return ((XSSFCell) cell).getErrorCellString(); } else { logger .error("Couldn't handle unexpected error scenario in cell: ({},{})", cell.getRowIndex(), cell .getColumnIndex()); throw e; } } }
Source:
<code>public int hashCode() { <START> return Objects.hash(this.allowedOrigins.hashCode(), <END> this.allowedMethodsRaw, this.allowedHeadersRaw); }</code><technical_language>Do want hash allowedOrigins.hashCode allowedOrigin? is more consistent</technical_language>

Target:
public int hashCode() { return Objects.hash(this.allowedOrigins, this.allowedMethodsRaw, this.allowedHeadersRaw); }
Source:
<code>public ConfigurationService(ServerConfiguration conf) { <START> assert conf != null; <END> this.conf = conf; }</code><technical_language>throw exception instead</technical_language>

Target:
public ConfigurationService(ServerConfiguration conf) { Preconditions.checkNotNull(conf); this.conf = conf; }
Source:
<code>@Override public void registerWorldGen(ICubicWorldServer world, GeneratorPipeline pipeline) { ServerCubeCache cubeCache = world.getCubeCache(); GeneratorStage terrain = new IndependentGeneratorStage("terrain"); DependentGeneratorStage features = new DependentGeneratorStage("features", null); <START> features.setCubeDependency(new RegionDependency(features, new Vec3i(0, -1, 0), new Vec3i(0, 0, 0))); <END> DependentGeneratorStage lighting = new DependentGeneratorStage("lighting", null); lighting.setCubeDependency(new RegionDependency(lighting, 2)); GeneratorStage population = new IndependentGeneratorStage("population"); pipeline.addStage(terrain, new CustomTerrainProcessor(world, 5)); pipeline.addStage(features, new CustomFeatureProcessor(features, "Features", cubeCache, 10)); pipeline.addStage(lighting, new FirstLightProcessor(lighting, "Lighting", cubeCache, 5)); pipeline.addStage(population, new CustomPopulationProcessor(population, "Population", world, 100)); }</code><technical_language>Change this IndependentGeneratorStage, require now</technical_language>

Target:
@Override public void registerWorldGen(ICubicWorldServer world, GeneratorPipeline pipeline) { ServerCubeCache cubeCache = world.getCubeCache(); GeneratorStage terrain = new IndependentGeneratorStage("terrain"); GeneratorStage features = new IndependentGeneratorStage("features"); DependentGeneratorStage lighting = new DependentGeneratorStage("lighting", null); lighting.setCubeDependency(new RegionDependency(lighting, 2)); GeneratorStage population = new IndependentGeneratorStage("population"); pipeline.addStage(terrain, new CustomTerrainProcessor(world, 5)); pipeline.addStage(features, new CustomFeatureProcessor(features, "Features", cubeCache, 10)); pipeline.addStage(lighting, new FirstLightProcessor(lighting, "Lighting", cubeCache, 5)); pipeline.addStage(population, new CustomPopulationProcessor(population, "Population", world, 100)); }
Source:
<code>public ExtensionBean getDetail(String extensionName) { EntityManager entityManager = getEntityManager(); beginTransaction(entityManager); Query q = entityManager.createNamedQuery(PersistenceConstants.GET_EXTENSION); q.setParameter(EXTENSION_NAME, extensionName); try { List resultList = q.getResultList(); <START> if (resultList.size()>0) { <END> return (ExtensionBean)resultList.get(0); } else { return null; } } finally { commitAndCloseTransaction(entityManager); } }</code><technical_language>isEmpty instead</technical_language>

Target:
public ExtensionBean getDetail(String extensionName) { EntityManager entityManager = getEntityManager(); beginTransaction(entityManager); Query q = entityManager.createNamedQuery(PersistenceConstants.GET_EXTENSION); q.setParameter(EXTENSION_NAME, extensionName); try { List resultList = q.getResultList(); if (!resultList.isEmpty()) { return (ExtensionBean)resultList.get(0); } else { return null; } } finally { commitAndCloseTransaction(entityManager); } }
Source:
<code>public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException { checkNotNullParam("link", link); checkIfInOpenState(); <START> synchronized (this.linkedPolicies) { <END> if (getContextID().equals(link.getContextID())) { throw log.authzLinkSamePolicyConfiguration(getContextID()); } this.linkedPolicies.add(this); if (!this.linkedPolicies.add(link)) { return; } ElytronPolicyConfiguration linkedPolicyConfiguration = (ElytronPolicyConfiguration) link; linkedPolicyConfiguration.linkConfiguration(this); this.linkedPolicies = linkedPolicyConfiguration.getLinkedPolicies(); } }</code><technical_language>This is fine. synchronizing collection field points to, updating field block. reading field get outdated copy</technical_language>

Target:
public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException { checkNotNullParam("link", link); synchronized (this) { checkIfInOpenState(); if (getContextID().equals(link.getContextID())) { throw log.authzLinkSamePolicyConfiguration(getContextID()); } this.linkedPolicies.add(this); if (!this.linkedPolicies.add(link)) { return; } ElytronPolicyConfiguration linkedPolicyConfiguration = (ElytronPolicyConfiguration) link; linkedPolicyConfiguration.linkConfiguration(this); this.linkedPolicies = linkedPolicyConfiguration.getLinkedPolicies(); } }
Source:
<code>public void testRawToken() throws Exception { String rawToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikp" + "vaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"; <START> JsonWebSignature jws = JsonWebSignature.parse(new MockJsonFactory(), rawToken); <END> assertEquals(jws.getRawToken(), rawToken); }</code><technical_language>jws --> signature</technical_language>

Target:
public void testRawToken() throws Exception { String rawToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikp" + "vaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"; JsonWebSignature signature = JsonWebSignature.parse(new MockJsonFactory(), rawToken); assertEquals(signature.getRawToken(), rawToken); }
Source:
<code>public int hashCode() { <START> return action.hashCode() + Boolean.valueOf(force).hashCode() <END> + Integer.valueOf(min).hashCode() + Integer.valueOf(max).hashCode() + group.hashCode(); }</code><technical_language>group.hashCode() enough here. In general a Permission PermissionRule a unique group put rules for group in Permission, combine PermissionRules Permission instances semantic meaning of vary</technical_language>

Target:
public int hashCode() { return group.hashCode(); }
Source:
<code>private boolean isLowRamDevice() { return ((ActivityManager) <START> getContext().getSystemService(Context.ACTIVITY_SERVICE)) <END> .isLowRamDevice(); }</code><technical_language>This class mContext is derived MediaPlayerTestBase. it? Is different</technical_language>

Target:
private boolean isLowRamDevice() { return ((ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE)). isLowRamDevice(); }
Source:
<code>public List<SlimAssertion> getAssertions() { String tableName = getTableName(); List<SlimAssertion> setSymbolsAssertions = new ArrayList<SlimAssertion>(); int rows = table.getRowCount(); for (int row = 1; row < rows; row++) { int cols = table.getColumnCountInRow(row); for (int col = 0; col < cols; col++) { String match; if ((match = ifSymbolAssignment(col, row)) != null) { Instruction instruction = callAndAssign(match, tableName + "_EXTRACT", "getValue", String.valueOf(row - 1), String.valueOf(col)); setSymbolsAssertions.add(makeAssertion(instruction, SlimExpectation.NOOP_EXPECTATION)); } } } List<SlimAssertion> assertions = new ArrayList<SlimAssertion>(); assertions.add(constructFixture(getFixtureName())); if (setSymbolsAssertions.size() > 0) { assertions.add(makeAssertion(callAndAssign(tableName, tableName, "doTable", tableAsList()), new TableTableExpectation())); assertions.add(makeAssertion(new MakeInstruction(makeInstructionTag(), tableName + "_EXTRACT", <START> TableTableExtractSymbol.class.getCanonicalName(), new Object[] { "$" + tableName }), SlimExpectation.NOOP_EXPECTATION)); <END> assertions.addAll(setSymbolsAssertions); } else { assertions.add(makeAssertion(callFunction(tableName, "doTable", tableAsList()), new TableTableExpectation())); } return assertions; }</code><technical_language>If I get right, this creates a new instance of TableTableExtractSymbol executing side of Slim, meaning need TableTableExtractSymbol class in class path (i.e. fitnesse.jar, is case). means, Slim implementation in other languages needs define a class fitnesse.testsystems.slim.tables.TableTableExtractSymbol (sic! package/namespace). is a protocol change. TableTableExtractSymbol is Slim execution side, fitnesse.slim</technical_language>

Target:
public List<SlimAssertion> getAssertions() { String tableName = getTableName(); List<SlimAssertion> setSymbolsAssertions = new ArrayList<SlimAssertion>(); int rows = table.getRowCount(); for (int row = 1; row < rows; row++) { int cols = table.getColumnCountInRow(row); for (int col = 0; col < cols; col++) { String match; if ((match = ifSymbolAssignment(col, row)) != null) { Instruction instruction = callAndAssign(match, tableName + "_EXTRACT", "getValue", String.valueOf(row - 1), String.valueOf(col)); setSymbolsAssertions.add(makeAssertion(instruction, SlimExpectation.NOOP_EXPECTATION)); } } } List<SlimAssertion> assertions = new ArrayList<SlimAssertion>(); assertions.add(constructFixture(getFixtureName())); if (setSymbolsAssertions.size() > 0) { assertions.add(makeAssertion(callAndAssign(tableName, tableName, "doTable", tableAsList()), new TableTableExpectation())); assertions.add(makeAssertion(new MakeInstruction(makeInstructionTag(), tableName + "_EXTRACT", RegexpExtractSymbolValue.class.getCanonicalName(), new Object[] { "$" + tableName , EXTRACT_REGEXP}), SlimExpectation.NOOP_EXPECTATION)); assertions.addAll(setSymbolsAssertions); } else { assertions.add(makeAssertion(callFunction(tableName, "doTable", tableAsList()), new TableTableExpectation())); } return assertions; }
Source:
<code>public boolean isAcceptable(Response response, Address address) { if (targets.contains(address)) { missingResponses--; if (response instanceof SuccessfulResponse || response instanceof ExceptionResponse) { <START> validResponses++; <END> return true; } } return false; }</code><technical_language>ExceptionResponse is a ValidResponse, validResponses field name is longer accurate</technical_language>

Target:
public boolean isAcceptable(Response response, Address address) { if (targets.contains(address)) { missingResponses--; if (response instanceof SuccessfulResponse || response instanceof ExceptionResponse) { acceptableResponses++; return true; } } return false; }
Source:
<code>public boolean isNameVisibleToUser( FeedbackQuestionAttributes question, FeedbackResponseAttributes response, String userEmail, UserRole role, boolean isGiverName, CourseRoster roster) { if (question == null) { return false; } if (question.giverType == FeedbackParticipantType.TEAMS) { <START> if (roster.isStudentInTeam(userEmail, response.giver)) { <END> return true; } } else { if (response.giver.equals(userEmail)) { return true; } } return isFeedbackParticipantNameVisibleToUser(question, response, userEmail, role, isGiverName, roster); }</code><technical_language>Some context here: - Sadly, do manage migrate database for team response. entries in database giver is of team member's email</technical_language>

Target:
public boolean isNameVisibleToUser( FeedbackQuestionAttributes question, FeedbackResponseAttributes response, String userEmail, UserRole role, boolean isGiverName, CourseRoster roster) { if (question == null) { return false; } if (question.giverType == FeedbackParticipantType.TEAMS) { if (roster.isStudentInTeam(userEmail, response.giver) || roster.isStudentsInSameTeam(userEmail, response.giver)) { return true; } } else { if (response.giver.equals(userEmail)) { return true; } } return isFeedbackParticipantNameVisibleToUser(question, response, userEmail, role, isGiverName, roster); }
Source:
<code>private Expiration<SocketPoolable> createSocketExpiration() { if (socketExpirationMs <= 0) { return new SocketExpiration(); } else { <START> return new TimeExpiration<SocketPoolable>(socketExpirationMs, MILLISECONDS); <END> } }</code><technical_language>want a compound expiration checks in SocketExpiration in addition timeout</technical_language>

Target:
private Expiration<SocketPoolable> createSocketExpiration() { if (socketExpirationMs <= 0) { return new SocketExpiration(); } else { return new CompoundExpiration<>( new TimeExpiration<SocketPoolable>(socketExpirationMs, MILLISECONDS), new SocketExpiration()); } }
Source:
<code>public synchronized void write(@Nonnull char[] cbuf, int off, int len) throws IOException { while (len > 0) { if (!buf.hasRemaining()) filterFlushLines(); if (!buf.hasRemaining()) { buf = CharBuffer.allocate(buf.capacity() + DEFAULT_BUFFER_CAPACITY).put(buf); } int toCopy = Math.min(buf.remaining(), len); <START> if (toCopy == 0) throw new IllegalStateException(); <END> buf.put(cbuf, off, toCopy); filterFlushLines(); len -= toCopy; off += toCopy; } filterFlushLines(); }</code><technical_language>This impossible a message in exception great for (including ourselves) reading code in future</technical_language>

Target:
public synchronized void write(@Nonnull char[] cbuf, int off, int len) throws IOException { ensureOpen(); while (len > 0) { if (!buf.hasRemaining()) filterFlushLines(); if (!buf.hasRemaining()) { buf = CharBuffer.allocate(buf.capacity() * 2).put(buf); } int toCopy = Math.min(buf.remaining(), len); if (toCopy == 0) throw new IllegalStateException(); buf.put(cbuf, off, toCopy); filterFlushLines(); len -= toCopy; off += toCopy; } filterFlushLines(); }
Source:
<code>public static BoxEntity createEntityFromJson(final String json){ BoxEntity createdByEntity = new BoxEntity(); createdByEntity.createFromJson(json); if (createdByEntity.getType() == null){ return createdByEntity; } if (createdByEntity.getType().equals(BoxCollection.TYPE)) { BoxCollection collection = new BoxCollection(); collection.createFromJson(json); return collection; } else if (createdByEntity.getType().equals(BoxComment.TYPE)) { BoxComment comment = new BoxComment(); comment.createFromJson(json); return comment; } else if (createdByEntity.getType().equals(BoxCollaboration.TYPE)) { BoxCollaboration collaboration = new BoxCollaboration(); collaboration.createFromJson(json); return collaboration; } else if (createdByEntity.getType().equals(BoxEnterprise.TYPE)) { BoxEnterprise enterprise = new BoxEnterprise(); enterprise.createFromJson(json); return enterprise; } else if (createdByEntity.getType().equals(BoxFileVersion.TYPE)) { BoxFileVersion version = new BoxFileVersion(); version.createFromJson(json); return version; <START> } else if (createdByEntity.getType().equals(BoxMetadata.TYPE)) { <END> BoxMetadata metadata = new BoxMetadata(); metadata.createFromJson(json); return metadata; } BoxEntity item = BoxItem.createBoxItemFromJson(json); if (item != null){ return item; } item = BoxCollaborator.createCollaboratorFromJson(json); if (item != null){ return item; } return null; }</code><technical_language>remove this if needed I BoxMetadata extend BoxEntity id type</technical_language>

Target:
public static BoxEntity createEntityFromJson(final String json){ BoxEntity createdByEntity = new BoxEntity(); createdByEntity.createFromJson(json); if (createdByEntity.getType() == null){ return createdByEntity; } if (createdByEntity.getType().equals(BoxCollection.TYPE)) { BoxCollection collection = new BoxCollection(); collection.createFromJson(json); return collection; } else if (createdByEntity.getType().equals(BoxComment.TYPE)) { BoxComment comment = new BoxComment(); comment.createFromJson(json); return comment; } else if (createdByEntity.getType().equals(BoxCollaboration.TYPE)) { BoxCollaboration collaboration = new BoxCollaboration(); collaboration.createFromJson(json); return collaboration; } else if (createdByEntity.getType().equals(BoxEnterprise.TYPE)) { BoxEnterprise enterprise = new BoxEnterprise(); enterprise.createFromJson(json); return enterprise; } else if (createdByEntity.getType().equals(BoxFileVersion.TYPE)) { BoxFileVersion version = new BoxFileVersion(); version.createFromJson(json); return version; } BoxEntity item = BoxItem.createBoxItemFromJson(json); if (item != null){ return item; } item = BoxCollaborator.createCollaboratorFromJson(json); if (item != null){ return item; } return null; }
Source:
<code>public Collection<Cookie> getRequestCookies() { final List<Cookie> cookies = new ArrayList<>(); final Http.Cookies httpCookies = request.cookies(); httpCookies.forEach(httpCookie -> { final Cookie cookie = new Cookie(httpCookie.name(), httpCookie.value()); <START> cookie.setDomain((httpCookie.domain() != null? httpCookie.domain():".")); <END> cookie.setHttpOnly(httpCookie.httpOnly()); cookie.setMaxAge((httpCookie.maxAge() != null? httpCookie.maxAge():-1)); cookie.setPath(httpCookie.path()); cookie.setSecure(httpCookie.secure()); cookies.add(cookie); }); return cookies; }</code><technical_language>setting domain if is null? I mean: java if (httpCookie.domain() != null) { cookie.setDomain(httpCookie.domain()); } work</technical_language>

Target:
public Collection<Cookie> getRequestCookies() { final List<Cookie> cookies = new ArrayList<>(); final Http.Cookies httpCookies = request.cookies(); httpCookies.forEach(httpCookie -> { final Cookie cookie = new Cookie(httpCookie.name(), httpCookie.value()); if(httpCookie.domain() != null) { cookie.setDomain(httpCookie.domain()); } cookie.setHttpOnly(httpCookie.httpOnly()); if(httpCookie.maxAge() != null) { cookie.setMaxAge(httpCookie.maxAge()); } cookie.setPath(httpCookie.path()); cookie.setSecure(httpCookie.secure()); cookies.add(cookie); }); return cookies; }
Source:
<code>public Status insert(String table, String endpoint, HashMap<String, ByteIterator> values) { int responseCode; try { responseCode = httpExecute(new HttpPost(urlPrefix + endpoint), values.get("data").toString()); } catch (Exception e) { responseCode = handleExceptions(e, urlPrefix + endpoint, HttpMethod.POST); } if (logEnabled) { <START> System.out.println(new StringBuilder("POST Request: ").append(urlPrefix).append(endpoint) <END> .append(" | Response Code: ").append(responseCode).toString()); } return getStatus(responseCode); }</code><technical_language>System.out instead of System.err</technical_language>

Target:
public Status insert(String table, String endpoint, HashMap<String, ByteIterator> values) { int responseCode; try { responseCode = httpExecute(new HttpPost(urlPrefix + endpoint), values.get("data").toString()); } catch (Exception e) { responseCode = handleExceptions(e, urlPrefix + endpoint, HttpMethod.POST); } if (logEnabled) { System.err.println(new StringBuilder("POST Request: ").append(urlPrefix).append(endpoint) .append(" | Response Code: ").append(responseCode).toString()); } return getStatus(responseCode); }
Source:
<code>private String createLink(ServletContext context){ return context.getContextPath() + "/" + English.plural(getType()) + "/" + getId(); <START> } <END></code><technical_language>I mean, link refer ID, if ID is integer, opposed new UUID, link limited new objects integer ID, objects uuid. ensure compatibility, need leave getLink return integerID, getLinkUUID new identifier. (this is rest versioning, want break contracts)</technical_language>

Target:
private String createLink(ServletContext context){ return context.getContextPath() + "/" + English.plural(getType()) + "/" + getUUID(); }
Source:
<code>protected void run() { try (Git git = new Git(db)) { if (command == null) { RemoteListCommand cmd = git.remoteList(); List<RemoteConfig> remotes = cmd.call(); <START> print(remotes); <END> } else { switch (command) { case "add": RemoteAddCommand add = git.remoteAdd(); add.setName(name); add.setUri(new URIish(uri)); add.call(); break; case "remove": case "rm": RemoteRemoveCommand rm = git.remoteRemove(); rm.setRemoteName(name); rm.call(); break; case "set-url": RemoteSetUrlCommand remoteSetUrl = git.remoteSetUrl(); remoteSetUrl.setRemoteName(name); remoteSetUrl.setRemoteUri(new URIish(uri)); remoteSetUrl .setUriType(push ? UriType.PUSH : UriType.FETCH); remoteSetUrl.call(); break; case "update": Fetch fetch = new Fetch(); fetch.init(db, gitdir); StringWriter osw = new StringWriter(); fetch.outw = new ThrowingPrintWriter(osw); StringWriter esw = new StringWriter(); fetch.errw = new ThrowingPrintWriter(esw); List<String> fetchArgs = new ArrayList<>(); if (verbose) { fetchArgs.add("--verbose"); } if (prune) { fetchArgs.add("--prune"); } if (name != null) { fetchArgs.add(name); } fetch.execute(fetchArgs.toArray(new String[0])); fetch.outw.flush(); fetch.errw.flush(); outw.println(osw.toString()); errw.println(esw.toString()); break; default: throw new JGitInternalException(MessageFormat .format(CLIText.get().unknownSubcommand, command)); } } } catch (Exception e) { throw die(e.getMessage(), e); } }</code><technical_language>return this statement</technical_language>

Target:
protected void run() { try (Git git = new Git(db)) { if (command == null) { RemoteListCommand cmd = git.remoteList(); List<RemoteConfig> remotes = cmd.call(); print(remotes); return; } switch (command) { case "add": RemoteAddCommand add = git.remoteAdd(); add.setName(name); add.setUri(new URIish(uri)); add.call(); break; case "remove": case "rm": RemoteRemoveCommand rm = git.remoteRemove(); rm.setRemoteName(name); rm.call(); break; case "set-url": RemoteSetUrlCommand remoteSetUrl = git.remoteSetUrl(); remoteSetUrl.setRemoteName(name); remoteSetUrl.setRemoteUri(new URIish(uri)); remoteSetUrl.setUriType(push ? UriType.PUSH : UriType.FETCH); remoteSetUrl.call(); break; case "update": Fetch fetch = new Fetch(); fetch.init(db, gitdir); StringWriter osw = new StringWriter(); fetch.outw = new ThrowingPrintWriter(osw); StringWriter esw = new StringWriter(); fetch.errw = new ThrowingPrintWriter(esw); List<String> fetchArgs = new ArrayList<>(); if (verbose) { fetchArgs.add("--verbose"); } if (prune) { fetchArgs.add("--prune"); } if (name != null) { fetchArgs.add(name); } fetch.execute(fetchArgs.toArray(new String[0])); fetch.outw.flush(); fetch.errw.flush(); outw.println(osw.toString()); errw.println(esw.toString()); break; default: throw new JGitInternalException(MessageFormat .format(CLIText.get().unknownSubcommand, command)); } } catch (Exception e) { throw die(e.getMessage(), e); } }
Source:
<code>protected List<String> getChildrenIds(String parentId, boolean excludeSpecialChildren, boolean excludeRegularChildren) { if (isOrderable(parentId)) { List<DBSDocumentState> docStates; <START> docStates = transaction.getChildrenStates(parentId, excludeSpecialChildren, excludeRegularChildren); <END> docStates.sort(POS_COMPARATOR); List<String> children = new ArrayList<>(docStates.size()); for (DBSDocumentState docState : docStates) { children.add(docState.getId()); } return children; } else { return transaction.getChildrenIds(parentId, excludeSpecialChildren, excludeRegularChildren); } }</code><technical_language>line</technical_language>

Target:
protected List<String> getChildrenIds(String parentId, boolean excludeSpecialChildren, boolean excludeRegularChildren) { if (isOrderable(parentId)) { List<DBSDocumentState> docStates = transaction.getChildrenStates(parentId, excludeSpecialChildren, excludeRegularChildren); docStates.sort(POS_COMPARATOR); List<String> children = new ArrayList<>(docStates.size()); for (DBSDocumentState docState : docStates) { children.add(docState.getId()); } return children; } else { return transaction.getChildrenIds(parentId, excludeSpecialChildren, excludeRegularChildren); } }
Source:
<code>private synchronized Long getGasPrice() { int size = calcGasPricesSize(); if (size < getMinTransactions() || blockGasPrices.size() < getMinBlocks()) return null; <START> long[] difficulties = new long[size > getMinTransactions() ? size : getMinTransactions()]; <END> int index = 0; for (int i = 0; i < blockGasPrices.size(); ++i) { long[] current = blockGasPrices.get(i); for (long currentDifficulty : current) { difficulties[index] = currentDifficulty; ++index; } } Arrays.sort(difficulties); return difficulties[difficulties.length/getPercentileShare()]; }</code><technical_language>Ternary operator in array size definition omitted</technical_language>

Target:
private synchronized Long getGasPrice() { int size = calcGasPricesSize(); if (size < getMinTransactions() || blockGasPrices.size() < getMinBlocks()) return null; long[] difficulties = new long[size]; int index = 0; for (long[] currentBlock : blockGasPrices) { for (long currentDifficulty : currentBlock) { difficulties[index] = currentDifficulty; ++index; } } Arrays.sort(difficulties); return difficulties[difficulties.length/getPercentileShare()]; }
Source:
<code>public FeedbackSubmissionEditQuestion(FeedbackQuestionAttributes questionAttributes, int qnIndx, boolean isModeratedQuestion) { courseId = questionAttributes.courseId; questionNumber = questionAttributes.questionNumber; this.qnIndx = qnIndx; questionId = questionAttributes.getId(); questionText = questionAttributes.getQuestionDetails().getQuestionText(); visibilityMessages = questionAttributes.getVisibilityMessage(); questionType = questionAttributes.questionType; numberOfEntitiesToGiveFeedbackTo = questionAttributes.numberOfEntitiesToGiveFeedbackTo; this.isModeratedQuestion = isModeratedQuestion; isRecipientNameHidden = questionAttributes.isRecipientNameHidden(); <START> isTeamQuestion = questionAttributes.giverType.equals(FeedbackParticipantType.TEAMS); <END> isRecipientTeam = questionAttributes.recipientType.equals(FeedbackParticipantType.TEAMS) || questionAttributes.recipientType.equals(FeedbackParticipantType.OWN_TEAM); }</code><technical_language>slightly out of scope of this PR, isRecipientTeam is added, this field renamed isGiverTeam reduce ambiguity</technical_language>

Target:
public FeedbackSubmissionEditQuestion(FeedbackQuestionAttributes questionAttributes, int qnIndx, boolean isModeratedQuestion) { courseId = questionAttributes.courseId; questionNumber = questionAttributes.questionNumber; this.qnIndx = qnIndx; questionId = questionAttributes.getId(); questionText = questionAttributes.getQuestionDetails().getQuestionText(); visibilityMessages = questionAttributes.getVisibilityMessage(); questionType = questionAttributes.questionType; numberOfEntitiesToGiveFeedbackTo = questionAttributes.numberOfEntitiesToGiveFeedbackTo; this.isModeratedQuestion = isModeratedQuestion; isRecipientNameHidden = questionAttributes.isRecipientNameHidden(); isGiverTeam = questionAttributes.giverType.equals(FeedbackParticipantType.TEAMS); isRecipientTeam = questionAttributes.recipientType.isTeam(); }
Source:
<code><START> public void doInit() { <END> ConversionService conversionService = this.getConversionService(); if (conversionService != null && this.messageProcessor instanceof AbstractMessageProcessor) { ((AbstractMessageProcessor<?>) this.messageProcessor).setConversionService(conversionService); } if (this.messageProcessor instanceof BeanFactoryAware) { ((BeanFactoryAware) this.messageProcessor).setBeanFactory(this.getBeanFactory()); } }</code><technical_language>'public'</technical_language>

Target:
protected void doInit() { ConversionService conversionService = this.getConversionService(); if (conversionService != null && this.messageProcessor instanceof AbstractMessageProcessor) { ((AbstractMessageProcessor<?>) this.messageProcessor).setConversionService(conversionService); } if (this.messageProcessor instanceof BeanFactoryAware) { ((BeanFactoryAware) this.messageProcessor).setBeanFactory(this.getBeanFactory()); } }