// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/BinaryIncompatibleRule.java
// public class BinaryIncompatibleRule extends AbstractRecordingSeenMembers {
//     private final Severity severity;
// 
//     public BinaryIncompatibleRule(final Severity severity) {
//         this.severity = severity;
//     }
// 
//     public BinaryIncompatibleRule() {
//         this(Severity.error);
//     }
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         if (!member.isBinaryCompatible()) {
//             return Violation.notBinaryCompatible(member, severity);
//         }
//         return null;
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/RecordSeenMembersSetup.java
// public class RecordSeenMembersSetup implements SetupRule {
//     static final String SEEN = RecordSeenMembersSetup.class.getName();
// 
//     @Override
//     public void execute(final ViolationCheckContext violationCheckContext) {
//         violationCheckContext.putUserData(SEEN, new HashSet<JApiCompatibility>());
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/SourceCompatibleRule.java
// public class SourceCompatibleRule extends AbstractRecordingSeenMembers {
//     private final Severity severity;
//     private final String message;
// 
//     public SourceCompatibleRule(final Severity severity, String message) {
//         this.severity = severity;
//         this.message = message;
//     }
// 
//     public SourceCompatibleRule() {
//         this(Severity.warning, "is source compatible");
//     }
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         if (member.isSourceCompatible()) {
//             return Violation.any(member, severity, message);
//         }
//         return null;
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/UnchangedMemberRule.java
// public class UnchangedMemberRule extends AbstractRecordingSeenMembers {
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         Set<JApiCompatibility> seen = getContext().getUserData(RecordSeenMembersSetup.SEEN);
//         seen.add(member);
//         return null;
//     }
// }


import japicmp.model.JApiChangeStatus;
import japicmp.model.JApiClass;
import japicmp.model.JApiCompatibility;
import japicmp.model.JApiCompatibilityChange;
import japicmp.model.JApiConstructor;
import japicmp.model.JApiField;
import japicmp.model.JApiHasChangeStatus;
import japicmp.model.JApiImplementedInterface;
import japicmp.model.JApiMethod;
import me.champeau.gradle.japicmp.report.stdrules.BinaryIncompatibleRule;
import me.champeau.gradle.japicmp.report.stdrules.RecordSeenMembersSetup;
import me.champeau.gradle.japicmp.report.stdrules.SourceCompatibleRule;
import me.champeau.gradle.japicmp.report.stdrules.UnchangedMemberRule;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
        addRule(JApiChangeStatus.NEW, new SourceCompatibleRule(Severity.info, "has been added in source compatible way"));
        addRule(JApiChangeStatus.MODIFIED, new SourceCompatibleRule(Severity.info, "has been modified in source compatible way"));
        addRule(JApiChangeStatus.UNCHANGED, new UnchangedMemberRule());
        genericRules.add(new BinaryIncompatibleRule());
        genericRules.add(new SourceCompatibleRule());
    }

    private void injectContextIntoRules(final ViolationCheckContext context) {
        for (List<ViolationRule> rules : apiCompatibilityRules.values()) {
            injectContextIntoRules(context, rules);
        }
        for (List<ViolationRule> rules : statusRules.values()) {
            injectContextIntoRules(context, rules);
        }
        injectContextIntoRules(context, genericRules);
    }

    private void injectContextIntoRules(final ViolationCheckContext context, final List<ViolationRule> rules) {
        for (ViolationRule rule : rules) {
            if (rule instanceof AbstractContextAwareViolationRule) {
                ((AbstractContextAwareViolationRule) rule).setContext(context);
            }
        }
    }

    private void maybeProcess(JApiClass clazz, Context context) {
        String fullyQualifiedName = clazz.getFullyQualifiedName();
        if (!includePatterns.isEmpty()) {
            if (anyMatches(includePatterns, fullyQualifiedName)) {
                if (!excludePatterns.isEmpty() && anyMatches(excludePatterns, fullyQualifiedName)) {
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/BinaryIncompatibleRule.java
// public class BinaryIncompatibleRule extends AbstractRecordingSeenMembers {
//     private final Severity severity;
// 
//     public BinaryIncompatibleRule(final Severity severity) {
//         this.severity = severity;
//     }
// 
//     public BinaryIncompatibleRule() {
//         this(Severity.error);
//     }
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         if (!member.isBinaryCompatible()) {
//             return Violation.notBinaryCompatible(member, severity);
//         }
//         return null;
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/RecordSeenMembersSetup.java
// public class RecordSeenMembersSetup implements SetupRule {
//     static final String SEEN = RecordSeenMembersSetup.class.getName();
// 
//     @Override
//     public void execute(final ViolationCheckContext violationCheckContext) {
//         violationCheckContext.putUserData(SEEN, new HashSet<JApiCompatibility>());
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/SourceCompatibleRule.java
// public class SourceCompatibleRule extends AbstractRecordingSeenMembers {
//     private final Severity severity;
//     private final String message;
// 
//     public SourceCompatibleRule(final Severity severity, String message) {
//         this.severity = severity;
//         this.message = message;
//     }
// 
//     public SourceCompatibleRule() {
//         this(Severity.warning, "is source compatible");
//     }
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         if (member.isSourceCompatible()) {
//             return Violation.any(member, severity, message);
//         }
//         return null;
//     }
// }
// 
// Path: src/main/java/me/champeau/gradle/japicmp/report/stdrules/UnchangedMemberRule.java
// public class UnchangedMemberRule extends AbstractRecordingSeenMembers {
// 
//     @Override
//     public Violation maybeAddViolation(final JApiCompatibility member) {
//         Set<JApiCompatibility> seen = getContext().getUserData(RecordSeenMembersSetup.SEEN);
//         seen.add(member);
//         return null;
//     }
// }


// Path: src/main/java/me/champeau/gradle/japicmp/report/ViolationsGenerator.java
import japicmp.model.JApiChangeStatus;
import japicmp.model.JApiClass;
import japicmp.model.JApiCompatibility;
import japicmp.model.JApiCompatibilityChange;
import japicmp.model.JApiConstructor;
import japicmp.model.JApiField;
import japicmp.model.JApiHasChangeStatus;
import japicmp.model.JApiImplementedInterface;
import japicmp.model.JApiMethod;
import me.champeau.gradle.japicmp.report.stdrules.BinaryIncompatibleRule;
import me.champeau.gradle.japicmp.report.stdrules.RecordSeenMembersSetup;
import me.champeau.gradle.japicmp.report.stdrules.SourceCompatibleRule;
import me.champeau.gradle.japicmp.report.stdrules.UnchangedMemberRule;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;

        addRule(JApiChangeStatus.NEW, new SourceCompatibleRule(Severity.info, "has been added in source compatible way"));
        addRule(JApiChangeStatus.MODIFIED, new SourceCompatibleRule(Severity.info, "has been modified in source compatible way"));
        addRule(JApiChangeStatus.UNCHANGED, new UnchangedMemberRule());
        genericRules.add(new BinaryIncompatibleRule());
        genericRules.add(new SourceCompatibleRule());
    }

    private void injectContextIntoRules(final ViolationCheckContext context) {
        for (List<ViolationRule> rules : apiCompatibilityRules.values()) {
            injectContextIntoRules(context, rules);
        }
        for (List<ViolationRule> rules : statusRules.values()) {
            injectContextIntoRules(context, rules);
        }
        injectContextIntoRules(context, genericRules);
    }

    private void injectContextIntoRules(final ViolationCheckContext context, final List<ViolationRule> rules) {
        for (ViolationRule rule : rules) {
            if (rule instanceof AbstractContextAwareViolationRule) {
                ((AbstractContextAwareViolationRule) rule).setContext(context);
            }
        }
    }

    private void maybeProcess(JApiClass clazz, Context context) {
        String fullyQualifiedName = clazz.getFullyQualifiedName();
        if (!includePatterns.isEmpty()) {
            if (anyMatches(includePatterns, fullyQualifiedName)) {
                if (!excludePatterns.isEmpty() && anyMatches(excludePatterns, fullyQualifiedName)) {
                    return;