auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void cleanserTest() { List<TextAnnotation> toyAnnotations = new ArrayList<>(); for (int i = 0; i < 3 ; i++) { <START> TextAnnotation ta = ToyTextAnnotationGenerator.generateToyTextAnnotation(3); <END> toyAnnotations.add(ta); } Set<String> uncleansed = toyAnnotations.get(0).getAvailableViews(); Set<String> uncleansedViews = new HashSet<>(); uncleansedViews.addAll(uncleansed); List<TextAnnotation> cleansedAnnotations; TokenLabelCleanser cleanser = new TokenLabelCleanser(); cleansedAnnotations = cleanser.removeAnnotations(toyAnnotations); for (TextAnnotation cleansedAnnotation : cleansedAnnotations) { Set<String> views = cleansedAnnotation.getAvailableViews(); Assert.assertEquals(1, views.size()); Assert.assertEquals(2, uncleansedViews.size()); Assert.assertTrue(uncleansedViews.contains(ViewNames.TOKENS)); Assert.assertFalse(views.contains(ViewNames.TOKENS)); } }</code><technical_language>remove ToyTextAnnotationGenerator instead [this](<LINK_0></technical_language>

Target:
public void cleanserTest() { List<TextAnnotation> toyAnnotations = new ArrayList<>(); for (int i = 0; i < 3 ; i++) { TextAnnotation ta = DummyTextAnnotationGenerator.generateBasicTextAnnotation(1); toyAnnotations.add(ta); } Set<String> uncleansed = toyAnnotations.get(0).getAvailableViews(); Set<String> uncleansedViews = new HashSet<>(); uncleansedViews.addAll(uncleansed); List<TextAnnotation> cleansedAnnotations; TokenLabelCleanser cleanser = new TokenLabelCleanser(); cleansedAnnotations = cleanser.removeAnnotations(toyAnnotations); for (TextAnnotation cleansedAnnotation : cleansedAnnotations) { Set<String> views = cleansedAnnotation.getAvailableViews(); Assert.assertEquals(1, views.size()); Assert.assertEquals(2, uncleansedViews.size()); Assert.assertTrue(uncleansedViews.contains(ViewNames.TOKENS)); Assert.assertFalse(views.contains(ViewNames.TOKENS)); } }
Source:
<code>public List<String> toJSONStrings() { ArrayList<String> list = new ArrayList<>(); for ( RowMap map : jsonMaps() ) { <START> ByteArrayOutputStream b = new ByteArrayOutputStream(); <END> JsonGenerator g = createJSONGenerator(b); try { rowMapToJSON(g, map); g.flush(); list.add(b.toString()); } catch ( IOException e ) { } } return list; }</code><technical_language>Instead of new-ing a ByteArrayOutputStream time, b.reset()</technical_language>

Target:
public List<String> toJSONStrings() { ArrayList<String> list = new ArrayList<>(); ByteArrayOutputStream b = new ByteArrayOutputStream(); JsonGenerator g = createJSONGenerator(b); g.setRootValueSeparator(null); for ( RowMap map : jsonMaps() ) { try { rowMapToJSON(g, map); b.reset(); g.flush(); list.add(b.toString()); } catch ( IOException e ) { LOGGER.error("Caught IOException while generating JSON: " + e, e); } } return list; }
Source:
<code>protected void executeCommand() { Job job = ExecutionHandler.createJob(VdcActionType.AddExternalJob, this); job.setDescription(getParameters().getDescription()); job.setAutoCleared(getParameters().isAutoCleared()); Guid id = job.getId(); job.setExternal(true); JobRepositoryFactory.getJobRepository().saveJob(job); <START> if (DbFacade.getInstance().getJobDao().get(id) != null) { <END> setActionReturnValue(id); setSucceeded(true); } else { setSucceeded(false); } }</code><technical_language>For mocking (even if now) purposes I a getJobDao() method instead of explicit singleton call here</technical_language>

Target:
protected void executeCommand() { Job job = ExecutionHandler.createJob(VdcActionType.AddExternalJob, this); job.setDescription(getParameters().getDescription()); job.setAutoCleared(getParameters().isAutoCleared()); Guid id = job.getId(); job.setExternal(true); JobRepositoryFactory.getJobRepository().saveJob(job); if (getJobDao().get(id) != null) { setActionReturnValue(id); setSucceeded(true); } else { setSucceeded(false); } }
Source:
<code><START> protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { <END> return application.sources(AuthServer.class); }</code><technical_language>This method is needed. docs state: > Class SpringBootServletInitializer > ... > configure application override configure(SpringApplicationBuilder) method (calling SpringApplicationBuilder.sources(Object...)) initializer a @Configuration. tested method worked</technical_language>

Target:
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { application.application().setDefaultProperties(DEFAULT_PROPERTIES); return application.sources(AuthServer.class); }
Source:
<code>public String toString() { return new String('[' + String.valueOf(fStart) + ", " + <START> (String.valueOf(fStart <END> + fDuration)) + ']'); }</code><technical_language>unnecessary parenthesis</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("["); sb.append(fStart); sb.append(", "); sb.append(fStart + fDuration); sb.append("]"); return sb.toString(); }
Source:
<code>public static void insertBenchmarkSuite(Handle handle, String suite, String querySet, String phases, String sessionProperties) { handle.execute( "INSERT INTO benchmark_suites(\n" + " suite, query_set, phases, session_properties, created_by, create_time, update_time)\n" + "SELECT\n" + " ?,\n" + " ?,\n" + " ?,\n" + " ?,\n" + " 'benchmark',\n" + <START> " CURRENT_TIMESTAMP,\n" + " CURRENT_TIMESTAMP\n", <END> suite, querySet, phases, sessionProperties); }</code><technical_language>remove</technical_language>

