auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public void threadMessages(List<EmailMessage> emailMessages, String threadIDPrefix) { <END> HashMap<String, Container> id_table = createIDTable(emailMessages); Set<Container> rootSet = getRootSet(id_table); pruneEmptyContainers(rootSet); Set<Container> finalSet = groupBySubject(rootSet); assignThreadIDs(finalSet, threadIDPrefix); }</code><technical_language>this in a constructor class useful this data passed in</technical_language>

Target:
public static void threadMessages(List<EmailMessage> emailMessages, String threadIDPrefix) { EmailMessageThreader instance = new EmailMessageThreader(); Map<String, EmailContainer> id_table = instance.createIDTable(emailMessages); Set<EmailContainer> rootSet = instance.getRootSet(id_table); instance.pruneEmptyContainers(rootSet); Set<EmailContainer> finalRootSet = instance.groupBySubject(rootSet); instance.assignThreadIDs(finalRootSet, threadIDPrefix); }
Source:
<code>public void processEvent(DiscoveryServiceEvent event) { switch (event.type) { case ACQUIRE_LOCK: processLockAcquire(); break; case RELEASE_LOCK: processLockRelease(); break; case DISCOVERED_TOPOLOGY: processTopologyChangeNotification(event); break; case UPGRADE: processUpgrade(event); break; <START> case ENFORCE_SNAPSHOT_FULL_SYNC: <END> processEnforceSnapshotFullSync(event); break; default: log.error("Invalid event type {}", event.type); break; } }</code><technical_language>Is this event handled leader node? is a broadcast</technical_language>

Target:
public synchronized void processEvent(DiscoveryServiceEvent event) { switch (event.type) { case ACQUIRE_LOCK: processLockAcquire(); break; case RELEASE_LOCK: processLockRelease(); break; case DISCOVERED_TOPOLOGY: processTopologyChangeNotification(event); break; case UPGRADE: processUpgrade(event); break; case ENFORCE_SNAPSHOT_SYNC: processEnforceSnapshotSync(event); break; default: log.error("Invalid event type {}", event.type); break; } }
Source:
<code>public ValidationResult validate(Object value) { ValidationResult result = new ValidationResult(); <START> T pasredValue = null; <END> if ((value instanceof String && !StringUtils.isEmpty((String) value))) { pasredValue = parse((String) value); } else if (valueTypeCheck(value)) { pasredValue = (T) value; } else { validationFailedWith(result, getNumberTypeErrorMessage()); return result; } String message = ""; String prefixMsg = getNumberTypeErrorMessage(); if (pasredValue == null) { message = getNumberRangeErrorMessage(prefixMsg); validationFailedWith(result, message); } else if (belowMinimum(pasredValue)) { message = getNumberBellowMinimumErrorMessage(prefixMsg); validationFailedWith(result, message); } else if (aboveMaximum(pasredValue)) { message = getNumberAboveMaximumErrorMessage(prefixMsg); validationFailedWith(result, message); } return result; }</code><technical_language>parsedValue :-)</technical_language>

Target:
public ValidationResult validate(Object value) { ValidationResult result = new ValidationResult(); T parsedValue = null; if (value instanceof String && !StringUtils.isEmpty((String) value)) { parsedValue = parse((String) value); } else { try { parsedValue = (T) value; } catch (Exception ex) { validationFailedWith(result, getNumberTypeErrorMessage()); return result; } } String message = ""; String prefixMsg = getNumberTypeErrorMessage(); if (parsedValue == null) { message = getNumberTypeErrorMessage(); validationFailedWith(result, message); } else if (belowMinimum(parsedValue)) { message = getNumberBellowMinimumErrorMessage(prefixMsg); validationFailedWith(result, message); } else if (aboveMaximum(parsedValue)) { message = getNumberAboveMaximumErrorMessage(prefixMsg); validationFailedWith(result, message); } return result; }
Source:
<code>public ValueMatcher makeValueMatcher(final String dimension, final DruidPredicateFactory predicateFactory) { if (dimension.equals(Column.TIME_COLUMN_NAME)) { return new ValueMatcher() { <START> DruidLongPredicate predicate = predicateFactory.makeLongPredicate(); <END> @Override public boolean matches() { return predicate.applyLong(row.getTimestampFromEpoch()); } }; } else { return new ValueMatcher() { Predicate<String> predicate = predicateFactory.makeStringPredicate(); @Override public boolean matches() { List<String> values = row.getDimension(dimension); for (String value : values) { if (predicate.apply(value)) { return true; } } return false; } }; } }</code><technical_language>predicate final</technical_language>

Target:
public ValueMatcher makeValueMatcher(final String dimension, final DruidPredicateFactory predicateFactory) { if (dimension.equals(Column.TIME_COLUMN_NAME)) { return new ValueMatcher() { final DruidLongPredicate predicate = predicateFactory.makeLongPredicate(); @Override public boolean matches() { return predicate.applyLong(row.getTimestampFromEpoch()); } }; } else { return new ValueMatcher() { final Predicate<String> predicate = predicateFactory.makeStringPredicate(); @Override public boolean matches() { List<String> values = row.getDimension(dimension); for (String value : values) { if (predicate.apply(value)) { return true; } } return false; } }; } }
Source:
<code>Time toTime(DateTime dateTime) { Time time = new Time(); time.set(dateTime.getTimestamp()); <START> time.timezone = dateTime.getTimeZone().getID(); <END> time.allDay = dateTime.isAllDay(); return time; }</code><technical_language>This crash if dateTime time zone (I Optional then) case for all-day tasks</technical_language>

Target:
Time toTime(DateTime dateTime) { if (dateTime.isFloating() && !dateTime.isAllDay()) { throw new IllegalArgumentException("Cannot support floating DateTime that is not all-day, can't represent it with Time"); } String timeZoneId = dateTime.getTimeZone() == null ? "UTC" : dateTime.getTimeZone().getID(); Time time = new Time(timeZoneId); time.set(dateTime.getTimestamp()); if (dateTime.isAllDay()) { time.allDay = true; time.hour = 0; time.minute = 0; time.second = 0; } return time; }
Source:
<code><START> private static Integer positionByRank(List<DocStruct> siblings, Integer rank) { <END> if (siblings != null || rank != null) { SIBLINGS: for (int i = 0; i < siblings.size(); i++) { DocStruct aforeborn = siblings.get(i); List<Metadata> allMetadata = aforeborn.getAllMetadata(); if (allMetadata != null) { for (Metadata metadataElement : allMetadata) { if (metadataElement.getType().getName().equals(IndividualIssue.RULESET_ORDER_NAME)) { try { if (Integer.parseInt(metadataElement.getValue()) > rank) { return i; } else { continue SIBLINGS; } } catch (NumberFormatException e) { if (metadataElement.getValue().compareTo(rank.toString()) > 0) { return i; } else { continue SIBLINGS; } } } } } } } return null; }</code><technical_language>add this method a static one</technical_language>

