auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static void reconfigure(DfsBlockCacheConfig cfg) { DfsBlockCache nc = new DfsBlockCache(cfg); DfsBlockCache oc = cache; cache = nc; if (oc != null) { if (oc.readAheadService != null) oc.readAheadService.shutdown(); <START> for (DfsPackFile pack : oc.getPackFiles()) { <END> pack.key.cachedSize.set(0); } } }</code><technical_language>Style-nit: Curly braces this loop necessary</technical_language>

Target:
public static void reconfigure(DfsBlockCacheConfig cfg) { DfsBlockCache nc = new DfsBlockCache(cfg); DfsBlockCache oc = cache; cache = nc; if (oc != null) { if (oc.readAheadService != null) oc.readAheadService.shutdown(); for (DfsPackFile pack : oc.getPackFiles()) pack.key.cachedSize.set(0); } }
Source:
<code>private RefactoringStatus check15() throws CoreException { RefactoringStatus result= new RefactoringStatus(); HashSet<IJavaProject> checkedProjects= new HashSet<>(); for (IJavaElement <START> fElement : <END> fElements) { IJavaProject javaProject = fElement.getJavaProject(); if (! checkedProjects.contains(javaProject)) { if (! JavaModelUtil.is50OrHigher(javaProject)) { String message= Messages.format(RefactoringCoreMessages.InferTypeArgumentsRefactoring_not50, BasicElementLabels.getJavaElementName(javaProject.getElementName())); result.addFatalError(message); } else if (! JavaModelUtil.is50OrHigherJRE(javaProject)) { String message= Messages.format(RefactoringCoreMessages.InferTypeArgumentsRefactoring_not50Library, BasicElementLabels.getJavaElementName(javaProject.getElementName())); result.addFatalError(message); } checkedProjects.add(javaProject); } } return result; }</code><technical_language>rename element</technical_language>

Target:
private RefactoringStatus check15() throws CoreException { RefactoringStatus result= new RefactoringStatus(); HashSet<IJavaProject> checkedProjects= new HashSet<>(); for (IJavaElement element : fElements) { IJavaProject javaProject= element.getJavaProject(); if (! checkedProjects.contains(javaProject)) { if (! JavaModelUtil.is50OrHigher(javaProject)) { String message= Messages.format(RefactoringCoreMessages.InferTypeArgumentsRefactoring_not50, BasicElementLabels.getJavaElementName(javaProject.getElementName())); result.addFatalError(message); } else if (! JavaModelUtil.is50OrHigherJRE(javaProject)) { String message= Messages.format(RefactoringCoreMessages.InferTypeArgumentsRefactoring_not50Library, BasicElementLabels.getJavaElementName(javaProject.getElementName())); result.addFatalError(message); } checkedProjects.add(javaProject); } } return result; }
Source:
<code>public boolean provides(IOperation operation) { if (!(operation instanceof CreateDecoratorsOperation)) { return false; } IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget(); <START> View view = decoratorTarget.getAdapter(View.class); <END> return view != null && DDiagramEditPart.MODEL_ID.equals(SiriusVisualIDRegistry.getModelID(view)); }</code><technical_language>cast removed avoid compilation errors Eclipse versions do generified getAdapter</technical_language>

Target:
public boolean provides(IOperation operation) { if (!(operation instanceof CreateDecoratorsOperation)) { return false; } IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget(); View view = (View) decoratorTarget.getAdapter(View.class); return view != null && DDiagramEditPart.MODEL_ID.equals(SiriusVisualIDRegistry.getModelID(view)); }
Source:
<code>public void addFailure(Throwable targetException) { if (targetException instanceof MultipleFailureException) { addMultipleFailureException((MultipleFailureException) targetException); <START> } else if (targetException instanceof AssumptionViolatedException) { <END> addFailedAssumption((AssumptionViolatedException) targetException); } else { notifier.fireTestFailure(new Failure(description, targetException)); } }</code><technical_language>Mmh. Good point. happy junit internal either</technical_language>

Target:
public void addFailure(Throwable targetException) { if (targetException instanceof MultipleFailureException) { addMultipleFailureException((MultipleFailureException) targetException); } else if (isAssumptionViolated(targetException)) { addFailedAssumption(targetException); } else { notifier.fireTestFailure(new Failure(description, targetException)); } }
Source:
<code>protected final AuditRepositoryRecord createDBAuditObj(LogEventSecureRequestType mess, AssertionType assertion) { AuditRepositoryRecord auditRec = new AuditRepositoryRecord(); <START> EventIdentificationType eventIdentification = mess.getAuditMessage().getEventIdentification(); <END> String eventCommunityId = mess.getRemoteHCID(); LOG.info("auditSourceID : " + eventCommunityId); if (NullChecker.isNotNullish(eventCommunityId)) { auditRec.setRemoteHcid(eventCommunityId); } else { auditRec.setRemoteHcid(""); } auditRec.setDirection(mess.getDirection()); auditRec.setMessage(getBlobFromAuditMessage(mess.getAuditMessage())); XMLGregorianCalendar xMLCalDate = eventIdentification.getEventDateTime(); if (xMLCalDate != null) { auditRec.setEventTimeStamp(convertXMLGregorianCalendarToDate(xMLCalDate)); } auditRec.setOutcome(eventIdentification.getEventOutcomeIndicator().intValue()); auditRec.setEventType(mess.getEventType()); auditRec.setEventId(eventIdentification.getEventID().getDisplayName()); auditRec.setMessageId(MessageGeneratorUtils.getInstance().generateMessageId(assertion)); auditRec.setRelatesTo(getRelatesTo(assertion)); auditRec.setUserId(getUserId(mess.getAuditMessage().getActiveParticipant())); return auditRec; }</code><technical_language>in LogEventRequestType schema accessed mess here</technical_language>

