nus-yam/ex-repair huggingface dataset:
Program: 141328
Project: 141328
Buggy source:
/** 
 * Convert the S3 URLs to S3N URLs in source, genome and annotation fields of the design.
 */
private void convertDesignS3URLs(){
  for (  Sample s : this.design.getSamples()) {
    final List<String> readsSources=s.getMetadata().getReads();
    for (int i=0; i < readsSources.size(); i++)     readsSources.set(i,convertS3URL(readsSources.get(i)));
    s.getMetadata().setReads(readsSources);
    if (s.getMetadata().isGenomeField())     s.getMetadata().setGenome(convertS3URL(s.getMetadata().getGenome()));
    if (s.getMetadata().isAnnotationField())     s.getMetadata().setAnnotation(convertS3URL(s.getMetadata().getAnnotation()));
  }
}

Fixed version (ground truth):
/** 
 * Convert the S3 URLs to S3N URLs in source, genome and annotation fields of the design.
 */
private void convertDesignS3URLs(){
  for (  Sample s : this.design.getSamples()) {
    final List<String> readsSources=Lists.newArrayList(s.getMetadata().getReads());
    for (int i=0; i < readsSources.size(); i++)     readsSources.set(i,convertS3URL(readsSources.get(i)));
    s.getMetadata().setReads(readsSources);
    if (s.getMetadata().isGenomeField())     s.getMetadata().setGenome(convertS3URL(s.getMetadata().getGenome()));
    if (s.getMetadata().isAnnotationField())     s.getMetadata().setAnnotation(convertS3URL(s.getMetadata().getAnnotation()));
  }
}
Program: 141329
Project: 141329
Buggy source:
/** 
 * Show a design
 * @param design Design to show
 */
public static void showDesign(final Design design){
  List<String> metadataFields=design.getMetadataFieldsNames();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  String f : metadataFields) {
    sb.append("String_Node_Str");
    sb.append(f);
  }
  System.out.println(sb.toString());
  List<Sample> slides=design.getSamples();
  for (  Sample s : slides) {
    sb.setLength(0);
    sb.append(s.getName());
    sb.append("String_Node_Str");
    String sourceInfo=s.getSourceInfo();
    if (sourceInfo != null)     sb.append(sourceInfo);
    for (    String f : metadataFields) {
      sb.append("String_Node_Str");
      sb.append(s.getMetadata().get(f));
    }
    System.out.println(sb.toString());
  }
}

Fixed version (ground truth):
/** 
 * Show a design
 * @param design Design to show
 */
public static void showDesign(final Design design){
  List<String> metadataFields=design.getMetadataFieldsNames();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  String f : metadataFields) {
    sb.append("String_Node_Str");
    sb.append(f);
  }
  System.out.println(sb.toString());
  List<Sample> slides=design.getSamples();
  for (  Sample s : slides) {
    sb.setLength(0);
    sb.append(s.getId());
    sb.append("String_Node_Str");
    sb.append(s.getName());
    sb.append("String_Node_Str");
    String sourceInfo=s.getSourceInfo();
    if (sourceInfo != null)     sb.append(sourceInfo);
    for (    String f : metadataFields) {
      sb.append("String_Node_Str");
      sb.append(s.getMetadata().get(f));
    }
    System.out.println(sb.toString());
  }
}
Program: 141330
Project: 141330
Buggy source:
/** 
 * Show a design
 * @param design Design to show
 */
public static void showDesign(final Design design){
  List<String> metadataFields=design.getMetadataFieldsNames();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  String f : metadataFields) {
    sb.append("String_Node_Str");
    sb.append(f);
  }
  System.out.println(sb.toString());
  List<Sample> slides=design.getSamples();
  for (  Sample s : slides) {
    sb.setLength(0);
    sb.append(s.getName());
    sb.append("String_Node_Str");
    String sourceInfo=s.getSourceInfo();
    if (sourceInfo != null)     sb.append(sourceInfo);
    for (    String f : metadataFields) {
      sb.append("String_Node_Str");
      sb.append(s.getMetadata().get(f));
    }
    System.out.println(sb.toString());
  }
}

Fixed version (ground truth):
/** 
 * Show a design
 * @param design Design to show
 */
public static void showDesign(final Design design){
  List<String> metadataFields=design.getMetadataFieldsNames();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  String f : metadataFields) {
    sb.append("String_Node_Str");
    sb.append(f);
  }
  System.out.println(sb.toString());
  List<Sample> slides=design.getSamples();
  for (  Sample s : slides) {
    sb.setLength(0);
    sb.append(s.getId());
    sb.append("String_Node_Str");
    sb.append(s.getName());
    sb.append("String_Node_Str");
    String sourceInfo=s.getSourceInfo();
    if (sourceInfo != null)     sb.append(sourceInfo);
    for (    String f : metadataFields) {
      sb.append("String_Node_Str");
      sb.append(s.getMetadata().get(f));
    }
    System.out.println(sb.toString());
  }
}
Program: 141333
Project: 141333
Buggy source:
/** 
 * Wait the end of the job
 * @param secondBetweenChecking number of seconds to wait between 2 checks
 * @return the final state of the job
 */
public String waitForJob(final int secondBetweenChecking){
  if (this.runFlowResult == null) {
    return null;
  }
  final DescribeJobFlowsRequest describeJobFlowsRequest=new DescribeJobFlowsRequest().withJobFlowIds(this.runFlowResult.getJobFlowId());
  String state=null;
  String lastState=null;
  try {
    do {
      Thread.sleep(secondBetweenChecking * 1000);
      final DescribeJobFlowsResult jobFlowsResult=this.mapReduceClient.describeJobFlows(describeJobFlowsRequest);
      final JobFlowDetail detail=jobFlowsResult.getJobFlows().get(0);
      final JobFlowExecutionStatusDetail executionStatusDetail=detail.getExecutionStatusDetail();
      state=executionStatusDetail.getState();
      if (lastState == null || !lastState.equals(state)) {
        LOGGER.info("String_Node_Str" + this.runFlowResult.getJobFlowId() + "String_Node_Str"+ state);
        lastState=state;
      }
    }
 while (state != null && !state.equals("String_Node_Str") && !state.equals("String_Node_Str") && !state.equals("String_Node_Str"));
    return state;
  }
 catch (  InterruptedException e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Wait the end of the job
 * @param secondBetweenChecking number of seconds to wait between 2 checks
 * @return the final state of the job
 */
public String waitForJob(final int secondBetweenChecking){
  if (this.runFlowResult == null) {
    return null;
  }
  final DescribeJobFlowsRequest describeJobFlowsRequest=new DescribeJobFlowsRequest().withJobFlowIds(this.runFlowResult.getJobFlowId());
  String state=null;
  String lastState=null;
  int failCount=0;
  try {
    do {
      Thread.sleep(secondBetweenChecking * 1000);
      try {
        final DescribeJobFlowsResult jobFlowsResult=this.mapReduceClient.describeJobFlows(describeJobFlowsRequest);
        final JobFlowDetail detail=jobFlowsResult.getJobFlows().get(0);
        final JobFlowExecutionStatusDetail executionStatusDetail=detail.getExecutionStatusDetail();
        failCount=0;
        state=executionStatusDetail.getState();
      }
 catch (      AmazonClientException ace) {
        failCount++;
        LOGGER.warning("String_Node_Str" + ace.getMessage());
        if (failCount >= MAX_FAIL_COUNT) {
          throw ace;
        }
      }
      if (lastState == null || !lastState.equals(state)) {
        LOGGER.info("String_Node_Str" + this.runFlowResult.getJobFlowId() + "String_Node_Str"+ state);
        lastState=state;
      }
    }
 while (state != null && !state.equals("String_Node_Str") && !state.equals("String_Node_Str") && !state.equals("String_Node_Str"));
    return state;
  }
 catch (  InterruptedException e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
  }
  return null;
}
Program: 141334
Project: 141334
Buggy source:
/** 
 * Wait the end of the job
 * @param secondBetweenChecking number of seconds to wait between 2 checks
 * @return the final state of the job
 */
public String waitForJob(final int secondBetweenChecking){
  if (this.runFlowResult == null) {
    return null;
  }
  final DescribeJobFlowsRequest describeJobFlowsRequest=new DescribeJobFlowsRequest().withJobFlowIds(this.runFlowResult.getJobFlowId());
  String state=null;
  String lastState=null;
  try {
    do {
      Thread.sleep(secondBetweenChecking * 1000);
      final DescribeJobFlowsResult jobFlowsResult=this.mapReduceClient.describeJobFlows(describeJobFlowsRequest);
      final JobFlowDetail detail=jobFlowsResult.getJobFlows().get(0);
      final JobFlowExecutionStatusDetail executionStatusDetail=detail.getExecutionStatusDetail();
      state=executionStatusDetail.getState();
      if (lastState == null || !lastState.equals(state)) {
        LOGGER.info("String_Node_Str" + this.runFlowResult.getJobFlowId() + "String_Node_Str"+ state);
        lastState=state;
      }
    }
 while (state != null && !state.equals("String_Node_Str") && !state.equals("String_Node_Str") && !state.equals("String_Node_Str"));
    return state;
  }
 catch (  InterruptedException e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Wait the end of the job
 * @param secondBetweenChecking number of seconds to wait between 2 checks
 * @return the final state of the job
 */
public String waitForJob(final int secondBetweenChecking){
  if (this.runFlowResult == null) {
    return null;
  }
  final DescribeJobFlowsRequest describeJobFlowsRequest=new DescribeJobFlowsRequest().withJobFlowIds(this.runFlowResult.getJobFlowId());
  String state=null;
  String lastState=null;
  int failCount=0;
  try {
    do {
      Thread.sleep(secondBetweenChecking * 1000);
      try {
        final DescribeJobFlowsResult jobFlowsResult=this.mapReduceClient.describeJobFlows(describeJobFlowsRequest);
        final JobFlowDetail detail=jobFlowsResult.getJobFlows().get(0);
        final JobFlowExecutionStatusDetail executionStatusDetail=detail.getExecutionStatusDetail();
        failCount=0;
        state=executionStatusDetail.getState();
      }
 catch (      AmazonClientException ace) {
        failCount++;
        LOGGER.warning("String_Node_Str" + ace.getMessage());
        if (failCount >= MAX_FAIL_COUNT) {
          throw ace;
        }
      }
      if (lastState == null || !lastState.equals(state)) {
        LOGGER.info("String_Node_Str" + this.runFlowResult.getJobFlowId() + "String_Node_Str"+ state);
        lastState=state;
      }
    }
 while (state != null && !state.equals("String_Node_Str") && !state.equals("String_Node_Str") && !state.equals("String_Node_Str"));
    return state;
  }
 catch (  InterruptedException e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
  }
  return null;
}
Program: 141339
Project: 141339
Buggy source:
@Override public void action(String[] arguments){
  try {
    initLog();
    final Settings settings=new Settings();
    final String instanceType=MEM_INSTANCE;
    final int instanceCount=3;
    final String genome="String_Node_Str";
    final String dir=BASE_DIR + genome + "String_Node_Str";
    final String designFile=dir + "String_Node_Str";
    final String mapper="String_Node_Str";
    final String paramFile=dir + "String_Node_Str" + mapper+ "String_Node_Str";
    final String desc=genome + "String_Node_Str" + mapper;
    exec(settings,instanceType,instanceCount,paramFile,designFile,desc);
    LOGGER.info("String_Node_Str" + new Date() + "String_Node_Str");
  }
 catch (  IOException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void action(String[] arguments){
  try {
    initLog();
    final Settings settings=new Settings();
    final String instanceType=MEM_INSTANCE;
    final int instanceCount=3;
    final String genome="String_Node_Str";
    final String dir=BASE_DIR + genome + "String_Node_Str";
    final String designFile=dir + "String_Node_Str";
    final String mapper="String_Node_Str";
    final String paramFile=dir + "String_Node_Str" + genome+ "String_Node_Str"+ mapper+ "String_Node_Str";
    final String desc=genome + "String_Node_Str" + mapper;
    exec(settings,instanceType,instanceCount,paramFile,designFile,desc);
    LOGGER.info("String_Node_Str" + new Date() + "String_Node_Str");
  }
 catch (  IOException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
}
Program: 141340
Project: 141340
Buggy source:
/** 
 * Main method.
 * @param args command line arguments
 * @throws IOException if an error occurs
 * @throws EoulsanException if an error occurs
 */
public static void main(String[] args) throws IOException, EoulsanException {
}

Fixed version (ground truth):
/** 
 * Main method.
 * @param args command line arguments
 */
public static void main(final String[] args){
  new BenchmarkAction().action(args);
}
Program: 141343
Project: 141343
Buggy source:
/** 
 * Run the job.
 * @return a the JobFlowId of the job
 */
public String runJob(){
  final AWSCredentials credentials=new BasicAWSCredentials(this.AWSAccessKey,this.AWSSecretKey);
  this.mapReduceClient=new AmazonElasticMapReduceClient(credentials);
  mapReduceClient.setEndpoint(this.endpoint);
  this.runFlowResult=mapReduceClient.runJobFlow(runFlowRequest);
  return this.runFlowResult.getJobFlowId();
}

Fixed version (ground truth):
/** 
 * Run the job.
 * @return a the JobFlowId of the job
 */
public String runJob(){
  final AWSCredentials credentials=new BasicAWSCredentials(this.AWSAccessKey,this.AWSSecretKey);
  this.mapReduceClient=new AmazonElasticMapReduceClient(credentials);
  mapReduceClient.setEndpoint(this.endpoint);
  this.runFlowResult=mapReduceClient.runJobFlow(this.runFlowRequest);
  return this.runFlowResult.getJobFlowId();
}
Program: 141344
Project: 141344
Buggy source:
@Override public void action(String[] arguments){
  try {
    initLog();
    final Settings settings=new Settings();
    final String instanceType=MEM_INSTANCE;
    final int instanceCount=3;
    final String genome="String_Node_Str";
    final String dir=BASE_DIR + genome + "String_Node_Str";
    final String designFile=dir + "String_Node_Str";
    final String mapper="String_Node_Str";
    final String paramFile=dir + "String_Node_Str" + mapper+ "String_Node_Str";
    final String desc=genome + "String_Node_Str" + mapper;
    exec(settings,instanceType,instanceCount,paramFile,designFile,desc);
    LOGGER.info("String_Node_Str" + new Date() + "String_Node_Str");
  }
 catch (  IOException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void action(String[] arguments){
  try {
    initLog();
    final Settings settings=new Settings();
    final String instanceType=MEM_INSTANCE;
    final int instanceCount=3;
    final String genome="String_Node_Str";
    final String dir=BASE_DIR + genome + "String_Node_Str";
    final String designFile=dir + "String_Node_Str";
    final String mapper="String_Node_Str";
    final String paramFile=dir + "String_Node_Str" + genome+ "String_Node_Str"+ mapper+ "String_Node_Str";
    final String desc=genome + "String_Node_Str" + mapper;
    exec(settings,instanceType,instanceCount,paramFile,designFile,desc);
    LOGGER.info("String_Node_Str" + new Date() + "String_Node_Str");
  }
 catch (  IOException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    LOGGER.severe("String_Node_Str" + e.getMessage());
  }
}
Program: 141345
Project: 141345
Buggy source:
/** 
 * Main method.
 * @param args command line arguments
 * @throws IOException if an error occurs
 * @throws EoulsanException if an error occurs
 */
public static void main(String[] args) throws IOException, EoulsanException {
}

Fixed version (ground truth):
/** 
 * Main method.
 * @param args command line arguments
 */
public static void main(final String[] args){
  new BenchmarkAction().action(args);
}
Program: 141348
Project: 141348
Buggy source:
/** 
 * Run the job.
 * @return a the JobFlowId of the job
 */
public String runJob(){
  final AWSCredentials credentials=new BasicAWSCredentials(this.AWSAccessKey,this.AWSSecretKey);
  this.mapReduceClient=new AmazonElasticMapReduceClient(credentials);
  mapReduceClient.setEndpoint(this.endpoint);
  this.runFlowResult=mapReduceClient.runJobFlow(runFlowRequest);
  return this.runFlowResult.getJobFlowId();
}

Fixed version (ground truth):
/** 
 * Run the job.
 * @return a the JobFlowId of the job
 */
public String runJob(){
  final AWSCredentials credentials=new BasicAWSCredentials(this.AWSAccessKey,this.AWSSecretKey);
  this.mapReduceClient=new AmazonElasticMapReduceClient(credentials);
  mapReduceClient.setEndpoint(this.endpoint);
  this.runFlowResult=mapReduceClient.runJobFlow(this.runFlowRequest);
  return this.runFlowResult.getJobFlowId();
}
Program: 141349
Project: 141349
Buggy source:
/** 
 * Create options for command line
 * @return an Options object
 */
@SuppressWarnings("String_Node_Str") private static Options makeOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('d'));
  return options;
}

Fixed version (ground truth):
/** 
 * Create options for command line
 * @return an Options object
 */
@SuppressWarnings("String_Node_Str") private static Options makeOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('d'));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('e'));
  return options;
}
Program: 141350
Project: 141350
Buggy source:
/** 
 * Main method. This method is called by MainHadoop.
 * @param args command line arguments
 */
public static void main(final String[] args){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  String jobEnvironment=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,args,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
    if (line.hasOption("String_Node_Str")) {
      jobEnvironment=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (args.length != argsOptions + 4) {
    help(options);
  }
  if (!"String_Node_Str".equals(args[argsOptions])) {
    Common.showErrorMessageAndExit("String_Node_Str" + args[argsOptions]);
  }
  final String paramPathname=args[argsOptions + 1];
  final String designPathname=args[argsOptions + 2];
  final String destPathname=args[argsOptions + 3];
  run(paramPathname,designPathname,destPathname,jobDescription,jobEnvironment);
}

Fixed version (ground truth):
/** 
 * Main method. This method is called by MainHadoop.
 * @param args command line arguments
 */
public static void main(final String[] args){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  if (args.length == 0 || !"String_Node_Str".equals(args[0])) {
    help(options);
  }
  final String[] arguments=StringUtils.arrayWithoutFirstElement(args);
  String jobDescription=null;
  String jobEnvironment=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
    if (line.hasOption("String_Node_Str")) {
      jobEnvironment=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 3) {
    help(options);
  }
  final String paramPathname=arguments[argsOptions];
  final String designPathname=arguments[argsOptions + 1];
  final String destPathname=arguments[argsOptions + 2];
  run(paramPathname,designPathname,destPathname,jobDescription,jobEnvironment);
}
Program: 141351
Project: 141351
Buggy source:
/** 
 * Get an array without the first element of the input array.
 * @param array input array
 * @param elementsToRemove number of the first elements to remove
 * @return an array without the first element of the input array
 */
public static final String[] arrayWithoutFirstsElement(final String[] array,final int elementsToRemove){
  if (array == null)   return null;
  if (elementsToRemove < 1 || elementsToRemove > array.length)   return new String[0];
  final int newLen=array.length - elementsToRemove;
  final String[] result=new String[newLen];
  System.arraycopy(array,1,result,0,newLen);
  return result;
}

Fixed version (ground truth):
/** 
 * Get an array without the first element of the input array.
 * @param array input array
 * @param elementsToRemove number of the first elements to remove
 * @return an array without the first element of the input array
 */
public static final String[] arrayWithoutFirstsElement(final String[] array,final int elementsToRemove){
  if (array == null)   return null;
  if (elementsToRemove < 1 || elementsToRemove > array.length)   return new String[0];
  final int newLen=array.length - elementsToRemove;
  final String[] result=new String[newLen];
  System.arraycopy(array,elementsToRemove,result,0,newLen);
  return result;
}
Program: 141352
Project: 141352
Buggy source:
/** 
 * Create options for command line
 * @return an Options object
 */
@SuppressWarnings("String_Node_Str") private static Options makeOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('d'));
  return options;
}

Fixed version (ground truth):
/** 
 * Create options for command line
 * @return an Options object
 */
@SuppressWarnings("String_Node_Str") private static Options makeOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('d'));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").withLongOpt("String_Node_Str").create('e'));
  return options;
}
Program: 141353
Project: 141353
Buggy source:
/** 
 * Main method. This method is called by MainHadoop.
 * @param args command line arguments
 */
public static void main(final String[] args){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  String jobEnvironment=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,args,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
    if (line.hasOption("String_Node_Str")) {
      jobEnvironment=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (args.length != argsOptions + 4) {
    help(options);
  }
  if (!"String_Node_Str".equals(args[argsOptions])) {
    Common.showErrorMessageAndExit("String_Node_Str" + args[argsOptions]);
  }
  final String paramPathname=args[argsOptions + 1];
  final String designPathname=args[argsOptions + 2];
  final String destPathname=args[argsOptions + 3];
  run(paramPathname,designPathname,destPathname,jobDescription,jobEnvironment);
}

Fixed version (ground truth):
/** 
 * Main method. This method is called by MainHadoop.
 * @param args command line arguments
 */
public static void main(final String[] args){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  if (args.length == 0 || !"String_Node_Str".equals(args[0])) {
    help(options);
  }
  final String[] arguments=StringUtils.arrayWithoutFirstElement(args);
  String jobDescription=null;
  String jobEnvironment=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
    if (line.hasOption("String_Node_Str")) {
      jobEnvironment=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 3) {
    help(options);
  }
  final String paramPathname=arguments[argsOptions];
  final String designPathname=arguments[argsOptions + 1];
  final String destPathname=arguments[argsOptions + 2];
  run(paramPathname,designPathname,destPathname,jobDescription,jobEnvironment);
}
Program: 141354
Project: 141354
Buggy source:
@Override public void action(final String[] arguments){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 2) {
    help(options);
  }
  final File paramFile=new File(arguments[argsOptions]);
  final File designFile=new File(arguments[argsOptions + 1]);
  final String hdfsPath=arguments[argsOptions + 2];
  run(paramFile,designFile,hdfsPath,jobDescription);
}

Fixed version (ground truth):
@Override public void action(final String[] arguments){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 3) {
    help(options);
  }
  final File paramFile=new File(arguments[argsOptions]);
  final File designFile=new File(arguments[argsOptions + 1]);
  final String hdfsPath=arguments[argsOptions + 2];
  run(paramFile,designFile,hdfsPath,jobDescription);
}
Program: 141355
Project: 141355
Buggy source:
/** 
 * Run Eoulsan in hadoop mode.
 * @param paramFile parameter file
 * @param designFile design file
 * @param hdfsPath path of data on hadoop file system
 * @param jobDescription job description
 */
