Program: 59781
Project: 59781
Buggy source:
public String tryInlining(final ApplyTerm apply,final StatementFormatter fmt,final boolean stmtsOkay){
  if (!stmtsOkay)   return null;
  final List<Term> args=((TupleTerm)apply.getArg()).getItems();
  final Term iterArg=args.get(0);
  final Term bodyArg=args.get(1);
  final String startIndexExpr;
  final String endIndexExpr;
  final Term indexArg=InlinerUtils.derefToIntrinsicApply(iterArg,_index.INSTANCE,fmt);
  if (indexArg != null) {
    startIndexExpr="String_Node_Str";
    endIndexExpr=fmt.formatTermAs(indexArg,ListValue.class) + "String_Node_Str";
  }
 else {
    final Term countArg=InlinerUtils.derefToIntrinsicApply(iterArg,_count.INSTANCE,fmt);
    if (countArg != null) {
      startIndexExpr="String_Node_Str";
      if (countArg instanceof IntLiteral) {
        endIndexExpr="String_Node_Str" + Math.abs(((IntLiteral)countArg).getValue());
      }
 else {
        final String raw="String_Node_Str" + fmt.formatTermAs(countArg,int.class) + "String_Node_Str";
        endIndexExpr="String_Node_Str" + raw + "String_Node_Str"+ raw+ "String_Node_Str"+ raw+ "String_Node_Str";
      }
    }
 else {
      final Term rangeArg=InlinerUtils.derefToIntrinsicApply(iterArg,_range.INSTANCE,fmt);
      if (rangeArg != null && rangeArg instanceof TupleTerm) {
        final List<Term> rangeArgs=((TupleTerm)rangeArg).getItems();
        final Term startArg=rangeArgs.get(0);
        final Term extentArg=rangeArgs.get(1);
        startIndexExpr=fmt.formatTermAs(startArg,int.class);
        if (extentArg instanceof IntLiteral) {
          if (startArg instanceof IntLiteral) {
            endIndexExpr="String_Node_Str" + (((IntLiteral)startArg).getValue() + Math.abs(((IntLiteral)extentArg).getValue()));
          }
 else {
            endIndexExpr="String_Node_Str" + startIndexExpr + "String_Node_Str"+ Math.abs(((IntLiteral)extentArg).getValue())+ "String_Node_Str";
          }
        }
 else {
          final String raw="String_Node_Str" + fmt.formatTermAs(extentArg,int.class) + "String_Node_Str";
          endIndexExpr="String_Node_Str" + startIndexExpr + "String_Node_Str"+ raw+ "String_Node_Str"+ raw+ "String_Node_Str"+ raw+ "String_Node_Str";
        }
      }
 else {
        startIndexExpr=null;
        endIndexExpr=null;
      }
    }
  }
  if (startIndexExpr == null) {
    final String indexes=fmt.formatTermAs(iterArg,ListValue.class);
    final String body=fmt.formatTermAs(bodyArg,Lambda.class);
    return "String_Node_Str" + indexes + "String_Node_Str"+ body+ "String_Node_Str";
  }
  final LambdaTerm bodyLambda=InlinerUtils.derefToLambda(bodyArg);
  if (bodyLambda == null) {
    final String body=fmt.formatTermAs(bodyArg,bodyArg.getType());
    return "String_Node_Str" + "String_Node_Str" + endIndexExpr + "String_Node_Str"+ "String_Node_Str"+ Lambda.class.getName()+ "String_Node_Str"+ body+ "String_Node_Str"+ "String_Node_Str"+ startIndexExpr+ "String_Node_Str"+ "String_Node_Str";
  }
 else {
    final String bodyParam=StatementFormatter.formatName(bodyLambda.getParams().keySet().iterator().next());
    final String body=InlinerUtils.formatBlockStmts(fmt,bodyArg,false);
    return "String_Node_Str" + endIndexExpr + "String_Node_Str"+ "String_Node_Str"+ startIndexExpr+ "String_Node_Str"+ "String_Node_Str"+ bodyParam+ "String_Node_Str"+ body+ "String_Node_Str";
  }
}

Fixed version (ground truth):
public String tryInlining(final ApplyTerm apply,final StatementFormatter fmt,final boolean stmtsOkay){
}