Target:
protected final AuditRepositoryRecord createDBAuditObj(LogEventSecureRequestType mess, AssertionType assertion) { AuditRepositoryRecord auditRec = new AuditRepositoryRecord(); String eventCommunityId = mess.getRemoteHCID(); LOG.info("auditSourceID : " + eventCommunityId); if (NullChecker.isNotNullish(eventCommunityId)) { auditRec.setRemoteHcid(eventCommunityId); } else { auditRec.setRemoteHcid(""); } auditRec.setDirection(mess.getDirection()); auditRec.setMessage(getBlobFromAuditMessage(mess.getAuditMessage())); XMLGregorianCalendar xMLCalDate = mess.getEventTimestamp(); if (xMLCalDate != null) { auditRec.setEventTimeStamp(convertXMLGregorianCalendarToDate(xMLCalDate)); } auditRec.setOutcome(mess.getEventOutcomeIndicator().intValue()); auditRec.setEventType(mess.getEventType()); auditRec.setEventId(mess.getEventID()); auditRec.setMessageId(MessageGeneratorUtils.getInstance().generateMessageId(assertion)); auditRec.setRelatesTo(mess.getRelatesTo()); auditRec.setUserId(mess.getUserId()); return auditRec; }
Source:
<code><START> public IMerchant getMerchant(){ <END> return merchant; }</code><technical_language>formatting</technical_language>

Target:
public IMerchant getMerchant() { return this.merchant; }
Source:
<code>public String lookupEntityName(Entity entity) { <START> if (entity != null) { <END> EntityEnum entityEnum = EntityEnum.getEntityEnum(entity.getEntityType()); return lookupEntityName(entityEnum, entity.getId()); } return null; }</code><technical_language>art: Personally I lean a guard statement. java if (entity == null) { return null } ..</technical_language>

Target:
public String lookupEntityName(Entity entity) { if (entity == null) { return null; } EntityEnum entityEnum = EntityEnum.getEntityEnum(entity.getEntityType()); return lookupEntityName(entityEnum, entity.getId()); }
Source:
<code><START> public CDNContainer(String name, boolean enabled, boolean logRetention, int ttl, URI uri, URI sslUri, URI streamingUri, URI iosUri) { <END> this.name = name; this.enabled = enabled; this.logRetention = logRetention; this.ttl = ttl; this.uri = uri; this.sslUri = sslUri; this.streamingUri = streamingUri; this.iosUri = iosUri; }</code><technical_language>Add checkNotNull validations annotate fields @Nullable</technical_language>

Target:
public CDNContainer(String name, boolean enabled, boolean logRetention, int ttl, URI uri, URI sslUri, URI streamingUri, URI iosUri) { this.name = checkNotNull(name, "name required"); this.enabled = enabled; this.logRetention = logRetention; this.ttl = ttl; this.uri = checkNotNull(uri, "uri required"); this.sslUri = checkNotNull(sslUri, "sslUri required"); this.streamingUri = checkNotNull(streamingUri, "streamingUri required"); this.iosUri = checkNotNull(iosUri, "iosUri required"); }
Source:
<code>public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) { String label = event.getLabel(); if (label == null) { <START> return null; <END> } ImmutableMap.Builder<String, String> builder = new ImmutableMap.Builder<>(); String channelType = event.getEntry().getParent().getParent().getName(); String connectionName = event.getEntry().getParent().getName(); String nodeName = event.getEntry().getParent().getParent().getParent().getName(); Pair<String, String> localRemoteHost = getLocalAndRemoteHosts(label); builder.put(Messages.AbstractRosPresentationProvider_ConnectionChannelType, channelType); builder.put(Messages.AbstractRosPresentationProvider_ConnectionName, connectionName); builder.put(Messages.AbstractRosPresentationProvider_NodeName, nodeName); builder.put(Messages.AbstractRosPresentationProvider_ConnectionHosts, StringUtils.EMPTY); builder.put(TAB + Messages.AbstractRosPresentationProvider_ConnectionHostLocal, localRemoteHost.getFirst()); builder.put(TAB + Messages.AbstractRosPresentationProvider_ConnectionHostRemote, localRemoteHost.getSecond()); return builder.build(); }</code><technical_language>Collections.emptyMap() a fit</technical_language>

Target:
public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) { String label = event.getLabel(); if (label == null) { return Collections.emptyMap(); } ImmutableMap.Builder<String, String> builder = new ImmutableMap.Builder<>(); String channelType = event.getEntry().getParent().getParent().getName(); String connectionName = event.getEntry().getParent().getName(); String nodeName = event.getEntry().getParent().getParent().getParent().getName(); Pair<String, String> localRemoteHost = getLocalAndRemoteHosts(label); builder.put(Messages.AbstractRosPresentationProvider_ConnectionChannelType, channelType); builder.put(Messages.AbstractRosPresentationProvider_ConnectionName, connectionName); builder.put(Messages.AbstractRosPresentationProvider_NodeName, nodeName); builder.put(Messages.AbstractRosPresentationProvider_ConnectionHosts, StringUtils.EMPTY); builder.put(TAB + Messages.AbstractRosPresentationProvider_ConnectionHostLocal, localRemoteHost.getFirst()); builder.put(TAB + Messages.AbstractRosPresentationProvider_ConnectionHostRemote, localRemoteHost.getSecond()); return builder.build(); }
Source:
<code>private String constructQueryArgs(String primaryKeySelection, String[] primaryKeySelectionArgs) { String queryArgsString = primaryKeySelection; <START> for (int i = 0; i < primaryKeySelectionArgs.length; i++) { <END> if (primaryKeySelectionArgs[i] == null) { queryArgsString = queryArgsString.replaceFirst("= \\?", "IS NULL"); } else { queryArgsString = queryArgsString.replaceFirst("\\?", "\"" + primaryKeySelectionArgs[i] + "\""); } } return queryArgsString; }</code><technical_language>a foreach loop instead</technical_language>

Target:
private String constructQueryArgs(String primaryKeySelection, String[] primaryKeySelectionArgs) { String queryArgsString = primaryKeySelection; for (String argument : primaryKeySelectionArgs) { if (argument == null) { queryArgsString = queryArgsString.replaceFirst("= \\?", "IS NULL"); } else { queryArgsString = queryArgsString.replaceFirst("\\?", "\"" + argument + "\""); } } return queryArgsString; }
Source:
<code>public AdaptiveFeatureGenerator create(Element generatorElement, FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException { Collection<AdaptiveFeatureGenerator> aggregatedGenerators = new LinkedList<>(); NodeList childNodes = generatorElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node childNode = childNodes.item(i); if (childNode instanceof Element) { Element aggregatedGeneratorElement = (Element) childNode; aggregatedGenerators.add( GeneratorFactory.createGenerator(aggregatedGeneratorElement, resourceManager)); } } <START> return new TokenNormalizerFeatureGenerator(new AggregatedFeatureGenerator(aggregatedGenerators.toArray( <END> new AdaptiveFeatureGenerator[aggregatedGenerators.size()]))); }</code><technical_language>Question: is this line exceeding 100 char limit? consider splitting next line</technical_language>