Target:
public static void insertBenchmarkSuite(Handle handle, String suite, String querySet, String phases, String sessionProperties) { handle.execute( "INSERT INTO benchmark_suites(\n" + " `suite`, `query_set`, `phases`, `session_properties`, `created_by`)\n" + "SELECT\n" + " ?,\n" + " ?,\n" + " ?,\n" + " ?,\n" + " 'benchmark'\n", suite, querySet, phases, sessionProperties); }
Source:
<code>public ContentAssistant openContentAssistant(String assistantLabel) { activate(); log.info("Open editor's " + assistantLabel + " content assistant"); AbstractWait.sleep(TimePeriod.SHORT); Shell[] shells1 = ShellLookup.getInstance().getShells(); <START> new ShellMenu("Edit", "Content Assist", assistantLabel).select(); <END> ContentAssistantShellIsOpened caw = new ContentAssistantShellIsOpened( shells1); new WaitUntil(caw); return new ContentAssistant(caw.getContentAssistTable()); }</code><technical_language>if I pass non-existing assistantLabel, I get some meaningful exception "Content assistant "+assistantLabel+ " exist". another case is if assistantLabel is is disabled - "Content assistant "+assistantLabel+ " is disabled"</technical_language>

Target:
public ContentAssistant openContentAssistant(String assistantLabel) { return openContentAssistant("Edit", "Content Assist", assistantLabel); }
Source:
<code>public void getPublicIPAddress() { final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName); boolean jobDone = Predicates2.retry(new Predicate<String>() { @Override public boolean apply(String name) { return ipApi.get(name).properties().provisioningState().equals("Succeeded"); } }, 10 * 1000).apply(publicIpAddressName); <START> assertTrue(jobDone, "getVault operation did not complete in the configured timeout"); <END> PublicIPAddress ip = ipApi.get(publicIpAddressName); assertNotNull(ip); assertEquals(ip.name(), publicIpAddressName); assertEquals(ip.location(), LOCATION); assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourceGroupName, publicIpAddressName)); assertEquals(ip.tags().get("testkey"), "testvalue"); assertNotNull(ip.properties()); assertEquals(ip.properties().provisioningState(), "Succeeded"); assertNotNull(ip.properties().ipAddress()); assertEquals(ip.properties().publicIPAllocationMethod(), "Static"); assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4); }</code><technical_language>I get more approriate</technical_language>

Target:
public void getPublicIPAddress() { final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName); boolean jobDone = Predicates2.retry(new Predicate<String>() { @Override public boolean apply(String name) { return ipApi.get(name).properties().provisioningState().equals("Succeeded"); } }, 10 * 1000).apply(publicIpAddressName); assertTrue(jobDone, "get operation did not complete in the configured timeout"); PublicIPAddress ip = ipApi.get(publicIpAddressName); assertNotNull(ip); assertEquals(ip.name(), publicIpAddressName); assertEquals(ip.location(), LOCATION); assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourceGroupName, publicIpAddressName)); assertEquals(ip.tags().get("testkey"), "testvalue"); assertNotNull(ip.properties()); assertEquals(ip.properties().provisioningState(), "Succeeded"); assertNotNull(ip.properties().ipAddress()); assertEquals(ip.properties().publicIPAllocationMethod(), "Static"); assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4); }
Source:
<code>public <T> T construct(Class<T> componentType) { if (PendingLockManager.class.equals(componentType)) { final boolean clustered = configuration.clustering().cacheMode().isClustered(); <START> return clustered ? (T) new DefaultPendingLockManager() : (T) NoOpPendingLockManager.getInstance(); <END> } if (configuration.deadlockDetection().enabled()) { return (T) new DeadlockDetectingLockManager(); } else { return (T) new LockManagerImpl(); } }</code><technical_language>I I late game this (the unchecked cast is everywhere), is reason return componentType.cast(clustered ? new DefaultPendingLockManager() : NoOpPendingLockManager.getInstance());</technical_language>

Target:
public <T> T construct(Class<T> componentType) { if (PendingLockManager.class.equals(componentType)) { return componentType.cast(configuration.clustering().cacheMode().isClustered() ? new DefaultPendingLockManager() : NoOpPendingLockManager.getInstance()); } else if (LockManager.class.equals(componentType)) { return componentType.cast(configuration.deadlockDetection().enabled() ? new DeadlockDetectingLockManager() : new LockManagerImpl()); } throw new IllegalArgumentException("Unexpected component type " + componentType + "."); }
Source:
<code><START> protected void errorOccurred(ErrorContext context) { <END> if (operationFailedHandler == null) { throw new IllegalStateException("Uninitialised error handler"); } Throwable throwable = context.getThrowable(); if (throwable instanceof LockObtainFailedException) { List<LuceneWork> failingOperations = context.getFailingOperations(); LuceneWork operationAtFault = context.getOperationAtFault(); List<LuceneWork> failed = new ArrayList<>(failingOperations); failed.add(operationAtFault); operationFailedHandler.lockObtainFailed(failed); } }</code><technical_language>this log a debug well? error sounds important :)</technical_language>

Target:
protected void errorOccurred(ErrorContext context) { if (operationFailedHandler != null) { Throwable throwable = context.getThrowable(); if (throwable instanceof LockObtainFailedException) { List<LuceneWork> failingOperations = context.getFailingOperations(); LuceneWork operationAtFault = context.getOperationAtFault(); List<LuceneWork> failed = new ArrayList<>(failingOperations); failed.add(operationAtFault); operationFailedHandler.lockObtainFailed(failed); } } }
Source:
<code>public void setDest(final RandomAccessOutputStream stream, final int imageIndex, final SCIFIOConfig config) throws FormatException, IOException { super.setDest(stream, imageIndex, config); <START> if (getStream().length() == 0) { writeHeader(); } <END> }</code><technical_language>This is ImageJ style. curly braces present, opening brace line, statement(s) line(s), closing brace line. Eclipse code style formatter this</technical_language>