Target:
private static Integer positionByRank(List<DocStruct> siblings, Integer rank) { if (siblings != null && rank != null) { SIBLINGS: for (int i = 0; i < siblings.size(); i++) { DocStruct aforeborn = siblings.get(i); List<Metadata> allMetadata = aforeborn.getAllMetadata(); if (allMetadata != null) { for (Metadata metadataElement : allMetadata) { if (metadataElement.getType().getName().equals(IndividualIssue.RULESET_ORDER_NAME)) { try { if (Integer.parseInt(metadataElement.getValue()) > rank) { return i; } else { continue SIBLINGS; } } catch (NumberFormatException e) { if (metadataElement.getValue().compareTo(rank.toString()) > 0) { return i; } else { continue SIBLINGS; } } } } } } } return null; }
Source:
<code>private static Object convertField(Group g, String fieldName, boolean binaryAsString) { if (!g.getType().containsField(fieldName)) { return null; } final int fieldIndex = g.getType().getFieldIndex(fieldName); <START> if (!(g.getFieldRepetitionCount(fieldIndex) > 0)) { <END> return null; } Type fieldType = g.getType().getFields().get(fieldIndex); if (fieldType.isPrimitive()) { if (fieldType.getRepetition().equals(Type.Repetition.REPEATED)) { int repeated = g.getFieldRepetitionCount(fieldIndex); List<Object> vals = new ArrayList<>(); for (int i = 0; i < repeated; i++) { vals.add(convertPrimitiveField(g, fieldIndex, i, binaryAsString)); } return vals; } return convertPrimitiveField(g, fieldIndex, binaryAsString); } else { if (fieldType.isRepetition(Type.Repetition.REPEATED)) { return convertRepeatedFieldToList(g, fieldIndex, binaryAsString); } if (isLogicalMapType(fieldType)) { return convertLogicalMap(g.getGroup(fieldIndex, 0), binaryAsString); } if (isLogicalListType(fieldType)) { return convertLogicalList(g.getGroup(fieldIndex, 0), binaryAsString); } return g.getGroup(fieldIndex, 0); } }</code><technical_language>Ouch <=</technical_language>

Target:
private static Object convertField(Group g, String fieldName, boolean binaryAsString) { if (!g.getType().containsField(fieldName)) { return null; } final int fieldIndex = g.getType().getFieldIndex(fieldName); if (g.getFieldRepetitionCount(fieldIndex) <= 0) { return null; } Type fieldType = g.getType().getFields().get(fieldIndex); if (fieldType.isPrimitive()) { if (fieldType.getRepetition().equals(Type.Repetition.REPEATED)) { int repeated = g.getFieldRepetitionCount(fieldIndex); List<Object> vals = new ArrayList<>(); for (int i = 0; i < repeated; i++) { vals.add(convertPrimitiveField(g, fieldIndex, i, binaryAsString)); } return vals; } return convertPrimitiveField(g, fieldIndex, binaryAsString); } else { if (fieldType.isRepetition(Type.Repetition.REPEATED)) { return convertRepeatedFieldToList(g, fieldIndex, binaryAsString); } if (isLogicalMapType(fieldType)) { return convertLogicalMap(g.getGroup(fieldIndex, 0), binaryAsString); } if (isLogicalListType(fieldType)) { return convertLogicalList(g.getGroup(fieldIndex, 0), binaryAsString); } return g.getGroup(fieldIndex, 0); } }
Source:
<code>protected void addHeaders(Message<?> message, Map<String, Object> headers) { if (message.getPayload() instanceof File) { File file = (File) message.getPayload(); headers.putIfAbsent(FileHeaders.ORIGINAL_FILE, file); headers.putIfAbsent(FileHeaders.FILENAME, file.getName()); } else if (message.getPayload() instanceof String) { File file = new File((String) message.getPayload()); headers.putIfAbsent(FileHeaders.ORIGINAL_FILE, file); <START> headers.putIfAbsent(FileHeaders.FILENAME, file.getName()); <END> } }</code><technical_language>Minor: duplicated code extracted if...else</technical_language>

Target:
protected void addHeaders(Message<?> message, Map<String, Object> headers) { File file = null; if (message.getPayload() instanceof File) { file = (File) message.getPayload(); } else if (message.getPayload() instanceof String) { file = new File((String) message.getPayload()); } if (file != null) { if (!headers.containsKey(FileHeaders.ORIGINAL_FILE)) { headers.put(FileHeaders.ORIGINAL_FILE, file); } if (!headers.containsKey(FileHeaders.FILENAME)) { headers.put(FileHeaders.FILENAME, file.getName()); } } }
Source:
<code>public void verifyAddTableLightbox() { waitForElementByElement(addTableLightbox); <START> Assertion.assertTrue(lightboxBackground.getCssValue("background-color").equals(backgroundLigthboxColor)); <END> }</code><technical_language>this assertion is necessary</technical_language>

Target:
public void verifyAddTableLightbox() { waitForElementByElement(addTableLightbox); }
Source:
<code>public void clear(String originator, TaskId taskid, String channel) throws InvalidChannelException, IOException { getChannel(channel).clear(); <START> logWithContext(taskid, channel, "cleared channel", Level.DEBUG); <END> commitIfNeeded(channel); }</code><technical_language>Minor: this is log message starting a capital letter</technical_language>

Target:
public void clear(String originator, TaskId taskid, String channel) throws InvalidChannelException, IOException { getChannel(channel).clear(); logWithContextAndPersist(taskid, channel, "Cleared channel", Level.DEBUG); }
Source:
<code><START> public ValuePriorityLevel getValueLevel() { <END> return fLevel; }</code><technical_language>rename it, getPriorityLevel() for example, reflect meaning</technical_language>

