nus-yam/ex-repair huggingface dataset:
Program: 130205
Project: 130205
Buggy source:
public void watchRunning(final Runnable r){
  final Thread thread=new Thread(){
    @Override public void run(){
      while (true) {
        try {
          WatchKey key=watcher.take();
          Path dir=keys.get(key);
          for (          WatchEvent<?> event : key.pollEvents()) {
            WatchEvent<Path> ev=cast(event);
            Path child=dir.resolve(ev.context());
            r.run();
            if (event.kind() == ENTRY_CREATE) {
              if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
                registerAll(child);
              }
            }
          }
          boolean valid=key.reset();
          if (!valid) {
            keys.remove(key);
            if (keys.isEmpty()) {
              break;
            }
          }
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
  }
;
  thread.start();
}

Fixed version (ground truth):
public void watchRunning(final Runnable r){
  final Thread thread=new Thread(){
    @Override public void run(){
      while (true) {
        try {
          WatchKey key=watcher.take();
          Path dir=keys.get(key);
          for (          WatchEvent<?> event : key.pollEvents()) {
            WatchEvent<Path> ev=cast(event);
            Path child=dir.resolve(ev.context());
            if (child.toFile().isFile()) {
              LOGGER.info("String_Node_Str");
              try {
                r.run();
              }
 catch (              Exception e) {
                LOGGER.error("String_Node_Str",e);
              }
              if (event.kind() == ENTRY_CREATE) {
                if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
                  registerAll(child);
                }
              }
            }
            boolean valid=key.reset();
            if (!valid) {
              keys.remove(key);
              if (keys.isEmpty()) {
                break;
              }
            }
          }
        }
 catch (        Exception ignored) {
        }
      }
    }
  }
;
  thread.start();
}
Program: 130206
Project: 130206
Buggy source:
NestedProperty(){
  super(ACCESSOR,PROPERTY_KEY);
}

Fixed version (ground truth):
NestedProperty(){
  super(ACCESSOR,ID);
}
Program: 130207
Project: 130207
Buggy source:
@Test public void nestedProperties(){
  TokenStream tokenStream=new TokenStream(Wave(),PropertyKey("String_Node_Str"),Accessor(),PropertyKey("String_Node_Str"),Wave());
  assertNotNull(NonTerminal.EVALUATION.buildAbstractSyntaxTree(tokenStream));
}

Fixed version (ground truth):
@Test public void nestedProperties(){
  TokenStream tokenStream=new TokenStream(Wave(),PropertyKey("String_Node_Str"),Accessor(),PropertyKey("String_Node_Str"),Accessor(),PropertyKey("String_Node_Str"),Wave());
  assertNotNull(NonTerminal.EVALUATION.buildAbstractSyntaxTree(tokenStream));
}
Program: 130208
Project: 130208
Buggy source:
@Override public void run(){
  try {
    while (true) {
      WatchKey key=watcher.take();
      Path dir=keys.get(key);
      for (      WatchEvent<?> event : key.pollEvents()) {
        WatchEvent<Path> ev=cast(event);
        Path child=dir.resolve(ev.context());
        r.run();
        if (event.kind() == ENTRY_CREATE) {
          if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
            registerAll(child);
          }
        }
      }
      boolean valid=key.reset();
      if (!valid) {
        keys.remove(key);
        if (keys.isEmpty()) {
          break;
        }
      }
    }
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  while (true) {
    try {
      WatchKey key=watcher.take();
      Path dir=keys.get(key);
      for (      WatchEvent<?> event : key.pollEvents()) {
        WatchEvent<Path> ev=cast(event);
        Path child=dir.resolve(ev.context());
        LOGGER.info(event.kind().name());
        r.run();
        if (event.kind() == ENTRY_CREATE) {
          if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
            registerAll(child);
          }
        }
      }
      boolean valid=key.reset();
      if (!valid) {
        keys.remove(key);
        if (keys.isEmpty()) {
          break;
        }
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 130209
Project: 130209
Buggy source:
public void watchRunning(final Runnable r){
  final Thread thread=new Thread(){
    @Override public void run(){
      try {
        while (true) {
          WatchKey key=watcher.take();
          Path dir=keys.get(key);
          for (          WatchEvent<?> event : key.pollEvents()) {
            WatchEvent<Path> ev=cast(event);
            Path child=dir.resolve(ev.context());
            r.run();
            if (event.kind() == ENTRY_CREATE) {
              if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
                registerAll(child);
              }
            }
          }
          boolean valid=key.reset();
          if (!valid) {
            keys.remove(key);
            if (keys.isEmpty()) {
              break;
            }
          }
        }
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
;
  thread.start();
}

Fixed version (ground truth):
public void watchRunning(final Runnable r){
  final Thread thread=new Thread(){
    @Override public void run(){
      while (true) {
        try {
          WatchKey key=watcher.take();
          Path dir=keys.get(key);
          for (          WatchEvent<?> event : key.pollEvents()) {
            WatchEvent<Path> ev=cast(event);
            Path child=dir.resolve(ev.context());
            LOGGER.info(event.kind().name());
            r.run();
            if (event.kind() == ENTRY_CREATE) {
              if (Files.isDirectory(child,NOFOLLOW_LINKS)) {
                registerAll(child);
              }
            }
          }
          boolean valid=key.reset();
          if (!valid) {
            keys.remove(key);
            if (keys.isEmpty()) {
              break;
            }
          }
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
  }
;
  thread.start();
}
Program: 130211
Project: 130211
Buggy source:
private String getAbsoluteConfDirPath(String dir,YamlConfig config){
  String result=null, response=null;
  if (dir == null || dir.trim().isEmpty() || !dir.contains("String_Node_Str")) {
    throw new IllegalArgumentException(error_message);
  }
  response=RemotingUtil.executeCommand(config,LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART);
  if (response != null && !response.isEmpty() && response.indexOf("String_Node_Str") != -1) {
    result=response.substring((response.indexOf("String_Node_Str") + 1),response.length());
    result=result.endsWith(File.separator) ? result : result.trim() + File.separator;
  }
  LOGGER.debug("String_Node_Str" + result);
  if (result != null) {
    String recursiveResponse=getAbsoluteConfDirPath(result,config);
    if (recursiveResponse != null) {
      result=recursiveResponse;
    }
  }
  return result;
}

Fixed version (ground truth):
private String getAbsoluteConfDirPath(String dir,YamlConfig config){
  String result=null, response=null;
  if (dir == null || dir.trim().isEmpty() || !dir.contains("String_Node_Str")) {
    throw new IllegalArgumentException(error_message);
  }
  response=RemotingUtil.executeCommand(config,LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART);
  int responseIndex=response.indexOf("String_Node_Str");
  if (response != null && !response.isEmpty() && responseIndex != -1) {
    result=response.substring((responseIndex + 1),response.length());
    result=result.endsWith(File.separator) ? result : result.trim() + File.separator;
  }
  LOGGER.debug("String_Node_Str" + result);
  if (result != null) {
    String recursiveResponse=getAbsoluteConfDirPath(result,config);
    if (recursiveResponse != null) {
      result=recursiveResponse;
    }
  }
  return result;
}
Program: 130212
Project: 130212
Buggy source:
/** 
 * This method is responsible for populating the clean up phase details.
 * @return TaskOutputDetails contains the details of the clean up phase.
 */
private PhaseDetails prepareCleanupDetails(JobInfo jobInfo,Map<TaskAttemptID,TaskAttemptInfo> tasks){
  PhaseDetails phaseDetails=new PhaseDetails();
  List<TaskOutputDetails> cleanupTaskOuptputDetails=new ArrayList<TaskOutputDetails>();
  TaskOutputDetails taskOutputDetails=new TaskOutputDetails();
  taskOutputDetails.setTaskType("String_Node_Str");
  taskOutputDetails.setTaskID("String_Node_Str");
  for (  Map.Entry<TaskAttemptID,TaskAttemptInfo> task : tasks.entrySet()) {
    TaskAttemptInfo taskAttemptInfo=(TaskAttemptInfo)(task.getValue());
    taskOutputDetails.setLocation(taskAttemptInfo.getHostname());
  }
  long startPoint=getMaxReduceTime(tasks,jobInfo.getSubmitTime());
  taskOutputDetails.setStartPoint(startPoint);
  LOGGER.info("String_Node_Str" + taskOutputDetails.getStartPoint());
  long endPoint=(jobInfo.getFinishTime() - jobInfo.getSubmitTime()) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setEndPoint(endPoint);
  LOGGER.info("String_Node_Str" + taskOutputDetails.getEndPoint());
  taskOutputDetails.setDataFlowRate(0);
  cleanupTaskOuptputDetails.add(taskOutputDetails);
  phaseDetails.setTaskOutputDetails(cleanupTaskOuptputDetails);
  phaseDetails.setAvgDataFlowRate(0);
  return phaseDetails;
}

Fixed version (ground truth):
/** 
 * This method is responsible for populating the clean up phase details.
 * @return TaskOutputDetails contains the details of the clean up phase.
 */
private PhaseDetails prepareCleanupDetails(JobInfo jobInfo,Map<TaskAttemptID,TaskAttemptInfo> tasks){
  PhaseDetails phaseDetails=new PhaseDetails();
  List<TaskOutputDetails> cleanupTaskOuptputDetails=new ArrayList<TaskOutputDetails>();
  TaskOutputDetails taskOutputDetails=new TaskOutputDetails();
  taskOutputDetails.setTaskType("String_Node_Str");
  taskOutputDetails.setTaskID("String_Node_Str");
  for (  Map.Entry<TaskAttemptID,TaskAttemptInfo> task : tasks.entrySet()) {
    TaskAttemptInfo taskAttemptInfo=(TaskAttemptInfo)(task.getValue());
    taskOutputDetails.setLocation(taskAttemptInfo.getHostname());
  }
  long startPoint=getMaxReduceTime(tasks,jobInfo.getSubmitTime());
  taskOutputDetails.setStartPoint(startPoint);
  long endPoint=(jobInfo.getFinishTime() - jobInfo.getSubmitTime()) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setEndPoint(endPoint);
  taskOutputDetails.setDataFlowRate(0);
  cleanupTaskOuptputDetails.add(taskOutputDetails);
  phaseDetails.setTaskOutputDetails(cleanupTaskOuptputDetails);
  phaseDetails.setAvgDataFlowRate(0);
  return phaseDetails;
}
Program: 130218
Project: 130218
Buggy source:
/** 
 * Gets the job client.
 * @param loader the loader
 * @return the job client
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static JobClient getJobClient(Loader loader) throws IOException {
  String jobTrackerURI=RemotingUtil.getHadoopConfigurationValue(loader,"String_Node_Str","String_Node_Str");
  JobClient client=null;
  Configuration config=new Configuration();
  YamlLoader yamlLoader=(YamlLoader)loader;
  YamlConfig yamlConfig=(YamlConfig)yamlLoader.getYamlConfiguration();
  config.set(yamlConfig.getMaster().getUser(),"String_Node_Str");
  if (Enable.TRUE.equals(yamlConfig.getEnableYarn())) {
    config.set("String_Node_Str","String_Node_Str");
  }
  try {
    if (StringUtil.emptyOrNull(jobTrackerURI)) {
      client=new JobClient(new InetSocketAddress("String_Node_Str",8032),config);
    }
 else {
      client=new JobClient(new InetSocketAddress(jobTrackerURI.split("String_Node_Str")[0],Integer.parseInt(jobTrackerURI.split("String_Node_Str")[1])),config);
    }
  }
 catch (  Exception e) {
    LOGGER.error(e);
  }
  return client;
}

Fixed version (ground truth):
/** 
 * Gets the job client.
 * @param loader the loader
 * @return the job client
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static JobClient getJobClient(Loader loader) throws IOException {
  String jobTrackerURI=RemotingUtil.getHadoopConfigurationValue(loader,"String_Node_Str","String_Node_Str");
  JobClient client=null;
  Configuration config=new Configuration();
  YamlLoader yamlLoader=(YamlLoader)loader;
  YamlConfig yamlConfig=(YamlConfig)yamlLoader.getYamlConfiguration();
  config.set(yamlConfig.getMaster().getUser(),"String_Node_Str");
  if (Enable.TRUE.equals(yamlConfig.getEnableYarn())) {
    config.set("String_Node_Str","String_Node_Str");
  }
  try {
    if (StringUtil.emptyOrNull(jobTrackerURI)) {
      LOGGER.debug("String_Node_Str");
      client=new JobClient(new InetSocketAddress("String_Node_Str",8032),config);
    }
 else {
      client=new JobClient(new InetSocketAddress(jobTrackerURI.split("String_Node_Str")[0],Integer.parseInt(jobTrackerURI.split("String_Node_Str")[1])),config);
    }
  }
 catch (  Exception e) {
    LOGGER.error(e);
  }
  return client;
}
Program: 130219
Project: 130219
Buggy source:
/** 
 * * This method retrieves out a Hadoop configuration parameters value. User has to specify appropriate Hadoop configuration file and configuration name. This method assumes that given configuration file is present in HADOOP_HOME/conf directory.
 * @param loader the loader
 * @param hadoopConfigurationFile configuration file in Hadoop configuration directory
 * @param configurationToGet Hadoop configuration parameter.
 * @return configuration value.
 */
public static String getHadoopConfigurationValue(Loader loader,String hadoopConfigurationFile,String configurationToGet){
  String destinationReceiveDir=copyAndGetHadoopConfigurationFilePath(loader,hadoopConfigurationFile);
  return parseConfiguration(destinationReceiveDir + "String_Node_Str" + hadoopConfigurationFile,configurationToGet);
}

Fixed version (ground truth):
/** 
 * * This method retrieves out a Hadoop configuration parameters value. User has to specify appropriate Hadoop configuration file and configuration name. This method assumes that given configuration file is present in HADOOP_HOME/conf directory.
 * @param loader the loader
 * @param hadoopConfigurationFile configuration file in Hadoop configuration directory
 * @param configurationToGet Hadoop configuration parameter.
 * @return configuration value.
 */
public static String getHadoopConfigurationValue(Loader loader,String hadoopConfigurationFile,String configurationToGet){
  String hadoopConfDir=RemotingUtil.getHadoopConfigurationDirPath(loader);
  String destinationReceiveDir=copyAndGetConfigurationFilePath(loader,hadoopConfDir,hadoopConfigurationFile);
  return parseConfiguration(destinationReceiveDir + "String_Node_Str" + hadoopConfigurationFile,configurationToGet);
}
Program: 130221
Project: 130221
Buggy source:
/** 
 * Check mr job field.
 * @param config object of yamlConfig class
 * @param failedCasesList error list
 */
protected void checkMrJobField(Config config){
  Map<String,String> failedCases=new HashMap<String,String>();
  Map<String,String> suggetion=new HashMap<String,String>();
  YamlConfig yamlConfig=(YamlConfig)config;
  if (isEnable(yamlConfig.getEnableStaticJobProfiling()) || yamlConfig.getDebugAnalysis().getEnumValue()) {
    checkNullEmptyAndMessage(failedCases,yamlConfig.getInputFile(),ErrorMessages.BASIC_INPUT_PATH_EMPTY,"String_Node_Str");
    validateJobs(config,failedCases,suggetion);
  }
  addToValidationList(Constants.JOBS_VALIDATION,failedCases,suggetion);
}

Fixed version (ground truth):
/** 
 * Check mr job field.
 * @param config object of yamlConfig class
 * @param failedCasesList error list
 */
protected void checkMrJobField(Config config){
  Map<String,String> failedCases=new HashMap<String,String>();
  Map<String,String> suggetion=new HashMap<String,String>();
  YamlConfig yamlConfig=(YamlConfig)config;
  if (!isEnable(yamlConfig.getEnableStaticJobProfiling()) || yamlConfig.getDebugAnalysis().getEnumValue()) {
    checkNullEmptyAndMessage(failedCases,yamlConfig.getInputFile(),ErrorMessages.BASIC_INPUT_PATH_EMPTY,"String_Node_Str");
    validateJobs(config,failedCases,suggetion);
  }
  addToValidationList(Constants.JOBS_VALIDATION,failedCases,suggetion);
}
Program: 130222
Project: 130222
Buggy source:
/** 
 * This method checks whether the jar location given corresponds to a valid jar file or not.
 * @param yamlConfig
 */
public void validateJarPath(YamlConfig yamlConfig){
  if (isEnable(yamlConfig.getDebugAnalysis()) || (isEnable(yamlConfig.getEnableStaticJobProfiling()) && isEnable(yamlConfig.getRunJobFromJumbune()))) {
    String inputFile=yamlConfig.getInputFile();
    Map<String,String> failedCases=new HashMap<String,String>();
    boolean isLocalSystemJar=isEnable(yamlConfig.getIsLocalSystemJar());
    if (inputFile != null) {
      boolean endsWithJar=inputFile.trim().endsWith("String_Node_Str");
      if ((((!endsWithJar || !new File(inputFile).exists()) && (!isLocalSystemJar)) || (isLocalSystemJar && !endsWithJar))) {
        failedCases.put(inputFile,errorMessages.get(ErrorMessages.SUPPLIED_JAR_INVALID));
        failedValidation.put("String_Node_Str",failedCases);
      }
    }
 else {
      failedCases.put(inputFile,errorMessages.get(ErrorMessages.SUPPLIED_JAR_INVALID));
      failedValidation.put("String_Node_Str",failedCases);
    }
  }
}

Fixed version (ground truth):
/** 
 * This method checks whether the jar location given corresponds to a valid jar file or not.
 * @param yamlConfig
 */
public void validateJarPath(YamlConfig yamlConfig){
  if (isEnable(yamlConfig.getDebugAnalysis()) || (isEnable(yamlConfig.getEnableStaticJobProfiling()) && isEnable(yamlConfig.getRunJobFromJumbune()))) {
    String inputFile=yamlConfig.getInputFile();
    Map<String,String> failedCases=new HashMap<String,String>();
    boolean isLocalSystemJar=isEnable(yamlConfig.getIsLocalSystemJar());
    if (inputFile != null) {
      boolean endsWithJar=inputFile.trim().endsWith("String_Node_Str");
      if ((((!endsWithJar || !new File(inputFile).exists()) && (!isLocalSystemJar)) || (isLocalSystemJar && !endsWithJar))) {
        failedCases.put(inputFile,errorMessages.get(ErrorMessages.SUPPLIED_JAR_INVALID));
        failedValidation.put("String_Node_Str",failedCases);
      }
    }
 else {
      failedCases.put(inputFile,errorMessages.get(ErrorMessages.BASIC_INPUT_PATH_EMPTY));
      failedValidation.put("String_Node_Str",failedCases);
    }
  }
}
Program: 130223
Project: 130223
Buggy source:
@Override public String getHadoopConfDirPath(YamlConfig config){
  StringBuilder responseAppender=new StringBuilder();
  String response=RemotingUtil.executeCommand(config,ECHO_HADOOP_CONF_DIR);
  LOGGER.info("String_Node_Str" + response);
  if (response != null || !response.isEmpty()) {
    return response;
  }
  responseAppender=responseAppender.append(getHadoopHomeDirPath(config)).append(File.separator).append(CONF_DIR);
  return responseAppender.toString();
}

Fixed version (ground truth):
@Override public String getHadoopConfDirPath(YamlConfig config){
  StringBuilder responseAppender=new StringBuilder();
  String response=RemotingUtil.executeCommand(config,ECHO_HADOOP_CONF_DIR);
  LOGGER.info("String_Node_Str" + response);
  if (response != null && !response.trim().isEmpty()) {
    return response;
  }
  responseAppender=responseAppender.append(getHadoopHomeDirPath(config)).append(File.separator).append(CONF_DIR);
  return responseAppender.toString();
}
Program: 130224
Project: 130224
Buggy source:
@Override public String getHadoopConfDirPath(YamlConfig config){
  String possibleDirList=RemotingUtil.executeCommand(config,WHEREIS_HADOOP);
  checkEmptyDir(possibleDirList);
  String[] splittedDirList=possibleDirList.split("String_Node_Str");
  String absoluteDirPath=null;
  for (int index=1; index < splittedDirList.length; index++) {
    absoluteDirPath=getAbsoluteConfDirPath(splittedDirList[index],config);
    if (absoluteDirPath != null && !absoluteDirPath.isEmpty()) {
      break;
    }
  }
  absoluteDirPath=absoluteDirPath.trim();
  checkEmptyDir(absoluteDirPath);
  return absoluteDirPath;
}

Fixed version (ground truth):
@Override public String getHadoopConfDirPath(YamlConfig config){
  String absoluteDirPath=null;
  absoluteDirPath=getAbsoluteConfDirPath(expectedConf,config);
  if (absoluteDirPath == null || absoluteDirPath.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str" + expectedConf);
  }
  LOGGER.debug("String_Node_Str" + absoluteDirPath);
  absoluteDirPath=absoluteDirPath.trim();
  checkEmptyDir(absoluteDirPath);
  return absoluteDirPath;
}
Program: 130225
Project: 130225
Buggy source:
private String getAbsoluteConfDirPath(String dir,YamlConfig config){
  String result=null, response=null;
  if (dir == null || dir.trim().isEmpty() || !dir.contains("String_Node_Str")) {
    throw new IllegalArgumentException(error_message);
  }
  response=RemotingUtil.executeCommand(config,LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART);
  if (response != null || !response.isEmpty()) {
    result=response.substring((response.indexOf("String_Node_Str") + 1),response.length());
  }
  result=result.endsWith(File.separator) ? result : result.trim() + File.separator;
  return result;
}

Fixed version (ground truth):
private String getAbsoluteConfDirPath(String dir,YamlConfig config){
  String result=null, response=null;
  if (dir == null || dir.trim().isEmpty() || !dir.contains("String_Node_Str")) {
    throw new IllegalArgumentException(error_message);
  }
  response=RemotingUtil.executeCommand(config,LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART);
  if (response != null && !response.isEmpty() && response.indexOf("String_Node_Str") != -1) {
    result=response.substring((response.indexOf("String_Node_Str") + 1),response.length());
    result=result.endsWith(File.separator) ? result : result.trim() + File.separator;
  }
  LOGGER.debug("String_Node_Str" + result);
  if (result != null) {
    String recursiveResponse=getAbsoluteConfDirPath(result,config);
    if (recursiveResponse != null) {
      result=recursiveResponse;
    }
  }
  return result;
}
Program: 130226
Project: 130226
Buggy source:
private void checkEmptyDir(String possibleDirList){
  if (possibleDirList == null || possibleDirList.isEmpty()) {
    throw new IllegalArgumentException(error_message);
  }
}

Fixed version (ground truth):
private boolean checkEmptyDir(String possibleDirList){
  if (possibleDirList == null || possibleDirList.isEmpty()) {
    return true;
  }
  return false;
}
Program: 130227
Project: 130227
Buggy source:
/** 
 * Gets the job counter beans.
 * @return the job counter beans
 */
public static List<JobCounterBean> getJobCounterBeans(){
  return jobCounterBeans;
}

Fixed version (ground truth):
/** 
 * Gets the job counter beans.
 * @return the job counter beans
 */
public List<JobCounterBean> getJobCounterBeans(){
  return jobCounterBeans;
}
Program: 130228
Project: 130228
Buggy source:
/** 
 * Fetch cluster configuration properties.
 * @param loader the loader
 * @return the string
 */
private static String fetchClusterConfigurationProperties(Loader loader){
  YamlLoader yamlLoader=(YamlLoader)loader;
  String expectedLocation=new StringBuilder().append(YamlLoader.getjHome()).append(File.separator).append(Constants.JOB_JARS_LOC).append(yamlLoader.getJumbuneJobName()).append("String_Node_Str").toString();
  File file=new File(expectedLocation);
  if (!file.exists() || file.isDirectory()) {
    Master master=yamlLoader.getMasterInfo();
    Remoter remoter=new Remoter(master.getHost(),Integer.valueOf(master.getAgentPort()));
    String relativePath=File.separator + Constants.JOB_JARS_LOC + yamlLoader.getJumbuneJobName();
    remoter.receiveLogFiles(relativePath,"String_Node_Str");
  }
  return expectedLocation;
}

Fixed version (ground truth):
/** 
 * Fetch cluster configuration properties.
 * @param loader the loader
 * @return the string
 */
private String fetchClusterConfigurationProperties(Loader loader){
  YamlLoader yamlLoader=(YamlLoader)loader;
  String expectedLocation=new StringBuilder().append(YamlLoader.getjHome()).append(File.separator).append(Constants.JOB_JARS_LOC).append(yamlLoader.getJumbuneJobName()).append("String_Node_Str").toString();
  File file=new File(expectedLocation);
  if (!file.exists() || file.isDirectory()) {
    Master master=yamlLoader.getMasterInfo();
    Remoter remoter=new Remoter(master.getHost(),Integer.valueOf(master.getAgentPort()));
    String relativePath=File.separator + Constants.JOB_JARS_LOC + yamlLoader.getJumbuneJobName();
    remoter.receiveLogFiles(relativePath,"String_Node_Str");
  }
  return expectedLocation;
}
Program: 130229
Project: 130229
Buggy source:
/** 
 * Process exception condition.
 * @param processName the process name
 * @param map the map
 * @param reader the reader
 * @param jobName the job name
 * @param line the line
 * @throws IOException Signals that an I/O exception has occurred.
 */
private static void processExceptionCondition(String processName,Map<String,String> map,BufferedReader reader,String jobName,String line) throws IOException {
  LOGGER.error("String_Node_Str" + line);
  map.put(ERRORANDEXCEPTION,line);
  while (true) {
    String lineTmp=line;
    lineTmp=reader.readLine();
    if (lineTmp == null) {
      break;
    }
    LOGGER.error(lineTmp);
  }
  JobCounterBean jobCounterBean=new JobCounterBean();
  jobCounterBean.setProcessName(processName);
  jobCounterBean.setJobName(jobName);
  jobCounterBean.setJobStatsMap(map);
  jobCounterBeans.add(jobCounterBean);
}

Fixed version (ground truth):
/** 
 * Process exception condition.
 * @param processName the process name
 * @param map the map
 * @param reader the reader
 * @param jobName the job name
 * @param line the line
 * @throws IOException Signals that an I/O exception has occurred.
 */
private void processExceptionCondition(String processName,Map<String,String> map,BufferedReader reader,String jobName,String line) throws IOException {
  LOGGER.error("String_Node_Str" + line);
  map.put(ERRORANDEXCEPTION,line);
  while (true) {
    String lineTmp=line;
    lineTmp=reader.readLine();
    if (lineTmp == null) {
      break;
    }
    LOGGER.error(lineTmp);
  }
  JobCounterBean jobCounterBean=new JobCounterBean();
  jobCounterBean.setProcessName(processName);
  jobCounterBean.setJobName(jobName);
  jobCounterBean.setJobStatsMap(map);
  jobCounterBeans.add(jobCounterBean);
}
Program: 130233
Project: 130233
Buggy source:
/** 
 * <p> </p>
 * @param bean Job process bean
 * @param jobCounterMap Existing map
 * @param yamlLoader
 * @param isDebugged
 * @throws IOException
 */
private void populateJobCounterMap(JobProcessBean bean,Map<String,Map<String,String>> jobCounterMap,Loader loader,Boolean isDebugged) throws IOException {
  if (isYarnJob) {
    jobCounterMap.putAll(getRemoteYarnJobCounters(bean.getJobName(),bean.getProcessResponse(),loader,isDebugged));
  }
 else {
    jobCounterMap.putAll(getRemoteJobCounters(bean.getJobName(),bean.getProcessResponse(),loader,isDebugged));
  }
  HadoopJobCounters.setJobCounterBeans(bean.getJobName(),bean.getProcessResponse(),loader);
}

Fixed version (ground truth):
/** 
 * <p> </p>
 * @param bean Job process bean
 * @param jobCounterMap Existing map
 * @param yamlLoader
 * @param isDebugged
 * @throws IOException
 */
private void populateJobCounterMap(JobProcessBean bean,Map<String,Map<String,String>> jobCounterMap,Loader loader,Boolean isDebugged) throws IOException {
  if (isYarnJob) {
    jobCounterMap.putAll(getRemoteYarnJobCounters(bean.getJobName(),bean.getProcessResponse(),loader,isDebugged));
  }
 else {
    jobCounterMap.putAll(getRemoteJobCounters(bean.getJobName(),bean.getProcessResponse(),loader,isDebugged));
  }
  hadoopJobCounters=new HadoopJobCounters();
  hadoopJobCounters.setJobCounterBeans(bean.getJobName(),bean.getProcessResponse(),loader);
}
Program: 130235
Project: 130235
Buggy source:
/** 
 * Gets the job client.
 * @param loader the loader
 * @return the job client
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static JobClient getJobClient(Loader loader) throws IOException {
  String jobTrackerURI=RemotingUtil.getHadoopConfigurationValue(loader,"String_Node_Str","String_Node_Str");
  JobClient client=null;
  Configuration config=new Configuration();
  YamlLoader yamlLoader=(YamlLoader)loader;
  YamlConfig yamlConfig=(YamlConfig)yamlLoader.getYamlConfiguration();
  config.set(yamlConfig.getMaster().getUser(),"String_Node_Str");
  if (Enable.TRUE.equals(yamlConfig.getEnableYarn())) {
    config.set(MRConfig.FRAMEWORK_NAME,MRConfig.YARN_FRAMEWORK_NAME);
  }
  try {
    if (StringUtil.emptyOrNull(jobTrackerURI)) {
      client=new JobClient(new InetSocketAddress("String_Node_Str",8032),config);
    }
 else {
      client=new JobClient(new InetSocketAddress(jobTrackerURI.split("String_Node_Str")[0],Integer.parseInt(jobTrackerURI.split("String_Node_Str")[1])),config);
    }
  }
 catch (  Exception e) {
    LOGGER.error(e);
  }
  return client;
}

Fixed version (ground truth):
/** 
 * Gets the job client.
 * @param loader the loader
 * @return the job client
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static JobClient getJobClient(Loader loader) throws IOException {
  String jobTrackerURI=RemotingUtil.getHadoopConfigurationValue(loader,"String_Node_Str","String_Node_Str");
  JobClient client=null;
  Configuration config=new Configuration();
  YamlLoader yamlLoader=(YamlLoader)loader;
  YamlConfig yamlConfig=(YamlConfig)yamlLoader.getYamlConfiguration();
  config.set(yamlConfig.getMaster().getUser(),"String_Node_Str");
  if (Enable.TRUE.equals(yamlConfig.getEnableYarn())) {
    config.set("String_Node_Str","String_Node_Str");
  }
  try {
    if (StringUtil.emptyOrNull(jobTrackerURI)) {
      client=new JobClient(new InetSocketAddress("String_Node_Str",8032),config);
    }
 else {
      client=new JobClient(new InetSocketAddress(jobTrackerURI.split("String_Node_Str")[0],Integer.parseInt(jobTrackerURI.split("String_Node_Str")[1])),config);
    }
  }
 catch (  Exception e) {
    LOGGER.error(e);
  }
  return client;
}
Program: 130236
Project: 130236
Buggy source:
/** 
 * * create object of ErrorMessageLoader class if it is not instantiated otherwise returns already used object this method load message file as an input stream.
 * @return single instance of ErrorMessageLoader
 */
public static ErrorMessageLoader getInstance(){
  if (instance == null) {
    final String messageFileName=INPUT_VALIDATION_MESSAGE_FILE;
    final InputStream msgStream=ErrorMessageLoader.class.getClassLoader().getResourceAsStream(messageFileName);
    try {
      instance=new ErrorMessageLoader(msgStream);
    }
 catch (    JumbuneException e) {
      LOGGER.error(e);
    }
 finally {
      try {
        if (msgStream != null) {
          msgStream.close();
        }
      }
 catch (      IOException e) {
        LOGGER.error(e.getMessage());
      }
    }
  }
  return instance;
}

Fixed version (ground truth):
/** 
 * * create object of ErrorMessageLoader class if it is not instantiated otherwise returns already used object this method load message file as an input stream.
 * @return single instance of ErrorMessageLoader
 */
public static ErrorMessageLoader getInstance(){
  if (instance == null) {
    final String messageFileName=inputValidationMessageFile;
    final InputStream msgStream=ErrorMessageLoader.class.getClassLoader().getResourceAsStream(messageFileName);
    try {
      instance=new ErrorMessageLoader(msgStream);
    }
 catch (    JumbuneException e) {
      LOGGER.error(e);
    }
 finally {
      try {
        if (msgStream != null) {
          msgStream.close();
        }
      }
 catch (      IOException e) {
        LOGGER.error(e.getMessage());
      }
    }
  }
  return instance;
}
Program: 130237
Project: 130237
Buggy source:
/** 
 * Checks if is atleast one module enabled.
 * @param config the config
 * @return true, if is atleast one module enabled
 */
private boolean isAtleastOneModuleEnabled(Config config){
  boolean result=false;
  YamlConfig yamlConfig=(YamlConfig)config;
  boolean isProfiling=isProfilingModuleEnabled(config);
  if (isEnable(yamlConfig.getEnableDataValidation()) || isEnable(yamlConfig.getHadoopJobProfile()) || isEnable(yamlConfig.getDebugAnalysis())|| isProfiling) {
    result=true;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Checks if is atleast one module enabled.
 * @param config the config
 * @return true, if is atleast one module enabled
 */
protected boolean isAtleastOneModuleEnabled(Config config){
  boolean result=false;
  YamlConfig yamlConfig=(YamlConfig)config;
  boolean isProfiling=isProfilingModuleEnabled(config);
  if (isEnable(yamlConfig.getEnableDataValidation()) || isEnable(yamlConfig.getHadoopJobProfile()) || isEnable(yamlConfig.getDebugAnalysis())|| isProfiling) {
    result=true;
  }
  return result;
}
Program: 130238
Project: 130238
Buggy source:
/** 
 * Checks if  profiling module enabled.
 * @param config the config
 * @return true, if profiling module is enabled
 */
private boolean isProfilingModuleEnabled(Config config){
  boolean result=false;
  YamlConfig yamlConfig=(YamlConfig)config;
  if (isEnable(yamlConfig.getEnableStaticJobProfiling())) {
    result=true;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Checks if  profiling module enabled.
 * @param config the config
 * @return true, if profiling module is enabled
 */
protected boolean isProfilingModuleEnabled(Config config){
  boolean result=false;
  YamlConfig yamlConfig=(YamlConfig)config;
  if (isEnable(yamlConfig.getEnableStaticJobProfiling())) {
    result=true;
  }
  return result;
}
Program: 130239
Project: 130239
Buggy source:
/** 
 * Generate the list of files and make them into DataValidationFileSplit.
 * @param job the job
 * @return the splits
 * @throws IOException Signals that an I/O exception has occurred.
 */
@Override public List<InputSplit> getSplits(JobContext job) throws IOException {
  long minSize=Math.max(getFormatMinSplitSize(),getMinSplitSize(job));
  long maxSize=getMaxSplitSize(job);
  List<InputSplit> splits=new ArrayList<InputSplit>();
  for (  FileStatus file : listStatus(job)) {
    generateSplits(job,minSize,maxSize,splits,file);
  }
  LOGGER.debug("String_Node_Str" + splits.size());
  return splits;
}

Fixed version (ground truth):
/** 
 * Generate the list of files and make them into DataValidationFileSplit.
 * @param job the job
 * @return the splits
 * @throws IOException Signals that an I/O exception has occurred.
 */
@Override public List<InputSplit> getSplits(JobContext job) throws IOException {
  long minSize=Math.max(getFormatMinSplitSize(),getMinSplitSize(job));
  long maxSize=getMaxSplitSize(job);
  List<InputSplit> splits=new ArrayList<InputSplit>();
  setData(job,minSize,maxSize,splits,listStatus(job));
  LOGGER.debug("String_Node_Str" + splits.size());
  return splits;
}
Program: 130240
Project: 130240
Buggy source:
@SuppressWarnings("String_Node_Str") protected void setup(Mapper.Context context) throws IOException, InterruptedException {
  String dvBeanString=context.getConfiguration().get(DataValidationConstants.DATA_VALIDATION_BEAN_STRING);
  Gson gson=new Gson();
  Type type=new TypeToken<DataValidationBean>(){
  }
.getType();
  DataValidationBean dataValidationBean=gson.fromJson(dvBeanString,type);
  fieldSeparator=dataValidationBean.getFieldSeparator();
  fieldSeparator=fieldSeparator.replaceAll(Constants.SPACE_SEPARATOR,Constants.SPACE);
  fieldValidationList=dataValidationBean.getFieldValidationList();
  expectedNumOfFields=dataValidationBean.getNumOfFields();
  InputSplit is=context.getInputSplit();
  if (is instanceof DataValidationFileSplit) {
    fileName=((DataValidationFileSplit)is).getPath().getName();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void setup(Mapper.Context context) throws IOException, InterruptedException {
  String dvBeanString=context.getConfiguration().get(DataValidationConstants.DATA_VALIDATION_BEAN_STRING);
  Gson gson=new Gson();
  Type type=new TypeToken<DataValidationBean>(){
  }
.getType();
  DataValidationBean dataValidationBean=gson.fromJson(dvBeanString,type);
  fieldSeparator=dataValidationBean.getFieldSeparator();
  fieldSeparator=fieldSeparator.replaceAll(Constants.SPACE_SEPARATOR,Constants.SPACE);
  fieldValidationList=dataValidationBean.getFieldValidationList();
  expectedNumOfFields=dataValidationBean.getNumOfFields();
  InputSplit is=context.getInputSplit();
  if (is instanceof DataValidationFileSplit) {
    fileName=((DataValidationFileSplit)is).getPath().toUri().getPath();
    fileName=fileName.replaceAll("String_Node_Str","String_Node_Str").substring(1,fileName.length());
  }
}
Program: 130241
Project: 130241
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + distributedHDFSPath + "String_Node_Str"+ master+ "String_Node_Str"+ slaves+ "String_Node_Str"+ hadoopJobProfile+ "String_Node_Str"+ enableYarn+ "String_Node_Str"+ enableDataValidation+ "String_Node_Str"+ debugAnalysis+ "String_Node_Str"+ enableStaticJobProfiling+ "String_Node_Str"+ profilingParams+ "String_Node_Str"+ jobs+ "String_Node_Str"+ includeClassJar+ "String_Node_Str"+ inputFile+ "String_Node_Str"+ doNotInstrument+ "String_Node_Str"+ Arrays.toString(mapperSuperClasses)+ "String_Node_Str"+ Arrays.toString(reducerSuperClasses)+ "String_Node_Str"+ debuggerConf+ "String_Node_Str"+ classpath+ "String_Node_Str"+ regexValidations+ "String_Node_Str"+ userValidations+ "String_Node_Str"+ partitionerSampleInterval+ "String_Node_Str"+ sJumbuneHome+ "String_Node_Str"+ hdfsInputPath+ "String_Node_Str"+ dataValidation+ "String_Node_Str"+ jumbuneJobName+ "String_Node_Str"+ slaveParam+ "String_Node_Str"+ runJobFromJumbune+ "String_Node_Str"+ existingJobName+ "String_Node_Str"+ isLocalSystemJar+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + distributedHDFSPath + "String_Node_Str"+ master+ "String_Node_Str"+ slaves+ "String_Node_Str"+ hadoopJobProfile+ "String_Node_Str"+ enableYarn+ "String_Node_Str"+ enableDataValidation+ "String_Node_Str"+ debugAnalysis+ "String_Node_Str"+ enableStaticJobProfiling+ "String_Node_Str"+ profilingParams+ "String_Node_Str"+ jobs+ "String_Node_Str"+ includeClassJar+ "String_Node_Str"+ inputFile+ "String_Node_Str"+ doNotInstrument+ "String_Node_Str"+ Arrays.toString(mapperSuperClasses)+ "String_Node_Str"+ Arrays.toString(reducerSuperClasses)+ "String_Node_Str"+ debuggerConf+ "String_Node_Str"+ classpath+ "String_Node_Str"+ logKeyValues+ "String_Node_Str"+ regexValidations+ "String_Node_Str"+ userValidations+ "String_Node_Str"+ partitionerSampleInterval+ "String_Node_Str"+ sJumbuneHome+ "String_Node_Str"+ hdfsInputPath+ "String_Node_Str"+ dataValidation+ "String_Node_Str"+ jumbuneJobName+ "String_Node_Str"+ slaveParam+ "String_Node_Str"+ runJobFromJumbune+ "String_Node_Str"+ existingJobName+ "String_Node_Str"+ isLocalSystemJar+ "String_Node_Str";
}
Program: 130242
Project: 130242
Buggy source:
/** 
 * * this method validate the inputs of debugging in jumbune.In web UI this field is in Debug Analysis tab
 * @param config the config
 */
private void validateDebugField(Config config){
  YamlLoader yamlLoader=new YamlLoader(config);
  Map<String,String> failedDebug=new HashMap<String,String>();
  Map<String,String> suggestionDebug=new HashMap<String,String>();
  YamlConfig yamlConfig=(YamlConfig)config;
  if (yamlLoader.isInstrumentEnabled(Constants.DEBUG_INSTR_REGEX_KEY)) {
    if (!yamlConfig.getRegexValidations().isEmpty()) {
      checkFieldsValue(yamlConfig.getRegexValidations(),ErrorMessages.DEBUG_REGEX_CLASS_INVALID,ErrorMessages.DEBUG_REGEX_KEY_INVALID,failedDebug,"String_Node_Str");
    }
 else {
      failedDebug.put("String_Node_Str",errorMessages.get(ErrorMessages.DEBUG_REGEX_VALIDATION_EMPTY));
    }
  }
  if (yamlLoader.isInstrumentEnabled(Constants.DEBUG_INST_USER_KEY)) {
    if (!yamlConfig.getUserValidations().isEmpty()) {
      checkFieldsValue(yamlConfig.getUserValidations(),ErrorMessages.DEBUG_INST_REGEX_INVALID,ErrorMessages.DEBUG_INST_KEY_INVALID,failedDebug,"String_Node_Str");
    }
 else {
      failedDebug.put("String_Node_Str",errorMessages.get(ErrorMessages.DEBUG_USERDEFINE_VALIDATION_EMPTY));
    }
  }
  addToValidationList(Constants.DEBUGGER_VALIDATION,failedDebug,suggestionDebug);
}

Fixed version (ground truth):
/** 
 * * this method validate the inputs of debugging in jumbune.In web UI this field is in Debug Analysis tab
 * @param config the config
 */
private void validateDebugField(Config config){
  YamlLoader yamlLoader=new YamlLoader(config);
  Map<String,String> failedDebug=new HashMap<String,String>();
  Map<String,String> suggestionDebug=new HashMap<String,String>();
  YamlConfig yamlConfig=(YamlConfig)config;
  if (!ifDebuggerValidationsEnabled(config)) {
    failedDebug.put("String_Node_Str",errorMessages.get(ErrorMessages.BOTH_DEBUGGER_VALIDATIONS_NULL));
  }
  if (yamlLoader.isInstrumentEnabled(Constants.DEBUG_INSTR_REGEX_KEY)) {
    if (!yamlConfig.getRegexValidations().isEmpty()) {
      checkFieldsValue(yamlConfig.getRegexValidations(),ErrorMessages.DEBUG_REGEX_CLASS_INVALID,ErrorMessages.DEBUG_REGEX_KEY_INVALID,failedDebug,"String_Node_Str");
    }
 else {
      failedDebug.put("String_Node_Str",errorMessages.get(ErrorMessages.DEBUG_REGEX_VALIDATION_EMPTY));
    }
  }
  if (yamlLoader.isInstrumentEnabled(Constants.DEBUG_INST_USER_KEY)) {
    if (!yamlConfig.getUserValidations().isEmpty()) {
      checkFieldsValue(yamlConfig.getUserValidations(),ErrorMessages.DEBUG_INST_REGEX_INVALID,ErrorMessages.DEBUG_INST_KEY_INVALID,failedDebug,"String_Node_Str");
    }
 else {
      failedDebug.put("String_Node_Str",errorMessages.get(ErrorMessages.DEBUG_USERDEFINE_VALIDATION_EMPTY));
    }
  }
  addToValidationList(Constants.DEBUGGER_VALIDATION,failedDebug,suggestionDebug);
}
Program: 130243
Project: 130243
Buggy source:
/** 
 * Gets the value by job name and property.
 * @param jobList the job list
 * @param jobName the job name
 * @param property the property
 * @return the value by job name and property
 */
public String getValueByJobNameAndProperty(List<JobCounterBean> jobList,String jobName,String property){
  for (  JobCounterBean bean : jobList) {
    if (bean.getJobName().equalsIgnoreCase(jobName)) {
      return bean.getJobStatsMap().get(property);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets the value by job name and property.
 * @param jobList the job list
 * @param jobName the job name
 * @param property the property
 * @return the value by job name and property
 */
public String getValueByJobNameAndProperty(String jobName,String property){
  for (  JobCounterBean bean : jobCounterBeans) {
    if (bean.getJobName().equalsIgnoreCase(jobName)) {
      return bean.getJobStatsMap().get(property);
    }
  }
  return null;
}
Program: 130245
Project: 130245
Buggy source:
/** 
 * This method is called to get job parameters.
 * @param jobDef
 * @param inputJarPath
 * @param isMainClassDefined Is main class defined in jar manifest
 * @return List<String>
 */
private List<String> getJobExecutionParams(String hadoopHome,JobDefinition jobDef,String inputJarPath,boolean isMainClassDefined,String jobName){
  List<String> jobExeParaList=new ArrayList<String>();
  jobExeParaList.add(hadoopHome + YamlLoader.getHadoopCommand());
  jobExeParaList.add(YamlLoader.getHadoopCommandType());
  jobExeParaList.add(inputJarPath);
  if (!isMainClassDefined) {
    jobExeParaList.add(jobDef.getJobClass());
  }
  jobExeParaList.add(Constants.LIB_JARS);
  String jarNames=addUserSuppliedDependencyJars(jobName);
  jobExeParaList.add(hadoopHome + Constants.LOG4J2_API_JAR + "String_Node_Str"+ hadoopHome+ Constants.LOG4J2_CORE_JAR+ jarNames);
  if (jobDef.getParameters() != null) {
    populateJobExecParamList(jobDef,jobExeParaList);
  }
  return jobExeParaList;
}

Fixed version (ground truth):
/** 
 * This method is called to get job parameters.
 * @param jobDef
 * @param inputJarPath
 * @param isMainClassDefined Is main class defined in jar manifest
 * @return List<String>
 */
private List<String> getJobExecutionParams(String hadoopHome,JobDefinition jobDef,String inputJarPath,boolean isMainClassDefined,String jobName){
  List<String> jobExeParaList=new ArrayList<String>();
  jobExeParaList.add(hadoopHome + YamlLoader.getHadoopCommand());
  jobExeParaList.add(YamlLoader.getHadoopCommandType());
  jobExeParaList.add(inputJarPath);
  if (!isMainClassDefined) {
    jobExeParaList.add(jobDef.getJobClass());
  }
  jobExeParaList.add(Constants.LIB_JARS);
  String jarNames=addUserSuppliedDependencyJars(jobName);
  jobExeParaList.add("String_Node_Str" + Constants.LOG4J2_API_JAR + "String_Node_Str"+ Constants.LOG4J2_CORE_JAR+ jarNames);
  if (jobDef.getParameters() != null) {
    populateJobExecParamList(jobDef,jobExeParaList);
  }
  return jobExeParaList;
}
Program: 130246
Project: 130246
Buggy source:
/** 
 * @return all contour points in this area, without repetition.
 */
public MPointDouble[] getPoints(){
  RedBlackBST<MPointDouble,Boolean> bst=new RedBlackBST<MPointDouble,Boolean>();
  ArrayList<MPointDouble> points=new ArrayList<MPointDouble>();
  for (PathIterator pi=this.getPathIterator(null); !pi.isDone(); pi.next()) {
    double[] coordinates=new double[6];
    int type=pi.currentSegment(coordinates);
    if (type != PathIterator.SEG_CLOSE) {
      MPointDouble p=new MPointDouble(coordinates[0],coordinates[1]);
      if (!bst.contains(p)) {
        points.add(p);
        bst.put(p,true);
      }
    }
  }
  MPointDouble[] res=points.toArray(new MPointDouble[0]);
  return res;
}

Fixed version (ground truth):
/** 
 * @return all contour points in this area, without repetition.
 */
public MPointDouble[] getPoints(){
  ArrayList<MPointDouble> points=new ArrayList<MPointDouble>();
  for (PathIterator pi=this.getPathIterator(null); !pi.isDone(); pi.next()) {
    double[] coordinates=new double[6];
    int type=pi.currentSegment(coordinates);
    if (type != PathIterator.SEG_CLOSE) {
      MPointDouble p=new MPointDouble(coordinates[0],coordinates[1]);
      points.add(p);
    }
  }
  MPointDouble[] res=points.toArray(new MPointDouble[0]);
  return res;
}
Program: 130247
Project: 130247
Buggy source:
public static void main(String[] args){
  if (args.length < 0) {
    printUsage();
  }
 else {
    try {
      String command=args[0];
      launch(command);
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str");
      e.printStackTrace();
      System.out.println("String_Node_Str");
      printFileSpecifications();
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  if (args.length < 1) {
    printUsage();
  }
 else {
    try {
      String command=args[0];
      launch(command);
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str");
      e.printStackTrace();
      System.out.println("String_Node_Str");
      printFileSpecifications();
    }
  }
}