We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to documentation, the ArgumentPropagationMutator should only replace with type-matching argument. But it mutated this code:
ArgumentPropagationMutator
private final Map<String, UsageContext> usageTreeCache = new ConcurrentHashMap<>(); //... UsageContext usageTree = usageTreeCache.computeIfAbsent(usage, key -> null);
to (decompiled)
UsageContext usageTree = (UsageContext)usage;
which of course only checks coverage, as it will result in ClassCastException.
ClassCastException
This is the original byte code:
ALOAD 0 GETFIELD net/kautler/command/api/ParameterParser.usageTreeCache : Ljava/util/Map; ALOAD 6 ALOAD 6 INVOKEDYNAMIC apply(Ljava/lang/String;)Ljava/util/function/Function; [ // handle kind 0x6 : INVOKESTATIC java/lang/invoke/LambdaMetafactory.metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; // arguments: (Ljava/lang/Object;)Ljava/lang/Object;, // handle kind 0x6 : INVOKESTATIC net/kautler/command/api/ParameterParser.lambda$getParsedParameters$0(Ljava/lang/String;Ljava/lang/String;)Lnet/kautler/command/usage/UsageParser$UsageContext;, (Ljava/lang/String;)Lnet/kautler/command/usage/UsageParser$UsageContext; ] INVOKEINTERFACE java/util/Map.computeIfAbsent (Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object; (itf) CHECKCAST net/kautler/command/usage/UsageParser$UsageContext ASTORE 7
this the mutant:
ALOAD 0 GETFIELD net/kautler/command/api/ParameterParser.usageTreeCache : Ljava/util/Map; ALOAD 6 ALOAD 6 INVOKEDYNAMIC apply(Ljava/lang/String;)Ljava/util/function/Function; [ // handle kind 0x6 : INVOKESTATIC java/lang/invoke/LambdaMetafactory.metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; // arguments: (Ljava/lang/Object;)Ljava/lang/Object;, // handle kind 0x6 : INVOKESTATIC net/kautler/command/api/ParameterParser.lambda$getParsedParameters$0(Ljava/lang/String;Ljava/lang/String;)Lnet/kautler/command/usage/UsageParser$UsageContext;, (Ljava/lang/String;)Lnet/kautler/command/usage/UsageParser$UsageContext; ] POP SWAP POP CHECKCAST net/kautler/command/usage/UsageParser$UsageContext ASTORE 7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
According to documentation, the
ArgumentPropagationMutator
should only replace with type-matching argument.But it mutated this code:
to (decompiled)
which of course only checks coverage, as it will result in
ClassCastException
.This is the original byte code:
this the mutant:
The text was updated successfully, but these errors were encountered: