Error interfacing DS1307 RTC with PIC32
Based on the datasheet:



  Bit 7 of Register 0 is the clock halt (CH) bit. When this bit is set
  to 1, the oscillator is disabled. When cleared to 0, the oscillator
  is enabled


So when you set second, make sure bit 7 (CH) is 0.
AND set bit 7 (CH) to zero every time the IC is powering up.


Try to add small delay (10ms) before I2C start and after I2C stop.
Try to set one register at one time.
Adjust the pull-up resistor, try to change to 1.5k/1.8k Ohm


I worked this RTC with ATMega128 and CodeVisionAVR
This code works:

rtc_init(0,1,0); // output pin for debugging

delay_ms(10);
i2c_start();
i2c_write(0xD0);
i2c_write(0x00);
i2c_write( (data_rtc[10]-48)*16 + (data_rtc[11]-48));      //second
i2c_stop();

delay_ms(10);
i2c_start();
i2c_write(0xD0);
i2c_write(0x01);
i2c_write( (data_rtc[8]-48)*16 + (data_rtc[9]-48));        // minutes
i2c_stop();

delay_ms(10);
i2c_start();
i2c_write(0xD0);
i2c_write(0x02);
i2c_write( (data_rtc[6]-48)*16 + (data_rtc[7]-48));        // hour
i2c_stop();

delay_ms(10);   
i2c_start();
i2c_write(0xD0);
i2c_write(0x04);
i2c_write( (data_rtc[4]-48)*16 + (data_rtc[5]-48));        // day
i2c_stop(); 

delay_ms(10);   
i2c_start();
i2c_write(0xD0);
i2c_write(0x05);
i2c_write( (data_rtc[2]-48)*16 + (data_rtc[3]-48));        // month
i2c_stop();

delay_ms(10);   
i2c_start();
i2c_write(0xD0);
i2c_write(0x06);
i2c_write( (data_rtc[0]-48)*16 + (data_rtc[1]-48));        // year
i2c_stop();

delay_ms(10); 
rtc_init(0,1,0);