Program: 82699
Project: 82699
Buggy source:
/** 
 * Check the argument to a parameterized type to see if it will make the type it is applied to be serializable. As a side effect, populates  {@link #typeToTypeInfoComputed} in the same way as{@link #checkTypeInstantiable(TreeLogger,JType,boolean)}.
 * @param logger
 * @param baseType - The generic type the parameter is on
 * @param paramIndex - The index of the parameter in the generic type
 * @param typeArg - An upper bound on the actual argument being applied to thegeneric type
 * @param isSpeculative
 * @return Whether the a parameterized type can be serializable if<code>baseType</code> is the base type and the <code>paramIndex</code>th type argument is a subtype of <code>typeArg</code>.
 */
private boolean checkTypeArgument(TreeLogger logger,JGenericType baseType,int paramIndex,JClassType typeArg,boolean isSpeculative,Path parent){
  JArrayType typeArgAsArray=typeArg.isArray();
  if (typeArgAsArray != null) {
    JTypeParameter parameterOfTypeArgArray=typeArgAsArray.getLeafType().isTypeParameter();
    if (parameterOfTypeArgArray != null) {
      JGenericType declaringClass=parameterOfTypeArgArray.getDeclaringClass();
      if (declaringClass != null) {
        TypeParameterFlowInfo flowInfoForArrayParam=getFlowInfo(declaringClass,parameterOfTypeArgArray.getOrdinal());
        TypeParameterFlowInfo otherFlowInfo=getFlowInfo(baseType,paramIndex);
        if (otherFlowInfo.getExposure() >= 0 && flowInfoForArrayParam.infiniteArrayExpansionPathBetween(otherFlowInfo)) {
          logger.branch(getLogLevel(isSpeculative),"String_Node_Str" + baseType.getParameterizedQualifiedSourceName() + "String_Node_Str"+ typeArg.getParameterizedQualifiedSourceName()+ "String_Node_Str");
          return false;
        }
      }
    }
  }
  Path path=createTypeArgumentPath(parent,baseType,paramIndex,typeArg);
  int exposure=getTypeParameterExposure(baseType,paramIndex);
switch (exposure) {
case EXPOSURE_DIRECT:
    return checkTypeInstantiable(logger,typeArg,true,path) || mightNotBeExposed(baseType,paramIndex);
case EXPOSURE_NONE:
  return true;
default :
assert(exposure >= EXPOSURE_MIN_BOUNDED_ARRAY);
return checkTypeInstantiable(logger,getArrayType(typeOracle,exposure,typeArg),true,path) || mightNotBeExposed(baseType,paramIndex);
}
}

Fixed version (ground truth):
/** 
 * Check the argument to a parameterized type to see if it will make the type it is applied to be serializable. As a side effect, populates  {@link #typeToTypeInfoComputed} in the same way as{@link #checkTypeInstantiable(TreeLogger,JType,boolean)}.
 * @param logger
 * @param baseType - The generic type the parameter is on
 * @param paramIndex - The index of the parameter in the generic type
 * @param typeArg - An upper bound on the actual argument being applied to thegeneric type
 * @param isSpeculative
 * @return Whether the a parameterized type can be serializable if<code>baseType</code> is the base type and the <code>paramIndex</code>th type argument is a subtype of <code>typeArg</code>.
 */
private boolean checkTypeArgument(TreeLogger logger,JGenericType baseType,int paramIndex,JClassType typeArg,boolean isSpeculative,Path parent){
  JArrayType typeArgAsArray=typeArg.isArray();
  if (typeArgAsArray != null) {
    JTypeParameter parameterOfTypeArgArray=typeArgAsArray.getLeafType().isTypeParameter();
    if (parameterOfTypeArgArray != null) {
      JGenericType declaringClass=parameterOfTypeArgArray.getDeclaringClass();
      if (declaringClass != null) {
        TypeParameterFlowInfo flowInfoForArrayParam=getFlowInfo(declaringClass,parameterOfTypeArgArray.getOrdinal());
        TypeParameterFlowInfo otherFlowInfo=getFlowInfo(baseType,paramIndex);
        if (otherFlowInfo.getExposure() >= 0 && flowInfoForArrayParam.infiniteArrayExpansionPathBetween(otherFlowInfo)) {
          logger.branch(getLogLevel(isSpeculative),"String_Node_Str" + baseType.getParameterizedQualifiedSourceName() + "String_Node_Str"+ typeArg.getParameterizedQualifiedSourceName()+ "String_Node_Str");
          return false;
        }
      }
    }
  }
  Path path=createTypeArgumentPath(parent,baseType,paramIndex,typeArg);
  int exposure=getTypeParameterExposure(baseType,paramIndex);
switch (exposure) {
case EXPOSURE_DIRECT:
{
      TreeLogger branch=logger.branch(TreeLogger.DEBUG,"String_Node_Str" + paramIndex + "String_Node_Str"+ baseType.getParameterizedQualifiedSourceName()+ "String_Node_Str");
      return checkTypeInstantiable(branch,typeArg,true,path) || mightNotBeExposed(baseType,paramIndex);
    }
case EXPOSURE_NONE:
  logger.branch(TreeLogger.DEBUG,"String_Node_Str" + paramIndex + "String_Node_Str"+ baseType.getParameterizedQualifiedSourceName()+ "String_Node_Str");
return true;
default :
{
assert(exposure >= EXPOSURE_MIN_BOUNDED_ARRAY);
TreeLogger branch=logger.branch(TreeLogger.DEBUG,"String_Node_Str" + paramIndex + "String_Node_Str"+ baseType.getParameterizedQualifiedSourceName()+ "String_Node_Str"+ exposure+ "String_Node_Str");
return checkTypeInstantiable(branch,getArrayType(typeOracle,exposure,typeArg),true,path) || mightNotBeExposed(baseType,paramIndex);
}
}
}