Target:
public PriorityLevel getValueLevel() { return fLevel; }
Source:
<code>public void doContainerLog(@QueryParameter String containerId, StaplerRequest req, StaplerResponse rsp) throws UnrecoverableKeyException, CertificateEncodingException, NoSuchAlgorithmException, KeyStoreException, IOException { <START> ByteBuffer outputStream = new ByteBuffer(); <END> KubernetesSlave slave = getNode(); if(slave != null) { KubernetesCloud cloud = slave.getKubernetesCloud(); KubernetesClient client = cloud.connect(); String namespace = StringUtils.defaultIfBlank(slave.getNamespace(), client.getNamespace()); client.pods().inNamespace(namespace).withName(getName()) .inContainer(containerId).tailingLines(20).watchLog(outputStream); } new LargeText(outputStream, false).doProgressText(req, rsp); }</code><technical_language>permission check here, log accessible user is able read agent</technical_language>

Target:
public void doContainerLog(@QueryParameter String containerId, StaplerRequest req, StaplerResponse rsp) throws UnrecoverableKeyException, CertificateEncodingException, NoSuchAlgorithmException, KeyStoreException, IOException { Jenkins.get().checkPermission(Jenkins.ADMINISTER); ByteBuffer outputStream = new ByteBuffer(); KubernetesSlave slave = getNode(); if(slave != null) { KubernetesCloud cloud = slave.getKubernetesCloud(); KubernetesClient client = cloud.connect(); String namespace = StringUtils.defaultIfBlank(slave.getNamespace(), client.getNamespace()); client.pods().inNamespace(namespace).withName(getName()) .inContainer(containerId).tailingLines(20).watchLog(outputStream); } new LargeText(outputStream, false).doProgressText(req, rsp); }
Source:
<code>public void cachesResults() { List<Integer> firstResponse = allocator.getRelevantModuli(KEY); List<Integer> secondResponse = allocator.getRelevantModuli(KEY); List<Integer> thirdResponse = allocator.getRelevantModuli(KEY); <START> verify(generator).getAndMarkResidue(); END> verifyNoMoreInteractions(generator); assertThat(firstResponse).isEqualTo(secondResponse).isEqualTo(thirdResponse); }</code><technical_language>verify(generator, times(1)).getAndMarkResidue()</technical_language>

Target:
public void cachesResults() { List<Integer> firstResponse = allocator.getRelevantModuli(KEY); List<Integer> secondResponse = allocator.getRelevantModuli(KEY); List<Integer> thirdResponse = allocator.getRelevantModuli(KEY); verify(generator, times(1)).getAndMarkResidue(); verifyNoMoreInteractions(generator); assertThat(firstResponse).isEqualTo(secondResponse).isEqualTo(thirdResponse); }
Source:
<code>public StreamProperties visitSort(SortNode node, List<StreamProperties> inputProperties) { StreamProperties sourceProperties = Iterables.getOnlyElement(inputProperties); <START> if (sourceProperties.isSingleStream()) { <END> return StreamProperties.ordered(); } else { return sourceProperties; } }</code><technical_language>in a checkState currently is a bug somewhere, point of parallel sort a merge</technical_language>

Target:
public StreamProperties visitSort(SortNode node, List<StreamProperties> inputProperties) { StreamProperties sourceProperties = Iterables.getOnlyElement(inputProperties); if (sourceProperties.isSingleStream()) { return StreamProperties.ordered(); } return sourceProperties; }
Source:
<code>@Override public void dispose() { <START> SubscriptionHelper.dispose(this); <END> }</code><technical_language>switch AtomicBoolean and: java if (compareAndSet(false, true)) { inner.cancel(); }</technical_language>

Target:
@Override public void dispose() { if (compareAndSet(false, true)) { inner.cancel(); inner = null; } }
Source:
<code>public static boolean main(String[] args) { new GlobalOptions().initialize(); try { return new KTest(args).run() == 0; } catch (SAXException | ParserConfigurationException | IOException | InterruptedException | TransformerException e) { e.printStackTrace(); GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, e.getMessage(), "command line", "System file.")); } catch (InvalidConfigError e) { LocationData location = e.getLocation(); GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, e.getMessage(), location.getSystemId(), location.getPosStr())); } catch (ParseException | InvalidArgumentException e) { GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, <START> e.getMessage(), "command line", "System file.")); <END> } return false; }</code><technical_language>haha, no. if file location, omit parameters, put useless junk</technical_language>

Target:
public static boolean main(String[] args) { new GlobalOptions().initialize(); KTest ktest = null; try { ktest = new KTest(args); } catch (ParseException e) { if (ArrayUtils.contains(args, "--" + Constants.DEBUG)) { e.printStackTrace(); } GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, e.getMessage())); } assert(ktest != null); try { return ktest.run() == 0; } catch (SAXException | ParserConfigurationException | IOException | InterruptedException | TransformerException | InvalidArgumentException e) { if (ktest.debug()) { e.printStackTrace(); } GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, e.getMessage())); } catch (InvalidConfigError e) { if (ktest.debug()) { e.printStackTrace(); } LocationData location = e.getLocation(); GlobalSettings.kem.register( new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, e.getMessage(), location.getSystemId(), location.getPosStr())); } return false; }
Source:
<code>private void createRepoManipulatorButton(Composite comboComposite) { new Label(comboComposite, SWT.NONE); new Label(comboComposite, SWT.NONE); Button repoManipulatorButton = new Button(comboComposite, SWT.PUSH); repoManipulatorButton.setText(ProvUIMessages.RepositoryManipulationPage_Manage); setButtonLayoutData(repoManipulatorButton); repoManipulatorButton.setFont(comboComposite.getFont()); <START> repoManipulatorButton.addSelectionListener(new SelectionListener() { <END> @Override public void widgetSelected(SelectionEvent e) { openRepoManipulatorUi(); } @Override public void widgetDefaultSelected(SelectionEvent e) { openRepoManipulatorUi(); } }); }</code><technical_language>Please org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter(Consumer) simply call openRepoManipulatorUi() method in consumer</technical_language>