Target:
public void setDest(final RandomAccessOutputStream stream, final int imageIndex, final SCIFIOConfig config) throws FormatException, IOException { super.setDest(stream, imageIndex, config); if (getStream().length() == 0) writeHeader(); }
Source:
<code>public Pair<String, Boolean> reprocess(OMMetadataManager omMetadataManager) { LOG.info("Starting a 'reprocess' run of FileSizeCountTask."); Table<String, OmKeyInfo> omKeyInfoTable = omMetadataManager.getKeyTable(); try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>> keyIter = omKeyInfoTable.iterator()) { while(keyIter.hasNext()) { Table.KeyValue<String, OmKeyInfo> kv = keyIter.next(); countFileSize(kv.getValue()); } populateFileCountBySizeDB(); } catch (IOException ioEx) { <START> LOG.error("Unable to populate Container Key Prefix data in Recon DB. ", ioEx); <END> return new ImmutablePair<>(getTaskName(), false); } LOG.info("Completed a 'reprocess' run of FileSizeCountTask."); return new ImmutablePair<>(getTaskName(), true); }</code><technical_language>log a error message here? populate file counts size container key prefix here. Also, indentation here</technical_language>

Target:
public Pair<String, Boolean> reprocess(OMMetadataManager omMetadataManager) { LOG.info("Starting a 'reprocess' run of FileSizeCountTask."); Table<String, OmKeyInfo> omKeyInfoTable = omMetadataManager.getKeyTable(); try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>> keyIter = omKeyInfoTable.iterator()) { while (keyIter.hasNext()) { Table.KeyValue<String, OmKeyInfo> kv = keyIter.next(); updateUpperBoundCount(kv.getValue(), PUT); } } catch (IOException ioEx) { LOG.error("Unable to populate File Size Count in Recon DB. ", ioEx); return new ImmutablePair<>(getTaskName(), false); } populateFileCountBySizeDB(); LOG.info("Completed a 'reprocess' run of FileSizeCountTask."); return new ImmutablePair<>(getTaskName(), true); }
Source:
<code>protected boolean compareAndPut(Ref oldRef, Ref newRef) throws IOException { <START> boolean ret = compareAndPutImpl(oldRef, newRef); if (ret) { objdb.markDirty(); } <END> return ret; }</code><technical_language>I need mark object database dirty store a ref. object(s) visible for newRef</technical_language>

Target:
protected boolean compareAndPut(Ref oldRef, Ref newRef) throws IOException { try { lock.writeLock().lock(); ObjectId id = newRef.getObjectId(); if (id != null) { try (RevWalk rw = new RevWalk(getRepository())) { rw.parseAny(id); } } String name = newRef.getName(); if (oldRef == null) return refs.putIfAbsent(name, newRef) == null; Ref cur = refs.get(name); Ref toCompare = cur; if (toCompare != null) { if (toCompare.isSymbolic()) { Ref leaf = toCompare.getLeaf(); if (leaf.getObjectId() == null) { leaf = refs.get(leaf.getName()); if (leaf.isSymbolic()) throw new IllegalArgumentException(); toCompare = new SymbolicRef( name, new ObjectIdRef.Unpeeled( Storage.NEW, leaf.getName(), leaf.getObjectId())); } else toCompare = toCompare.getLeaf(); } if (eq(toCompare, oldRef)) return refs.replace(name, cur, newRef); } if (oldRef.getStorage() == Storage.NEW) return refs.putIfAbsent(name, newRef) == null; return false; } finally { lock.writeLock().unlock(); } }
Source:
<code>public void be_able_to_remove_bounded_context_from_builder() { final BoundedContext firstBoundedContext = newBoundedContext("Removed"); final BoundedContext secondBoundedContext = newBoundedContext("Also removed"); final BoundedContext thirdBoundedContext = newBoundedContext("The one to stay"); <START> final SubscriptionService subscriptionService = SubscriptionService.newBuilder() <END> .addBoundedContext(firstBoundedContext) .addBoundedContext(secondBoundedContext) .addBoundedContext(thirdBoundedContext) .removeBoundedContext(secondBoundedContext) .removeBoundedContext(firstBoundedContext) .build(); assertNotNull(subscriptionService); }</code><technical_language>need check contexts removed builder. Consider adding a method builder</technical_language>

Target:
public void be_able_to_remove_bounded_context_from_builder() { final BoundedContext firstBoundedContext = newBoundedContext("Removed", newSimpleStand()); final BoundedContext secondBoundedContext = newBoundedContext("Also removed", newSimpleStand()); final BoundedContext thirdBoundedContext = newBoundedContext("The one to stay", newSimpleStand()); final SubscriptionService.Builder builder = SubscriptionService.newBuilder() .addBoundedContext(firstBoundedContext) .addBoundedContext(secondBoundedContext) .addBoundedContext(thirdBoundedContext) .removeBoundedContext(secondBoundedContext) .removeBoundedContext(firstBoundedContext); final SubscriptionService subscriptionService = builder.build(); assertNotNull(subscriptionService); final List<BoundedContext> boundedContexts = builder.getBoundedContexts(); assertSize(1, boundedContexts); assertFalse(boundedContexts.contains(firstBoundedContext)); assertFalse(boundedContexts.contains(secondBoundedContext)); assertTrue(boundedContexts.contains(thirdBoundedContext)); }
Source:
<code>private void handleSetDetails(Message message) { if (isCorrectEvent(message, CommActions.ACTIONDETAILS)) { handleCommEventSync(message, CommActions.ACTIONDETAILS, this::onActionDetails); } <START> LOGGER.warn("Warning: set details handler received non-set details message " + message.toString()); <END> }</code><technical_language>warning conditional</technical_language>

Target:
private void handleSetDetails(Message message) { if (isCorrectEvent(message, CommActions.ACTIONDETAILS)) { handleCommEventSync(message, CommActions.ACTIONDETAILS, this::onActionDetails); } }
Source:
<code>public LZMACompressorInputStream(final InputStream inputStream) throws IOException { try { in = new LZMAInputStream(inputStream, MemoryLimit.getMemoryLimitInKb()); } catch (org.tukaani.xz.MemoryLimitException e) { <START> throw new MemoryLimitException(e.getMemoryNeeded(), e.getMemoryLimit()); <END> } }</code><technical_language>source code of MemoryLimitException classes, this hide root of exception? original e exception is ignored</technical_language>

