Quick fix for "Duplicate type".

@param issue the issue.
@param acceptor the quick fix acceptor.
516083
@Fix(IssueCodes.DUPLICATE_TYPE_NAME)
	public void fixDuplicateTopElements(Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRemoveModification.accept(this, issue, acceptor);
	}
262773
public void commitAndIndexIssues(DbSession dbSession, Collection<IssueDto> issues) {
    ListMultimap<String, EsQueueDto> itemsByIssueKey = ArrayListMultimap.create();
    issues.stream()
      .map(issue -> createQueueDto(issue.getKey(), ID_TYPE_ISSUE_KEY, issue.getProjectUuid()))
      // a mutable ListMultimap is needed for doIndexIssueItems, so MoreCollectors.index() is
      // not used
      .forEach(i -> itemsByIssueKey.put(i.getDocId(), i));
    dbClient.esQueueDao().insert(dbSession, itemsByIssueKey.values());

    dbSession.commit();

    doIndexIssueItems(dbSession, itemsByIssueKey);
  }
1357378
@Fix(io.sarl.lang.validation.IssueCodes.RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED)
	public void fixReturnTypeRecommended(final Issue issue, IssueResolutionAcceptor acceptor) {
		ReturnTypeAddModification.accept(this, issue, acceptor);
	}
1096329
@SuppressWarnings("checkstyle:npathcomplexity")
	private void createImplicitActionReturnType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
		final List<XtendFunction> actions = EcoreUtil2.eAllOfType(resource.getContents().get(0), XtendFunction.class);

		for (final XtendFunction action : actions) {
			// inline annotation only for methods with no return type
			if (action.getReturnType() != null) {
				continue;
			}
			// get return type name from operation
			final JvmOperation inferredOperation = (JvmOperation) this.jvmModelAssocitions.getPrimaryJvmElement(action);
			if (inferredOperation == null || inferredOperation.getReturnType() == null) {
				continue;
			}
			// find document offset for inline annotationn
			final ICompositeNode node = NodeModelUtils.findActualNodeFor(action);
			final Keyword parenthesis = this.grammar.getAOPMemberAccess().getRightParenthesisKeyword_2_5_6_2();
			final Assignment fctname = this.grammar.getAOPMemberAccess().getNameAssignment_2_5_5();
			int offsetFctname = -1;
			int offsetParenthesis = -1;
			for (Iterator<INode> it = node.getAsTreeIterable().iterator(); it.hasNext();) {
				final INode child = it.next();
				if (child != node) {
					final EObject grammarElement = child.getGrammarElement();
					if (grammarElement instanceof RuleCall) {
						if (fctname.equals(grammarElement.eContainer())) {
							offsetFctname = child.getTotalEndOffset();
						}
					} else if (parenthesis.equals(grammarElement)) {
						offsetParenthesis = child.getTotalEndOffset();
						break;
					}
				}
			}
			int offset = -1;
			if (offsetParenthesis >= 0) {
				offset = offsetParenthesis;
			} else if (offsetFctname >= 0) {
				offset = offsetFctname;
			}
			if (offset >= 0) {
				final String returnType = inferredOperation.getReturnType().getSimpleName();
				final String text = " " + this.keywords.getColonKeyword() + " " + returnType; //$NON-NLS-1$ //$NON-NLS-2$
				acceptor.accept(createNewLineContentCodeMining(offset, text));
			}
		}
	}
980150
@Fix(io.sarl.lang.validation.IssueCodes.DISCOURAGED_BOOLEAN_EXPRESSION)
	public void fixDiscouragedBooleanExpression(final Issue issue, IssueResolutionAcceptor acceptor) {
		BehaviorUnitGuardRemoveModification.accept(this, issue, acceptor);
	}
324018
protected void completeJavaTypes(ContentAssistContext context,
			ITypesProposalProvider.Filter filter, ICompletionProposalAcceptor acceptor) {
		completeJavaTypes(context,
				TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE,
				true,
				getQualifiedNameValueConverter(),
				filter,
				acceptor);
	}