Target:
private void createRepoManipulatorButton(Composite comboComposite) { new Label(comboComposite, SWT.NONE); new Label(comboComposite, SWT.NONE); Button repoManipulatorButton = new Button(comboComposite, SWT.PUSH); repoManipulatorButton.setText(ProvUIMessages.RepositoryManipulationPage_Manage); setButtonLayoutData(repoManipulatorButton); repoManipulatorButton.setFont(comboComposite.getFont()); repoManipulatorButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { openRepoManipulatorUi(); })); }
Source:
<code>private boolean isValidConfiguration() { if (isDiscarding() || isCalleeData()) { return isAsync(); } else { return true; <START> } <END> }</code><technical_language>This return !(isDiscarding() || isCalleeData()) || isAsync();</technical_language>

Target:
private boolean isValidConfiguration() { return !(isDiscarding() || isCalleeData()) || isAsync(); }
Source:
<code>public void registerOperations(ManagementResourceRegistration registration) { ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()) <START> .addAttributes(SingleSignOnDefinition.Attribute.class).addCapabilities((Capability) new Capability() { <END> @Override public RuntimeCapability<?> getDefinition() { return HOST_SSO_CAPABILITY; } @Override public RuntimeCapability<?> resolve(PathAddress address) { return HOST_SSO_CAPABILITY.fromBaseCapability(address); } }); new SimpleResourceRegistration(descriptor, new HostSingleSignOnServiceHandler()).register(registration); }</code><technical_language>FYI - <LINK_0> is merged, this becomes: .addCapabilities(() -> HOST_SSO_CAPABILITY)</technical_language>

Target:
public void registerOperations(ManagementResourceRegistration registration) { ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()) .addAttributes(SingleSignOnDefinition.Attribute.class).addCapabilities(() -> HOST_SSO_CAPABILITY); new SimpleResourceRegistration(descriptor, new HostSingleSignOnServiceHandler()).register(registration); }
Source:
<code>public String getTopCommitRevision() { loader.waitOnClosed(); return seleniumWebDriverHelper .waitVisibility(revertPanel, ELEMENT_TIMEOUT_SEC) .getText() <START> .split("\n")[1] <END> .replaceAll("\\.", ""); }</code><technical_language>complex procedure of revision number. IMHO usage of regex more obvious</technical_language>

Target:
public String getTopCommitRevision() { loader.waitOnClosed(); int numberOfTopRevisionCell = 1; return getRevertCommitTableContent().split("\n")[numberOfTopRevisionCell]; }
Source:
<code>public Consumer getHost(String guestId, Owner owner) { String guestLower = guestId.toLowerCase(); if (this.cachedHosts.containsKey(guestLower)) { return this.cachedHosts.get(guestLower); } Disjunction guestIdCrit = Restrictions.disjunction(); for (String possibleId : Util.getPossibleUuids(guestId)) { guestIdCrit.add(Restrictions.eq("guestIdLower", possibleId.toLowerCase())); } Criteria crit = currentSession() .createCriteria(GuestId.class) .createAlias("consumer", "gconsumer") .add(Restrictions.eq("gconsumer.owner", owner)) .addOrder(Order.desc("updated")) .setMaxResults(1) .setProjection(Projections.property("consumer")); <START> Consumer host = (Consumer) crit.add(guestIdCrit).uniqueResult(); <END> cachedHosts.put(guestLower, host); return host; }</code><technical_language>move .add block adding other restrictions? Criteria crit = currentSession() .createCriteria(GuestId.class) .createAlias("consumer", "gconsumer") .add(Restrictions.eq("gconsumer.owner", owner)) .add(guestIdCrit) .addOrder(Order.desc("updated")) .setMaxResults(1) .setProjection(Projections.property("consumer")); Consumer host = (Consumer) crit.uniqueResult();</technical_language>

Target:
public Consumer getHost(String guestId, Owner owner) { String guestLower = guestId.toLowerCase(); if (cachedHosts.containsKey(guestLower)) { return cachedHosts.get(guestLower); } Disjunction guestIdCrit = Restrictions.disjunction(); for (String possibleId : Util.getPossibleUuids(guestId)) { guestIdCrit.add(Restrictions.eq("guestIdLower", possibleId.toLowerCase())); } Criteria crit = currentSession() .createCriteria(GuestId.class) .createAlias("consumer", "gconsumer") .add(Restrictions.eq("gconsumer.owner", owner)) .add(guestIdCrit) .addOrder(Order.desc("updated")) .setMaxResults(1) .setProjection(Projections.property("consumer")); Consumer host = (Consumer) crit.uniqueResult(); cachedHosts.put(guestLower, host); return host; }
Source:
<code><START> private void setUpUsers() throws Exception <END> { getUtil().rest().deletePage("XWiki", FIRST_USER_NAME); getUtil().rest().deletePage("XWiki", FIRST_USER_NAME); getUtil().createUser(FIRST_USER_NAME, FIRST_USER_PASSWORD, "", ""); getUtil().createUser(SECOND_USER_NAME, SECOND_USER_PASSWORD, "", ""); NotificationsUserProfilePage p; getUtil().login(FIRST_USER_NAME, FIRST_USER_PASSWORD); p = NotificationsUserProfilePage.gotoPage(FIRST_USER_NAME); p.disableAllParameters(); getUtil().login(SECOND_USER_NAME, SECOND_USER_PASSWORD); p = NotificationsUserProfilePage.gotoPage(SECOND_USER_NAME); p.disableAllParameters(); }</code><technical_language>This is missing @Before</technical_language>

Target:
public void setUpUsers() throws Exception { getUtil().createUser(FIRST_USER_NAME, FIRST_USER_PASSWORD, "", ""); getUtil().createUser(SECOND_USER_NAME, SECOND_USER_PASSWORD, "", ""); NotificationsUserProfilePage p; getUtil().login(FIRST_USER_NAME, FIRST_USER_PASSWORD); p = NotificationsUserProfilePage.gotoPage(FIRST_USER_NAME); p.disableAllParameters(); getUtil().login(SECOND_USER_NAME, SECOND_USER_PASSWORD); p = NotificationsUserProfilePage.gotoPage(SECOND_USER_NAME); p.disableAllParameters(); }
Source:
<code>public static final boolean isWindows() { <START> return System.getProperty("os.name").startsWith("Windows"); <END> }</code><technical_language>if want this code more efficient, for private static final boolean IS_WINDOWS = System.getProperty("os.name").startsWith("Windows"); public static final boolean isWindows() { return IS_WINDOWS; } check class loading initialization time. do assume change OS a running JVM, fine ;-)</technical_language>