Target:
public AdaptiveFeatureGenerator create(Element generatorElement, FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException { Collection<AdaptiveFeatureGenerator> aggregatedGenerators = new LinkedList<>(); NodeList childNodes = generatorElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node childNode = childNodes.item(i); if (childNode instanceof Element) { Element aggregatedGeneratorElement = (Element) childNode; aggregatedGenerators.add( GeneratorFactory.createGenerator(aggregatedGeneratorElement, resourceManager)); } } TokenNormalizerFeatureGenerator featureGenerator = null; String normalizerClassName = generatorElement.getAttribute("class"); if (normalizerClassName != null && !normalizerClassName.isEmpty()) { TokenNormalizer tokenNormalizer = ExtensionLoader.instantiateExtension(TokenNormalizer.class, normalizerClassName); featureGenerator = new TokenNormalizerFeatureGenerator(tokenNormalizer, new AggregatedFeatureGenerator(aggregatedGenerators.toArray( new AdaptiveFeatureGenerator[aggregatedGenerators.size()]))); } if (featureGenerator == null) { featureGenerator = new TokenNormalizerFeatureGenerator( new AggregatedFeatureGenerator(aggregatedGenerators.toArray( new AdaptiveFeatureGenerator[aggregatedGenerators.size()]))); } return featureGenerator; }
Source:
<code>public void onPageRequest(final PageRequest request) { final Map<Integer, Integer> calendars = new HashMap<Integer, Integer>(); <START> Integer CalendarId = 1; <END> calendars.put(CalendarId++, getProject().getId()); calendars.put(CalendarId++, getProject().getCalendarId()); calendars.put(CalendarId++, getProject().getPointsList().getId()); calendars.put(CalendarId++, getProject().getRemindersList().getId()); if (!getProject().getFunded().isEmpty()) { for (int i = 0; i < getProject().getFunded().size(); i++) { calendars.put(CalendarId++, getProject().getFunded().get(i).getFunded().getId()); calendars.put(CalendarId++, getProject().getFunded().get(i).getFunded().getCalendarId()); calendars.put(CalendarId++, getProject().getFunded().get(i).getFunded().getPointsList().getId()); calendars.put(CalendarId++, getProject().getFunded().get(i).getFunded().getRemindersList().getId()); } } if (!getProject().getFunding().isEmpty()) { for (int i = 0; i < getProject().getFunding().size(); i++) { calendars.put(CalendarId++, getProject().getFunding().get(i).getFunding().getId()); calendars.put(CalendarId++, getProject().getFunding().get(i).getFunding().getCalendarId()); calendars.put(CalendarId++, getProject().getFunding().get(i).getFunding().getPointsList().getId()); calendars.put(CalendarId++, getProject().getFunding().get(i).getFunding().getRemindersList().getId()); } } calendarPresenter.reload(calendars); }</code><technical_language>[Java naming convention](<LINK_0> encourage naming variables a letter lowercase . CalendarId spelled calendarId</technical_language>

Target:
public void onPageRequest(final PageRequest request) { final Map<Integer, Integer> calendars = new HashMap<Integer, Integer>(); Integer calendarId = 1; calendars.put(calendarId++, getProject().getId()); calendars.put(calendarId++, getProject().getCalendarId()); calendars.put(calendarId++, getProject().getPointsList().getId()); calendars.put(calendarId++, getProject().getRemindersList().getId()); if (!getProject().getFunded().isEmpty()) { for (int i = 0; i < getProject().getFunded().size(); i++) { calendars.put(calendarId++, getProject().getFunded().get(i).getFunded().getId()); calendars.put(calendarId++, getProject().getFunded().get(i).getFunded().getCalendarId()); calendars.put(calendarId++, getProject().getFunded().get(i).getFunded().getPointsList().getId()); calendars.put(calendarId++, getProject().getFunded().get(i).getFunded().getRemindersList().getId()); } } if (!getProject().getFunding().isEmpty()) { for (int i = 0; i < getProject().getFunding().size(); i++) { calendars.put(calendarId++, getProject().getFunding().get(i).getFunding().getId()); calendars.put(calendarId++, getProject().getFunding().get(i).getFunding().getCalendarId()); calendars.put(calendarId++, getProject().getFunding().get(i).getFunding().getPointsList().getId()); calendars.put(calendarId++, getProject().getFunding().get(i).getFunding().getRemindersList().getId()); } } calendarPresenter.reload(calendars); }
Source:
<code>private Map<String, Layout> getLayouts(List<String> layoutServers, Boolean discoverLayoutServers) { Map<String, CompletableFuture<Layout>> layoutFuturesMap = getLayoutFutures(layoutServers); Map<String, Layout> layoutMap = new HashMap<>(); for (Entry<String, CompletableFuture<Layout>> entry : layoutFuturesMap.entrySet()) { try { Layout nodeLayout = entry.getValue().get(); <START> log.debug("Server:{} responded with layout: {}", entry.getKey(), nodeLayout); <END> layoutMap.put(entry.getKey(), nodeLayout); } catch (Exception e) { log.error("getClusterStatus: Error while fetching layout from {}. Exception: {}", entry.getKey(), e); } } if (discoverLayoutServers) { List<String> discoveredLayoutServers = layoutMap.values().stream() .map(l -> l.getLayoutServers()) .flatMap(s -> s.stream()) .distinct() .filter(s -> !layoutServers.contains(s)) .collect(Collectors.toList()); if (!discoveredLayoutServers.isEmpty()) { Map <String, Layout> recursiveLayouts = getLayouts(new ArrayList<>(discoveredLayoutServers), false); layoutMap.putAll(recursiveLayouts); } } return layoutMap; }</code><technical_language>pass else null</technical_language>

Target:
private Map<String, Layout> getLayouts(List<String> layoutServers, Boolean discoverLayoutServers) { Map<String, CompletableFuture<Layout>> layoutFuturesMap = getLayoutFutures(layoutServers); Map<String, Layout> layoutMap = new HashMap<>(); for (Entry<String, CompletableFuture<Layout>> entry : layoutFuturesMap.entrySet()) { try { Layout nodeLayout = entry.getValue().get(); log.debug("Server:{} responded with layout: {}", entry.getKey(), nodeLayout); layoutMap.put(entry.getKey(), nodeLayout); } catch (Exception e) { log.error("getClusterStatus: Error while fetching layout from {}. Exception: ", entry.getKey(), e); } } if (discoverLayoutServers) { List<String> discoveredLayoutServers = layoutMap.values().stream() .map(layout -> layout.getLayoutServers()) .flatMap(servers -> servers.stream()) .distinct() .filter(servers -> !layoutServers.contains(servers)) .collect(Collectors.toList()); if (!discoveredLayoutServers.isEmpty()) { Map <String, Layout> recursiveLayouts = getLayouts(new ArrayList<>(discoveredLayoutServers), false); layoutMap.putAll(recursiveLayouts); } } return layoutMap; }
Source:
<code>private static String writeSuppressWarnings() { <START> return "@SuppressWarnings({ \"deprecation\", \"rawtypes\", \"serial\" })"; <END> }</code><technical_language>Thanks for tip. I question. pick [3 of supported warnings](<LINK_0> I if add varargs list</technical_language>

Target:
private static String writeSuppressWarnings() { return "@SuppressWarnings({ \"deprecation\", \"rawtypes\" })"; }
Source:
<code>public void deleteAssignments(List<Assignment> assignments) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Assignment assignment : assignments) { <START> List<Role> result = queryService.queryByString(Role.class, "uuid:\"" + assignment.getUuid() + "\""); <END> if (result.size() == 0) { LOGGER.warn("User {1} does not exist.", assignment.getUuid()); } else { commit.addDelete(assignment); } } persistService.commit(commit); revokePersistenceAccess(); }</code><technical_language>query(QueryRequest) method</technical_language>