Target:
public LZMACompressorInputStream(final InputStream inputStream) throws IOException { in = new LZMAInputStream(inputStream, -1); }
Source:
<code>public ProfileDto updateProfileStatus(Integer userId, String statusName) { Profile profile = profileService.findProfileByUserLogin(userService.findUserById(userId).getLogin()); if(profile != null) { if(statusName.equals("Checked")) { profile.setChecked(true); } else { profile.setChecked(false); } profileService.saveProfile(profile); CheckedProfile checkedProfile = checkedProfileService.findCheckedProfileByProfileId(profile.getId()); if(checkedProfile == null) { checkedProfile = new CheckedProfile(); checkedProfile.setProfile(profile); } <START> checkedProfile.setModerator(userService.findByLogin(SecurityContextHolder.getContext().getAuthentication().getName())); <END> checkedProfile.setStatus(checkedStatusService.findByName(statusName)); checkedProfileService.save(checkedProfile); } return mapProfile(profile); }</code><technical_language>In utils static method for authentication name</technical_language>

Target:
public ProfileDto updateProfileStatus(Integer userId, String statusName) { Profile profile = profileService.findProfileByUserLogin(userService.findUserById(userId).getLogin()); if(profile != null) { if(statusName.equals("Checked")) { profile.setChecked(true); } else { profile.setChecked(false); } profileService.saveProfile(profile); CheckedProfile checkedProfile = checkedProfileService.findCheckedProfileByProfileId(profile.getId()); if(checkedProfile == null) { checkedProfile = new CheckedProfile(); checkedProfile.setProfile(profile); } checkedProfile.setModerator(userService.findByLogin(Util.getUserLogin())); checkedProfile.setStatus(checkedStatusService.findByName(statusName)); checkedProfileService.save(checkedProfile); } return mapProfile(profile); }
Source:
<code>private String buildConfig(@NotNull String host) { String validName = getValidNameForSecret(host); StringBuilder stringBuilder = new StringBuilder(); stringBuilder .append("host ") .append(host) .append("\n") .append("HostName ") .append(host) .append("\nIdentityFile ") .append(SSH_BASE_CONFIG_PATH) .append(validName) .append("/") .append(SSH_PRIVATE_KEY) .append("\n"); <START> return stringBuilder.toString(); <END> }</code><technical_language>IDE propose replace String, java return "host " + host + "\n" + "HostName " + host + "\nIdentityFile " + SSH_BASE_CONFIG_PATH + getValidNameForSecret(host) + "/" + SSH_PRIVATE_KEY + "\n"; WDYT</technical_language>

Target:
private String buildConfig(@NotNull String host) { return "host " + host + "\n" + "HostName " + host + "\nIdentityFile " + SSH_BASE_CONFIG_PATH + getValidNameForSecret(host) + "/" + SSH_PRIVATE_KEY + "\n"; }
Source:
<code>private void writeDictionaryRowGroup(Block dictionary, int valueCount, LongInputStream dictionaryIdInputStream) { int[] dictionaryIdBuffer = new int[1024]; while (valueCount > 0) { int batchSize = Math.min(valueCount, dictionaryIdBuffer.length); try { dictionaryIdInputStream.nextIntVector(batchSize, dictionaryIdBuffer, 0); } catch (IOException e) { <START> throw new RuntimeException(e); <END> } DictionaryBlock dictionaryBlock = new DictionaryBlock(batchSize, dictionary, dictionaryIdBuffer); directColumnWriter.writeBlock(dictionaryBlock); valueCount -= batchSize; } checkState(valueCount == 0); }</code><technical_language>UncheckedIoException("Unable decode dictionary index stream", e)</technical_language>

Target:
private void writeDictionaryRowGroup(Block dictionary, int valueCount, LongInputStream dictionaryIdInputStream) { while (valueCount > 0) { int batchSize = Math.min(valueCount, 1024); int[] dictionaryIdBuffer = new int[batchSize]; try { dictionaryIdInputStream.nextIntVector(batchSize, dictionaryIdBuffer, 0); } catch (IOException e) { throw new UncheckedIOException("Unable to decode dictionary index stream", e); } DictionaryBlock dictionaryBlock = new DictionaryBlock(batchSize, dictionary, dictionaryIdBuffer); directColumnWriter.writeBlock(dictionaryBlock); valueCount -= batchSize; } checkState(valueCount == 0); }
Source:
<code>protected Void visitExcept(Except node, Integer indent) { processRelation(node.getLeft(), indent); builder.append("EXCEPT "); <START> if (node.isDistinct().isPresent()) { <END> boolean isDistinct = node.isDistinct().get(); if (isDistinct) { builder.append("DISTINCT "); } else { builder.append("ALL "); } } processRelation(node.getRight(), indent); return null; }</code><technical_language>prefer functional interface logic is simple. this rewritten to: node.isDistinct().map(distinct -> distinct ? builder.append("DISTINCT ") : builder.append("ALL "));</technical_language>

Target:
protected Void visitExcept(Except node, Integer indent) { processRelation(node.getLeft(), indent); builder.append("EXCEPT "); node.isDistinct().map(distinct -> distinct ? builder.append("DISTINCT ") : builder.append("ALL ")); processRelation(node.getRight(), indent); return null; }
Source:
<code>void duplicateAccountCreateFails() { verifyEndpointReturningObject(client -> client.createAccount(USERNAME_1, EMAIL_1, PASSWORD_1)); final CreateAccountResponse result = verifyEndpointReturningObject( client -> client.createAccount(USERNAME_1, EMAIL_1, PASSWORD_1)); <START> assertThat(result, not(is(CreateAccountResponse.SUCCESS_RESPONSE))); <END> }</code><technical_language>suggestion assertThat(result, is(not(CreateAccountResponse.SUCCESS_RESPONSE))); work well, nicer read</technical_language>

Target:
void duplicateAccountCreateFails() { verifyEndpointReturningObject(client -> client.createAccount(USERNAME_1, EMAIL_1, PASSWORD_1)); final CreateAccountResponse result = verifyEndpointReturningObject( client -> client.createAccount(USERNAME_1, EMAIL_1, PASSWORD_1)); assertThat(result, is(not(CreateAccountResponse.SUCCESS_RESPONSE))); }
Source:
<code>public Company get() { <START> <END> if (name == null) { name = dataMaster.getRandomValue(COMPANY_NAME); if (baseProducer.trueOrFalse()) { name += " " + dataMaster.getRandomValue(COMPANY_SUFFIX); } } if (domain == null) { domain = StringUtils.strip(StringUtils.deleteWhitespace(name.toLowerCase()), ".") + "." + dataMaster.getRandomValue(DOMAIN); } if (email == null) { email = dataMaster.getRandomValue(COMPANY_EMAIL); } if (vatIdentificationNumber == null) { vatIdentificationNumber = vatIdentificationNumberProvider.get(); } return new Company(name, domain, email, vatIdentificationNumber); }</code><technical_language>imho conditions in this method large; extract smaller methods substitute null checks in conditions elvis operators in return statements possible? Please apply this other similar places in this PR</technical_language>

Target:
public Company get() { if (name == null) { name = dataMaster.getRandomValue(COMPANY_NAME); if (baseProducer.trueOrFalse()) { name += " " + dataMaster.getRandomValue(COMPANY_SUFFIX); } } if (domain == null) { domain = TextUtils.stripAccents(StringUtils.strip(StringUtils.deleteWhitespace(name.toLowerCase()), ".").replace("/", "")) + "." + dataMaster.getRandomValue(DOMAIN); } if (email == null) { email = dataMaster.getRandomValue(COMPANY_EMAIL); } if (vatIdentificationNumber == null) { vatIdentificationNumber = vatIdentificationNumberProvider.get(); } return new Company(name, domain, email, vatIdentificationNumber); }
Source:
<code>public void endVisitByUUID(final Visit visit) { visit.setStopDatetime(DateUtils.convertTime(System.currentTimeMillis(), DateUtils.OPEN_MRS_REQUEST_FORMAT)); Visit test = new Visit(); test.setStopDatetime(visit.getStopDatetime()); visitRepository.endVisitByUuid(visit.getUuid(), test, new DefaultVisitsCallback() { @Override public void onSuccess(String response) { addSubscription(visitDAO.getVisitByID(visit.getId()) .observeOn(AndroidSchedulers.mainThread()) <START> .subscribe(vis -> { <END> vis.setStopDatetime(response); visitDAO.saveOrUpdate(vis, vis.getPatient().getId()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(id -> moveToPatientDashboard()); })); } @Override public void onFailure(String errorMessage) { mVisitDashboardView.showErrorToast(errorMessage); } }); }</code><technical_language>rename vis visit</technical_language>

Target:
public void endVisitByUUID(final Visit visit) { visit.setStopDatetime(DateUtils.convertTime(System.currentTimeMillis(), DateUtils.OPEN_MRS_REQUEST_FORMAT)); Visit testVisit = new Visit(); testVisit.setStopDatetime(visit.getStopDatetime()); visitRepository.endVisitByUuid(visit.getUuid(), testVisit, new DefaultVisitsCallback() { @Override public void onSuccess(String response) { addSubscription(visitDAO.getVisitByID(visit.getId()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(visit -> { visit.setStopDatetime(response); visitDAO.saveOrUpdate(visit, visit.getPatient().getId()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(id -> moveToPatientDashboard()); })); } @Override public void onFailure(String errorMessage) { mVisitDashboardView.showErrorToast(errorMessage); } }); }
Source:
<code>protected void initCoreModel(ManagementModel managementModel, Resource modelControllerResource) { if (modelInitializer != null) { modelInitializer.populateModel(managementModel); } <START> System.setProperty("wildfly.test.boot.disable.rollback", "1"); <END> initializer.initCoreModel(managementModel.getRootResource(), managementModel.getRootResourceRegistration(), modelControllerResource); }</code><technical_language>This out of sync I reverted WFCORE-307 fix. property is "jboss.as.test.disable.runtime"</technical_language>

Target:
protected void initCoreModel(ManagementModel managementModel, Resource modelControllerResource) { if (modelInitializer != null) { modelInitializer.populateModel(managementModel); } System.setProperty("jboss.as.test.disable.runtime", "1"); initializer.initCoreModel(managementModel.getRootResource(), managementModel.getRootResourceRegistration(), modelControllerResource); }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_info) { AnalyticsTracker.get().trackEvent("Clicked on info menu item", null, null); new MaterialStyledDialog.Builder(MainActivity.this) .setTitle(getString(R.string.info_dialog_title)) .setDescription(getString(R.string.info_dialog_description)) .setIcon(R.mipmap.ic_launcher) .setHeaderColor(R.color.mapboxBlue) .withDivider(true) .setPositiveText(getString(R.string.info_dialog_positive_button_text)) .onPositive(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { AnalyticsTracker.get().trackEvent("Clicked on info menu dialog start learning button", null, null); <START> <END> Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("<LINK_0>")); startActivity(intent); } }) .setNegativeText(getString(R.string.info_dialog_negative_button_text)) .onNegative(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { AnalyticsTracker.get().trackEvent("Clicked on info menu dialog not now button", null, null); } }) .show(); return true; } return super.onOptionsItemSelected(item); }</code><technical_language>new lines</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_info) { AnalyticsTracker.getInstance().trackEvent("Clicked on info menu item"); new MaterialStyledDialog.Builder(MainActivity.this) .setTitle(getString(R.string.info_dialog_title)) .setDescription(getString(R.string.info_dialog_description)) .setIcon(R.mipmap.ic_launcher) .setHeaderColor(R.color.mapboxBlue) .withDivider(true) .setPositiveText(getString(R.string.info_dialog_positive_button_text)) .onPositive(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { AnalyticsTracker.getInstance().trackEvent("Clicked on info menu dialog start learning button"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("<LINK_0>")); startActivity(intent); } }) .setNegativeText(getString(R.string.info_dialog_negative_button_text)) .onNegative(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { AnalyticsTracker.getInstance().trackEvent("Clicked on info menu dialog not now button"); } }) .show(); return true; } return super.onOptionsItemSelected(item); }
Source:
<code>private void detach() { <START> getTip().detach(); <END> }</code><technical_language>forget detach widget if exists : java Widget w = options.getWidget(); if (w != null && RootPanel.isInDetachList(w)) { RootPanel.detachNow(w); }</technical_language>