Target:
public static final boolean isWindows() { return IS_WINDOWS; }
Source:
<code>private static String toLegacyPathString(String moduleName) { final ModuleIdentifier moduleIdentifier = ModuleIdentifier.fromString(moduleName); final String name = moduleIdentifier.getName(); final String slot = moduleIdentifier.getSlot(); final StringBuilder builder = new StringBuilder(name.length() + slot.length() + 2); builder.append(name.replace('.', File.separatorChar)); builder.append(File.separatorChar).append(slot); <START> builder.append(File.separatorChar); <END> return builder.toString(); }</code><technical_language>In this case matter if slash is present omitted too, it</technical_language>

Target:
private static String toLegacyPathString(String moduleName) { final ModuleIdentifier moduleIdentifier = ModuleIdentifier.fromString(moduleName); final String name = moduleIdentifier.getName(); final String slot = moduleIdentifier.getSlot(); final StringBuilder builder = new StringBuilder(name.length() + slot.length() + 2); builder.append(name.replace('.', File.separatorChar)); builder.append(File.separatorChar).append(slot); return builder.toString(); }
Source:
<code>public synchronized void run() { if (log.isDebugEnabled()) { log.debug("Cache expiry scheduler running..."); } try { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext cc = PrivilegedCarbonContext.getThreadLocalCarbonContext(); cc.setTenantId(MultitenantConstants.SUPER_TENANT_ID); cc.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); for (CacheImpl cache : caches) { try { cache.runCacheExpiry(); if (log.isDebugEnabled()) { <START> log.debug("Cache expiry completed for cache " + cache.getName()); <END> } } catch (IllegalStateException e) { if (log.isDebugEnabled()) { log.debug("Error occurred while running CacheCleanupTask for cache " + cache.getName(), e); } } catch (Throwable e) { log.error("Error occurred while running CacheCleanupTask for cache " + cache.getName(), e); } } } finally { PrivilegedCarbonContext.endTenantFlow(); } }</code><technical_language>suggestion log.debug("Cache expiry completed for cache : " + cache.getName()); improve readability? kindly check other places well..</technical_language>

Target:
public synchronized void run() { if (log.isDebugEnabled()) { log.debug("Cache expiry scheduler running..."); } try { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext cc = PrivilegedCarbonContext.getThreadLocalCarbonContext(); cc.setTenantId(MultitenantConstants.SUPER_TENANT_ID); cc.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); for (CacheImpl cache : caches) { try { cache.runCacheExpiry(); if (log.isDebugEnabled()) { log.debug("Cache expiry completed for the cache: " + cache.getName()); } } catch (IllegalStateException e) { if (log.isDebugEnabled()) { log.debug("Error occurred while running CacheCleanupTask for the cache: " + cache.getName(), e); } } catch (Throwable e) { log.error("Error occurred while running CacheCleanupTask for the cache: " + cache.getName(), e); } } } finally { PrivilegedCarbonContext.endTenantFlow(); } }
Source:
<code>protected void checkFailures(StandardHost host) { boolean ok = Stream.of(host.findChildren()).map(Lifecycle::getState).allMatch(s -> s == LifecycleState.STARTED); <START> boolean strict = System.getProperty("nuxeo.start.strict") != null; <END> if (!ok && strict) { throw new IllegalStateException("There're context(s) failed to start."); } }</code><technical_language>boolean strict = Boolean.getBoolean("nuxeo.start.strict")</technical_language>

Target:
protected void checkFailures(StandardHost host) { boolean ok = Stream.of(host.findChildren()).map(Lifecycle::getState).allMatch(s -> s == LifecycleState.STARTED); boolean strict = Boolean.getBoolean("nuxeo.start.strict"); if (!ok && strict) { throw new IllegalStateException("Some contexts failed to start."); } }
Source:
<code>public List<LogEvent> getRecentLogs() { List<DedupedLogEvent> dedupedLogEvents = LogService.getInstance().getEvents(); ArrayList<LogEvent> logEvents = new ArrayList<>(dedupedLogEvents.size()); for (DedupedLogEvent dev : dedupedLogEvents) { LoggingEvent ev = dev.getEvent(); Object application = ev.getMDC("application"); if (application == null) application = ""; String msg = ev.getMessage().toString(); StringBuilder text = new StringBuilder(); for (int i = 0; i < msg.length(); i++) { char c = msg.charAt(i); int type = Character.getType(c); boolean notPrintable = type == Character.UNASSIGNED || type == Character.LINE_SEPARATOR || type == Character.NON_SPACING_MARK || type == Character.PRIVATE_USE; text.append(notPrintable ? '?' : c); } msg = sanitize(text.toString()); logEvents.add(new LogEvent(ev.getTimeStamp(), application, dev.getCount(), <START> ev.getLevel().toString(), msg.trim(), ev.getThrowableStrRep())); <END> } return logEvents; }</code><technical_language>need sanitize elements of this stack trace mess HTML page</technical_language>

Target:
public List<LogEvent> getRecentLogs() { List<DedupedLogEvent> dedupedLogEvents = LogService.getInstance().getEvents(); ArrayList<LogEvent> logEvents = new ArrayList<>(dedupedLogEvents.size()); for (DedupedLogEvent dev : dedupedLogEvents) { LoggingEvent ev = dev.getEvent(); Object application = ev.getMDC("application"); if (application == null) application = ""; String msg = ev.getMessage().toString(); msg = StringUtils.abbreviate(sanitize(msg), 300); String[] stacktrace = ev.getThrowableStrRep(); if (stacktrace != null) for (int i = 0; i < stacktrace.length; i++) stacktrace[i] = sanitize(stacktrace[i]); logEvents.add(new LogEvent(ev.getTimeStamp(), application, dev.getCount(), ev.getLevel().toString(), msg.trim(), stacktrace)); } return logEvents; }
Source:
<code>protected String getSQLine(final SAMSequenceRecord sequenceRecord) { int numAttributes = sequenceRecord.getAttributes() != null ? sequenceRecord.getAttributes().size() : 0; if (sequenceRecord.hasAlternativeSequenceNames()) numAttributes++; final String[] fields = new String[3 + numAttributes]; fields[0] = HEADER_LINE_START + HeaderRecordType.SQ; fields[1] = SAMSequenceRecord.SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + sequenceRecord.getSequenceName(); fields[2] = SAMSequenceRecord.SEQUENCE_LENGTH_TAG + TAG_KEY_VALUE_SEPARATOR + Integer.toString(sequenceRecord.getSequenceLength()); encodeTags(sequenceRecord, fields, 3); <START> if (sequenceRecord.hasAlternativeSequenceNames()) fields[fields.length - 1] = SAMSequenceRecord.ALTERNATIVE_SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + String.join(",", sequenceRecord.getAlternativeSequeneNames()); <END> return StringUtil.join(FIELD_SEPARATOR, fields); }</code><technical_language>this need special handling? alternate contig names added attributes map handled other attributes</technical_language>

