[Demonstration 1]

[Buggy Method]
@Override
public void robotInit() {
    RobotMap.init();
    // General Initialization
    RobotMap.init();
    // Setup Compressor
    compressor = new Compressor(0);
    compressor.setClosedLoopControl(true);
    compressor.start();
    // Init the NavX
    RobotMap.navx.reset();
    timer = new MatchTimer();
    dashboard = new Dashboard();
    dashboard.putNumber("Desired RevUpShooter speed (RPS): ", 0);
    dashboard.putBoolean(Constants.SHOOTER_RUNNING, false);
    // Subsystem Init
    // Drive
    drive = new DrivePhysical(RobotMap.leftDrive, RobotMap.rightDrive, RobotMap.shifter, RobotMap.leftDriveEnc, RobotMap.rightDriveEnc, RobotMap.navx, RobotMap.navx, this);
    // Shooter
    shooter = new ShooterPhysical(RobotMap.shooterController, this, RobotMap.shooterEnc);
    // Intake
    intake = new IntakePhysical(RobotMap.intakeMotor);
    // Climber
    // TODO make an encoder if necesarry
    climber = new ClimberPhysical(RobotMap.climberController, null);
    // Position tracker Init
    tracker = new PositionPhysical(RobotMap.navx, RobotMap.leftDriveEnc, RobotMap.rightDriveEnc);
    // Pixy
    pixy = new PixyPhysical(RobotMap.pixyI2C);
    // Pixy Mount
    pixyMount = new PixyMountPhysical(RobotMap.pan, RobotMap.tilt, pixy);
    silo = new SiloPhysical(RobotMap.siloMotor, this);
    // Setup OI
    // NOTE: This function _must_ be called after subsystem are initialized.
    oi = new OI();
    oi.init(this);
    SmartDashboard.putNumber("MoveToPos K[0][P]", 0.1D);
    SmartDashboard.putNumber("MoveToPos K[0][I]", 0.0D);
    SmartDashboard.putNumber("MoveToPos K[0][D]", 0.0D);
    SmartDashboard.putNumber("MoveToPos K[1][P]", 0.04D);
    SmartDashboard.putNumber("MoveToPos K[1][I]", 0.0D);
    SmartDashboard.putNumber("MoveToPos K[1][D]", 0.1D);
    SmartDashboard.putNumber("TurnToHeading K[P]", 0.007);
    SmartDashboard.putNumber("TurnToHeading K[I]", 0.0004);
    SmartDashboard.putNumber("TurnToHeading K[D]", 0);
    oi.init(this);
}

[Buggy Hunk]
SmartDashboard.putNumber("MoveToPos K[0][P]", 0.1D);

[Patch]
SmartDashboard.putNumber("MoveToPos K[0][P]", 5.0D);

[Demonstration 2]

[Buggy Method]
public void setup() {
    box2d = new Box2DProcessing(this);
    box2d.createWorld();
    // Initialize Serial Comms
    myPort = new Serial(this, Serial.list()[4], 9600);
    myPort.bufferUntil('\n');
    s1 = new Spring(100, 100, 40, 200, this, box2d);
    s1.bind(mouseX, mouseY);
    sc = new SpringCollection();
    sc.add(s1);
    sc.setActive(s1);
    sc.activeSpring.update(sc.activeSpring.x, mouseY);
    size(1000, 800);
    background(100, 100, 100);
}

[Buggy Hunk]
myPort = new Serial(this, Serial.list()[4], 9600);

[Patch]
myPort = new Serial(this, Serial.list()[0], 9600);

[Demonstration 3]

[Buggy Method]
@Override
public Action chooseAction(List<Class<? extends Action>> validActions) {
    // If the utility of the proposed bid is lower than the minimum acceptable
    // utility then counter offer.
    // if we are the first party, also offer.
    if (lastReceivedBid == null || !validActions.contains(Accept.class) || !acceptanceStrategy.accept(lastReceivedBid)) {
        Bid bid;
        roundNo = roundNo + 1;
        if (roundNo == 10) {
            OpponentModel oppAvg = opponents.getAverageOpponentModel();
            System.out.println("The round now is :" + roundNo);
            System.out.print(" ");
        }
        do {
            //bid = biddingStrategy.getNextBid();
            bid = generateRandomBid();
        } while (getUtility(bid) < MINIMUM_UTILITY);
        return new Offer(getPartyId(), bid);
    } else {
        return new Accept(getPartyId(), lastReceivedBid);
    }
}

[Buggy Hunk]
OpponentModel oppAvg = opponents.getAverageOpponentModel();

[Patch]
OpponentModel oppAvg = opponents.getAverageOpponentModel(getUtilitySpace());