Program: 167309
Project: 167309
Buggy source:
@Override public void handle(Message inputMessage,ISendMessageCallback callback,boolean unitOfWorkBoundaryReached){
  if ((PER_UNIT_OF_WORK.equals(runWhen) && inputMessage instanceof ControlMessage) || (!PER_UNIT_OF_WORK.equals(runWhen) && !(inputMessage instanceof ControlMessage))) {
    HttpDirectory streamable=getResourceReference();
    Map<String,Serializable> outputMessageHeaders=new HashMap<String,Serializable>();
    httpHeaders=getHttpHeaderConfigEntries(inputMessage);
    httpParameters=getHttpParameterConfigEntries(inputMessage);
    assembleRelativePathPlusParameters();
    ArrayList<String> outputPayload=new ArrayList<String>();
    ArrayList<String> inputPayload=new ArrayList<String>();
    if (bodyFrom.equals("String_Node_Str") && inputMessage instanceof TextMessage) {
      inputPayload=((TextMessage)inputMessage).getPayload();
    }
 else {
      inputPayload.add(bodyText);
    }
    if (inputPayload != null) {
      try {
        String path=resolveParamsAndHeaders(relativePath,inputMessage);
        for (        String requestContent : inputPayload) {
          getComponentStatistics().incrementNumberEntitiesProcessed(threadNumber);
          if (parameterReplacement) {
            resolveHttpHeaderVars(httpHeaders,inputMessage);
            requestContent=resolveParamsAndHeaders(requestContent,inputMessage);
          }
          if (isNotBlank(requestContent)) {
            info("String_Node_Str",path);
            OutputStream os=streamable.getOutputStream(path,false,false,false,httpHeaders,httpParameters);
            BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(os,DEFAULT_CHARSET));
            try {
              writer.write(requestContent);
            }
  finally {
              writer.close();
              if (os instanceof IOutputStreamWithResponse) {
                String response=((IOutputStreamWithResponse)os).getResponse();
                if (response != null) {
                  outputPayload.add(response);
                }
              }
            }
          }
 else {
            info("String_Node_Str",path);
            HttpInputStream is=(HttpInputStream)streamable.getInputStream(path,false,false,httpHeaders,httpParameters);
            Map<String,List<String>> responseHdrs=is.getHttpConnection().getHeaderFields();
            outputMessageHeaders.putAll(convertResponseHdrsToMsgHeaders(responseHdrs));
            try {
              String response=IOUtils.toString(is);
              if (response != null) {
                outputPayload.add(response);
              }
            }
  finally {
              IOUtils.closeQuietly(is);
            }
          }
        }
        if (outputPayload.size() > 0) {
          callback.sendTextMessage(outputMessageHeaders,outputPayload);
        }
      }
 catch (      IOException e) {
        throw new IoException(String.format("String_Node_Str",streamable),e);
      }
    }
  }
 else   if (context.getManipulatedFlow().findStartSteps().contains(context.getFlowStep()) && !PER_UNIT_OF_WORK.equals(runWhen)) {
    warn("String_Node_Str",runWhen,PER_UNIT_OF_WORK);
  }
}

Fixed version (ground truth):
@Override public void handle(Message inputMessage,ISendMessageCallback callback,boolean unitOfWorkBoundaryReached){
  if ((PER_UNIT_OF_WORK.equals(runWhen) && inputMessage instanceof ControlMessage) || (!PER_UNIT_OF_WORK.equals(runWhen) && !(inputMessage instanceof ControlMessage))) {
    IDirectory streamable=getResourceReference();
    Map<String,Serializable> outputMessageHeaders=new HashMap<String,Serializable>();
    httpHeaders=getHttpHeaderConfigEntries(inputMessage);
    httpParameters=getHttpParameterConfigEntries(inputMessage);
    assembleRelativePathPlusParameters();
    ArrayList<String> outputPayload=new ArrayList<String>();
    ArrayList<String> inputPayload=new ArrayList<String>();
    if (bodyFrom.equals("String_Node_Str") && inputMessage instanceof TextMessage) {
      inputPayload=((TextMessage)inputMessage).getPayload();
    }
 else {
      inputPayload.add(bodyText);
    }
    if (inputPayload != null) {
      try {
        String path=resolveParamsAndHeaders(relativePath,inputMessage);
        for (        String requestContent : inputPayload) {
          getComponentStatistics().incrementNumberEntitiesProcessed(threadNumber);
          if (parameterReplacement) {
            resolveHttpHeaderVars(httpHeaders,inputMessage);
            requestContent=resolveParamsAndHeaders(requestContent,inputMessage);
          }
          if (isNotBlank(requestContent)) {
            info("String_Node_Str",path);
            OutputStream os=streamable.getOutputStream(path,false,false,false,httpHeaders,httpParameters);
            BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(os,DEFAULT_CHARSET));
            try {
              writer.write(requestContent);
            }
  finally {
              writer.close();
              if (os instanceof IOutputStreamWithResponse) {
                String response=((IOutputStreamWithResponse)os).getResponse();
                if (response != null) {
                  outputPayload.add(response);
                }
              }
            }
          }
 else {
            info("String_Node_Str",path);
            IInputStreamWithConnection isc=(IInputStreamWithConnection)streamable.getInputStream(path,false,false,httpHeaders,httpParameters);
            Map<String,List<String>> responseHdrs=isc.getHttpConnection().getHeaderFields();
            outputMessageHeaders.putAll(convertResponseHdrsToMsgHeaders(responseHdrs));
            try {
              String response=IOUtils.toString(isc.getInputStream());
              if (response != null) {
                outputPayload.add(response);
              }
            }
  finally {
              IOUtils.closeQuietly(isc.getInputStream());
            }
          }
        }
        if (outputPayload.size() > 0) {
          callback.sendTextMessage(outputMessageHeaders,outputPayload);
        }
      }
 catch (      IOException e) {
        throw new IoException(String.format("String_Node_Str",streamable),e);
      }
    }
  }
 else   if (context.getManipulatedFlow().findStartSteps().contains(context.getFlowStep()) && !PER_UNIT_OF_WORK.equals(runWhen)) {
    warn("String_Node_Str",runWhen,PER_UNIT_OF_WORK);
  }
}