Target:
protected String getSQLine(final SAMSequenceRecord sequenceRecord) { final int numAttributes = sequenceRecord.getAttributes() != null ? sequenceRecord.getAttributes().size() : 0; final String[] fields = new String[3 + numAttributes]; fields[0] = HEADER_LINE_START + HeaderRecordType.SQ; fields[1] = SAMSequenceRecord.SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + sequenceRecord.getSequenceName(); fields[2] = SAMSequenceRecord.SEQUENCE_LENGTH_TAG + TAG_KEY_VALUE_SEPARATOR + Integer.toString(sequenceRecord.getSequenceLength()); encodeTags(sequenceRecord, fields, 3); return StringUtil.join(FIELD_SEPARATOR, fields); }
Source:
<code>private void assertCorruptedFrameExceptionHandling(byte[] data) { EmbeddedChannel channel = new EmbeddedChannel(new Utf8FrameValidator()); try { channel.writeInbound(new TextWebSocketFrame(Unpooled.copiedBuffer(data))); Assert.fail(); } catch (CorruptedFrameException e) { } Assert.assertTrue(channel.finish()); <START> EmptyByteBuf buf = channel.readOutbound(); <END> Assert.assertNotNull(buf); Assert.assertNull(channel.readOutbound()); }</code><technical_language>I depend fact this is instance of EmptyByteBuf... check readable release</technical_language>

Target:
private void assertCorruptedFrameExceptionHandling(byte[] data) { EmbeddedChannel channel = new EmbeddedChannel(new Utf8FrameValidator()); try { channel.writeInbound(new TextWebSocketFrame(Unpooled.copiedBuffer(data))); Assert.fail(); } catch (CorruptedFrameException e) { } Assert.assertTrue(channel.finish()); ByteBuf buf = channel.readOutbound(); Assert.assertNotNull(buf); try { Assert.assertFalse(buf.isReadable()); } finally { buf.release(); } Assert.assertNull(channel.readOutbound()); }
Source:
<code>public void waitForInitialData_resilientInCaseOfRetriesAsync() { SyncCredentials credentials = SyncCredentials.usernamePassword(UUID.randomUUID().toString(), "password", true); SyncUser user = SyncUser.login(credentials, Constants.AUTH_URL); final SyncConfiguration config = new SyncConfiguration.Builder(user, Constants.USER_REALM) .waitForInitialRemoteData(false) .build(); Random randomizer = new Random(); for (int i = 0; i < 10; i++) { <START> final int iteration = i; <END> RealmAsyncTask task = Realm.getInstanceAsync(config, new Realm.Callback() { @Override public void onSuccess(Realm realm) { fail(); } @Override public void onError(Throwable exception) { fail(exception.toString()); } }); SystemClock.sleep(randomizer.nextInt(5)); task.cancel(); } looperThread.testComplete(); }</code><technical_language>iteration??? this for error message something</technical_language>

Target:
public void waitForInitialData_resilientInCaseOfRetriesAsync() { SyncCredentials credentials = SyncCredentials.usernamePassword(UUID.randomUUID().toString(), "password", true); SyncUser user = SyncUser.login(credentials, Constants.AUTH_URL); final SyncConfiguration config = new SyncConfiguration.Builder(user, Constants.USER_REALM) .waitForInitialRemoteData() .build(); Random randomizer = new Random(); for (int i = 0; i < 10; i++) { RealmAsyncTask task = Realm.getInstanceAsync(config, new Realm.Callback() { @Override public void onSuccess(Realm realm) { fail(); } @Override public void onError(Throwable exception) { fail(exception.toString()); } }); SystemClock.sleep(randomizer.nextInt(5)); task.cancel(); } looperThread.testComplete(); }
Source:
<code>public TraversalControl visitField(Field field, TraverserContext<Node> context) { QueryTraversalContext parentEnv = context .parentContext() .getVar(QueryTraversalContext.class); GraphQLFieldDefinition fieldDefinition = Introspection.getFieldDef(schema, parentEnv.getType(), field.getName()); Map<String, Object> argumentValues = valuesResolver.getArgumentValues(schema.getFieldVisibility(), fieldDefinition.getArguments(), field.getArguments(), variables); QueryVisitorEnvironment environment = new QueryVisitorEnvironment(field, fieldDefinition, parentEnv.getType(), parentEnv.getEnvironment(), argumentValues); LeaveOrEnter leaveOrEnter = context.getVar(LeaveOrEnter.class); if (leaveOrEnter == LEAVE) { if (!preOrder) { <START> visitFieldCallback.visitField(environment); <END> } return TraversalControl.CONTINUE; } if (preOrder) { visitFieldCallback.visitField(environment); } if (!conditionalNodes.shouldInclude(variables, field.getDirectives())) return TraversalControl.ABORT; GraphQLUnmodifiedType unmodifiedType = schemaUtil.getUnmodifiedType(fieldDefinition.getType()); QueryTraversalContext fieldEnv = (unmodifiedType instanceof GraphQLCompositeType) ? new QueryTraversalContext((GraphQLCompositeType) unmodifiedType, environment) : new QueryTraversalContext(null, environment); context.setVar(QueryTraversalContext.class, fieldEnv); return TraversalControl.CONTINUE; }</code><technical_language>agreed. changed it. redundant code ... I it</technical_language>

