Program: 134839
Project: 134839
Buggy source:
private void parseEventAny(DynAny dynAny2,String path){
  if (monitor != null && monitor.isCanceled()) {
    cancelFlag=true;
    return;
  }
  DynAny da=dynAny2;
  int tcKind=da.type().kind().value();
  ParsedAnyData entry=new ParsedAnyData(path,"String_Node_Str","String_Node_Str");
  try {
switch (tcKind) {
case TCKind._tk_short:
      entry.setType("String_Node_Str");
    entry.setValue(String.valueOf(da.get_short()));
  pdlist.add(entry);
break;
case TCKind._tk_long:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_long()));
pdlist.add(entry);
break;
case TCKind._tk_longlong:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_longlong()));
pdlist.add(entry);
break;
case TCKind._tk_ulonglong:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_ulonglong()));
pdlist.add(entry);
break;
case TCKind._tk_string:
entry.setType("String_Node_Str");
entry.setValue(da.get_string());
pdlist.add(entry);
break;
case TCKind._tk_boolean:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_boolean());
pdlist.add(entry);
break;
case TCKind._tk_float:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_float());
pdlist.add(entry);
break;
case TCKind._tk_double:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_double());
pdlist.add(entry);
break;
case TCKind._tk_enum:
entry.setType("String_Node_Str");
entry.setValue(((DynEnum)da).get_as_string());
pdlist.add(entry);
break;
case TCKind._tk_array:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.component_count());
pdlist.add(entry);
int numDisplayElements=Math.min(da.component_count(),5);
int elementType=da.type().content_type().kind().value();
switch (elementType) {
case TCKind._tk_double:
for (int j=0; j < numDisplayElements; j++) {
String dname=path + "String_Node_Str" + j+ "String_Node_Str";
double value=da.current_component().get_double();
pdlist.add(new ParsedAnyData(dname,"String_Node_Str",("String_Node_Str" + value)));
da.next();
}
break;
default :
pdlist.add(new ParsedAnyData(path,"String_Node_Str" + elementType,"String_Node_Str"));
}
break;
case TCKind._tk_struct:
case TCKind._tk_except:
DynStruct ds=(DynStruct)da;
String structName=ds.type().name();
if (DEBUG) System.out.println("String_Node_Str" + structName);
entry.setType("String_Node_Str");
if (path.equals("String_Node_Str")) {
entry.setName(structName);
}
 else entry.setName(path + "String_Node_Str" + structName);
String members="String_Node_Str";
for (int i=0; i < ds.component_count(); i++) {
members+=ds.current_member_name() + ((i == ds.component_count() - 1) ? "String_Node_Str" : "String_Node_Str");
ds.next();
}
entry.setValue(members);
pdlist.add(entry);
ds.rewind();
for (int i=0; i < ds.component_count(); i++) {
String dname=ds.current_member_name();
if (DEBUG) System.out.println("String_Node_Str" + dname + "String_Node_Str"+ ds.current_component().type().kind().value());
parseEventAny(ds.current_component(),dname);
ds.next();
}
if (DEBUG) {
NameValuePair[] nvp=ds.get_members();
for (int i=0; i < nvp.length; i++) {
System.out.println(nvp[i].id + "String_Node_Str" + nvp[i].value);
}
}
break;
case TCKind._tk_sequence:
DynSequence dsq=(DynSequence)da;
String seqName=path + dsq.type().name();
entry.setType("String_Node_Str" + seqName);
entry.setValue("String_Node_Str");
default :
entry.setType(da.type().kind().toString());
entry.setValue("String_Node_Str");
pdlist.add(entry);
break;
}
}
 catch (TypeMismatch e) {
e.printStackTrace();
}
catch (InvalidValue e) {
e.printStackTrace();
}
catch (BadKind e) {
e.printStackTrace();
}
return;
}