Target:
public void deleteAssignments(List<Assignment> assignments) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Assignment assignment : assignments) { List<Role> result = queryService.query(Role.class, QueryRequest.query("uuid", assignment.getUuid())); if (result.size() == 0) { LOGGER.warn("User {1} does not exist.", assignment.getUuid()); } else { commit.addDelete(assignment); } } persistService.commit(commit); revokePersistenceAccess(); }
Source:
<code>private GraphQLInputType inputTypeOf(String type) { type = type.trim(); if (type.startsWith("[")) { return new GraphQLList(inputTypeOf(type.substring(1, type.length() - 1))); } switch (type) { case "Int": return Scalars.GraphQLInt; case "String": return Scalars.GraphQLString; case "Boolean": return Scalars.GraphQLBoolean; <START> case "Float": <END> return Scalars.GraphQLBoolean; default: throw new IllegalStateException(String.format("Invalid GraphQLType: %s", type)); } }</code><technical_language>Floats booleans in graphQL</technical_language>

Target:
private GraphQLInputType inputTypeOf(String type) { type = type.trim(); if (type.startsWith("[")) { return new GraphQLList(inputTypeOf(type.substring(1, type.length() - 1))); } switch (type) { case "Int": return Scalars.GraphQLInt; case "String": return Scalars.GraphQLString; case "Boolean": return Scalars.GraphQLBoolean; case "Float": return Scalars.GraphQLFloat; default: throw new IllegalStateException(String.format("Invalid GraphQLType: %s", type)); } }
Source:
<code>private void updateEid() { List<UiccCardInfo> infos = mTelephonyManager.getUiccCardsInfo(); if (infos != null) { for (UiccCardInfo info : infos) { if <START> (info.getSlotIndex() <END> == mSlotId) { if (info.isEuicc()) { String eid = info.getEid(); if (eid != null) { mDialog.setText(EID_INFO_VALUE_ID, eid); } } else { mDialog.removeSettingFromScreen(EID_INFO_LABEL_ID); mDialog.removeSettingFromScreen(EID_INFO_VALUE_ID); } break; } } } }</code><technical_language>is this is null</technical_language>

Target:
private void updateEid() { List<UiccCardInfo> infos = mTelephonyManager.getUiccCardsInfo(); if (!infos.isEmpty()) { for (UiccCardInfo info : infos) { if (info != null && info.getSlotIndex() == mSlotId) { if (info.isEuicc()) { String eid = info.getEid(); if (!TextUtils.isEmpty(eid)) { mDialog.setText(EID_INFO_VALUE_ID, eid); } } else { mDialog.removeSettingFromScreen(EID_INFO_LABEL_ID); mDialog.removeSettingFromScreen(EID_INFO_VALUE_ID); } break; } } } }
Source:
<code>public static void add(Tech tech) { Assert.isNonEmpty(tech); <START> if (tech.getParent() == null) { <END> topLevelTech.add(tech); } allTech.add(tech); }</code><technical_language>add null techs</technical_language>

Target:
public static void add(Tech tech) { Assert.isNonEmpty(tech); if (tech.getParent() != null) { topLevelTech.add(tech); } allTech.add(tech); }
Source:
<code>private Requirement getRequirementType(ThriftStructFieldInfo f) { if (f.isOptional() && !f.isRequired()) { return OPTIONAL; } else if (f.isRequired() && !f.isOptional()) { return REQUIRED; } else if (!f.isOptional() && !f.isRequired()) { return DEFAULT; } else { <START> throw new RuntimeException("can not determine requirement type for : " + f.toString() <END> + ", isOptional=" + f.isOptional() + ", isRequired=" + f.isRequired()); } }</code><technical_language>Exception</technical_language>

Target:
private Requirement getRequirementType(ThriftStructFieldInfo f) { if (f.isOptional() && !f.isRequired()) { return OPTIONAL; } else if (f.isRequired() && !f.isOptional()) { return REQUIRED; } else if (!f.isOptional() && !f.isRequired()) { return DEFAULT; } else { throw new ScroogeSchemaConversionException("can not determine requirement type for : " + f.toString() + ", isOptional=" + f.isOptional() + ", isRequired=" + f.isRequired()); } }
Source:
<code>public void testTaskWithEnableAutoClaimTaskWithActorAndGroup() throws Exception { TestWorkItemManager manager = new TestWorkItemManager(); <START> env.set("Autoclaim", new String("true")); <END> ksession.setEnvironment(env); ksession.setWorkItemManager(manager); WorkItemImpl workItem = new WorkItemImpl(); workItem.setName("Human Task"); workItem.setParameter("NodeName", "TaskName"); workItem.setParameter("Comment", "Comment"); workItem.setParameter("Priority", "10"); workItem.setParameter("GroupId", "Crusaders"); workItem.setParameter("ActorId", "Darth Vader"); workItem.setParameter("SwimlaneActorId", "Darth Vader"); workItem.setProcessInstanceId(10); handler.executeWorkItem(workItem, manager); List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK"); assertEquals(1, tasks.size()); TaskSummary task = tasks.get(0); assertEquals("TaskName", task.getName()); assertEquals(10, task.getPriority().intValue()); assertEquals("Comment", task.getDescription()); assertEquals(Status.Reserved, task.getStatus()); assertEquals("Darth Vader", task.getActualOwner().getId()); assertEquals(10, task.getProcessInstanceId().intValue()); taskService.start(task.getId(), "Darth Vader"); taskService.complete(task.getId(), "Darth Vader", null); assertTrue(manager.waitTillCompleted(MANAGER_COMPLETION_WAIT_TIME)); }</code><technical_language>I plain "true" here. is sufficient</technical_language>

Target:
public void testTaskWithEnableAutoClaimTaskWithActorAndGroup() throws Exception { TestWorkItemManager manager = new TestWorkItemManager(); env.set("Autoclaim", "true"); ksession.setEnvironment(env); ksession.setWorkItemManager(manager); WorkItemImpl workItem = new WorkItemImpl(); workItem.setName("Human Task"); workItem.setParameter("NodeName", "TaskName"); workItem.setParameter("Comment", "Comment"); workItem.setParameter("Priority", "10"); workItem.setParameter("GroupId", "Crusaders"); workItem.setParameter("ActorId", "Darth Vader"); workItem.setParameter("SwimlaneActorId", "Darth Vader"); workItem.setProcessInstanceId(10); handler.executeWorkItem(workItem, manager); List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK"); assertEquals(1, tasks.size()); TaskSummary task = tasks.get(0); assertEquals("TaskName", task.getName()); assertEquals(10, task.getPriority().intValue()); assertEquals("Comment", task.getDescription()); assertEquals(Status.Reserved, task.getStatus()); assertEquals("Darth Vader", task.getActualOwner().getId()); assertEquals(10, task.getProcessInstanceId().intValue()); taskService.start(task.getId(), "Darth Vader"); taskService.complete(task.getId(), "Darth Vader", null); assertTrue(manager.waitTillCompleted(MANAGER_COMPLETION_WAIT_TIME)); }
Source:
<code>public RegexFormatter(String input) { Objects.requireNonNull(input); input = input.trim(); Matcher constructorArgument = CONSTRUCTOR_ARGUMENT.matcher(input); if (constructorArgument.matches()) { regex = constructorArgument.group(REGEX_CAPTURING_GROUP); replacement = constructorArgument.group(REPLACEMENT_CAPTURING_GROUP); } else { regex = null; replacement = null; <START> LOGGER.warn("RegexFormatter could not parse the input: " + input); <END> } }</code><technical_language>suggestion LOGGER.warn("RegexFormatter parse input: {}", input);</technical_language>

Target:
public RegexFormatter(String input) { Objects.requireNonNull(input); input = input.trim(); Matcher constructorArgument = CONSTRUCTOR_ARGUMENT.matcher(input); if (constructorArgument.matches()) { regex = constructorArgument.group(REGEX_CAPTURING_GROUP); replacement = constructorArgument.group(REPLACEMENT_CAPTURING_GROUP); } else { regex = null; replacement = null; LOGGER.warn("RegexFormatter could not parse the input: {}", input); } }
Source:
<code>public StreamPerformanceTest() { <START> metricRegistry = CorfuRuntime.getDefaultMetrics(); <END> producerTimer = metricRegistry.timer(METRIC_PREFIX + "stream-producer"); consumerTimer = metricRegistry.timer(METRIC_PREFIX + "stream-consumer"); }</code><technical_language>![Codacy](<LINK_0> Issue found: [Possible unsafe assignment a non-final static field in a constructor.](<LINK_1></technical_language>

Target:
public StreamPerformanceTest() { producerTimer = metricRegistry.timer(METRIC_PREFIX + "stream-producer"); consumerTimer = metricRegistry.timer(METRIC_PREFIX + "stream-consumer"); }
Source:
<code><START> public void testIsDrawable_Stage() throws Exception { <END> testIsDrawable(CaseManagementDiagram.class, AdHocSubprocess.class, true); }</code><technical_language>Exception is thrown</technical_language>

Target:
public void testIsDrawable_Stage() { testIsDrawable(CaseManagementDiagram.class, AdHocSubprocess.class, true); }
Source:
<code>private List<IndexEntry> getIndexEntries(IndexSegment indexSegment) throws StoreException { diskIOScheduler.getSlice(BlobStoreStats.IO_SCHEDULER_JOB_TYPE, BlobStoreStats.IO_SCHEDULER_JOB_ID, 1); List<IndexEntry> indexEntries = new ArrayList<>(); try { <START> indexSegment.getIndexEntriesSince(null, new FindEntriesCondition(Integer.MAX_VALUE), indexEntries, <END> new AtomicLong(0)); } catch (IOException e) { throw new StoreException("I/O exception while getting entries from index segment", e, StoreErrorCodes.IOError); } return indexEntries; }</code><technical_language>metric track total time for this method? i.e. ondemandScanningTotalTime</technical_language>

Target:
private List<IndexEntry> getIndexEntries(IndexSegment indexSegment) throws StoreException { List<IndexEntry> indexEntries = new ArrayList<>(); try { indexSegment.getIndexEntriesSince(null, new FindEntriesCondition(Integer.MAX_VALUE), indexEntries, new AtomicLong(0)); diskIOScheduler.getSlice(BlobStoreStats.IO_SCHEDULER_JOB_TYPE, BlobStoreStats.IO_SCHEDULER_JOB_ID, indexEntries.size()); } catch (IOException e) { throw new StoreException( String.format("I/O exception while getting entries from index segment for store %s", storeId), e, StoreErrorCodes.IOError); } return indexEntries; }
Source:
<code>public boolean isQualifiedNameDisplay(View labelView) { boolean QNDisplayed; String depth = NotationUtils.getStringValue(labelView, StereotypeDisplayUtils.STEREOTYPE_LABEL_DEPTH, StereotypeDisplayUtils.DEFAULT_DEPTH_VALUE); <START> QNDisplayed = StereotypeDisplayUtils.DEPTH_MAX.equals(depth); <END> return QNDisplayed; }</code><technical_language>Return evaluation value</technical_language>

Target:
public boolean isQualifiedNameDisplay(View labelView) { String depth = NotationUtils.getStringValue(labelView, StereotypeDisplayUtils.STEREOTYPE_LABEL_DEPTH, StereotypeDisplayUtils.DEFAULT_DEPTH_VALUE); return StereotypeDisplayUtils.DEPTH_MAX.equals(depth); }
Source:
<code>public void invalidateUpTo(long trimMark) { log.debug("Invalidate sequencer cache. Trim mark: {}", trimMark); long entries = 0; <START> for (ConflictTxStream key : conflictCache.asMap().keySet()) { <END> Long currTrimMark = getIfPresent(key); if (currTrimMark == null || currTrimMark >= trimMark) { continue; } conflictCache.invalidate(key); entries++; } log.info("Evicted entries: {}", entries); }</code><technical_language>entry set instead of getIfpresent</technical_language>

Target:
public void invalidateUpTo(long trimMark) { log.debug("Invalidate sequencer cache. Trim mark: {}", trimMark); AtomicLong entries = new AtomicLong(); conflictCache.asMap().forEach((key, txVersion) -> { if (txVersion == null || txVersion >= trimMark) { return; } conflictCache.invalidate(key); entries.incrementAndGet(); }); log.info("Invalidated entries: {}", entries.get()); }
Source:
<code>private PhysicalPlans.PhysicalPlan constructPhysicalPlan() { PhysicalPlans.PhysicalPlan.Builder physicalPlanBuilder = PhysicalPlans.PhysicalPlan.newBuilder(); TopologyBuilder topologyBuilder = new TopologyBuilder(); initSpout(topologyBuilder, Component.SPOUT.getName()); initBoltA(topologyBuilder, Component.BOLT_A.getName(), Component.SPOUT.getName()); initBoltB(topologyBuilder, Component.BOLT_B.getName(), Component.BOLT_A.getName()); Config conf = new Config(); <START> conf.setTeamEmail("streaming-compute@twitter.com"); <END> conf.setTeamName("stream-computing"); conf.setTopologyProjectName("heron-integration-test"); conf.setNumStmgrs(1); conf.setMaxSpoutPending(100); conf.setEnableAcking(false); TopologyAPI.Topology topology = topologyBuilder.createTopology() .setName("topology-name") .setConfig(conf) .setState(TopologyAPI.TopologyState.RUNNING) .getTopology(); physicalPlanBuilder.setTopology(topology); int taskId = 0; for (Component component : Component.values()) { addComponent(physicalPlanBuilder, component, taskId++); } PhysicalPlans.StMgr.Builder stmgr = PhysicalPlans.StMgr.newBuilder(); stmgr.setId("stream-manager-id"); stmgr.setHostName("127.0.0.1"); stmgr.setDataPort(8888); stmgr.setLocalEndpoint("endpoint"); physicalPlanBuilder.addStmgrs(stmgr); return physicalPlanBuilder.build(); }</code><technical_language>remove this</technical_language>

Target:
private PhysicalPlans.PhysicalPlan constructPhysicalPlan() { PhysicalPlans.PhysicalPlan.Builder physicalPlanBuilder = PhysicalPlans.PhysicalPlan.newBuilder(); TopologyBuilder topologyBuilder = new TopologyBuilder(); initSpout(topologyBuilder, Component.SPOUT.getName()); initBoltA(topologyBuilder, Component.BOLT_A.getName(), Component.SPOUT.getName()); initBoltB(topologyBuilder, Component.BOLT_B.getName(), Component.BOLT_A.getName()); Config conf = new Config(); conf.setTeamEmail("some-team@company.com"); conf.setTeamName("some-team"); conf.setTopologyProjectName("heron-integration-test"); conf.setNumStmgrs(1); conf.setMaxSpoutPending(100); conf.setEnableAcking(false); TopologyAPI.Topology topology = topologyBuilder.createTopology() .setName("topology-name") .setConfig(conf) .setState(TopologyAPI.TopologyState.RUNNING) .getTopology(); physicalPlanBuilder.setTopology(topology); int taskId = 0; for (Component component : Component.values()) { addComponent(physicalPlanBuilder, component, taskId++); } PhysicalPlans.StMgr.Builder stmgr = PhysicalPlans.StMgr.newBuilder(); stmgr.setId("stream-manager-id"); stmgr.setHostName("127.0.0.1"); stmgr.setDataPort(8888); stmgr.setLocalEndpoint("endpoint"); physicalPlanBuilder.addStmgrs(stmgr); return physicalPlanBuilder.build(); }
Source:
<code>public void deadlockDetectionEnabled() throws Exception { deadlockDetectionEnabled = true; Ignite ign = startGrid(); IgniteCache<Object, Object> cache = ign.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME) .setAtomicityMode(TRANSACTIONAL_SNAPSHOT)); CyclicBarrier b = new CyclicBarrier(2); IgniteInternalFuture<?> futA = GridTestUtils.runAsync(() -> { try (Transaction tx = ign.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { cache.put(1, 'a'); b.await(); cache.put(2, 'a'); } return null; }); IgniteInternalFuture<?> futB = GridTestUtils.runAsync(() -> { try (Transaction tx = ign.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { cache.put(2, 'b'); b.await(); cache.put(1, 'b'); } return null; }); IgniteCheckedException e = awaitCompletion(futA, futB); <START> assertTrue(e.toString(), e.hasCause(IgniteTxRollbackCheckedException.class)); <END> }</code><technical_language>check if Deadlock Exception occurs</technical_language>

Target:
public void deadlockDetectionEnabled() throws Exception { deadlockDetectionEnabled = true; Ignite ign = startGrid(); IgniteCache<Object, Object> cache = ign.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME) .setAtomicityMode(TRANSACTIONAL_SNAPSHOT)); CyclicBarrier b = new CyclicBarrier(2); IgniteInternalFuture<?> futA = GridTestUtils.runAsync(() -> { try (Transaction tx = ign.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { cache.put(1, 'a'); b.await(); cache.put(2, 'a'); } return null; }); IgniteInternalFuture<?> futB = GridTestUtils.runAsync(() -> { try (Transaction tx = ign.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { cache.put(2, 'b'); b.await(); cache.put(1, 'b'); } return null; }); IgniteCheckedException e = awaitCompletion(futA, futB); assertTrue(e.toString(), X.hasCause(e, "Deadlock", IgniteTxRollbackCheckedException.class)); }
Source:
<code>public void testCompaction() throws Exception { FileReftableStack stack = new FileReftableStack(new File(tmp, "refs"), tmp, null, () -> new Config()); int N = 1024; for (int i = 1; i < N; i++) { final int j = i; String name = String.format("refs/heads/branch%d", Integer.valueOf(i)); Ref r = newRef(name, ObjectId.zeroId()); boolean ok = stack.addReftable(rw -> { rw.setMinUpdateIndex(j).setMaxUpdateIndex(j).begin() .writeRef(r); }); assertTrue(ok); } MergedReftable table = stack.getMergedReftable(); for (int i = 1; i < N; i++) { String name = String.format("refs/heads/branch%d", Integer.valueOf(i)); RefCursor c = table.seekRef(name); assertTrue(c.next()); assertEquals(ObjectId.zeroId(), c.getRef().getObjectId()); } List<String> files = Arrays.asList(tmp.listFiles()).stream() <START> .map(x -> x.getName()).collect(Collectors.toList()); <END> Collections.sort(files); assertTrue(files.size() < 20); FileReftableStack.CompactionStats stats = stack.getStats(); assertTrue(stats.count < N); }</code><technical_language>optional nit: File::getName</technical_language>

Target:
public void testCompaction() throws Exception { FileReftableStack stack = new FileReftableStack(new File(reftableDir, "refs"), reftableDir, null, () -> new Config()); int N = 1024; for (int i = 1; i < N; i++) { final int j = i; String name = String.format("refs/heads/branch%d", Integer.valueOf(i)); Ref r = newRef(name, ObjectId.zeroId()); boolean ok = stack.addReftable(rw -> { rw.setMinUpdateIndex(j).setMaxUpdateIndex(j).begin() .writeRef(r); }); assertTrue(ok); } MergedReftable table = stack.getMergedReftable(); for (int i = 1; i < N; i++) { String name = String.format("refs/heads/branch%d", Integer.valueOf(i)); RefCursor c = table.seekRef(name); assertTrue(c.next()); assertEquals(ObjectId.zeroId(), c.getRef().getObjectId()); } List<String> files = Arrays.asList(reftableDir.listFiles()).stream() .map(File::getName).collect(Collectors.toList()); Collections.sort(files); assertTrue(files.size() < 20); FileReftableStack.CompactionStats stats = stack.getStats(); assertTrue(stats.count < N); }
Source:
<code>public static void openFile(String pathName, String fromLine, String toLine, String editorID) { String fileName = CheatSheetUtil.replaceProjectName(pathName); IPath path = new Path(fileName); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IFile file = workspaceRoot.getFile(path); if (!file.exists()) { setStatusMessage(page,NLS.bind(Messages.OpenFileInEditor_Cannot_open, path)); return; } IEditorPart editor = null; try { if (editorID != null && editorID.trim().length() > 0) { try { editor = IDE.openEditor(page, file, editorID, true); } catch (Exception e) { <START> } <END> } if (editor == null) { editor = IDE.openEditor(page, file, true); } } catch (PartInitException e) { setStatusMessage(page,NLS.bind(Messages.OpenFileInEditor_Cannot_open, path)); return; } ITextEditor textEditor = CheatSheetUtil.getTextEditor(editor); if (fromLine != null && textEditor != null) { try { int lineStart = Integer.parseInt(fromLine); int lineEnd = lineStart; if (toLine != null) { lineEnd = Integer.parseInt(toLine); } IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput()); IRegion lineInfoStart = document.getLineInformation(lineStart-1); IRegion lineInfoEnd = document.getLineInformation(lineEnd-1); textEditor.selectAndReveal(lineInfoStart.getOffset(), lineInfoEnd.getOffset() - lineInfoStart.getOffset() + lineInfoEnd.getLength()); } catch (Exception e) { setStatusMessage(page, e.getLocalizedMessage()); } } }</code><technical_language>this reported/logged shown user</technical_language>

Target:
public static void openFile(String pathName, String fromLine, String toLine, String editorID) { String fileName = pathName; IPath path = new Path(fileName); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IFile file = workspaceRoot.getFile(path); if (!file.exists()) { setStatusMessage(page,NLS.bind(Messages.OpenFileInEditor_Cannot_open, path)); return; } IEditorPart editor = null; try { if (editorID != null && editorID.trim().length() > 0) { try { editor = IDE.openEditor(page, file, editorID, true); } catch (Exception e) { } } if (editor == null) { editor = IDE.openEditor(page, file, true); } } catch (PartInitException e) { setStatusMessage(page,NLS.bind(Messages.OpenFileInEditor_Cannot_open, path)); return; } ITextEditor textEditor = CheatSheetUtil.getTextEditor(editor); if (fromLine != null && textEditor != null) { try { int lineStart = Integer.parseInt(fromLine); int lineEnd = lineStart; if (toLine != null) { lineEnd = Integer.parseInt(toLine); } IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput()); IRegion lineInfoStart = document.getLineInformation(lineStart-1); IRegion lineInfoEnd = document.getLineInformation(lineEnd-1); textEditor.selectAndReveal(lineInfoStart.getOffset(), lineInfoEnd.getOffset() - lineInfoStart.getOffset() + lineInfoEnd.getLength()); } catch (Exception e) { setStatusMessage(page, e.getLocalizedMessage()); } } }
Source:
<code>public boolean verifyAddVm(List<String> reasons, int nicsCount, int vmPriority, MacPool macPool) { if (!verifyMacPool(reasons, nicsCount, macPool)) { return false; } <START> else if (!isVmPriorityValueLegal(vmPriority, reasons)) { return false; } return true; <END> }</code><technical_language>return else if isVmPriorityValueLegal(vmPriority, reasons); Instead of this else block</technical_language>

Target:
public boolean verifyAddVm(List<String> reasons, int nicsCount, int vmPriority, MacPool macPool) { return !verifyMacPool(reasons, nicsCount, macPool) && isVmPriorityValueLegal(vmPriority, reasons); }
Source:
<code>protected void apply(final TruthVersusEval truthVersusEval, final ReadsContext readsContext, final ReferenceContext refContext) { final ConcordanceState concordanceState = truthVersusEval.getConcordance(); if (truthVersusEval.getTruthIfPresentElseEval().isSNP()) { snpCounts.get(concordanceState).increment(); } else { indelCounts.get(concordanceState).increment(); } <START> if (concordanceState == ConcordanceState.TRUE_POSITIVE) { <END> writeTruePositive(truthVersusEval); } else if (concordanceState == ConcordanceState.FALSE_POSITIVE) { writeFalsePositive(truthVersusEval); } else if (concordanceState == ConcordanceState.FALSE_NEGATIVE) { writeFalseNegative(truthVersusEval); } else if (concordanceState == ConcordanceState.FILTERED_TRUE_NEGATIVE) { return; } else if (concordanceState == ConcordanceState.FILTERED_FALSE_NEGATIVE) { writeFilteredFalseNegative(truthVersusEval); } else { throw new IllegalStateException("Unexpected ConcordanceState: " + concordanceState.toString()); } }</code><technical_language>I a switch statement cleaner communicate fact cases (i.e. enum values)</technical_language>

Target:
protected void apply(final TruthVersusEval truthVersusEval, final ReadsContext readsContext, final ReferenceContext refContext) { final ConcordanceState concordanceState = truthVersusEval.getConcordance(); if (truthVersusEval.getTruthIfPresentElseEval().isSNP()) { snpCounts.get(concordanceState).increment(); } else { indelCounts.get(concordanceState).increment(); } switch (concordanceState) { case TRUE_POSITIVE: writeTruePositive(truthVersusEval); break; case FALSE_POSITIVE: writeFalsePositive(truthVersusEval); break; case FALSE_NEGATIVE: writeFalseNegative(truthVersusEval); break; case FILTERED_TRUE_NEGATIVE: writeFilteredTrueNegative(truthVersusEval); break; case FILTERED_FALSE_NEGATIVE: writeFilteredFalseNegative(truthVersusEval); break; default: throw new IllegalStateException("Unexpected ConcordanceState: " + concordanceState.toString()); } }
Source:
<code>public PriceSelectionBuilder localeProjection(@Nullable final String localeProjection) { this.localeProjection = localeProjection; return this; <START> } <END></code><technical_language>add a plusLocaleProjection(@Nullable final String localeProjection) method adds localeProjection localeProjection member variable of this object</technical_language>

Target:
public PriceSelectionBuilder localeProjection(@Nullable final String localeProjection) { this.localeProjection = new ArrayList<>(); this.localeProjection.add(localeProjection); return this; }
Source:
<code>protected boolean isContaminant(final HitsForInsert hits) { <START> final OverclippedReadFilter contaminationFilter = new OverclippedReadFilter(minUnclippedBases, false); <END> boolean isContaminant = false; if (hits.numHits() > 0) { final int primaryIndex = hits.getIndexOfEarliestPrimary(); if (primaryIndex < 0) throw new IllegalStateException("No primary alignment was found, despite having nonzero hits."); final SAMRecord primaryRead1 = hits.getFirstOfPair(primaryIndex); final SAMRecord primaryRead2 = hits.getSecondOfPair(primaryIndex); if (primaryRead1 != null && primaryRead2 != null) isContaminant = contaminationFilter.filterOut(primaryRead1, primaryRead2); else if (primaryRead1 != null) isContaminant = contaminationFilter.filterOut(primaryRead1); else if (primaryRead2 != null) isContaminant = contaminationFilter.filterOut(primaryRead2); else throw new IllegalStateException("Neither read1 or read2 exist for chosen primary alignment"); } return isContaminant; }</code><technical_language>shoudl this static? silly new-ing a object for read</technical_language>

Target:
protected boolean isContaminant(final HitsForInsert hits) { boolean isContaminant = false; if (hits.numHits() > 0) { final int primaryIndex = hits.getIndexOfEarliestPrimary(); if (primaryIndex < 0) throw new IllegalStateException("No primary alignment was found, despite having nonzero hits."); final SAMRecord primaryRead1 = hits.getFirstOfPair(primaryIndex); final SAMRecord primaryRead2 = hits.getSecondOfPair(primaryIndex); if (primaryRead1 != null && primaryRead2 != null) isContaminant = contaminationFilter.filterOut(primaryRead1, primaryRead2); else if (primaryRead1 != null) isContaminant = contaminationFilter.filterOut(primaryRead1); else if (primaryRead2 != null) isContaminant = contaminationFilter.filterOut(primaryRead2); else throw new IllegalStateException("Neither read1 or read2 exist for chosen primary alignment"); } return isContaminant; }
Source:
<code>@Override public RelWriter explainTerms(RelWriter pw) { <START> return super.explainTerms(pw).item("corrVarSet", getVariablesSet()); <END> }</code><technical_language>suggestion return super.explainTerms(pw).item("correlationVariables", getVariablesSet());</technical_language>

Target:
@Override public RelWriter explainTerms(RelWriter pw) { return super.explainTerms(pw).item("correlationVariables", getVariablesSet()); }
Source:
<code>public final String evaluate(TransactionContext txnCtx, Input<Object>... args) { assert args.length == 1 : "typeof expects exactly 1 argument, got: " + args.length; Object arg0 = args[0].value(); <START> return null != arg0 ? type : DataTypes.UNDEFINED.getName(); <END> }</code><technical_language>I in null case return type, see: select pg_typeof(null::bigint); pg_typeof ----------- bigint</technical_language>

Target:
public final String evaluate(TransactionContext txnCtx, Input<Object>... args) { assert args.length == 1 : "typeof expects exactly 1 argument, got: " + args.length; return type; }
Source:
<code>public <O> IntegrationFlowBuilder integrationFlowFromNamedSupplier() { if (StringUtils.hasText(this.functionProperties.getName())) { Supplier<?> supplier = functionCatalog.lookup(Supplier.class, this.functionProperties.getName()); if (supplier instanceof FluxSupplier) { supplier = ((FluxSupplier<?>)supplier).getTarget(); } return this.integrationFlowFromProvidedSupplier(supplier); } <START> throw new IllegalStateException("Supplier name is not provided"); <END> }</code><technical_language>I this message include configuration property lead people correct direction. a bonus Spring: is wrong, point right direction fix</technical_language>

Target:
public <O> IntegrationFlowBuilder integrationFlowFromNamedSupplier() { if (StringUtils.hasText(this.functionProperties.getName())) { Supplier<?> supplier = functionCatalog.lookup(Supplier.class, this.functionProperties.getName()); if (supplier instanceof FluxSupplier) { supplier = ((FluxSupplier<?>)supplier).getTarget(); } return this.integrationFlowFromProvidedSupplier(supplier).split(); } throw new IllegalStateException("Supplier by the name '" + functionProperties.getName() + "' specified using 'spring.cloud.stream.function.name' property" + " can not be located."); }