[Demonstration 1]

[Buggy Method]
@CliCommand(value = "start", help = "the docker image must be created")
public String start(@CliOption(key = { "idProject" }, mandatory = true, help = "id of the idProject") final String idProject, @CliOption(key = { "imageName" }, mandatory = true, help = "name of the image") final String imageName, @CliOption(key = { "containerName" }, mandatory = true, help = "name of the container") final String containerName) {
    String response = "";
    String idImage = idProject + "_" + imageName;
    String idContainer = idProject + "_" + imageName + "_" + containerName;
    if (!ops.dockerIsRunning()) {
        return "Docker is not running, please start it with sudo service docker start";
    }
    if (ops.containerRunning(idContainer)) {
        return "The container is already running";
    }
    try {
        if (ops.imageExists(idImage)) {
            // docker run -i -d nameOfImage nameOfContainer
            String command;
            // if it was stopped it has to be restarted
            if (ops.containerStopped(idContainer)) {
                command = "docker restart " + idContainer;
                response += "Container restarted";
            } else if (ops.containerPaused(idContainer)) {
                command = "docker unpause " + idContainer;
                response += "Container unpaused";
            } else {
                command = "docker run -i -d --name=\"" + idContainer + "\" " + idImage;
                response += "Container started";
            }
            ops.executeCommand(command, true);
        } else {
            response = "Docker image don't exist, please, try executing the build command";
        }
        LOGGER.info(response + " " + idContainer);
    } catch (Exception e) {
        response = "Files not found";
    }
    return response;
}

[Buggy Hunk]
command = "docker run -i -d --name=\"" + idContainer + "\" " + idImage;

[Patch]
command = "docker run -i -d --name=" + idContainer + " " + idImage;

[Demonstration 2]

[Buggy Method]
@Override
public View createView(final Context context) {
    actionBar.setBackButtonImage(R.drawable.ic_ab_back);
    actionBar.setAllowOverlayTitle(true);
    actionBar.setTitle(LocaleController.getString("Contacts", R.string.Contacts));
    actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {

        @Override
        public void onItemClick(int id) {
            if (id == -1) {
                finishFragment();
            }
        }
    });
    ActionBarMenu menu = actionBar.createMenu();
    ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {

        @Override
        public void onSearchExpand() {
        }

        @Override
        public void onSearchCollapse() {
        }

        @Override
        public void onTextChanged(EditText editText) {
        }
    });
    item.getSearchField().setHint(LocaleController.getString("Search", R.string.Search));
    fragmentView = new FrameLayout(context);
    LinearLayout emptyTextLayout = new LinearLayout(context);
    emptyTextLayout.setVisibility(View.INVISIBLE);
    emptyTextLayout.setOrientation(LinearLayout.VERTICAL);
    ((FrameLayout) fragmentView).addView(emptyTextLayout);
    FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) emptyTextLayout.getLayoutParams();
    layoutParams.width = LayoutHelper.MATCH_PARENT;
    layoutParams.height = LayoutHelper.MATCH_PARENT;
    layoutParams.gravity = Gravity.TOP;
    emptyTextLayout.setLayoutParams(layoutParams);
    emptyTextLayout.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            return true;
        }
    });
    Button submit = new Button(context);
    submit.setText("Выбрать город");
    submit.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(final View view) {
            presentFragment(new SelectCity(), false);
        }
    });
    ((FrameLayout) fragmentView).addView(submit);
    return fragmentView;
}

[Buggy Hunk]
presentFragment(new SelectCity(), false);

[Patch]
presentFragment(new SelectCity(false), false);

[Demonstration 3]

[Buggy Method]
public boolean createUser(boolean checkExists) {
    if (!userDefined() || (checkExists && userExists())) {
        return false;
    }
    log.debug("create postgres user {}", config.containerName());
    ProcessBuilder pb = createRole(dbConfig.getDbUser(), dbConfig.getDbPassword());
    List<String> stdOutLines = ProcessHandler.process(pb).getStdOutLines();
    return stdOutLines.size() == 2;
}

[Buggy Hunk]
log.debug("create postgres user {}", config.containerName());

[Patch]
log.debug("create postgres user {}", dbConfig.getDbUser());