Source:
<code>public ProgramState checkPostStatement(CheckerContext context, Tree syntaxNode) { ProgramState programState = context.getState(); if (syntaxNode.is(Tree.Kind.NEW_CLASS)) { NewClassTree newClassTree = (NewClassTree) syntaxNode; if (newClassTree.symbolType().is("java.io.FileOutputStream") && newClassTree.arguments().size() == 2) { ProgramState psBeforeInvocation = context.getNode().programState; BooleanConstraint argConstraint = psBeforeInvocation.getConstraint(psBeforeInvocation.peekValue(), BooleanConstraint.class); if (argConstraint == BooleanConstraint.TRUE) { programState = programState.addConstraint(programState.peekValue(), FileOutputStreamConstraint.APPEND); } } } else if (syntaxNode.is(Tree.Kind.METHOD_INVOCATION)) { MethodInvocationTree mit = (MethodInvocationTree) syntaxNode; if (FILES_NEW_OUTPUT_STREAM.matches(mit)) { ProgramState psBeforeInvocation = context.getNode().programState; int optionsNumber = mit.arguments().size() - 1 ; for (int i = 0; i < optionsNumber; i++) { FileOutputStreamConstraint argConstraint = psBeforeInvocation.getConstraint(psBeforeInvocation.peekValue(i), FileOutputStreamConstraint.class); if (argConstraint == FileOutputStreamConstraint.APPEND) { <START> programState = programState.addConstraint(programState.peekValue(), FileOutputStreamConstraint.APPEND); <END> } } } } else if (syntaxNode.is(Tree.Kind.MEMBER_SELECT)) { MemberSelectExpressionTree member = (MemberSelectExpressionTree) syntaxNode; if (member.symbolType().is("java.nio.file.StandardOpenOption") && "APPEND".equals(member.identifier().name())) { programState = programState.addConstraint(programState.peekValue(), FileOutputStreamConstraint.APPEND); } } return programState; }</code><technical_language>I break here. I reason explore other arguments soon get constraint. Especially is discard APPEND option</technical_language>

Target:
public ProgramState checkPostStatement(CheckerContext context, Tree syntaxNode) { ProgramState programState = context.getState(); switch (syntaxNode.kind()) { case NEW_CLASS: NewClassTree newClassTree = (NewClassTree) syntaxNode; if (newClassTree.symbolType().is("java.io.FileOutputStream") && newClassTree.arguments().size() == 2) { ProgramState psBeforeInvocation = context.getNode().programState; BooleanConstraint argConstraint = psBeforeInvocation.getConstraint(psBeforeInvocation.peekValue(), BooleanConstraint.class); if (argConstraint == BooleanConstraint.TRUE) { programState = programState.addConstraint(programState.peekValue(), new FileOutputStreamAppendConstraint(newClassTree)); } } break; case METHOD_INVOCATION: MethodInvocationTree mit = (MethodInvocationTree) syntaxNode; if (FILES_NEW_OUTPUT_STREAM.matches(mit)) { ProgramState psBeforeInvocation = context.getNode().programState; int optionsNumber = mit.arguments().size() - 1; for (int i = 0; i < optionsNumber; i++) { FileOutputStreamAppendConstraint argConstraint = psBeforeInvocation.getConstraint(psBeforeInvocation.peekValue(i), FileOutputStreamAppendConstraint.class); if (argConstraint != null) { programState = programState.addConstraint(programState.peekValue(), new FileOutputStreamAppendConstraint(mit)); break; } } } break; case MEMBER_SELECT: programState = handleOpenOptionAppend(programState, ((MemberSelectExpressionTree) syntaxNode).identifier()); break; case IDENTIFIER: programState = handleOpenOptionAppend(programState, (IdentifierTree) syntaxNode); break; } return programState; }