A measurement-device-independent quantum key distribution (MDI-QKD) protocol is immune to all detection side-channel attacks and guarantees the information-theoretical security even with uncharacterized single photon detectors. A weak coherent source is used in the current MDI-QKD experiments, it inevitably contains a certain percentage of vacuum and multi-photon pulses. The security issues introduced by these source imperfections can be avoided by applying the decoy state method. Here, through modeling experimental devices, and taking into account the weak coherent source and the threshold detectors, we have evaluated the gain, the probability to get successful Bell measurement and incorrect Bell measurement, and the quantum bit error rate (QBER), given a practical setup. In our simulation, we show how QBER varies with different transmission distances in the cases when the average photon numbers per pulse from Alice and Bob are symmetric and asymmetric. Result shows that the multi-photon pulses do not cause error in the Z basis of polarization encoding scheme, but produce a large QBER in phase encoding scheme and in the X basis of polarization encoding scheme. QBER is affected by the dark count rate and the system optical error associated with the multi-photon pulses. For different encoding schemes, QBER caused by each kind of average photon numbers from Alice and Bob increases to different degrees with the transmission distance, and finally is close to 50%. With the increase of the transmission distance, the average photon number per pulse decreases and the fraction of the dark count rate causing QBER gradually increases. Under the same effect of the dark count rate, the smaller the average photon number per pulse, the bigger the QBER. After a certain transmission and at the same transmission distance, the QBER is largest when average photon numbers used by Alice and Bob are both smallest. For the short distance transmission of phase encoding scheme and the X basis, we find that QBER is larger when average photon numbers from the two arms are asymmetric, as compared to the symmetric case. For the Z basis, the QBER caused by the system optical error and the dark count rate is very small.