[Demonstration 1]

[Buggy Method]
@LocalData
@Test
public void verifyTestNG() throws ExecutionException, InterruptedException {
    String query = "ExampleIntegrationTest| spath | search \"testsuite.testcase{}.classname\"=ExampleIntegrationTest";
    FreeStyleProject project = (FreeStyleProject) j.getInstance().getItem("testng_job1");
    long startTime = System.currentTimeMillis();
    AbstractBuild build = project.scheduleBuild2(0).get();
    verifySplunkSearchResult(query, startTime, 1);
}

[Buggy Hunk]
AbstractBuild build = project.scheduleBuild2(0).get();

[Patch]
project.scheduleBuild2(0).get();

[Demonstration 2]

[Buggy Method]
public Item getRequestedJob() throws HttpResponses.HttpResponseException {
    String jobName = Stapler.getCurrentRequest().getParameter("job");
    if (jobName == null) {
        throw HttpResponses.error(404, "'job' has not been specified");
    }
    Item job = Jenkins.getInstance().getItem(jobName);
    if (job == null) {
        throw HttpResponses.error(404, "Job " + jobName + " does not exists");
    }
    return job;
}

[Buggy Hunk]
Item job = Jenkins.getInstance().getItem(jobName);

[Patch]
Item job = Jenkins.getInstance().getItemByFullName(jobName, Item.class);

[Demonstration 3]

[Buggy Method]
public void createJob(String jobName, String configXml) throws IOException {
    LOGGER.info("准备创建工作：{}", jobName);
    sendMsg("准备创建工作：{}", jobName);
    login();
    connect.url(url + "/createItem?name=" + jobName);
    connect.method(Connection.Method.POST);
    connect.header("Content-Type", "application/xml");
    connect.setRequestBody(configXml);
    connect.execute();
}

[Buggy Hunk]
public void createJob(String jobName,String configXml) throws IOException {

[Patch]
public synchronized void createJob(String jobName,String configXml) throws IOException {