private void run(final File paramFile,final File designFile,final String hdfsPath,final String jobDescription){
  checkNotNull(paramFile,"String_Node_Str");
  checkNotNull(designFile,"String_Node_Str");
  checkNotNull(hdfsPath,"String_Node_Str");
  try {
    File repackagedJarFile=HadoopJarRepackager.repack();
    LOGGER.info("String_Node_Str");
    final StringBuilder sb=new StringBuilder();
    sb.append(HADOOP_CMD);
    sb.append(repackagedJarFile.getCanonicalPath());
    sb.append("String_Node_Str");
    if (jobDescription != null) {
      sb.append("String_Node_Str");
      sb.append(jobDescription.trim());
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    sb.append(paramFile);
    sb.append("String_Node_Str");
    sb.append(designFile);
    sb.append("String_Node_Str");
    sb.append(hdfsPath);
    ProcessUtils.execThreadOutput(sb.toString());
  }
 catch (  IOException e) {
    Common.errorExit(e,"String_Node_Str" + Globals.APP_NAME_LOWER_CASE + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Run Eoulsan in hadoop mode.
 * @param paramFile parameter file
 * @param designFile design file
 * @param hdfsPath path of data on hadoop file system
 * @param jobDescription job description
 */
private void run(final File paramFile,final File designFile,final String hdfsPath,final String jobDescription){
  checkNotNull(paramFile,"String_Node_Str");
  checkNotNull(designFile,"String_Node_Str");
  checkNotNull(hdfsPath,"String_Node_Str");
  try {
    File repackagedJarFile=HadoopJarRepackager.repack();
    LOGGER.info("String_Node_Str");
    final List<String> argsList=Lists.newArrayList();
    argsList.add("String_Node_Str");
    argsList.add("String_Node_Str");
    argsList.add(repackagedJarFile.getCanonicalPath());
    argsList.add("String_Node_Str");
    if (jobDescription != null) {
      argsList.add("String_Node_Str");
      argsList.add(jobDescription.trim());
    }
    argsList.add("String_Node_Str");
    argsList.add("String_Node_Str");
    argsList.add(paramFile.toString());
    argsList.add(designFile.toString());
    argsList.add(hdfsPath);
    final String[] args=argsList.toArray(new String[0]);
    ProcessUtils.execThreadOutput(args);
  }
 catch (  IOException e) {
    Common.errorExit(e,"String_Node_Str" + Globals.APP_NAME_LOWER_CASE + "String_Node_Str"+ e.getMessage());
  }
}
Program: 141356
Project: 141356
Buggy source:
/** 
 * Execute a command and write the content of the standard output and error to System.out and System.err.
 * @param cmd Command to execute
 * @throws IOException if an error occurs while executing the command
 */
public static void execThreadOutput(final String cmd) throws IOException {
  logger.fine("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cmd);
  final long startTime=System.currentTimeMillis();
  Process p=Runtime.getRuntime().exec(cmd);
  final BufferedReader stdr=new BufferedReader(new InputStreamReader(p.getInputStream()));
  final BufferedReader errr=new BufferedReader(new InputStreamReader(p.getErrorStream()));
  new Thread(new ProcessThreadOutput(stdr,System.out)).run();
  new Thread(new ProcessThreadOutput(errr,System.err)).run();
  logEndTime(p,cmd,startTime);
}

Fixed version (ground truth):
/** 
 * Execute a command and write the content of the standard output and error to System.out and System.err.
 * @param cmd array with the command to execute
 * @throws IOException if an error occurs while executing the command
 */
public static void execThreadOutput(final String[] cmd) throws IOException {
  logger.fine("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cmd);
  final long startTime=System.currentTimeMillis();
  Process p=Runtime.getRuntime().exec(cmd);
  final BufferedReader stdr=new BufferedReader(new InputStreamReader(p.getInputStream()));
  final BufferedReader errr=new BufferedReader(new InputStreamReader(p.getErrorStream()));
  new Thread(new ProcessThreadOutput(stdr,System.out)).run();
  new Thread(new ProcessThreadOutput(errr,System.err)).run();
  logEndTime(p,Joiner.on(' ').join(cmd),startTime);
}
Program: 141357
Project: 141357
Buggy source:
@Override public void action(final String[] arguments){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 2) {
    help(options);
  }
  final File paramFile=new File(arguments[argsOptions]);
  final File designFile=new File(arguments[argsOptions + 1]);
  final String hdfsPath=arguments[argsOptions + 2];
  run(paramFile,designFile,hdfsPath,jobDescription);
}

Fixed version (ground truth):
@Override public void action(final String[] arguments){
  final Options options=makeOptions();
  final CommandLineParser parser=new GnuParser();
  String jobDescription=null;
  int argsOptions=0;
  try {
    final CommandLine line=parser.parse(options,arguments,true);
    if (line.hasOption("String_Node_Str")) {
      help(options);
    }
    if (line.hasOption("String_Node_Str")) {
      jobDescription=line.getOptionValue("String_Node_Str");
      argsOptions+=2;
    }
  }
 catch (  ParseException e) {
    Common.errorExit(e,"String_Node_Str" + e.getMessage());
  }
  if (arguments.length != argsOptions + 3) {
    help(options);
  }
  final File paramFile=new File(arguments[argsOptions]);
  final File designFile=new File(arguments[argsOptions + 1]);
  final String hdfsPath=arguments[argsOptions + 2];
  run(paramFile,designFile,hdfsPath,jobDescription);
}
Program: 141358
Project: 141358
Buggy source:
/** 
 * Run Eoulsan in hadoop mode.
 * @param paramFile parameter file
 * @param designFile design file
 * @param hdfsPath path of data on hadoop file system
 * @param jobDescription job description
 */
private void run(final File paramFile,final File designFile,final String hdfsPath,final String jobDescription){
  checkNotNull(paramFile,"String_Node_Str");
  checkNotNull(designFile,"String_Node_Str");
  checkNotNull(hdfsPath,"String_Node_Str");
  try {
    File repackagedJarFile=HadoopJarRepackager.repack();
    LOGGER.info("String_Node_Str");
    final StringBuilder sb=new StringBuilder();
    sb.append(HADOOP_CMD);
    sb.append(repackagedJarFile.getCanonicalPath());
    sb.append("String_Node_Str");
    if (jobDescription != null) {
      sb.append("String_Node_Str");
      sb.append(jobDescription.trim());
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    sb.append(paramFile);
    sb.append("String_Node_Str");
    sb.append(designFile);
    sb.append("String_Node_Str");
    sb.append(hdfsPath);
    ProcessUtils.execThreadOutput(sb.toString());
  }
 catch (  IOException e) {
    Common.errorExit(e,"String_Node_Str" + Globals.APP_NAME_LOWER_CASE + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Run Eoulsan in hadoop mode.
 * @param paramFile parameter file
 * @param designFile design file
 * @param hdfsPath path of data on hadoop file system
 * @param jobDescription job description
 */
private void run(final File paramFile,final File designFile,final String hdfsPath,final String jobDescription){
  checkNotNull(paramFile,"String_Node_Str");
  checkNotNull(designFile,"String_Node_Str");
  checkNotNull(hdfsPath,"String_Node_Str");
  try {
    File repackagedJarFile=HadoopJarRepackager.repack();
    LOGGER.info("String_Node_Str");
    final List<String> argsList=Lists.newArrayList();
    argsList.add("String_Node_Str");
    argsList.add("String_Node_Str");
    argsList.add(repackagedJarFile.getCanonicalPath());
    argsList.add("String_Node_Str");
    if (jobDescription != null) {
      argsList.add("String_Node_Str");
      argsList.add(jobDescription.trim());
    }
    argsList.add("String_Node_Str");
    argsList.add("String_Node_Str");
    argsList.add(paramFile.toString());
    argsList.add(designFile.toString());
    argsList.add(hdfsPath);
    final String[] args=argsList.toArray(new String[0]);
    ProcessUtils.execThreadOutput(args);
  }
 catch (  IOException e) {
    Common.errorExit(e,"String_Node_Str" + Globals.APP_NAME_LOWER_CASE + "String_Node_Str"+ e.getMessage());
  }
}
Program: 141359
Project: 141359
Buggy source:
/** 
 * Execute a command and write the content of the standard output and error to System.out and System.err.
 * @param cmd Command to execute
 * @throws IOException if an error occurs while executing the command
 */
public static void execThreadOutput(final String cmd) throws IOException {
  logger.fine("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cmd);
  final long startTime=System.currentTimeMillis();
  Process p=Runtime.getRuntime().exec(cmd);
  final BufferedReader stdr=new BufferedReader(new InputStreamReader(p.getInputStream()));
  final BufferedReader errr=new BufferedReader(new InputStreamReader(p.getErrorStream()));
  new Thread(new ProcessThreadOutput(stdr,System.out)).run();
  new Thread(new ProcessThreadOutput(errr,System.err)).run();
  logEndTime(p,cmd,startTime);
}

Fixed version (ground truth):
/** 
 * Execute a command and write the content of the standard output and error to System.out and System.err.
 * @param cmd array with the command to execute
 * @throws IOException if an error occurs while executing the command
 */
public static void execThreadOutput(final String[] cmd) throws IOException {
  logger.fine("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cmd);
  final long startTime=System.currentTimeMillis();
  Process p=Runtime.getRuntime().exec(cmd);
  final BufferedReader stdr=new BufferedReader(new InputStreamReader(p.getInputStream()));
  final BufferedReader errr=new BufferedReader(new InputStreamReader(p.getErrorStream()));
  new Thread(new ProcessThreadOutput(stdr,System.out)).run();
  new Thread(new ProcessThreadOutput(errr,System.err)).run();
  logEndTime(p,Joiner.on(' ').join(cmd),startTime);
}
Program: 141360
Project: 141360
Buggy source:
/** 
 * Get an array without the first element of the input array.
 * @param array input array
 * @param elementsToRemove number of the first elements to remove
 * @return an array without the first element of the input array
 */
public static final String[] arrayWithoutFirstsElement(final String[] array,final int elementsToRemove){
  if (array == null)   return null;
  if (elementsToRemove < 1 || elementsToRemove > array.length)   return new String[0];
  final int newLen=array.length - elementsToRemove;
  final String[] result=new String[newLen];
  System.arraycopy(array,1,result,0,newLen);
  return result;
}

Fixed version (ground truth):
/** 
 * Get an array without the first element of the input array.
 * @param array input array
 * @param elementsToRemove number of the first elements to remove
 * @return an array without the first element of the input array
 */
public static final String[] arrayWithoutFirstsElement(final String[] array,final int elementsToRemove){
  if (array == null)   return null;
  if (elementsToRemove < 1 || elementsToRemove > array.length)   return new String[0];
  final int newLen=array.length - elementsToRemove;
  final String[] result=new String[newLen];
  System.arraycopy(array,elementsToRemove,result,0,newLen);
  return result;
}
Program: 141361
Project: 141361
Buggy source:
private DataFormat getGenomeDataFormat(final Sample s) throws EoulsanException {
  if (!s.getMetadata().isGenomeField())   return null;
  final String genomeSource=s.getMetadata().getGenome();
  if (genomeSource == null || "String_Node_Str".equals(genomeSource))   throw new EoulsanException("String_Node_Str" + s.getId() + "String_Node_Str");
  DataFormat readsDF;
  try {
    readsDF=new DataFile(genomeSource).getMetaData().getDataFormat();
    if (readsDF == null)     throw new EoulsanException("String_Node_Str" + s.getSource());
    return readsDF;
  }
 catch (  IOException e) {
    throw new EoulsanException("String_Node_Str" + s.getSource());
  }
}

Fixed version (ground truth):
private DataFormat getGenomeDataFormat(final Sample s) throws EoulsanException {
  if (!s.getMetadata().isGenomeField())   return null;
  final String genomeSource=s.getMetadata().getGenome();
  if (genomeSource == null || "String_Node_Str".equals(genomeSource))   throw new EoulsanException("String_Node_Str" + s.getId() + "String_Node_Str");
  final DataFile genomeFile=new DataFile(genomeSource);
  if (!genomeFile.exists())   return null;
  DataFormat genomeFormat;
  try {
    genomeFormat=genomeFile.getMetaData().getDataFormat();
    if (genomeFormat == null)     throw new EoulsanException("String_Node_Str" + s.getSource());
    return genomeFormat;
  }
 catch (  IOException e) {
    throw new EoulsanException("String_Node_Str" + s.getSource());
  }
}
Program: 141363
Project: 141363
Buggy source:
private DataFormat getAnnotationDataFormat(final Sample s) throws EoulsanException {
  if (!s.getMetadata().isAnnotationField())   return null;
  final String annotationSource=s.getMetadata().getAnnotation();
  if (annotationSource == null || "String_Node_Str".equals(annotationSource))   throw new EoulsanException("String_Node_Str" + s.getId() + "String_Node_Str");
  DataFormat annotDF;
  try {
    annotDF=new DataFile(annotationSource).getMetaData().getDataFormat();
    if (annotDF == null)     throw new EoulsanException("String_Node_Str" + s.getSource());
    return annotDF;
  }
 catch (  IOException e) {
    throw new EoulsanException("String_Node_Str" + s.getSource());
  }
}

Fixed version (ground truth):
private DataFormat getAnnotationDataFormat(final Sample s) throws EoulsanException {
  if (!s.getMetadata().isAnnotationField())   return null;
  final String annotationSource=s.getMetadata().getAnnotation();
  if (annotationSource == null || "String_Node_Str".equals(annotationSource))   throw new EoulsanException("String_Node_Str" + s.getId() + "String_Node_Str");
  final DataFile annotationFile=new DataFile(annotationSource);
  if (!annotationFile.exists()) {
    return null;
  }
  DataFormat annotDF;
  try {
    annotDF=annotationFile.getMetaData().getDataFormat();
    if (annotDF == null)     throw new EoulsanException("String_Node_Str" + s.getSource());
    return annotDF;
  }
 catch (  IOException e) {
    throw new EoulsanException("String_Node_Str" + s.getSource());
  }
}
Program: 141364
Project: 141364
Buggy source:
@Override protected void copy(final Map<DataFile,DataFile> files) throws IOException {
  if (files == null)   throw new NullPointerException("String_Node_Str");
  final Set<DataFile> stdCopyFiles=new HashSet<DataFile>();
  final DataProtocol fileProtocol=DataProtocolService.getInstance().getProtocol("String_Node_Str");
  for (  Map.Entry<DataFile,DataFile> e : files.entrySet()) {
    final DataFile src=e.getKey();
    final DataFile dest=e.getValue();
    if (e.getKey().getProtocol() == fileProtocol) {
      new DataFormatConverter(src,dest).convert();
      stdCopyFiles.add(src);
    }
  }
  for (  DataFile file : stdCopyFiles)   files.remove(file);
  if (files.size() > 0) {
    final Path jobPath=PathUtils.createTempPath(new Path(getDest().getSource()),"String_Node_Str","String_Node_Str",this.conf);
    DataSourceDistCp distCp=new DataSourceDistCp(this.conf,jobPath);
    distCp.copy(files);
  }
}

Fixed version (ground truth):
@Override protected void copy(final Map<DataFile,DataFile> files) throws IOException {
  if (files == null)   throw new NullPointerException("String_Node_Str");
  final Set<DataFile> stdCopyFiles=new HashSet<DataFile>();
  final DataProtocol fileProtocol=DataProtocolService.getInstance().getProtocol("String_Node_Str");
  for (  Map.Entry<DataFile,DataFile> e : files.entrySet()) {
    final DataFile src=e.getKey();
    final DataFile dest=e.getValue();
    if (src == null || dest == null) {
      continue;
    }
    if (e.getKey().getProtocol() == fileProtocol) {
      new DataFormatConverter(src,dest).convert();
      stdCopyFiles.add(src);
    }
  }
  for (  DataFile file : stdCopyFiles)   files.remove(file);
  if (files.size() > 0) {
    final Path jobPath=PathUtils.createTempPath(new Path(getDest().getSource()),"String_Node_Str","String_Node_Str",this.conf);
    DataSourceDistCp distCp=new DataSourceDistCp(this.conf,jobPath);
    distCp.copy(files);
  }
}
Program: 141365
Project: 141365
Buggy source:
@Override protected DataFile getUploadedDataFile(final DataFile file,final int id) throws IOException {
  final DataFile dest=getDest();
  DataFile result=null;
  DataFormat df=file.getMetaData().getDataFormat();
  if (df == DataFormats.READS_FASTQ || df == DataFormats.READS_TFQ)   result=new DataFile(dest,DataFormats.READS_TFQ.getType().getPrefix() + id + DataFormats.READS_TFQ.getDefaultExtention());
  if (df == DataFormats.GENOME_FASTA)   result=new DataFile(dest,DataFormats.GENOME_FASTA.getType().getPrefix() + id + DataFormats.GENOME_FASTA.getDefaultExtention());
  if (df == DataFormats.ANNOTATION_GFF)   result=new DataFile(dest,DataFormats.ANNOTATION_GFF.getType().getPrefix() + id + DataFormats.ANNOTATION_GFF.getDefaultExtention());
  if (result == null)   result=new DataFile(dest,file.getName());
  return result;
}

Fixed version (ground truth):
@Override protected DataFile getUploadedDataFile(final DataFile file,final int id) throws IOException {
  if (file == null || !file.exists())   return null;
  final DataFile dest=getDest();
  DataFile result=null;
  DataFormat df=file.getMetaData().getDataFormat();
  if (df == DataFormats.READS_FASTQ || df == DataFormats.READS_TFQ)   result=new DataFile(dest,DataFormats.READS_TFQ.getType().getPrefix() + id + DataFormats.READS_TFQ.getDefaultExtention());
  if (df == DataFormats.GENOME_FASTA)   result=new DataFile(dest,DataFormats.GENOME_FASTA.getType().getPrefix() + id + DataFormats.GENOME_FASTA.getDefaultExtention());
  if (df == DataFormats.ANNOTATION_GFF)   result=new DataFile(dest,DataFormats.ANNOTATION_GFF.getType().getPrefix() + id + DataFormats.ANNOTATION_GFF.getDefaultExtention());
  if (result == null)   result=new DataFile(dest,file.getName());
  return result;
}
Program: 141366
Project: 141366
Buggy source:
@Override protected void copy(final Map<DataFile,DataFile> files) throws IOException {
  if (files == null)   throw new NullPointerException("String_Node_Str");
  for (  Map.Entry<DataFile,DataFile> e : files.entrySet()) {
    LOGGER.info("String_Node_Str" + e.getKey() + "String_Node_Str"+ e.getValue());
    new DataFormatConverter(e.getKey(),e.getValue()).convert();
  }
}

Fixed version (ground truth):
@Override protected void copy(final Map<DataFile,DataFile> files) throws IOException {
  if (files == null)   throw new NullPointerException("String_Node_Str");
  for (  Map.Entry<DataFile,DataFile> e : files.entrySet()) {
    final DataFile src=e.getKey();
    final DataFile dest=e.getValue();
    if (src == null || dest == null) {
      continue;
    }
    LOGGER.info("String_Node_Str" + src + "String_Node_Str"+ dest);
    new DataFormatConverter(src,dest).convert();
  }
}
Program: 141367
Project: 141367
Buggy source:
@Override protected DataFile getUploadedDataFile(final DataFile file,final int id) throws IOException {
  return new DataFile(getDest(),file.getName());
}

Fixed version (ground truth):
@Override protected DataFile getUploadedDataFile(final DataFile file,final int id) throws IOException {
  final String filename;
  if (file.getName().endsWith("String_Node_Str") || file.getName().endsWith("String_Node_Str") || file.getName().endsWith("String_Node_Str")|| file.getName().endsWith("String_Node_Str"))   filename=file.getName();
 else   filename=CompressionType.removeCompressionExtension(file.getName()) + CompressionType.BZIP2.getExtension();
  return new DataFile(getDest(),filename);
}