Target:
public TraversalControl visitField(Field field, TraverserContext<Node> context) { QueryTraversalContext parentEnv = context .getParentContext() .getVar(QueryTraversalContext.class); GraphQLFieldDefinition fieldDefinition = Introspection.getFieldDef(schema, parentEnv.getType(), field.getName()); Map<String, Object> argumentValues = valuesResolver.getArgumentValues(schema.getFieldVisibility(), fieldDefinition.getArguments(), field.getArguments(), variables); QueryVisitorEnvironment environment = new QueryVisitorEnvironment(field, fieldDefinition, parentEnv.getType(), parentEnv.getEnvironment(), argumentValues); LeaveOrEnter leaveOrEnter = context.getVar(LeaveOrEnter.class); if (leaveOrEnter == LEAVE) { postOrderCallback.visitField(environment); return TraversalControl.CONTINUE; } if (!conditionalNodes.shouldInclude(variables, field.getDirectives())) return TraversalControl.ABORT; preOrderCallback.visitField(environment); GraphQLUnmodifiedType unmodifiedType = schemaUtil.getUnmodifiedType(fieldDefinition.getType()); QueryTraversalContext fieldEnv = (unmodifiedType instanceof GraphQLCompositeType) ? new QueryTraversalContext((GraphQLCompositeType) unmodifiedType, environment) : new QueryTraversalContext(null, environment); context.setVar(QueryTraversalContext.class, fieldEnv); return TraversalControl.CONTINUE; }
Source:
<code>public <Z, D extends Database<Z>> void dump(D database, Decoder decoder, File file, boolean dataOnly) throws Exception { try (Connection c = database.connect(decoder)) { try (Statement s = c.createStatement()) { if (!s.execute("set EXCLUSIVE 1;")) { try (ResultSet rs = s.executeQuery("SCRIPT;")) { try (FileWriter fw = new FileWriter(file)) { while (rs.next()) { fw.write(rs.getString(1) + "\n"); } } } finally { s.execute("set EXCLUSIVE 0;"); } } <START> } catch (Exception e) { <END> System.err.println(e.getMessage()); e.printStackTrace(); throw e; } } }</code><technical_language>drop catch block? want write System.err System.out. caller handle exception</technical_language>

Target:
public <Z, D extends Database<Z>> void dump(D database, Decoder decoder, File file, boolean dataOnly) throws Exception { try (Connection c = database.connect(decoder)) { try (Statement s = c.createStatement()) { if (!s.execute("set EXCLUSIVE 1;")) { try (ResultSet rs = s.executeQuery("SCRIPT;")) { try (FileWriter fw = new FileWriter(file)) { while (rs.next()) { fw.write(rs.getString(1) + "\n"); } } } finally { s.execute("set EXCLUSIVE 0;"); } } } } }
Source:
<code>public void testMulipleClients() throws Throwable { <START> final CountDownLatch latch = new CountDownLatch(NUM_THREADS + 1); <END> List<Thread> threads = new ArrayList<>(NUM_THREADS); for (int i = 0; i < NUM_THREADS; i++) { Thread t1 = new Thread(content(latch)); t1.start(); threads.add(t1); } latch.countDown(); latch.await(); for (Thread t : threads) { t.join(); } Throwable throwable = exception.get(); if (throwable != null) { throw throwable; } }</code><technical_language>final flag needed</technical_language>

Target:
public void testMulipleClients() throws Throwable { CountDownLatch latch = new CountDownLatch(NUM_THREADS + 1); List<Thread> threads = new ArrayList<>(NUM_THREADS); for (int i = 0; i < NUM_THREADS; i++) { Thread t1 = new Thread(content(latch)); t1.start(); threads.add(t1); } latch.countDown(); assertTrue(latch.await(MAX_WAIT_TIME_SECONDS, TimeUnit.SECONDS)); for (Thread t : threads) { t.join(); } Throwable throwable = exception.get(); if (throwable != null) { throw throwable; } }
Source:
<code>public @NonNull String getHelpText() { <START> return "Start time of the segment"; END> }</code><technical_language>Externalize</technical_language>

Target:
public @NonNull String getHelpText() { return Messages.getString("SegmentStartTimeAspect.startDescription"); }
Source:
<code>public AdapterFactory getAdapterFactory() { Object adapterFactory; String adapterFactoryClassName = msbConfig.getBrokerAdapterFactory(); try { Class clazz = Class.forName(adapterFactoryClassName); adapterFactory = clazz.newInstance(); } catch (ClassNotFoundException e) { <START> throw new AdapterFactoryNotSupportedException("The required MSB Adapter Factory '" + adapterFactoryClassName + "' is not supported.", e); <END> } catch (Exception e) { throw new FailedToCreateAdapterFactoryException("Failed to create Adapter Factory: " + adapterFactoryClassName, e); } if (!(adapterFactory instanceof AdapterFactory)) { throw new InconsistentAdapterFactoryException("Inconsistent Adapter Factory class: " + adapterFactoryClassName); } ((AdapterFactory) adapterFactory).init(msbConfig); return (AdapterFactory) adapterFactory; }</code><technical_language>I argue exceptions fine-grained</technical_language>

Target:
public AdapterFactory getAdapterFactory() { AdapterFactory adapterFactory; String adapterFactoryClassName = msbConfig.getBrokerAdapterFactory(); try { Class clazz = Class.forName(adapterFactoryClassName); adapterFactory = (AdapterFactory) clazz.newInstance(); } catch (ClassNotFoundException e) { throw new AdapterInitializationException("The required MSB Adapter Factory '" + adapterFactoryClassName + "' is not supported.", e); } catch (InstantiationException | IllegalAccessException e) { throw new AdapterInitializationException("Failed to create Adapter Factory: " + adapterFactoryClassName, e); } catch (ClassCastException e) { throw new AdapterInitializationException("Inconsistent Adapter Factory class: " + adapterFactoryClassName); } adapterFactory.init(msbConfig); return adapterFactory; }
Source:
<code>private String readPasswordFile(String passwordFile) throws FileNotFoundException, IOException { <START> try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(passwordFile), Charset.defaultCharset().displayName()))) { <END> String readLine = reader.readLine(); return readLine; } }</code><technical_language>I new BufferedReader(new FileReader(propFile)) FileReader conversion Unicode platform default encoding</technical_language>

