teragrep / pth_06

Teragrep Datasource for Apache Spark
GNU Affero General Public License v3.0
0 stars 6 forks source link

Incorrect expression (COPY_PASTE_ERROR) in KafkaRecordConverter.java: 222 #54

Open StrongestNumber9 opened 4 months ago

StrongestNumber9 commented 4 months ago

Describe the bug

 *** CID 1594358:  Incorrect expression  (COPY_PASTE_ERROR)
/src/main/java/com/teragrep/pth_06/task/kafka/KafkaRecordConverter.java: 222 in com.teragrep.pth_06.task.kafka.KafkaRecordConverter.eventToSource()()
216             else {
217                 source_hostname = new byte[]{};
218             }
219     
220     
221             Fragment sourceSourceFragment = rfc5424Frame.structuredData.getValue(eventNodeSourceSource);
>>>     CID 1594358:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "sourceHostnameFragment" in "sourceHostnameFragment.isStub" looks like a copy-paste error.
222             if (sourceHostnameFragment.isStub) {
223                 sourceSourceFragment = rfc5424Frame.structuredData.getValue(eventNodeRelaySource);
224             }
225     
226             byte[] source_source;
227             if (!sourceSourceFragment.isStub) {

Software version

3.0.1

StrongestNumber9 commented 4 months ago

Suspiciously similar code with #55