Target:
private void detach() { getTip().detach(); Widget w = options.getWidget(); if (w != null && RootPanel.isInDetachList(w)) { RootPanel.detachNow(w); } }
Source:
<code>public static void fhirStoreExecuteBundle(String fhirStoreName, String data) throws IOException, URISyntaxException { CloudHealthcare client = createClient(); HttpClient httpClient = HttpClients.createDefault(); <START> String baseUri = String.format("%sv1beta1/%s/fhir", client.getRootUrl(), fhirStoreName); <END> URIBuilder uriBuilder = new URIBuilder(baseUri) .setParameter("access_token", getAccessToken()); StringEntity requestEntity = new StringEntity(data); HttpUriRequest request = RequestBuilder .post() .setUri(uriBuilder.build()) .setEntity(requestEntity) .addHeader("Content-Type", "application/fhir+json") .addHeader("Accept-Charset", "utf-8") .addHeader("Accept", "application/fhir+json; charset=utf-8") .build(); HttpResponse response = httpClient.execute(request); HttpEntity responseEntity = response.getEntity(); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { System.err.print(String.format( "Exception executing FHIR bundle: %s\n", response.getStatusLine().toString())); responseEntity.writeTo(System.err); throw new RuntimeException(); } System.out.print("FHIR bundle executed: "); responseEntity.writeTo(System.out); }</code><technical_language>this v1</technical_language>

Target:
public static void fhirStoreExecuteBundle(String fhirStoreName, String data) throws IOException, URISyntaxException { CloudHealthcare client = createClient(); HttpClient httpClient = HttpClients.createDefault(); String baseUri = String.format("%sv1/%s/fhir", client.getRootUrl(), fhirStoreName); URIBuilder uriBuilder = new URIBuilder(baseUri) .setParameter("access_token", getAccessToken()); StringEntity requestEntity = new StringEntity(data); HttpUriRequest request = RequestBuilder .post() .setUri(uriBuilder.build()) .setEntity(requestEntity) .addHeader("Content-Type", "application/fhir+json") .addHeader("Accept-Charset", "utf-8") .addHeader("Accept", "application/fhir+json; charset=utf-8") .build(); HttpResponse response = httpClient.execute(request); HttpEntity responseEntity = response.getEntity(); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { System.err.print(String.format( "Exception executing FHIR bundle: %s\n", response.getStatusLine().toString())); responseEntity.writeTo(System.err); throw new RuntimeException(); } System.out.print("FHIR bundle executed: "); responseEntity.writeTo(System.out); }
Source:
<code>public void write(DataOutput output) throws IOException { super.write(output); output.writeInt(vertexMap.size()); for (Map.Entry<I, byte[]> entry : vertexMap.entrySet()) { progress(); entry.getKey().write(output); int vertexDataSize = UnsafeByteArrayInputStream.getInt(entry.getValue(), 0); <START> output.writeInt(vertexDataSize); <END> output.write(entry.getValue(), 0, vertexDataSize); } }</code><technical_language>supporting non-unsafe version anymore</technical_language>

Target:
public void write(DataOutput output) throws IOException { super.write(output); output.writeInt(vertexMap.size()); for (Map.Entry<I, byte[]> entry : vertexMap.entrySet()) { progress(); entry.getKey().write(output); int vertexDataSize; if (useUnsafeSerialization) { vertexDataSize = UnsafeByteArrayInputStream.getInt(entry.getValue(), 0); } else { vertexDataSize = Ints.fromByteArray(entry.getValue()); } output.writeInt(vertexDataSize); output.write(entry.getValue(), 0, vertexDataSize); } }
Source:
<code>private void startListeningTCP() { new Thread(() -> { DataInputStream input = null; try { input = new DataInputStream(tcpSocket.getInputStream()); while (isActive) { byte[] buf = new byte[512]; <START> input.read(buf); <END> receiveTCP(buf); } } catch (IOException e) { e.printStackTrace(); } }).start(); }</code><technical_language>if (buf.length == 0) break/return</technical_language>

Target:
private void startListeningTCP() { new Thread(() -> { DataInputStream input = null; try { input = new DataInputStream(tcpSocket.getInputStream()); while (isActive) { byte[] buf = new byte[512]; input.read(buf); if (buf.length == 0) { break; } receiveTCP(buf); } } catch (IOException e) { e.printStackTrace(); } }).start(); }
Source:
<code>private void recreatePK(StatementExecutor executor, String tableName, PrimaryKey pk) throws OrmException { try { if (pk.oldNameInDb == null) { ui.message("WARN: primary key for table %s didn't exist ... ", tableName); } else { if (dialect instanceof DialectPostgreSQL) { executor.execute("ALTER TABLE " + tableName + " DROP CONSTRAINT " + pk.oldNameInDb); } else { executor.execute("ALTER TABLE " + tableName + " DROP PRIMARY KEY"); } } } catch (OrmException ignore) { ui.message("WARN: <START> %s\n", <END> ignore.getMessage()); } executor.execute("ALTER TABLE " + tableName + " ADD PRIMARY KEY(" + Joiner.on(",").join(pk.cols) + ")"); }</code><technical_language>this need changed '...' too</technical_language>

Target:
private void recreatePK(StatementExecutor executor, String tableName, PrimaryKey pk) throws OrmException { if (pk.oldNameInDb == null) { ui.message("WARN: primary key for table %s didn't exist ... ", tableName); } else { if (dialect instanceof DialectPostgreSQL) { executor.execute("ALTER TABLE " + tableName + " DROP CONSTRAINT " + pk.oldNameInDb); } else { executor.execute("ALTER TABLE " + tableName + " DROP PRIMARY KEY"); } } executor.execute("ALTER TABLE " + tableName + " ADD PRIMARY KEY(" + Joiner.on(",").join(pk.cols) + ")"); }
Source:
<code>public TopologyDetails simScheduleNextHighest() { TopologyDetails td = tds.pop(); assignedCpu += td.getTotalRequestedCpu(); <START> assignedMemory += td.getTotalRequestedMemOffHeap() + td.getTotalRequestedMemOnHeap(); <END> Map<String, Double> tdRequestedGenericResource = td.getTotalRequestedGenericResources(); for (Map.Entry<String, Double> entry : tdRequestedGenericResource.entrySet()) { String resource = entry.getKey(); Double requestedAmount = entry.getValue(); assignedGenericResources.put(resource, assignedGenericResources.getOrDefault(resource, 0.0) + requestedAmount); } return td; }</code><technical_language>reply super.simScheduleNextHighest(); in GrasSimulatedUser is gras specific,</technical_language>

Target:
public TopologyDetails simScheduleNextHighest() { TopologyDetails td = super.simScheduleNextHighest(); Map<String, Double> tdRequestedGenericResource = td.getTotalRequestedGenericResources(); for (Map.Entry<String, Double> entry : tdRequestedGenericResource.entrySet()) { String resource = entry.getKey(); Double requestedAmount = entry.getValue(); assignedGenericResources.put(resource, assignedGenericResources.getOrDefault(resource, 0.0) + requestedAmount); } return td; }
Source:
<code>public static CompositeName toCompositeName(final Name name) throws InvalidNameException { if (name instanceof CompositeName) { return (CompositeName) name; } else { final CompositeName compositeName = new CompositeName(); <START> compositeName.addAll(new CompositeName(name.toString())); <END> return compositeName; } }</code><technical_language>theory CompositeName is segment is meant represent a name a namespace, supposed able support a single segment is a name-within-a-schema (e.g. "foo/bar/baz") is navigate a single naming store. said, I extrapolate this change means naming server is coping parsing a name out of a CompositeName component, is a bug, grapple legacy servers this bug. So, I solution introduce a new method, e.g. toDecomposedCompositeName that, creates a CompositeName name segment is equal name segment in source name. Connecting (at minimum) legacy server this method of conversion, while maintain method converts a Name a single-element CompositeName before. WDYT</technical_language>

Target:
public static CompositeName toCompositeName(final Name name) throws InvalidNameException { if (name instanceof CompositeName) { return (CompositeName) name; } else { final CompositeName compositeName = new CompositeName(); compositeName.add(name.toString()); return compositeName; } }
Source:
<code>public File getEmbeddingDirectory() { <START> return new File(getReportDirectory().getAbsolutePath(), ReportBuilder.BASE_DIRECTORY + this.getDirectoryQualifier() <END> + File.separatorChar + Configuration.EMBEDDINGS_DIRECTORY); }</code><technical_language>directory separator is missing</technical_language>

Target:
public File getEmbeddingDirectory() { return new File(getReportDirectory().getAbsolutePath(), ReportBuilder.BASE_DIRECTORY + this.getDirectorySuffixWithSeparator() + File.separatorChar + Configuration.EMBEDDINGS_DIRECTORY); }
Source:
<code>public Integer addSeries( AddSeriesDto dto, AddParticipantDto sellerDto, AddSeriesSalesDto saleDto, Integer requestId, Integer userId) { Integer seriesId = seriesService.add(dto, userId, false); <START> <END> if (saleDto != null) { if (saleDto.getSellerId() == null && sellerDto != null) { Integer sellerId = participantService.add(sellerDto); saleDto.setSellerId(sellerId); } seriesSalesService.add(saleDto, seriesId, userId); } Date now = new Date(); seriesImportDao.setSeriesIdAndChangeStatus( seriesId, new UpdateImportRequestStatusDbDto( requestId, now, SeriesImportRequestStatus.PARSING_SUCCEEDED, SeriesImportRequestStatus.IMPORT_SUCCEEDED) ); return seriesId; }</code><technical_language>Please, change related issue. commit focused a single change</technical_language>

