Program: 172333
Project: 172333
Buggy source:
/** 
 * Converts the source and target content to temporary files with the correct extensions for the mimetype that they map to.
 * @see #transformInternal(File,File)
 */
protected final void transformInternal(ContentReader reader,ContentWriter writer,Map<String,Object> options) throws Exception {
  String sourceMimetype=getMimetype(reader);
  String targetMimetype=getMimetype(writer);
  String sourceExtension=mimetypeService.getExtension(sourceMimetype);
  String targetExtension=mimetypeService.getExtension(targetMimetype);
  if (sourceExtension == null || targetExtension == null) {
    throw new AlfrescoRuntimeException("String_Node_Str" + "String_Node_Str" + sourceMimetype + "String_Node_Str"+ "String_Node_Str"+ sourceExtension+ "String_Node_Str"+ "String_Node_Str"+ targetMimetype+ "String_Node_Str"+ "String_Node_Str"+ targetExtension);
  }
  if (sourceMimetype.equals(targetMimetype)) {
    writer.putContent(reader.getContentInputStream());
    return;
  }
  File sourceFile=TempFileProvider.createTempFile(getClass().getSimpleName() + "String_Node_Str","String_Node_Str" + sourceExtension);
  File targetFile=TempFileProvider.createTempFile(getClass().getSimpleName() + "String_Node_Str","String_Node_Str" + targetExtension);
  Map<String,String> properties=new HashMap<String,String>(5);
  for (  Map.Entry<String,Object> entry : options.entrySet()) {
    String key=entry.getKey();
    Object value=entry.getValue();
    properties.put(key,(value == null ? null : value.toString()));
  }
  properties.put(VAR_SOURCE,sourceFile.getAbsolutePath());
  properties.put(VAR_TARGET,targetFile.getAbsolutePath());
  reader.getContent(sourceFile);
  ExecutionResult result=null;
  try {
    result=transformCommand.execute(properties);
  }
 catch (  Throwable e) {
    throw new ContentIOException("String_Node_Str" + transformCommand,e);
  }
  if (!result.getSuccess()) {
    throw new ContentIOException("String_Node_Str" + result);
  }
  if (!targetFile.exists()) {
    throw new ContentIOException("String_Node_Str" + result);
  }
  writer.putContent(targetFile);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + "String_Node_Str" + reader + "String_Node_Str"+ "String_Node_Str"+ writer+ "String_Node_Str"+ "String_Node_Str"+ options+ "String_Node_Str"+ "String_Node_Str"+ result);
  }
}

Fixed version (ground truth):
/** 
 * Converts the source and target content to temporary files with the correct extensions for the mimetype that they map to.
 * @see #transformInternal(File,File)
 */
protected final void transformInternal(ContentReader reader,ContentWriter writer,Map<String,Object> options) throws Exception {
  String sourceMimetype=getMimetype(reader);
  String targetMimetype=getMimetype(writer);
  String sourceExtension=getMimetypeService().getExtension(sourceMimetype);
  String targetExtension=getMimetypeService().getExtension(targetMimetype);
  if (sourceExtension == null || targetExtension == null) {
    throw new AlfrescoRuntimeException("String_Node_Str" + "String_Node_Str" + sourceMimetype + "String_Node_Str"+ "String_Node_Str"+ sourceExtension+ "String_Node_Str"+ "String_Node_Str"+ targetMimetype+ "String_Node_Str"+ "String_Node_Str"+ targetExtension);
  }
  if (sourceMimetype.equals(targetMimetype)) {
    writer.putContent(reader.getContentInputStream());
    return;
  }
  File sourceFile=TempFileProvider.createTempFile(getClass().getSimpleName() + "String_Node_Str","String_Node_Str" + sourceExtension);
  File targetFile=TempFileProvider.createTempFile(getClass().getSimpleName() + "String_Node_Str","String_Node_Str" + targetExtension);
  Map<String,String> properties=new HashMap<String,String>(5);
  for (  Map.Entry<String,Object> entry : options.entrySet()) {
    String key=entry.getKey();
    Object value=entry.getValue();
    properties.put(key,(value == null ? null : value.toString()));
  }
  properties.put(VAR_SOURCE,sourceFile.getAbsolutePath());
  properties.put(VAR_TARGET,targetFile.getAbsolutePath());
  reader.getContent(sourceFile);
  ExecutionResult result=null;
  try {
    result=transformCommand.execute(properties);
  }
 catch (  Throwable e) {
    throw new ContentIOException("String_Node_Str" + transformCommand,e);
  }
  if (!result.getSuccess()) {
    throw new ContentIOException("String_Node_Str" + result);
  }
  if (!targetFile.exists()) {
    throw new ContentIOException("String_Node_Str" + result);
  }
  writer.putContent(targetFile);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + "String_Node_Str" + reader + "String_Node_Str"+ "String_Node_Str"+ writer+ "String_Node_Str"+ "String_Node_Str"+ options+ "String_Node_Str"+ "String_Node_Str"+ result);
  }
}