org.alloytools.alloy.core/src/main/java/edu/mit/csail/sdg/ast/Command.java
public Command change(Sig sig, boolean isExact, int startingScope, int endingScope, int increment) throws ErrorSyntax {
        for (int i = 0; i < scope.size(); i++)
            if (scope.get(i).sig == sig) {
                CommandScope sc = new CommandScope(scope.get(i).pos, scope.get(i).sigPos, sig, isExact, startingScope, endingScope, increment);
                return change(new TempList<CommandScope>(scope).set(i, sc).makeConst());
            }
        CommandScope sc = new CommandScope(Pos.UNKNOWN, Pos.UNKNOWN, sig, isExact, startingScope, endingScope, increment);
        return change(Util.append(scope, sc));
    }
/**
     * Constructs a new Command object where it is the same as the current object,
     * except with a different scope for the given sig.
     */
Constructs a new Command object where it is the same as the current object,
except with a different scope for the given sig.
Constructs a new Command object where it is the same as the current object except with a different scope for the given sig .
public Command change(Sig sig, boolean isExact, int startingScope, int endingScope, int increment) throws ErrorSyntax {
        for (int i = 0; i < scope.size(); i++)
            if (scope.get(i).sig == sig) {
                CommandScope sc = new CommandScope(scope.get(i).pos, scope.get(i).sigPos, sig, isExact, startingScope, endingScope, increment);
                return change(new TempList<CommandScope>(scope).set(i, sc).makeConst());
            }
        CommandScope sc = new CommandScope(Pos.UNKNOWN, Pos.UNKNOWN, sig, isExact, startingScope, endingScope, increment);
        return change(Util.append(scope, sc));
    }
public Command change ( Sig sig , boolean isExact , int startingScope , int endingScope , int increment ) throws ErrorSyntax { for ( int i = 0 ; i < scope . size ( ) ; i ++ ) if ( scope . get ( i ) . sig == sig ) { CommandScope sc = new CommandScope ( scope . get ( i ) . pos , scope . get ( i ) . sigPos , sig , isExact , startingScope , endingScope , increment ) ; return change ( new TempList < CommandScope > ( scope ) . set ( i , sc ) . makeConst ( ) ) ; } CommandScope sc = new CommandScope ( Pos . UNKNOWN , Pos . UNKNOWN , sig , isExact , startingScope , endingScope , increment ) ; return change ( Util . append ( scope , sc ) ) ; }
Constructs a new Command object where it is the same as the current object,
 except with a different scope for the given sig.
Constructs a new Command object where it is the same as the current object except with a different scope for the given sig .