Target:
public Integer addSeries( AddSeriesDto dto, AddParticipantDto sellerDto, AddSeriesSalesDto saleDto, Integer requestId, Integer userId) { Integer seriesId = seriesService.add(dto, userId, false); if (saleDto != null) { if (saleDto.getSellerId() == null && sellerDto != null) { Integer sellerId = participantService.add(sellerDto); saleDto.setSellerId(sellerId); } seriesSalesService.add(saleDto, seriesId, userId); } Date now = new Date(); UpdateImportRequestStatusDbDto status = new UpdateImportRequestStatusDbDto( requestId, now, SeriesImportRequestStatus.PARSING_SUCCEEDED, SeriesImportRequestStatus.IMPORT_SUCCEEDED ); seriesImportDao.setSeriesIdAndChangeStatus(seriesId, status); return seriesId; }
Source:
<code>public Response updateDefaultContributorRole( @PathParam("identifier") String dvIdtf, @PathParam("roleAlias") String roleAlias) { DataverseRole defaultRole; <START> if (roleAlias.equals("none")) { <END> defaultRole = null; } else { try { Dataverse dv = findDataverseOrDie(dvIdtf); defaultRole = roleService.findCustomRoleByAliasAndOwner(roleAlias, dv.getId()); } catch (Exception nre) { List<String> args = Arrays.asList(roleAlias); String retStringError = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.failure.role.not.found", args); return error(Status.NOT_FOUND, retStringError); } if (!defaultRole.doesDvObjectClassHavePermissionForObject(Dataset.class)) { List<String> args = Arrays.asList(roleAlias); String retStringError = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.failure.role.does.not.have.dataset.permissions", args); return error(Status.BAD_REQUEST, retStringError); } } try { Dataverse dv = findDataverseOrDie(dvIdtf); String defaultRoleName = defaultRole == null ? "None" : defaultRole.getName(); return response(req -> { execCommand(new UpdateDataverseDefaultContributorRoleCommand(defaultRole, req, dv)); List<String> args = Arrays.asList(dv.getDisplayName(), defaultRoleName); String retString = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.success", args); return ok(retString); }); } catch (WrappedResponse wr) { return wr.getResponse(); } }</code><technical_language>Ok, more clear "none" is a special keyword, appears in UI. Right? "none" a constant? "none" sprinkled in places in code</technical_language>

Target:
public Response updateDefaultContributorRole( @PathParam("identifier") String dvIdtf, @PathParam("roleAlias") String roleAlias) { DataverseRole defaultRole; if (roleAlias.equals(DataverseRole.NONE)) { defaultRole = null; } else { try { Dataverse dv = findDataverseOrDie(dvIdtf); defaultRole = rolesSvc.findCustomRoleByAliasAndOwner(roleAlias, dv.getId()); } catch (Exception nre) { List<String> args = Arrays.asList(roleAlias); String retStringError = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.failure.role.not.found", args); return error(Status.NOT_FOUND, retStringError); } if (!defaultRole.doesDvObjectClassHavePermissionForObject(Dataset.class)) { List<String> args = Arrays.asList(roleAlias); String retStringError = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.failure.role.does.not.have.dataset.permissions", args); return error(Status.BAD_REQUEST, retStringError); } } try { Dataverse dv = findDataverseOrDie(dvIdtf); String defaultRoleName = defaultRole == null ? BundleUtil.getStringFromBundle("permission.default.contributor.role.none.name") : defaultRole.getName(); return response(req -> { execCommand(new UpdateDataverseDefaultContributorRoleCommand(defaultRole, req, dv)); List<String> args = Arrays.asList(dv.getDisplayName(), defaultRoleName); String retString = BundleUtil.getStringFromBundle("dataverses.api.update.default.contributor.role.success", args); return ok(retString); }); } catch (WrappedResponse wr) { return wr.getResponse(); } }
Source:
<code>public void canDoActionFails() { GlusterServiceParameters params = new GlusterServiceParameters(); params.setActionType("InvalidActionType"); cmd = spy(new ManageGlusterServiceCommand(params)); assertFalse(cmd.canDoAction()); params.setServiceType(ServiceType.SMB); cmd = spy(new ManageGlusterServiceCommand(params)); assertFalse(cmd.canDoAction()); <START> <END> params.setClusterId(null); params.setServerId(null); assertFalse(cmd.canDoAction()); }</code><technical_language>move separate tests. verify error message returned canDoAction</technical_language>

Target:
public void canDoActionFails() { GlusterServiceParameters params = new GlusterServiceParameters(); params.setActionType("InvalidActionType"); cmd = spy(new ManageGlusterServiceCommand(params)); assertFalse(cmd.canDoAction()); params.setClusterId(null); params.setServerId(null); assertFalse(cmd.canDoAction()); }
Source:
<code>public void checkVariableFormat(Task task, TaskVariable variable) throws JobValidationException { if (!Strings.isNullOrEmpty(variable.getModel())) { String model = variable.getModel().trim(); try { <START> new ModelValidator(model).validate(variable.getValue()); <END> } catch (Exception e) { throw new JobValidationException("Task '" + task.getName() + "': Variable '" + variable.getName() + "': Model " + variable.getModel() + ": " + e.getMessage(), e); } } }</code><technical_language>model passed a parameter validate method in order create a single instance of ModelValidator reuse it</technical_language>

Target:
protected void checkVariableFormat(Task task, TaskVariable variable) throws JobValidationException { if (!Strings.isNullOrEmpty(variable.getModel())) { String model = variable.getModel().trim(); try { new ModelValidator(model).validate(variable.getValue()); } catch (Exception e) { throw new JobValidationException("Task '" + task.getName() + "': Variable '" + variable.getName() + "': Model " + variable.getModel() + ": " + e.getMessage(), e); } } }
Source:
<code>protected void onPause() { super.onPause(); stopTimer(); if (adapter != null) { adapter.unregisterDataSetObserver(mListStateObserver); } <START> hereFunctionHandler.stopLocationUpdates(); <END> }</code><technical_language>tricky stopping in onPause is want resume continue acquiring a location. For instance, if a location switch another app for a sec switch back, paused resumed this activity, is restart code for location acquisition logic. this cleanly is sorta tricky, talk approaches</technical_language>

Target:
protected void onPause() { super.onPause(); stopTimer(); if (adapter != null) { adapter.unregisterDataSetObserver(mListStateObserver); } hereFunctionHandler.unregisterEntitySelectActivity(); hereFunctionHandler.stopLocationUpdates(); }
Source:
<code>public void testExecutionModePropagationFromEnvWithDefaultAndBoundedSource() throws Exception { final StreamExecutionEnvironment environment = new TestExecutionEnvironment( GlobalDataExchangeMode.ALL_EDGES_PIPELINED, ScheduleMode.EAGER, true); environment .fromSource( new MockSource(Boundedness.BOUNDED, 100), WatermarkStrategy.noWatermarks(), "bounded-source") .print(); <START> environment.executeAsync(); <END> }</code><technical_language>do environment.getStreamGraph assert StreamGraph? I find easier figure out a test verifies if assertions part of test body</technical_language>

Target:
public void testExecutionModePropagationFromEnvWithDefaultAndBoundedSource() { final StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment(); environment .fromSource( new MockSource(Boundedness.BOUNDED, 100), WatermarkStrategy.noWatermarks(), "bounded-source") .print(); assertThat( environment.getStreamGraph(), hasProperties( GlobalDataExchangeMode.ALL_EDGES_PIPELINED, ScheduleMode.EAGER, true)); }
Source:
<code>public String getDescription() { <START> return getStatuteType().getName().getContent(I18N.getLocale()) <END> + (studentStatute instanceof SeniorStatute ? (" (" + ((SeniorStatute) studentStatute).getRegistration().getDegree().getPresentationName() + ") ") : ""); }</code><technical_language>Beware invoking [getContent(I18N.getLocale())](<LINK_0> is invoking [getContent()](<LINK_1></technical_language>

Target:
public String getDescription() { return getStatuteType().getName().getContent() + (studentStatute instanceof SeniorStatute ? (" (" + ((SeniorStatute) studentStatute).getRegistration().getDegree().getPresentationName() + ") ") : ""); }