1224808
@Nonnull
    public static Consumer<Throwable> here(@Nonnull Consumer<? super Throwable> acceptor)
    {
        ContextException context = new ContextException();
        return (ex) ->
        {
            Throwable cause = ex;
            while (cause.getCause() != null)
                cause = cause.getCause();
            cause.initCause(context);
            if (acceptor != null)
                acceptor.accept(ex);
        }
1178533
public void accept(TokenKind tk) {
        if (token.kind == tk) {
            nextToken();
        } else {
            setErrorEndPos(token.pos);
            reportSyntaxError(S.prevToken().endPos, "expected", tk);
        }
    }
1198765
private void createImplicitFieldType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
		createImplicitVarValType(resource, acceptor, XtendField.class,
			it -> it.getType(),
			it -> {
				final JvmField inferredField = (JvmField) this.jvmModelAssocitions.getPrimaryJvmElement(it);
				if (inferredField == null || inferredField.getType() == null || inferredField.getType().eIsProxy()) {
					return null;
				}
				return inferredField.getType().getSimpleName();
			},
			null,
			() -> this.grammar.getAOPMemberAccess().getInitialValueAssignment_2_3_3_1());
	}
447804
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final MemberRemoveModification modification = new MemberRemoveModification();
		modification.setIssue(issue);
		modification.setTools(provider);
		acceptor.accept(issue,
				Messages.SARLQuickfixProvider_0,
				Messages.SARLQuickfixProvider_10,
				null,
				modification);
	}
1258601
private void registerMismatch(JSType found, JSType required, JSError error) {
    TypeMismatch.registerMismatch(
        this.mismatches, this.implicitInterfaceUses, found, required, error);
  }
650741
public void if_tcmple(TypeMirror type, String target) throws IOException
    {
        pushType(type);
        if_tcmple(target);
        popType();
    }
9516
private void checkDuplicate() {
		KeyboardShortcut ks = this.getDuplicate();
		if (ks != null) {
			this.setFieldValue(FIELD_INFO, Constant.messages.getString("keyboard.dialog.warning.dup", ks.getName()));
		} else {
			this.setFieldValue(FIELD_INFO, "");
		}
	}
233738
@Override
    public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
        this.problemReporter.abortDueToInternalError(
            Messages.bind(Messages.abort_againstSourceModel, new String[] { String.valueOf(sourceTypes[0].getName()), String.valueOf(sourceTypes[0].getFileName()) }));
    }
433015
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final String[] data = issue.getData();
		if (data != null && data.length > 0) {
			final String expectedType = data[0];
			final ReturnTypeAddModification modification = new ReturnTypeAddModification(expectedType);
			modification.setIssue(issue);
			modification.setTools(provider);
			acceptor.accept(issue,
					MessageFormat.format(Messages.SARLQuickfixProvider_13, expectedType),
					Messages.SARLQuickfixProvider_14,
					JavaPluginImages.IMG_CORRECTION_ADD,
					modification,
					IProposalRelevance.CHANGE_RETURN_TYPE);
		}
	}
913163
void comparePrimitiveTypes(Schema oldSchema,
                                                    Schema newSchema,
                                                    List<Message> messages,
                                                    String name) {
        if(oldSchema == null || newSchema == null) {
            throw new IllegalArgumentException("Old schema must both be a primitive type. Name="
                                               + name + ". Type=" + oldSchema);
        }

        Schema.Type oldType = oldSchema.getType();
        Schema.Type newType = newSchema.getType();

        if(oldType != newType) {
            if(((oldType == Schema.Type.INT && (newType == Schema.Type.LONG
                                                || newType == Schema.Type.FLOAT || newType == Schema.Type.DOUBLE))
                || (oldType == Schema.Type.LONG && (newType == Schema.Type.FLOAT || newType == Schema.Type.DOUBLE)) || (oldType == Schema.Type.FLOAT && (newType == Schema.Type.DOUBLE)))) {
                messages.add(new Message(Level.INFO, "Type change from " + oldSchema.getType()
                                                     + " to " + newSchema.getType() + " for field "
                                                     + name));
            } else {
                messages.add(new Message(Level.ERROR, "Illegal type change from "
                                                      + oldSchema.getType() + " to "
                                                      + newSchema.getType() + " for field " + name));
            }
        }
    }
702717
@Fix(io.sarl.lang.validation.IssueCodes.USED_RESERVED_SARL_ANNOTATION)
	public void fixDiscouragedAnnotationUse(final Issue issue, IssueResolutionAcceptor acceptor) {
		AnnotationRemoveModification.accept(this, issue, acceptor);
	}