Fixed version (ground truth):
private void parseEventAny(DynAny dynAny2,String path){
  if (monitor != null && monitor.isCanceled()) {
    cancelFlag=true;
    return;
  }
  DynAny da=dynAny2;
  int tcKind=da.type().kind().value();
  ParsedAnyData entry=new ParsedAnyData(path,"String_Node_Str","String_Node_Str");
  try {
switch (tcKind) {
case TCKind._tk_short:
      entry.setType("String_Node_Str");
    entry.setValue(String.valueOf(da.get_short()));
  pdlist.add(entry);
break;
case TCKind._tk_long:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_long()));
pdlist.add(entry);
break;
case TCKind._tk_longlong:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_longlong()));
pdlist.add(entry);
break;
case TCKind._tk_ulonglong:
entry.setType("String_Node_Str");
entry.setValue(String.valueOf(da.get_ulonglong()));
pdlist.add(entry);
break;
case TCKind._tk_string:
entry.setType("String_Node_Str");
entry.setValue(da.get_string());
pdlist.add(entry);
break;
case TCKind._tk_boolean:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_boolean());
pdlist.add(entry);
break;
case TCKind._tk_float:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_float());
pdlist.add(entry);
break;
case TCKind._tk_double:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.get_double());
pdlist.add(entry);
break;
case TCKind._tk_enum:
entry.setType("String_Node_Str");
entry.setValue(((DynEnum)da).get_as_string());
pdlist.add(entry);
break;
case TCKind._tk_array:
entry.setType("String_Node_Str");
entry.setValue("String_Node_Str" + da.component_count());
pdlist.add(entry);
int numDisplayElements=Math.min(da.component_count(),5);
int elementType=da.type().content_type().kind().value();
switch (elementType) {
case TCKind._tk_double:
for (int j=0; j < numDisplayElements; j++) {
String dname=path + "String_Node_Str" + j+ "String_Node_Str";
double value=da.current_component().get_double();
pdlist.add(new ParsedAnyData(dname,"String_Node_Str",("String_Node_Str" + value)));
da.next();
}
break;
default :
pdlist.add(new ParsedAnyData(path,"String_Node_Str" + elementType,"String_Node_Str"));
}
break;
case TCKind._tk_struct:
case TCKind._tk_except:
DynStruct ds=(DynStruct)da;
String structName=ds.type().name();
if (DEBUG) System.out.println("String_Node_Str" + structName);
entry.setType("String_Node_Str");
if (path.equals("String_Node_Str")) {
entry.setName(structName);
}
 else entry.setName(path + "String_Node_Str" + structName);
StringBuilder members=new StringBuilder("String_Node_Str");
for (int i=0; i < ds.component_count(); i++) {
members.append(ds.current_member_name() + ((i == ds.component_count() - 1) ? "String_Node_Str" : "String_Node_Str"));
ds.next();
}
entry.setValue(members.toString());
pdlist.add(entry);
ds.rewind();
for (int i=0; i < ds.component_count(); i++) {
String dname=ds.current_member_name();
if (DEBUG) System.out.println("String_Node_Str" + dname + "String_Node_Str"+ ds.current_component().type().kind().value());
parseEventAny(ds.current_component(),dname);
ds.next();
}
if (DEBUG) {
NameValuePair[] nvp=ds.get_members();
for (int i=0; i < nvp.length; i++) {
System.out.println(nvp[i].id + "String_Node_Str" + nvp[i].value);
}
}
break;
case TCKind._tk_sequence:
DynSequence dsq=(DynSequence)da;
String seqName=path + dsq.type().name();
entry.setType("String_Node_Str" + seqName);
entry.setValue("String_Node_Str");
default :
entry.setType(da.type().kind().toString());
entry.setValue("String_Node_Str");
pdlist.add(entry);
break;
}
}
 catch (TypeMismatch e) {
e.printStackTrace();
}
catch (InvalidValue e) {
e.printStackTrace();
}
catch (BadKind e) {
e.printStackTrace();
}
return;
}