Program: 167386
Project: 167386
Buggy source:
@Override public void handle(Message inputMessage,ISendMessageCallback callback,boolean unitOfWorkBoundaryReached){
  if (scriptEngine == null) {
    ScriptEngineManager factory=new ScriptEngineManager();
    scriptEngine=factory.getEngineByName("String_Node_Str");
  }
  totalTime=0;
  if (inputMessage instanceof EntityDataMessage) {
    Model inputModel=getComponent().getInputModel();
    List<EntityData> inDatas=((EntityDataMessage)inputMessage).getPayload();
    ArrayList<EntityData> outDatas=new ArrayList<EntityData>(inDatas != null ? inDatas.size() : 0);
    if (inDatas != null) {
      for (      EntityData inData : inDatas) {
        EntityData outData=new EntityData();
        outData.setChangeType(inData.getChangeType());
        outDatas.add(outData);
        Set<String> attributeIds=new HashSet<String>();
        Set<ModelEntity> processedEntities=new HashSet<ModelEntity>();
        for (        String attributeId : inData.keySet()) {
          ModelAttribute attribute=inputModel.getAttributeById(attributeId);
          if (attribute != null) {
            ModelEntity entity=inputModel.getEntityById(attribute.getEntityId());
            if (entity != null && !processedEntities.contains(entity)) {
              List<ModelAttribute> attributes=entity.getModelAttributes();
              for (              ModelAttribute modelAttribute : attributes) {
                attributeIds.add(modelAttribute.getId());
              }
              processedEntities.add(entity);
            }
          }
        }
        for (        String attributeId : attributeIds) {
          String transform=transformsByAttributeId.get(attributeId);
          Object value=inData.get(attributeId);
          if (isNotBlank(transform)) {
            ModelAttribute attribute=inputModel.getAttributeById(attributeId);
            ModelEntity entity=inputModel.getEntityById(attribute.getEntityId());
            ModelAttributeScriptHelper helper=helpers.get(attribute.getId());
            if (helper == null) {
              long ts=System.currentTimeMillis();
              scriptEngine.put("String_Node_Str",value);
              scriptEngine.put("String_Node_Str",entity);
              scriptEngine.put("String_Node_Str",attribute);
              scriptEngine.put("String_Node_Str",context);
              try {
                String importString="String_Node_Str";
                String code=String.format("String_Node_Str",transform);
                helper=(ModelAttributeScriptHelper)scriptEngine.eval(importString + code);
                helpers.put(attribute.getId(),helper);
              }
 catch (              ScriptException e) {
                throw new RuntimeException("String_Node_Str" + attribute.getName() + "String_Node_Str"+ value.toString()+ "String_Node_Str"+ e.getCause().getMessage(),e);
              }
              log.debug("String_Node_Str" + (System.currentTimeMillis() - ts) + "String_Node_Str");
            }
            helper.setData(inData);
            helper.setValue(value);
            helper.setMessage(inputMessage);
            long ts=System.currentTimeMillis();
            value=helper.eval();
            totalTime+=(System.currentTimeMillis() - ts);
            totalCalls++;
          }
          if (value != ModelAttributeScriptHelper.REMOVE_ATTRIBUTE) {
            outData.put(attributeId,value);
          }
        }
        getComponentStatistics().incrementNumberEntitiesProcessed(threadNumber);
      }
    }
    callback.sendEntityDataMessage(null,outDatas);
    if (totalCalls > 0) {
      log.debug("String_Node_Str" + (totalTime / totalCalls) + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void handle(Message inputMessage,ISendMessageCallback callback,boolean unitOfWorkBoundaryReached){
  if (scriptEngine == null) {
    ScriptEngineManager factory=new ScriptEngineManager();
    scriptEngine=factory.getEngineByName("String_Node_Str");
  }
  totalTime=0;
  if (inputMessage instanceof EntityDataMessage) {
    Model inputModel=getComponent().getInputModel();
    List<EntityData> inDatas=((EntityDataMessage)inputMessage).getPayload();
    ArrayList<EntityData> outDatas=new ArrayList<EntityData>(inDatas != null ? inDatas.size() : 0);
    if (inDatas != null) {
      for (      EntityData inData : inDatas) {
        EntityData outData=new EntityData();
        outData.setChangeType(inData.getChangeType());
        outDatas.add(outData);
        Set<String> attributeIds=new HashSet<String>();
        Set<ModelEntity> processedEntities=new HashSet<ModelEntity>();
        for (        String attributeId : inData.keySet()) {
          ModelAttribute attribute=inputModel.getAttributeById(attributeId);
          if (attribute != null) {
            ModelEntity entity=inputModel.getEntityById(attribute.getEntityId());
            if (entity != null && !processedEntities.contains(entity)) {
              List<ModelAttribute> attributes=entity.getModelAttributes();
              for (              ModelAttribute modelAttribute : attributes) {
                attributeIds.add(modelAttribute.getId());
              }
              processedEntities.add(entity);
            }
          }
        }
        for (        String attributeId : attributeIds) {
          String transform=transformsByAttributeId.get(attributeId);
          Object value=inData.get(attributeId);
          if (isNotBlank(transform)) {
            ModelAttribute attribute=inputModel.getAttributeById(attributeId);
            ModelEntity entity=inputModel.getEntityById(attribute.getEntityId());
            ModelAttributeScriptHelper helper=helpers.get(attribute.getId());
            if (helper == null) {
              long ts=System.currentTimeMillis();
              scriptEngine.put("String_Node_Str",entity);
              scriptEngine.put("String_Node_Str",attribute);
              scriptEngine.put("String_Node_Str",context);
              try {
                String importString="String_Node_Str";
                String code=String.format("String_Node_Str",transform);
                helper=(ModelAttributeScriptHelper)scriptEngine.eval(importString + code);
                helpers.put(attribute.getId(),helper);
              }
 catch (              ScriptException e) {
                throw new RuntimeException("String_Node_Str" + attribute.getName() + "String_Node_Str"+ value.toString()+ "String_Node_Str"+ e.getCause().getMessage(),e);
              }
              log.debug("String_Node_Str" + (System.currentTimeMillis() - ts) + "String_Node_Str");
            }
            helper.setData(inData);
            helper.setValue(value);
            helper.setMessage(inputMessage);
            long ts=System.currentTimeMillis();
            value=helper.eval();
            totalTime+=(System.currentTimeMillis() - ts);
            totalCalls++;
          }
          if (value != ModelAttributeScriptHelper.REMOVE_ATTRIBUTE) {
            outData.put(attributeId,value);
          }
        }
        getComponentStatistics().incrementNumberEntitiesProcessed(threadNumber);
      }
    }
    callback.sendEntityDataMessage(null,outDatas);
    if (totalCalls > 0) {
      log.debug("String_Node_Str" + (totalTime / totalCalls) + "String_Node_Str");
    }
  }
}