Program: 39636
Project: 39636
Buggy source:
/** 
 * Performs the transformation utility against the application to be transformed <br> This is the one called by the transformation engine, and regardless of any customization it could have, it must always: <ol> <li>1- Call   {@link #applyPropertiesFromContext(TransformationContext)}</li> <li>2- Call   {@link #execution(File,TransformationContext)}</li> </ol> <br> This method is NOT supposed to be overwritten, unless you really know what you are doing.
 * @param transformedAppFolder
 * @param transformationContext
 * @return the result
 */
public PerformResult perform(File transformedAppFolder,TransformationContext transformationContext) throws TransformationUtilityException {
  if (hasBeenPerformed.get()) {
    String exceptionMessage=String.format("String_Node_Str",getName());
    TransformationUtilityException e=new TransformationUtilityException(exceptionMessage);
    return PerformResult.error(this,e);
  }
  if (ifConditionAttributeName != null) {
    Object conditionResult=transformationContext.get(ifConditionAttributeName);
    if (conditionResult == null || conditionResult instanceof Boolean && !((Boolean)conditionResult).booleanValue()) {
      String details=String.format("String_Node_Str",getName(),ifConditionAttributeName);
      return PerformResult.skippedCondition(this,details);
    }
  }
  if (unlessConditionAttributeName != null) {
    Object conditionResult=transformationContext.get(unlessConditionAttributeName);
    if (conditionResult == null || conditionResult instanceof Boolean && ((Boolean)conditionResult).booleanValue()) {
      String details=String.format("String_Node_Str",getName(),unlessConditionAttributeName);
      return PerformResult.skippedCondition(this,details);
    }
  }
  if (utilityCondition != null) {
    try {
      TransformationUtility utilityCondition=this.utilityCondition.clone();
      utilityCondition.relative(this.getRelativePath());
      TUExecutionResult conditionExecutionResult=(TUExecutionResult)utilityCondition.execution(transformedAppFolder,transformationContext);
      Object conditionResult=conditionExecutionResult.getValue();
      if (conditionResult == null || conditionResult instanceof Boolean && !((Boolean)conditionResult).booleanValue()) {
        String utilityConditionName=(utilityCondition.getName() == null ? utilityCondition.toString() : utilityCondition.getName());
        String details=String.format("String_Node_Str",getName(),utilityConditionName);
        return PerformResult.skippedCondition(this,details);
      }
    }
 catch (    CloneNotSupportedException e) {
      String exceptionMessage=String.format("String_Node_Str",getName());
      TransformationUtilityException ex=new TransformationUtilityException(exceptionMessage,e);
      return PerformResult.error(this,ex);
    }
  }
  PerformResult result=(PerformResult)checkDependencies(transformationContext);
  if (result != null) {
    return result;
  }
  applyPropertiesFromContext(transformationContext);
  try {
    ExecutionResult executionResult=execution(transformedAppFolder,transformationContext);
    result=PerformResult.executionResult(this,executionResult);
  }
 catch (  Exception e) {
    String exceptionMessage=String.format("String_Node_Str",getName());
    TransformationUtilityException ex=new TransformationUtilityException(exceptionMessage,e);
    return PerformResult.error(this,ex);
  }
 finally {
    hasBeenPerformed.set(true);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Performs the transformation utility against the application to be transformed <br> This is the one called by the transformation engine, and regardless of any customization it could have, it must always: <ol> <li>1- Call   {@link #applyPropertiesFromContext(TransformationContext)}</li> <li>2- Call   {@link #execution(File,TransformationContext)}</li> </ol> <br> This method is NOT supposed to be overwritten, unless you really know what you are doing.
 * @param transformedAppFolder
 * @param transformationContext
 * @return the result
 */
public PerformResult perform(File transformedAppFolder,TransformationContext transformationContext) throws TransformationUtilityException {
  if (hasBeenPerformed.get()) {
    String exceptionMessage=String.format("String_Node_Str",getName());
    TransformationUtilityException e=new TransformationUtilityException(exceptionMessage);
    return PerformResult.error(this,e);
  }
  if (ifConditionAttributeName != null) {
    Object conditionResult=transformationContext.get(ifConditionAttributeName);
    if (conditionResult == null || conditionResult instanceof Boolean && !((Boolean)conditionResult).booleanValue()) {
      String details=String.format("String_Node_Str",getName(),ifConditionAttributeName);
      return PerformResult.skippedCondition(this,details);
    }
  }
  if (unlessConditionAttributeName != null) {
    Object conditionResult=transformationContext.get(unlessConditionAttributeName);
    if (conditionResult != null && conditionResult instanceof Boolean && ((Boolean)conditionResult).booleanValue()) {
      String details=String.format("String_Node_Str",getName(),unlessConditionAttributeName);
      return PerformResult.skippedCondition(this,details);
    }
  }
  if (utilityCondition != null) {
    try {
      TransformationUtility utilityCondition=this.utilityCondition.clone();
      utilityCondition.relative(this.getRelativePath());
      TUExecutionResult conditionExecutionResult=(TUExecutionResult)utilityCondition.execution(transformedAppFolder,transformationContext);
      Object conditionResult=conditionExecutionResult.getValue();
      if (conditionResult == null || conditionResult instanceof Boolean && !((Boolean)conditionResult).booleanValue()) {
        String utilityConditionName=(utilityCondition.getName() == null ? utilityCondition.toString() : utilityCondition.getName());
        String details=String.format("String_Node_Str",getName(),utilityConditionName);
        return PerformResult.skippedCondition(this,details);
      }
    }
 catch (    CloneNotSupportedException e) {
      String exceptionMessage=String.format("String_Node_Str",getName());
      TransformationUtilityException ex=new TransformationUtilityException(exceptionMessage,e);
      return PerformResult.error(this,ex);
    }
  }
  PerformResult result=(PerformResult)checkDependencies(transformationContext);
  if (result != null) {
    return result;
  }
  applyPropertiesFromContext(transformationContext);
  try {
    ExecutionResult executionResult=execution(transformedAppFolder,transformationContext);
    result=PerformResult.executionResult(this,executionResult);
  }
 catch (  Exception e) {
    String exceptionMessage=String.format("String_Node_Str",getName());
    TransformationUtilityException ex=new TransformationUtilityException(exceptionMessage,e);
    return PerformResult.error(this,ex);
  }
 finally {
    hasBeenPerformed.set(true);
  }
  return result;
}