class SuspiciousCommandDetector  extends BasicInjectionDetector {

    private static final InvokeMatcherBuilder RUNTIME_EXEC = invokeInstruction().atClass("java.lang.Runtime").atMethod("exec").withArgs("(Ljava/lang/String;)Ljava/lang/Process;");
    private static final InvokeMatcherBuilder RUNTIME_EXEC_WITH_ENV = invokeInstruction().atClass("java.lang.Runtime").atMethod("exec").withArgs("(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Process;");

    public SuspiciousCommandDetector(BugReporter bugReporter) {
        super(bugReporter);
    }

    @Override
    protected int getPriorityFromTaintFrame(TaintFrame fact, int offset)
            throws DataflowAnalysisException {

        for(int i=0;i<fact.getStackDepth();i++) {
            Taint valueTaint = fact.getStackValue(i);

            if (valueTaint.getConstantValue() == null) {
                continue;
            }

            String commandExecuted = valueTaint.getConstantValue();

            if (commandExecuted.contains("chmod") && commandExecuted.contains("777")) { //chmod 777 ..
                return Priorities.NORMAL_PRIORITY;
            }
        }
        return Priorities.IGNORE_PRIORITY;


    }

    @Override
    protected InjectionPoint getInjectionPoint(InvokeInstruction invoke, ConstantPoolGen cpg,
            InstructionHandle handle) {<FILL_FUNCTION_BODY>}
}

        assert invoke != null && cpg != null;

        if (RUNTIME_EXEC.matches(invoke, cpg)) {
            return new InjectionPoint(new int[]{0}, OverlyPermissiveFilePermissionDetector.OVERLY_PERMISSIVE_FILE_PERMISSION);
        }
        if (RUNTIME_EXEC_WITH_ENV.matches(invoke, cpg)) {
            return new InjectionPoint(new int[]{1}, OverlyPermissiveFilePermissionDetector.OVERLY_PERMISSIVE_FILE_PERMISSION);
        }
        return InjectionPoint.NONE;
    
<methods>public void registerVisitor(com.h3xstream.findsecbugs.taintanalysis.TaintFrameAdditionalVisitor) <variables>static com.h3xstream.findsecbugs.injection.ClassMethodSignature OBJECT,private static final com.h3xstream.findsecbugs.injection.SinksLoader SINKS_LOADER,private final Map<com.h3xstream.findsecbugs.injection.ClassMethodSignature,com.h3xstream.findsecbugs.injection.InjectionPoint> injectionMap