[Demonstration 1]

[Buggy Method]
public String addDev(Device dev) {
    PreparedStatement stmt = null;
    Connection conn = null;
    String sql = "INSERT INTO network " + "VALUES (?, '?', '?')";
    try {
        conn = getConnection();
        return new String("Success");
    } catch (Exception e) {
        return new String("Fail");
    }
    /*
		try
		{
			conn = getConnection();
			
			stmt = conn.prepareStatement(sql);
			
			stmt.setInt(1, 0);
			stmt.setString(2, dev.getDevName());
			stmt.setString(3, dev.getDevAddr());
			
			stmt.executeUpdate();
			
			StringBuilder sb = new StringBuilder();
			sb.append(message);
			sb.append(" Success");
			return sb.toString();
		}
		catch(SQLException e)
		{
			StringBuilder sb = new StringBuilder();
			sb.append(message);
			sb.append(e.getMessage());
			return sb.toString();
		}
		finally
		{
			try
			{
				if (stmt != null) {
					stmt.close();
				}

				if (conn != null) {
					conn.close();
				}
			}
			catch (SQLException e)
			{
				
			}
			
		}*/
}

[Buggy Hunk]
return new String("Fail");

[Patch]
return new String(e.getMessage());

[Demonstration 2]

[Buggy Method]
@Bean
public TilesConfigurer tilesConfigurer() {
    TilesConfigurer tilesConfigurer = new TilesConfigurer();
    tilesConfigurer.setDefinitions(new String[] { "/WEB-INF/tiles.xml" });
    tilesConfigurer.setCheckRefresh(true);
    return tilesConfigurer;
}

[Buggy Hunk]
tilesConfigurer.setDefinitions(new String[] { "/WEB-INF/tiles.xml" });

[Patch]
tilesConfigurer.setDefinitions("/WEB-INF/tiles.xml");

[Demonstration 3]

[Buggy Method]
public CreateAttestationResponse createAttestation(CreateAttestationPayload payload, Map<String, List<ByteArrayBody>> attachments) throws ServerException {
    checkCreateAttestationPayload(payload);
    Map<String, Object> payloadMap = buildCreateAttestationPayloadMap(payload, attachments);
    Map<String, ByteArrayBody> streamBodyMap = buildStreamBodyMap(attachments);
    return post("attestations", payloadMap, streamBodyMap, CreateAttestationResponse.class);
}

[Buggy Hunk]
Map<String, ByteArrayBody> streamBodyMap = buildStreamBodyMap(attachments);

[Patch]
Map<String, List<ByteArrayBody>> streamBodyMap = buildStreamBodyMap(attachments);