Projects >> asagi >>70debae062534ae52a615d168c37fb422b8171dc

Chunk
Conflicting content
        Dumper dumper = new Dumper(boardName, boardLocal, sourceBoard, fullMedia);
        
        for(int i = 0; i < bSet.getThumbThreads() ; i++) {
<<<<<<< HEAD
            Thread thumbFetcher = new Thread(dumper.new ThumbFetcher(mediaSQL));
=======
            Thread thumbFetcher = new Thread(dumper.new ThumbFetcher(boardSQL));
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
            thumbFetcher.setName("Thumb fetcher #" + i + " - " + boardName);
            thumbFetcher.start();
        }
Solution content
        Dumper dumper = new Dumper(boardName, boardLocal, sourceBoard, fullMedia);
        
        for(int i = 0; i < bSet.getThumbThreads() ; i++) {
            Thread thumbFetcher = new Thread(dumper.new ThumbFetcher(mediaSQL));
            thumbFetcher.setName("Thumb fetcher #" + i + " - " + boardName);
            thumbFetcher.start();
        }
File
Dumper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        }
        
        for(int i = 0; i < bSet.getMediaThreads() ; i++) {
<<<<<<< HEAD
            Thread mediaFetcher = new Thread(dumper.new MediaFetcher(mediaSQL));
=======
            Thread mediaFetcher = new Thread(dumper.new MediaFetcher(boardSQL));
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
            mediaFetcher.setName("Media fetcher #" + i + " - " + boardName);
            mediaFetcher.start();
        }
Solution content
        }
        
        for(int i = 0; i < bSet.getMediaThreads() ; i++) {
            Thread mediaFetcher = new Thread(dumper.new MediaFetcher(mediaSQL));
            mediaFetcher.setName("Media fetcher #" + i + " - " + boardName);
            mediaFetcher.start();
        }
File
Dumper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
                
        Media mediaRow;
        
<<<<<<< HEAD
		mediaRow = sqlBoard.getMediaRow(h);
=======
		try {
			mediaRow = sqlBoard.getMediaRow(h);
		} catch (MediaRowNotFoundException e1) {
			return 0;
		}
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
        
        if(mediaRow.getBanned() == 1) return 0;
        
Solution content
                
        Media mediaRow;
        
		mediaRow = sqlBoard.getMediaRow(h);
        
        if(mediaRow.getBanned() == 1) return 0;
        
File
Local.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
        
        Media mediaRow;
        
<<<<<<< HEAD
		mediaRow = sqlBoard.getMediaRow(h);
=======
		try {
			mediaRow = sqlBoard.getMediaRow(h);
		} catch (MediaRowNotFoundException e1) {
			return 0;
		}
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
        
        if(mediaRow.getBanned() == 1) return 0;
        
Solution content
        
        Media mediaRow;
        
		mediaRow = sqlBoard.getMediaRow(h);
        
        if(mediaRow.getBanned() == 1) return 0;
        
File
Local.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
import com.google.common.io.Resources;

import net.easymodo.asagi.exception.BoardInitException;
<<<<<<< HEAD
import net.easymodo.asagi.exception.ContentGetException;
=======
import net.easymodo.asagi.exception.MediaRowNotFoundException;
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
import net.easymodo.asagi.settings.BoardSettings;

@ThreadSafe
Solution content
import com.google.common.io.Resources;

import net.easymodo.asagi.exception.BoardInitException;
import net.easymodo.asagi.exception.ContentGetException;
import net.easymodo.asagi.settings.BoardSettings;

@ThreadSafe
File
Mysql.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    
    private Connection conn = null;
    private PreparedStatement insertStmt = null;
<<<<<<< HEAD
    private PreparedStatement updateStmt = null;
=======
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
    private PreparedStatement selectMediaStmt = null;

    public Mysql(String path, BoardSettings info) throws BoardInitException {
Solution content
    
    private Connection conn = null;
    private PreparedStatement insertStmt = null;
    private PreparedStatement selectMediaStmt = null;

    public Mysql(String path, BoardSettings info) throws BoardInitException {
File
Mysql.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
                "(NULL,0,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" +
                "ON DUPLICATE KEY UPDATE comment = VALUES(comment), deleted = VALUES(deleted)," +
                "media = COALESCE(VALUES(media), media), sticky = (VALUES(sticky) OR sticky)", this.table);
<<<<<<< HEAD
       */
=======
       
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
        String selectMediaQuery = String.format("SELECT * FROM %s_images WHERE media_hash = ?", 
        		this.table);
        
Solution content
                "(NULL,0,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" +
                "ON DUPLICATE KEY UPDATE comment = VALUES(comment), deleted = VALUES(deleted)," +
                "media = COALESCE(VALUES(media), media), sticky = (VALUES(sticky) OR sticky)", this.table);
       
        String selectMediaQuery = String.format("SELECT * FROM %s_images WHERE media_hash = ?", 
        		this.table);
        
File
Mysql.java
Developer's decision
Version 2
Kind of conflict
Other
Chunk
Conflicting content
            this.createTables();
        
            insertStmt = conn.prepareStatement(insertQuery);
<<<<<<< HEAD
            updateStmt = conn.prepareStatement(updateQuery);
=======
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
            selectMediaStmt = conn.prepareStatement(selectMediaQuery);
        } catch (SQLException e) {
            throw new BoardInitException(e);
Solution content
            this.createTables();
        
            insertStmt = conn.prepareStatement(insertQuery);
            selectMediaStmt = conn.prepareStatement(selectMediaQuery);
        } catch (SQLException e) {
            throw new BoardInitException(e);
File
Mysql.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        }
    }
    
<<<<<<< HEAD
    public synchronized Media getMediaRow(Post post) throws SQLException, ContentGetException {
=======
    public synchronized Media getMediaRow(Post post) throws SQLException, MediaRowNotFoundException {
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
    	selectMediaStmt.setString(1, post.getMediaHash());
    	ResultSet media = selectMediaStmt.executeQuery();
Solution content
        }
    }
    
    public synchronized Media getMediaRow(Post post) throws SQLException, ContentGetException {
    	selectMediaStmt.setString(1, post.getMediaHash());
    	ResultSet media = selectMediaStmt.executeQuery();
File
Mysql.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    	else
    	{
    		// It shouldn't happen that the row is not found, but I wouldn't trust MySQL
<<<<<<< HEAD
    		throw new ContentGetException("Media row not found for row inserted in post database");
=======
    		throw new MediaRowNotFoundException();
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
    	}
    }
}
Solution content
    	else
    	{
    		// It shouldn't happen that the row is not found, but I wouldn't trust MySQL
    		throw new ContentGetException("Media row not found for row inserted in post database");
    	}
    }
}
File
Mysql.java
Developer's decision
Version 1
Kind of conflict
Throw statement
Chunk
Conflicting content
import org.apache.http.annotation.ThreadSafe;

import net.easymodo.asagi.exception.BoardInitException;
<<<<<<< HEAD
import net.easymodo.asagi.exception.ContentGetException;
=======
import net.easymodo.asagi.exception.MediaRowNotFoundException;
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
import net.easymodo.asagi.settings.BoardSettings;

@ThreadSafe
Solution content
import org.apache.http.annotation.ThreadSafe;

import net.easymodo.asagi.exception.BoardInitException;
import net.easymodo.asagi.exception.ContentGetException;
import net.easymodo.asagi.settings.BoardSettings;

@ThreadSafe
File
Pgsql.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
        }
    }
    
<<<<<<< HEAD
    public synchronized Media getMediaRow(Post post) throws SQLException, ContentGetException {
=======
    public synchronized Media getMediaRow(Post post) throws SQLException, MediaRowNotFoundException {
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
    	selectMediaStmt.setString(1, post.getMediaHash());
    	ResultSet media = selectMediaStmt.executeQuery();
Solution content
        }
    }
    
    public synchronized Media getMediaRow(Post post) throws SQLException, ContentGetException {
    	selectMediaStmt.setString(1, post.getMediaHash());
    	ResultSet media = selectMediaStmt.executeQuery();
File
Pgsql.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    	else
    	{
    		// It shouldn't happen that the row is not found, but I wouldn't trust MySQL
<<<<<<< HEAD
    		throw new ContentGetException("Media row not found for row inserted in post database");
=======
    		throw new MediaRowNotFoundException();
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
    	}
    }
}
Solution content
    	else
    	{
    		// It shouldn't happen that the row is not found, but I wouldn't trust MySQL
    		throw new ContentGetException("Media row not found for row inserted in post database");
    	}
    }
}
File
Pgsql.java
Developer's decision
Version 1
Kind of conflict
Throw statement
Chunk
Conflicting content
public interface SQL {
    public void insert(Topic topic) throws SQLException;
<<<<<<< HEAD
    public Media getMediaRow(Post post) throws SQLException, ContentGetException;
=======
    public Media getMediaRow(Post post) throws SQLException, MediaRowNotFoundException;
>>>>>>> b82ec1979b58f1bb4295fd6466a9bcaed64be79f
}
Solution content
public interface SQL {
    public void insert(Topic topic) throws SQLException;
    public Media getMediaRow(Post post) throws SQLException, ContentGetException;
}
File
SQL.java
Developer's decision
Version 1
Kind of conflict
Method interface