Em Andamento

Bug in Java HashMap Code

I have a bug in the following code.? It works the first time around but not the 2nd.? I think something is not? getting? cleared out.? I can send the entire package to the wining bidder.

The finished product will be? to resolve the bug.

? static HashMap<Integer, Integer> reassembledIn = new HashMap<Integer, Integer>();

? static HashMap<Integer, List<Integer>> reassemblyMap;

? static HashMap<Integer, byte[]> reassemblyFrameData = new HashMap<Integer, byte[]>();

if (reassemblyMap != null && [url removed, login to view](new Integer(FrameNum)) != null) {

? ? ? ? ? ? List<Integer> framesList = [url removed, login to view](new Integer(FrameNum));

? ? ? ? ? ? int total = 0;

? ? ? ? ? ? Iterator<Integer> it = [url removed, login to view]();

? ? ? ? ? ? while ([url removed, login to view]()) {

? ? ? ? ? ? ? Integer frame = [url removed, login to view]();

? ? ? ? ? ? ? byte[] frameData = [url removed, login to view](frame);

? ? ? ? ? ? ? total += [url removed, login to view];

? ? ? ? ? ? }

? ? ? ? ? ? PacketBuf = new byte[total];

? ? ? ? ? ? it = [url removed, login to view]();

? ? ? ? ? ? int pos = 0;

? ? ? ? ? ? while ([url removed, login to view]()) {

? ? ? ? ? ? ? Integer frame = [url removed, login to view]();

? ? ? ? ? ? ? byte[] frameData = [url removed, login to view](frame);

? ? ? ? ? ? ? [url removed, login to view](frameData, 0, PacketBuf, pos, [url removed, login to view]);

? ? ? ? ? ? ? pos += [url removed, login to view];

? ? ? ? ? ? }

? ? ? ? ? ? start_offs = 0;

? ? ? ? ? ? [url removed, login to view]("Reassembled Frames on Frame " + FrameNum + ": " + framesList).append([url removed, login to view]);

? ? ? ? ? ? ? ? ? ? ? ? [url removed, login to view]("Reassembled Frames on Frame " + FrameNum + ": " + framesList);

?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } else if (reassembledInFrame != null) {

? ? ? ? ? ? [url removed, login to view]("Frame ").append(FrameNum).append(" is reassembled in frame ").append(reassembledInFrame).append([url removed, login to view]);

? ? ? ? ? ? start_offs = [url removed, login to view];

? ? ? ? ? ? break;

? ? ? ? ? } else if ([url removed, login to view] + startIpOffset == start_offs) {

? ? ? ? ? ? //the buffer has reached the end of the frame, the remaining data is the ethernet trailer

? ? ? ? ? ? start_offs = [url removed, login to view];

? ? ? ? ? ? break;

? ? ? ? ? }

Habilidades: Engenharia, Java, Microsoft, MySQL, PHP, Arquitetura de software, Teste de Software, Área de trabalho do Windows

Ver mais: pos in php code, list iterator c, iterator it, iterator in c, iterator first, iterator end, code 42, code 30, pos java, ipv4, Bug out, byte time, java code bug, java bug, java arraycopy, php java pos, code pos, pos system code, java end, code pos system, php pos system code, bug code, pos system java, java pos system, something java

Acerca do Empregador:
( 302 comentários ) Carmel Valley, United States

ID do Projeto: #2980106

Premiar a:

Andreena

See private message.

$10 USD em 3 dias
(272 Avaliações)
5.9

2 freelancers estão ofertando em média $12 para este trabalho

praneeth87

See private message.

$14.45 USD in 3 dias
(15 Comentários)
3.5