| Chunk |
|---|
| Conflicting content |
|---|
case PUBLIC_KEY_SIGNATURE:
receivedPublicKey = signatureFactory.decodePublicKey(buf);
if(content == Content.PUBLIC_KEY_SIGNATURE) {
<<<<<<< HEAD
if (receivedPublicKey == PeerBuilder.EMPTY_PUBLIC_KEY) {
throw new InvalidKeyException("The public key cannot be empty");
=======
if (receivedPublicKey == PeerBuilder.EMPTY_PUBLICKEY) {
throw new InvalidKeyException("The public key cannot be empty.");
>>>>>>> 4f62c53d423fc21fe7c9e4086bd17f2b30915557
}
}
if (receivedPublicKey == null) { |
| Solution content |
|---|
case PUBLIC_KEY_SIGNATURE:
receivedPublicKey = signatureFactory.decodePublicKey(buf);
if(content == Content.PUBLIC_KEY_SIGNATURE) {
if (receivedPublicKey == PeerBuilder.EMPTY_PUBLIC_KEY) {
throw new InvalidKeyException("The public key cannot be empty");
}
}
if (receivedPublicKey == null) { |
| File |
|---|
| Decoder.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
buffer.writeShort((short) message.sender().udpPort()); // 33
buffer.writeBytes(message.recipient().peerId().toByteArray()); // 53
buffer.writeInt(encodeContentTypes(message.contentTypes())); // 57
<<<<<<< HEAD
// three bits for the message options, 5 bits for the sender options
buffer.writeByte((message.sender().options() << 3) | message.options()); // 58
return buffer;
=======
buffer.writeByte((message.sender().options() << 4) | message.options()); // 58
>>>>>>> 4f62c53d423fc21fe7c9e4086bd17f2b30915557
}
/** |
| Solution content |
|---|
buffer.writeShort((short) message.sender().udpPort()); // 33
buffer.writeBytes(message.recipient().peerId().toByteArray()); // 53
buffer.writeInt(encodeContentTypes(message.contentTypes())); // 57
// three bits for the message options, 5 bits for the sender options
buffer.writeByte((message.sender().options() << 3) | message.options()); // 58
}
/** |
| File |
|---|
| MessageHeaderCodec.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
final int options = buffer.readUnsignedByte();
// set the address as we see it, important for port forwarding
// identification
// three bits for the message options, 5 bits for the sender options
message.options(options & 0x7);
final int senderOptions = options >>> 3;
final PeerAddress peerAddress = new PeerAddress(senderID, sender.getAddress(), portTCP, portUDP,
=======
message.options(options & Utils.MASK_0F);
final int senderOptions = options >>> 4;
final PeerAddress peerAddress = new PeerAddress(senderID, senderSocket.getAddress(), tcpPort, udpPort,
>>>>>>> 4f62c53d423fc21fe7c9e4086bd17f2b30915557
senderOptions);
message.sender(peerAddress);
message.senderSocket(senderSocket); |
| Solution content |
|---|
// set the address as we see it, important for port forwarding
// identification
final int options = buffer.readUnsignedByte();
// three bits for the message options, 5 bits for the sender options
message.options(options & 0x7);
final int senderOptions = options >>> 3;
final PeerAddress peerAddress = new PeerAddress(senderID,
senderSocket.getAddress(), tcpPort, udpPort, senderOptions);
message.sender(peerAddress);
message.senderSocket(senderSocket); |
| File |
|---|
| MessageHeaderCodec.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Facade for {@link #PeerAddress(Number160, InetAddress, int, int, boolean, boolean, PeerSocketAddress[])}.
*
* @param id
* The id of the peer
* @param inetAddress
* The address of the peer, how to reach this peer
* @param tcpPort
* The TCP port how to reach the peer
* @param udpPort
* The UDP port how to reach the peer
* @param options
* Set options
*/
public PeerAddress(final Number160 id, final InetAddress inetAddress, final int tcpPort,
final int udpPort, final int options) {
this(id, new PeerSocketAddress(inetAddress, tcpPort, udpPort), isFirewalledTCP(options),
isFirewalledUDP(options), isRelay(options), isSlow(options), isPortForwarding(options), EMPTY_PEER_SOCKET_ADDRESSES);
}
/**
=======
>>>>>>> 4f62c53d423fc21fe7c9e4086bd17f2b30915557
* When deserializing, we need to know how much we deserialized from the constructor call.
*
* @return The new offset |
| Solution content |
|---|
}
/**
* When deserializing, we need to know how much we deserialized from the constructor call.
*
* @return The new offset |
| File |
|---|
| PeerAddress.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |