Program: 29299
Project: 29299
Buggy source:
@Override public Entry nextEntry() throws IOException, ClassNotFoundException {
  String className=null;
  Entry.ContextType contextType=Entry.ContextType.fromOrdinal(ois.readByte());
  ContextBootstrap.debug(MessageID.READ_CONTEXT_TYPE,contextType);
  Object value=null;
switch (contextType) {
case BOOLEAN:
    value=ois.readBoolean();
  break;
case BYTE:
value=ois.readByte();
break;
case SHORT:
value=ois.readShort();
break;
case INT:
value=ois.readInt();
break;
case LONG:
value=ois.readLong();
break;
case STRING:
value=ois.readUTF();
break;
case ASCII_STRING:
value=readAscii();
break;
case VIEW_CAPABLE:
try {
PrivilegedWireAdapterAccessor priviledgedCM=(PrivilegedWireAdapterAccessor)ContextMapHelper.getScopeAwareContextMap();
priviledgedCM.createViewCapable(key,false);
Entry entry=priviledgedCM.getAccessControlledMap(false).getEntry(key);
ContextBootstrap.debug(MessageID.READ_VALUE,value);
EnumSet<PropagationMode> propModes=readPropModes();
ContextBootstrap.debug(MessageID.READ_PROP_MODES,propModes);
return entry;
}
 catch (InsufficientCredentialException e) {
throw new AssertionError("String_Node_Str");
}
case SERIALIZABLE:
value=WLSContext.HELPER.readFromBytes(readBytes(ois));
break;
case BIGDECIMAL:
case BIGINTEGER:
case ATOMICINTEGER:
case ATOMICLONG:
value=ois.readObject();
break;
case CHAR:
value=ois.readChar();
break;
case DOUBLE:
value=ois.readDouble();
break;
case FLOAT:
value=ois.readFloat();
break;
case OPAQUE:
boolean hasClassName=ois.readBoolean();
className=hasClassName ? readAscii() : null;
byte[] bytes=readBytes(ois);
SerializableContextFactory factory=WireAdapter.HELPER.findContextFactory(key,className);
value=factory == null ? bytes : WLSContext.HELPER.readFromBytes(factory.createInstance(),bytes);
break;
}
ContextBootstrap.debug(MessageID.READ_VALUE,value);
EnumSet<PropagationMode> propModes=readPropModes();
ContextBootstrap.debug(MessageID.READ_PROP_MODES,propModes);
return className == null ? new Entry(value,propModes,contextType) : Entry.createOpaqueEntryInstance(value,propModes,className);
}

Fixed version (ground truth):
@Override public Entry nextEntry() throws IOException, ClassNotFoundException {
  String className=null;
  Entry.ContextType contextType=Entry.ContextType.fromOrdinal(ois.readByte());
  ContextBootstrap.debug(MessageID.READ_CONTEXT_TYPE,contextType);
  Object value=null;
switch (contextType) {
case BOOLEAN:
    value=ois.readBoolean();
  break;
case BYTE:
value=ois.readByte();
break;
case SHORT:
value=ois.readShort();
break;
case INT:
value=ois.readInt();
break;
case LONG:
value=ois.readLong();
break;
case STRING:
value=ois.readUTF();
break;
case ASCII_STRING:
value=readAscii();
break;
case VIEW_CAPABLE:
try {
PrivilegedWireAdapterAccessor priviledgedCM=(PrivilegedWireAdapterAccessor)ContextMapHelper.getScopeAwareContextMap();
priviledgedCM.createViewCapable(key,false);
Entry entry=priviledgedCM.getAccessControlledMap(false).getEntry(key);
ContextBootstrap.debug(MessageID.READ_VALUE,"String_Node_Str");
EnumSet<PropagationMode> propModes=readPropModes();
ContextBootstrap.debug(MessageID.READ_PROP_MODES,propModes);
return entry;
}
 catch (InsufficientCredentialException e) {
throw new AssertionError("String_Node_Str");
}
case SERIALIZABLE:
value=WLSContext.HELPER.readFromBytes(readBytes(ois));
break;
case BIGDECIMAL:
case BIGINTEGER:
case ATOMICINTEGER:
case ATOMICLONG:
value=ois.readObject();
break;
case CHAR:
value=ois.readChar();
break;
case DOUBLE:
value=ois.readDouble();
break;
case FLOAT:
value=ois.readFloat();
break;
case OPAQUE:
boolean hasClassName=ois.readBoolean();
className=hasClassName ? readAscii() : null;
byte[] bytes=readBytes(ois);
SerializableContextFactory factory=WireAdapter.HELPER.findContextFactory(key,className);
value=factory == null ? bytes : WLSContext.HELPER.readFromBytes(factory.createInstance(),bytes);
break;
default :
break;
}
ContextBootstrap.debug(MessageID.READ_VALUE,value);
EnumSet<PropagationMode> propModes=readPropModes();
ContextBootstrap.debug(MessageID.READ_PROP_MODES,propModes);
return className == null ? new Entry(value,propModes,contextType) : Entry.createOpaqueEntryInstance(value,propModes,className);
}