Target:
private String readPasswordFile(String passwordFile) throws FileNotFoundException, IOException { FileReader in = new FileReader(passwordFile); BufferedReader bufferedReader = new BufferedReader(in); String readLine = bufferedReader.readLine(); closeQuietly(in, bufferedReader); return readLine; }
Source:
<code>SyslogAuditEndpoint(Builder builder) throws IOException { <START> infiniteReconnectAttemptsOverflowNumber = Integer.parseInt(System.getProperty("wildfly.elytron.infinite.reconnect.attempts.overflow.number", "10000")); <END> maxReconnectAttempts = builder.maxReconnectAttempts; protocol = builder.ssl ? Protocol.SSL_TCP : builder.tcp ? Protocol.TCP : Protocol.UDP; syslogHandler = new SyslogHandler(checkNotNullParam("serverAddress", builder.serverAddress), builder.port, Facility.SECURITY, builder.format, protocol, checkNotNullParam("hostName", builder.hostName)); if (builder.tcp) { if (builder.socketFactory != null) { tcpOutputStream = new TcpOutputStream(builder.socketFactory, builder.serverAddress, builder.port) { }; } else { tcpOutputStream = new TcpOutputStream(builder.serverAddress, builder.port); } syslogHandler.setOutputStream(tcpOutputStream); } else { tcpOutputStream = null; } errorManager = new TransportErrorManager(protocol); syslogHandler.setErrorManager(errorManager); accept(EventPriority.INFORMATIONAL, "Elytron audit logging enabled with RFC format: " + builder.format); }</code><technical_language>This needs a privileged action</technical_language>

Target:
SyslogAuditEndpoint(Builder builder) throws IOException { maxReconnectAttempts = builder.maxReconnectAttempts; protocol = builder.ssl ? Protocol.SSL_TCP : builder.tcp ? Protocol.TCP : Protocol.UDP; syslogHandler = new SyslogHandler(checkNotNullParam("serverAddress", builder.serverAddress), builder.port, Facility.SECURITY, builder.format, protocol, checkNotNullParam("hostName", builder.hostName)); if (builder.tcp) { if (builder.socketFactory != null) { tcpOutputStream = new TcpOutputStream(builder.socketFactory, builder.serverAddress, builder.port) { }; } else { tcpOutputStream = new TcpOutputStream(builder.serverAddress, builder.port); } syslogHandler.setOutputStream(tcpOutputStream); } else { tcpOutputStream = null; } errorManager = new TransportErrorManager(protocol); syslogHandler.setErrorManager(errorManager); accept(EventPriority.INFORMATIONAL, "Elytron audit logging enabled with RFC format: " + builder.format); }
Source:
<code>private void initialize(FileSplit split, JobConf job) { <START> if (realInputFormat == null) { <END> return; } Map<String, PartitionDesc> partitionDescMap = Utilities.getMapRedWork(job).getPathToPartitionInfo(); if (!partitionDescMap.containsKey(split.getPath().getParent().toUri().toString())) { throw new RuntimeException("Failed locating partition description for " + split.getPath().toUri().toString()); } Properties properties = partitionDescMap.get(split.getPath().getParent().toUri().toString()) .getTableDesc().getProperties(); String thriftClassName = properties.getProperty(Constants.SERIALIZATION_CLASS, null); if (thriftClassName == null) { throw new RuntimeException( "Required property " + Constants.SERIALIZATION_CLASS + " is null."); } try { Class thriftClass = job.getClassByName(thriftClassName); realInputFormat = new MultiInputFormat(new TypeRef(thriftClass) {}); } catch (ClassNotFoundException e) { throw new RuntimeException("Failed getting class for " + thriftClassName); } }</code><technical_language>is this check required</technical_language>

Target:
private void initialize(FileSplit split, JobConf job) { Map<String, PartitionDesc> partitionDescMap = Utilities.getMapRedWork(job).getPathToPartitionInfo(); if (!partitionDescMap.containsKey(split.getPath().getParent().toUri().toString())) { throw new RuntimeException("Failed locating partition description for " + split.getPath().toUri().toString()); } Properties properties = partitionDescMap.get(split.getPath().getParent().toUri().toString()) .getTableDesc().getProperties(); String thriftClassName = properties.getProperty(Constants.SERIALIZATION_CLASS, null); if (thriftClassName == null) { throw new RuntimeException( "Required property " + Constants.SERIALIZATION_CLASS + " is null."); } try { Class thriftClass = job.getClassByName(thriftClassName); realInputFormat = new MultiInputFormat(new TypeRef(thriftClass) {}); } catch (ClassNotFoundException e) { throw new RuntimeException("Failed getting class for " + thriftClassName); } }
Source:
<code>protected void sendPromiseMessage(final Object[] args, final SPromise rcvr, final SResolver resolver, final RegisterWhenResolved registerNode) { assert rcvr.getOwner() == EventualMessage.getActorCurrentMessageIsExecutionOn() : "think this should be true because the promise is an Object and owned by this specific actor"; SteppingType step = getStepping(); PromiseSendMessage msg = new PromiseSendMessage( EventualMessage.getCurrentExecutingMessage(), EventualMessage.getCurrentExecutingMessageId(), selector, args, rcvr.getOwner(), resolver, onReceive, messageReceiverBreakpoint.executeCheckIsSetAndEnabled(), promiseResolverBreakpoint.executeCheckIsSetAndEnabled()); <START> msg.setTriggerStepping(step); <END> registerNode.register(rcvr, msg, rcvr.getOwner()); }</code><technical_language>set constructor</technical_language>

Target:
protected void sendPromiseMessage(final Object[] args, final SPromise rcvr, final SResolver resolver, final RegisterWhenResolved registerNode) { assert rcvr.getOwner() == EventualMessage.getActorCurrentMessageIsExecutionOn() : "think this should be true because the promise is an Object and owned by this specific actor"; PromiseSendMessage msg = new PromiseSendMessage( EventualMessage.getCurrentExecutingMessageId(), selector, args, rcvr.getOwner(), resolver, onReceive, hasMessageReceiverBreakpoint(resolver), promiseResolverBreakpoint.executeCheckIsSetAndEnabled()); registerNode.register(rcvr, msg, rcvr.getOwner()); }
Source:
<code>public AbstractWidget() { <START> this.title = ""; <END> settings = new HashMap<String, String>(); location = new WidgetLocation(); }</code><technical_language>I rewrite hashcode equals title id IDE provide failsafe implementation</technical_language>

Target:
public AbstractWidget() { settings = new HashMap<String, String>(); location = new WidgetLocation(); }