nus-yam/ex-repair huggingface dataset:
Program: 39992
Project: 39992
Buggy source:
private Service getService(){
  Service airline=new Service();
  airline.setName("String_Node_Str");
  airline.setSpec(getSpec());
  ServiceInstance instance=new ServiceInstance();
  instance.setInstanceId("String_Node_Str");
  instance.setNativeUri("String_Node_Str");
  airline.addInstance(instance);
  return airline;
}

Fixed version (ground truth):
private DeployedService getService(){
  DeployedService airline=new DeployedService(getSpec());
  ServiceInstance instance=new ServiceInstance();
  instance.setInstanceId("String_Node_Str");
  instance.setNativeUri("String_Node_Str");
  airline.addInstance(instance);
  return airline;
}
Program: 39993
Project: 39993
Buggy source:
public Service getDeployedServiceByName(String serviceName){
  List<Service> deployedServices=this.getDeployedServices();
  for (  Service svc : deployedServices) {
    if (serviceName.equals(svc.getName()))     return svc;
  }
  throw new IllegalArgumentException("String_Node_Str" + serviceName + "String_Node_Str");
}

Fixed version (ground truth):
public Service getDeployedServiceByName(String serviceName){
  List<Service> deployedServices=this.getDeployedServices();
  for (  Service svc : deployedServices) {
    System.out.println("String_Node_Str" + serviceName + "String_Node_Str"+ svc.toString());
    if (serviceName.equals(svc.getName()))     return svc;
  }
  throw new IllegalArgumentException("String_Node_Str" + serviceName + "String_Node_Str");
}
Program: 39994
Project: 39994
Buggy source:
@Before public void setUp(){
  ModelsForTest models=new ModelsForTest(PackageType.COMMAND_LINE);
  smallSpec=models.getChorSpecWithResourceImpact(ResourceImpactDefs.MemoryTypes.SMALL);
  mediumSpec=models.getChorSpecWithResourceImpact(ResourceImpactDefs.MemoryTypes.MEDIUM);
  largeSpec=models.getChorSpecWithResourceImpact(ResourceImpactDefs.MemoryTypes.LARGE);
}

Fixed version (ground truth):
@Before public void setUp(){
  ModelsForTest models=new ModelsForTest(PackageType.COMMAND_LINE);
  smallSpec=models.getChorSpecWithResourceImpact(ResourceImpactDefs.MemoryTypes.SMALL);
  mediumSpec=models.getChorSpecWithResourceImpact(ResourceImpactDefs.MemoryTypes.MEDIUM);
}
Program: 39995
Project: 39995
Buggy source:
private void migrateServiceInstances(Service currentService,ServiceSpec requestedSpec) throws UnhandledModificationException {
  currentService.setSpec(requestedSpec);
  try {
    deployNoLegacyService(currentService);
  }
 catch (  ServiceNotDeployedException e) {
    throw new UnhandledModificationException();
  }
}

Fixed version (ground truth):
private void migrateServiceInstances(Service currentService,ServiceSpec requestedSpec) throws UnhandledModificationException {
  currentService.setSpec(requestedSpec);
  currentService.getInstances().clear();
  try {
    deployNoLegacyService(currentService);
  }
 catch (  ServiceNotDeployedException e) {
    throw new UnhandledModificationException();
  }
}
Program: 39996
Project: 39996
Buggy source:
private void executeDeployment(Service service,int numberOfNewInstances){
  Recipe serviceRecipe=service.getRecipe();
  String configName=serviceRecipe.getCookbookName() + "String_Node_Str" + serviceRecipe.getName();
  Config config=new Config(configName,null,numberOfNewInstances);
  List<Node> nodes=new ArrayList<Node>();
  try {
    nodes=npm.applyConfig(config);
  }
 catch (  ConfigNotAppliedException e) {
    logger.error(e.getMessage());
  }
catch (  Exception e) {
    logger.error(e.getMessage());
  }
  for (  Node node : nodes) {
    if (!((node.getHostname() == null || node.getHostname().isEmpty()) && (node.getIp() == null || node.getIp().isEmpty()))) {
      logger.debug("String_Node_Str" + node.getHostname() + "String_Node_Str"+ node.getIp());
      @SuppressWarnings("String_Node_Str") ServiceInstance serviceInstance=new ServiceInstance(node,service);
    }
 else {
      logger.debug("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void executeDeployment(Service service,int numberOfNewInstances){
  Recipe serviceRecipe=service.getRecipe();
  String configName=serviceRecipe.getCookbookName() + "String_Node_Str" + serviceRecipe.getName();
  Config config=new Config(configName,service.getSpec().getResourceImpact(),numberOfNewInstances);
  List<Node> nodes=new ArrayList<Node>();
  try {
    nodes=npm.applyConfig(config);
  }
 catch (  ConfigNotAppliedException e) {
    logger.error(e.getMessage());
  }
catch (  Exception e) {
    logger.error(e.getMessage());
  }
  for (  Node node : nodes) {
    if (!((node.getHostname() == null || node.getHostname().isEmpty()) && (node.getIp() == null || node.getIp().isEmpty()))) {
      logger.debug("String_Node_Str" + node.getHostname() + "String_Node_Str"+ node.getIp());
      @SuppressWarnings("String_Node_Str") ServiceInstance serviceInstance=new ServiceInstance(node,service);
    }
 else {
      logger.debug("String_Node_Str");
    }
  }
}
Program: 39997
Project: 39997
Buggy source:
public Service(ServiceSpec serviceSpec){
  if (serviceSpec == null)   throw new IllegalArgumentException();
  this.spec=serviceSpec;
  if (this.spec.getPackageType() == null) {
    this.spec.setPackageType(PackageType.OTHER);
  }
  if (serviceSpec.getName() == null || serviceSpec.getName().isEmpty()) {
    throw new IllegalArgumentException();
  }
 else {
    name=serviceSpec.getName();
  }
  if (serviceSpec.packageType == PackageType.LEGACY) {
    setLegacyServiceInstances(serviceSpec);
  }
}

Fixed version (ground truth):
public Service(ServiceSpec serviceSpec){
  if (serviceSpec == null)   throw new IllegalArgumentException();
  this.serviceInstances=new ArrayList<ServiceInstance>();
  this.spec=serviceSpec;
  if (this.spec.getPackageType() == null) {
    this.spec.setPackageType(PackageType.OTHER);
  }
  if (serviceSpec.getName() == null || serviceSpec.getName().isEmpty()) {
    throw new IllegalArgumentException();
  }
 else {
    name=serviceSpec.getName();
  }
  if (serviceSpec.packageType == PackageType.LEGACY) {
    setLegacyServiceInstances(serviceSpec);
  }
}
Program: 39998
Project: 39998
Buggy source:
public Service(ServiceSpec serviceSpec){
  if (serviceSpec == null)   throw new IllegalArgumentException();
  this.spec=serviceSpec;
  if (this.spec.getPackageType() == null) {
    this.spec.setPackageType(PackageType.OTHER);
  }
  if (serviceSpec.getName() == null || serviceSpec.getName().isEmpty()) {
    throw new IllegalArgumentException();
  }
 else {
    name=serviceSpec.getName();
  }
  if (serviceSpec.packageType == PackageType.LEGACY) {
    setLegacyServiceInstances(serviceSpec);
  }
}

Fixed version (ground truth):
public Service(ServiceSpec serviceSpec){
  if (serviceSpec == null)   throw new IllegalArgumentException();
  serviceInstances=new ArrayList<ServiceInstance>();
  this.spec=serviceSpec;
  if (this.spec.getPackageType() == null) {
    this.spec.setPackageType(PackageType.OTHER);
  }
  if (serviceSpec.getName() == null || serviceSpec.getName().isEmpty()) {
    throw new IllegalArgumentException();
  }
 else {
    name=serviceSpec.getName();
  }
  if (serviceSpec.packageType == PackageType.LEGACY) {
    setLegacyServiceInstances(serviceSpec);
  }
}
Program: 39999
Project: 39999
Buggy source:
/** 
 * Runs chef-client in a given node
 * @param node
 * @throws JSchException if could not connect into the node
 * @throws NodeNotUpgradedException if chef-client ends in error
 */
public void upgradeNodeConfiguration(Node node) throws JSchException, NodeNotUpgradedException {
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    while (updating.get(node)) {
      this.sleep(10000);
    }
    return;
  }
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    logger.debug("String_Node_Str" + node);
    try {
      this.runChefClient(ssh);
    }
 catch (    SshCommandFailed e) {
      String message="String_Node_Str" + node.toString();
      logger.error(message);
      throw new NodeNotUpgradedException(node.getId(),message);
    }
    updating.put(node,false);
  }
}

Fixed version (ground truth):
/** 
 * Runs chef-client in a given node
 * @param node
 * @throws JSchException if could not connect into the node
 * @throws NodeNotUpgradedException if chef-client ends in error
 */
public void upgradeNodeConfiguration(Node node) throws JSchException, NodeNotUpgradedException {
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    while (updating.get(node)) {
      this.sleep(10000);
    }
    return;
  }
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    logger.debug("String_Node_Str" + node);
    try {
      this.runChefClient(ssh);
    }
 catch (    SshCommandFailed e) {
      needUpdate.remove(node);
      updating.remove(node);
      String message="String_Node_Str" + node.toString();
      logger.error(message);
      throw new NodeNotUpgradedException(node.getId(),message);
    }
    updating.put(node,false);
  }
}
Program: 40000
Project: 40000
Buggy source:
@Override public void run(){
  System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx);
  long t0=System.currentTimeMillis();
  EnactmentEngine enacter=new EnactEngClient(ENACTMENT_ENGINE_HOST);
  String chorId=enacter.createChoreography(chorSpec);
  Choreography chor=null;
  try {
    chor=enacter.enact(chorId);
  }
 catch (  EnactmentException e) {
    System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str");
    ok=false;
    return;
  }
catch (  ChoreographyNotFoundException e) {
    System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str");
    ok=false;
    return;
  }
  long tf=System.currentTimeMillis();
  duration=tf - t0;
  Service travelService=chor.getDeployedServiceByName(TRAVEL_AGENCY);
  travelWSDL=travelService.getUri() + "String_Node_Str";
  System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str"+ duration+ "String_Node_Str");
  report.addChorEnactmentTime(duration);
  StringBuilder chorMachinesMessage=new StringBuilder("String_Node_Str" + idx + "String_Node_Str");
  for (  String mch : getMachinesFromChor(chor)) {
    chorMachinesMessage.append(mch + "String_Node_Str");
  }
  System.out.println(Utils.getTimeStamp() + chorMachinesMessage.toString());
}

Fixed version (ground truth):
@Override public void run(){
  System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx);
  long t0=System.currentTimeMillis();
  EnactmentEngine enacter=new EnactEngClient(ENACTMENT_ENGINE_HOST);
  String chorId=enacter.createChoreography(chorSpec);
  Choreography chor=null;
  try {
    chor=enacter.enact(chorId);
  }
 catch (  EnactmentException e) {
    System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str"+ chorId+ "String_Node_Str");
    ok=false;
    return;
  }
catch (  ChoreographyNotFoundException e) {
    System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str"+ chorId+ "String_Node_Str");
    ok=false;
    return;
  }
  long tf=System.currentTimeMillis();
  duration=tf - t0;
  Service travelService=chor.getDeployedServiceByName(TRAVEL_AGENCY);
  travelWSDL=travelService.getUri() + "String_Node_Str";
  System.out.println(Utils.getTimeStamp() + "String_Node_Str" + idx+ "String_Node_Str"+ duration+ "String_Node_Str");
  report.addChorEnactmentTime(duration);
  StringBuilder chorMachinesMessage=new StringBuilder("String_Node_Str" + idx + "String_Node_Str"+ chorId+ "String_Node_Str");
  for (  String mch : getMachinesFromChor(chor)) {
    chorMachinesMessage.append(mch + "String_Node_Str");
  }
  System.out.println(Utils.getTimeStamp() + chorMachinesMessage.toString());
}
Program: 40001
Project: 40001
Buggy source:
public static ChorRegistry getInstance(){
  if (instance == null)   instance=new ChorRegistry();
  return instance;
}

Fixed version (ground truth):
public static ChorRegistry getInstance(){
  return instance;
}
Program: 40002
Project: 40002
Buggy source:
@Override public String createChoreography(ChorSpec chor){
  String chorId=reg.create(chor);
  return chorId;
}

Fixed version (ground truth):
@Override public String createChoreography(ChorSpec chor){
  String chorId=reg.create(chor);
  logger.info("String_Node_Str" + chorId + "String_Node_Str");
  return chorId;
}
Program: 40003
Project: 40003
Buggy source:
@Override public Choreography enact(String chorId) throws EnactmentException {
  Choreography chor=reg.get(chorId);
  if (chor == null) {
    return null;
  }
  logger.info("String_Node_Str" + chorId);
  Deployer deployer=new Deployer();
  Map<String,Service> deployedMap=deployer.deployServices(chor.getChorSpec());
  ContextCaster caster=new ContextCaster();
  caster.cast(chor.getChorSpec(),deployedMap);
  logger.info("String_Node_Str" + chorId);
  List<Service> deployedList=new ArrayList<Service>(deployedMap.values());
  reg.addDeployedServices(chorId,deployedList);
  return chor;
}

Fixed version (ground truth):
@Override public Choreography enact(String chorId) throws EnactmentException, ChoreographyNotFoundException {
  Choreography chor=reg.get(chorId);
  if (chor == null) {
    throw new ChoreographyNotFoundException(chorId);
  }
  logger.info("String_Node_Str" + chorId);
  Deployer deployer=new Deployer();
  Map<String,Service> deployedMap=deployer.deployServices(chor.getChorSpec());
  ContextCaster caster=new ContextCaster();
  caster.cast(chor.getChorSpec(),deployedMap);
  logger.info("String_Node_Str" + chorId);
  List<Service> deployedList=new ArrayList<Service>(deployedMap.values());
  reg.addDeployedServices(chorId,deployedList);
  return chor;
}
Program: 40004
Project: 40004
Buggy source:
@Override public Choreography enact(String chorId) throws EnactmentException, ChoreographyNotFoundException {
  WebClient client=setupClient();
  client.path("String_Node_Str");
  client.path(chorId);
  client.path("String_Node_Str");
  Choreography chor;
  try {
    chor=client.post(null,Choreography.class);
  }
 catch (  WebApplicationException e) {
    int code=e.getResponse().getStatus();
    if (code == 400 || code == 404) {
      throw new ChoreographyNotFoundException(chorId);
    }
 else {
      throw new EnactmentException("String_Node_Str" + chorId + "String_Node_Str");
    }
  }
  return chor;
}

Fixed version (ground truth):
@Override public Choreography enact(String chorId) throws EnactmentException, ChoreographyNotFoundException {
  WebClient client=setupClient();
  client.path("String_Node_Str");
  client.path(chorId);
  client.path("String_Node_Str");
  Choreography chor;
  try {
    chor=client.post(null,Choreography.class);
  }
 catch (  WebApplicationException e) {
    int code=e.getResponse().getStatus();
    if (code == 400 || code == 404) {
      throw new ChoreographyNotFoundException(chorId);
    }
 else {
      throw new EnactmentException("String_Node_Str" + chorId + "String_Node_Str"+ code+ "String_Node_Str");
    }
  }
  return chor;
}
Program: 40005
Project: 40005
Buggy source:
private void waitForSSHAccess() throws NodeNotAccessibleException {
  logger.debug("String_Node_Str");
  SshUtil ssh=new SshUtil(this.node.getIp(),this.node.getUser(),this.node.getPrivateKeyFile());
  final int DELAY=5000;
  Timer timer=new Timer(MAX_TIME_TO_CONNECT,DELAY);
  Thread t=new Thread(timer);
  t.start();
  while (!ssh.isAccessible()) {
    if (timer.timeouted()) {
      throw new NodeNotAccessibleException(this.node.getId());
    }
    logger.debug("String_Node_Str" + this.node.getIp() + "String_Node_Str");
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
    ssh.disconnect();
  }
  logger.debug("String_Node_Str" + this.node);
}

Fixed version (ground truth):
private void waitForSSHAccess() throws NodeNotAccessibleException {
  logger.debug("String_Node_Str");
  SshUtil ssh=new SshUtil(this.node.getIp(),this.node.getUser(),this.node.getPrivateKeyFile());
  final int DELAY=5000;
  Timer timer=new Timer(MAX_TIME_TO_CONNECT,DELAY);
  Thread t=new Thread(timer);
  t.start();
  while (!ssh.isAccessible()) {
    if (timer.timeouted()) {
      throw new NodeNotAccessibleException(this.node.getId());
    }
    logger.debug("String_Node_Str" + this.node.getIp() + "String_Node_Str");
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
  }
  ssh.disconnect();
  logger.debug("String_Node_Str" + this.node);
}
Program: 40006
Project: 40006
Buggy source:
/** 
 * Try to run chef client 5 times This strategy is carried out since sometimes  we try to ssh the VM when it is not ready yet.
 * @param ssh
 * @throws JSchException 
 */
private void runChefClient(SshUtil ssh) throws JSchException {
  String logFile=Configuration.get("String_Node_Str");
  if (logFile == null || logFile.isEmpty()) {
    logFile="String_Node_Str";
  }
  final String CHEF_CLIENT_COMMAND="String_Node_Str" + logFile;
  final int MAX_TRIALS=5;
  final int SLEEPING_TIME=5000;
  int trials=0;
  boolean ok=false;
  while (!ok) {
    try {
      trials++;
      ssh.runCommand(CHEF_CLIENT_COMMAND);
      ok=true;
    }
 catch (    JSchException e) {
      if (trials >= MAX_TRIALS) {
        throw e;
      }
      try {
        Thread.sleep(SLEEPING_TIME);
      }
 catch (      InterruptedException e1) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Try to run chef client 5 times This strategy is carried out since sometimes  we try to ssh the VM when it is not ready yet.
 * @param ssh
 * @throws JSchException 
 */
private void runChefClient(SshUtil ssh) throws JSchException {
  String logFile=Configuration.get("String_Node_Str");
  if (logFile == null || logFile.isEmpty()) {
    logFile="String_Node_Str";
  }
  final String CHEF_CLIENT_COMMAND="String_Node_Str" + logFile + "String_Node_Str"+ logFile+ "String_Node_Str";
  final int MAX_TRIALS=5;
  final int SLEEPING_TIME=5000;
  int trials=0;
  boolean ok=false;
  while (!ok) {
    try {
      trials++;
      ssh.runCommand(CHEF_CLIENT_COMMAND);
      ok=true;
    }
 catch (    JSchException e) {
      if (trials >= MAX_TRIALS) {
        throw e;
      }
      try {
        Thread.sleep(SLEEPING_TIME);
      }
 catch (      InterruptedException e1) {
      }
    }
  }
}
Program: 40007
Project: 40007
Buggy source:
/** 
 * Runs chef-client in a given node
 * @param node
 * @throws JSchException if could not connect into the node
 * @throws NodeNotUpgradedException if chef-client ends in error
 */
public void upgradeNodeConfiguration(Node node) throws JSchException, NodeNotUpgradedException {
  List<String> newRecipes=this.findNewRecipes(node);
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    return;
  }
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    logger.debug("String_Node_Str" + node);
    this.runChefClient(ssh);
    updating.put(node,false);
  }
  if (!this.checkNewRecipes(node,newRecipes)) {
    throw new NodeNotUpgradedException(node.getId());
  }
}

Fixed version (ground truth):
/** 
 * Runs chef-client in a given node
 * @param node
 * @throws JSchException if could not connect into the node
 * @throws NodeNotUpgradedException if chef-client ends in error
 */
public void upgradeNodeConfiguration(Node node) throws JSchException, NodeNotUpgradedException {
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    return;
  }
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    logger.debug("String_Node_Str" + node);
    this.runChefClient(ssh);
    updating.put(node,false);
  }
}
Program: 40008
Project: 40008
Buggy source:
private void updateNodeConfiguration(final Node node) throws Exception {
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    return;
  }
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile()).runCommand("String_Node_Str");
    updating.put(node,false);
  }
}

Fixed version (ground truth):
private void updateNodeConfiguration(final Node node) throws Exception {
  needUpdate.put(node,true);
  if (updating.containsKey(node) && updating.get(node)) {
    return;
  }
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (needUpdate.get(node)) {
    needUpdate.put(node,false);
    updating.put(node,true);
    ssh.runCommand("String_Node_Str");
    updating.put(node,false);
  }
}
Program: 40009
Project: 40009
Buggy source:
public void initializeNode(Node node){
  System.out.println("String_Node_Str");
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (!ssh.isAccessible()) {
    System.out.println("String_Node_Str" + node.getHostname() + "String_Node_Str"+ node.getUser()+ "String_Node_Str");
    System.out.println("String_Node_Str");
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
  }
  System.out.println("String_Node_Str");
  String command;
  try {
    System.out.println("String_Node_Str" + node.getHostname());
    command=ChefScripts.getChefBootstrapScript(node.getPrivateKeyFile(),node.getIp(),node.getUser());
    System.out.println(command);
    CommandLine.runLocalCommand(command,CHEF_REPO);
    System.out.println("String_Node_Str");
    this.retrieveChefName(node);
    this.installInitialRecipe(node);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void initializeNode(Node node) throws JSchException {
  System.out.println("String_Node_Str");
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (!ssh.isAccessible()) {
    System.out.println("String_Node_Str" + node.getUser() + "String_Node_Str"+ node.getIp()+ "String_Node_Str"+ node.getPrivateKeyFile()+ "String_Node_Str");
    System.out.println("String_Node_Str");
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
  }
  System.out.println("String_Node_Str");
  String command;
  try {
    System.out.println("String_Node_Str" + node.getHostname());
    command=ChefScripts.getChefBootstrapScript(node.getPrivateKeyFile(),node.getIp(),node.getUser());
    System.out.println(command);
    CommandLine.runLocalCommand(command,CHEF_REPO);
    System.out.println("String_Node_Str");
    this.retrieveChefName(node);
    this.installInitialRecipe(node);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 40010
Project: 40010
Buggy source:
/** 
 * @param node
 * @param cookbook
 * @param recipe
 * @return false if recipe not applied
 * @throws IOException
 */
public boolean installRecipe(Node node,String cookbook,String recipe){
  try {
    if (!isInitialized(node)) {
      System.out.println("String_Node_Str");
      this.initializeNode(node);
    }
  }
 catch (  NodeNotAccessible e) {
    return false;
  }
catch (  Exception e) {
    return false;
  }
  if (node.getChefName() == null)   this.retrieveChefName(node);
  String command=ChefScripts.getChefAddCookbook(node.getChefName(),cookbook,recipe);
  System.out.println("String_Node_Str" + command + "String_Node_Str");
  CommandLine.runLocalCommand(command);
  try {
    this.updateNodeConfiguration(node);
  }
 catch (  Exception e) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param node
 * @param cookbook
 * @param recipe
 * @return false if recipe not applied
 * @throws Exception
 * @throws IOException
 */
public void installRecipe(Node node,String cookbook,String recipe) throws Exception {
  if (!isInitialized(node)) {
    System.out.println("String_Node_Str");
    this.initializeNode(node);
  }
  if (node.getChefName() == null)   this.retrieveChefName(node);
  System.out.println("String_Node_Str" + node.getChefName());
  String command=ChefScripts.getChefAddCookbook(node.getChefName(),cookbook,recipe);
  System.out.println("String_Node_Str" + command + "String_Node_Str");
  CommandLine.runLocalCommand(command);
  this.updateNodeConfiguration(node);
}
Program: 40011
Project: 40011
Buggy source:
public boolean isInitialized(Node node) throws NodeNotAccessible, Exception {
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  while (!ssh.isAccessible()) {
    System.out.println("String_Node_Str" + node.getIp() + "String_Node_Str"+ node.getUser()+ "String_Node_Str");
    System.out.println("String_Node_Str");
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
  }
  String createdFile="String_Node_Str";
  String returnText=null;
  returnText=ssh.runCommand("String_Node_Str" + createdFile);
  System.out.println("String_Node_Str" + returnText.trim() + "String_Node_Str");
  return returnText.trim().equals(createdFile);
}

Fixed version (ground truth):
public boolean isInitialized(Node node) throws NodeNotAccessible, Exception {
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  String createdFile="String_Node_Str";
  String returnText=null;
  returnText=ssh.runCommand("String_Node_Str" + createdFile,true);
  System.out.println("String_Node_Str" + returnText.trim() + "String_Node_Str");
  return returnText.trim().equals(createdFile);
}
Program: 40012
Project: 40012
Buggy source:
private void retrieveChefName(Node node){
  while (node.getChefName() == null) {
    try {
      SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
      String command=ChefScripts.getChefName();
      String chefClientName=ssh.runCommand(command,true);
      if (chefClientName == null || chefClientName.isEmpty())       chefClientName=node.getHostname();
      chefClientName=chefClientName.replace("String_Node_Str","String_Node_Str").trim();
      node.setChefName(chefClientName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void retrieveChefName(Node node) throws Exception {
  SshUtil ssh=new SshUtil(node.getIp(),node.getUser(),node.getPrivateKeyFile());
  String command=ChefScripts.getChefName();
  String chefClientName=ssh.runCommand(command,true);
  if (chefClientName == null || chefClientName.isEmpty())   chefClientName=node.getHostname();
  chefClientName=chefClientName.replace("String_Node_Str","String_Node_Str").trim();
  node.setChefName(chefClientName);
}
Program: 40013
Project: 40013
Buggy source:
private void upgradeNodes(){
  NodePoolManager npm=new NodePoolManagerClient();
  npm.upgradeNodes();
}

Fixed version (ground truth):
private void upgradeNodes(){
  System.out.println("String_Node_Str");
  NodePoolManager npm=new NodePoolManagerClient();
  npm.upgradeNodes();
}
Program: 40015
Project: 40015
Buggy source:
@Test public void testWordCount() throws Exception {
  HttpClient httpclient=new DefaultHttpClient();
  FileSystem fs=null;
  try {
    Configuration conf=new Configuration(true);
    ByteArrayInputStream bais=new ByteArrayInputStream(retrieveConfig(httpclient).getBytes());
    XMLSource xml=new XMLSource(bais);
    xml.setBuffering(true);
    Property dfs=xml.getNode("String_Node_Str",Property.class);
    String newValue=dfs.getValue();
    conf.set("String_Node_Str",newValue);
    fs=FileSystem.get(conf);
    if (!fs.exists(new Path("String_Node_Str")))     fs.mkdirs(new Path("String_Node_Str"));
    FSDataOutputStream output=fs.create(new Path("String_Node_Str"),true);
    FileInputStream input=new FileInputStream(new File(PROJECT_PATH + "String_Node_Str"));
    byte buffer[]=new byte[4096];
    int byte_read=0;
    while ((byte_read=input.read(buffer)) != -1) {
      output.write(buffer,0,byte_read);
    }
    conf=new Configuration();
    Job job=Job.getInstance(conf,"String_Node_Str");
    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(IntWritable.class);
    job.setMapperClass(Map.class);
    job.setReducerClass(Reduce.class);
    job.setInputFormatClass(TextInputFormat.class);
    job.setOutputFormatClass(TextOutputFormat.class);
    FileInputFormat.addInputPath(job,new Path("String_Node_Str"));
    FileOutputFormat.setOutputPath(job,new Path("String_Node_Str"));
    job.waitForCompletion(true);
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw e;
  }
 finally {
    fs.close();
    FileSystem.closeAll();
    httpclient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
@Test public void testWordCount() throws Exception {
  HttpClient httpclient=new DefaultHttpClient();
  FileSystem fs=null;
  try {
    Configuration conf=new Configuration(true);
    ByteArrayInputStream bais=new ByteArrayInputStream(retrieveConfig(httpclient).getBytes());
    XMLSource xml=new XMLSource(bais);
    xml.setBuffering(true);
    Property dfs=xml.getNode("String_Node_Str",Property.class);
    String newValue=dfs.getValue();
    System.out.println("String_Node_Str" + newValue);
    conf.set("String_Node_Str",newValue);
    conf.set("String_Node_Str",MAPRED_URL);
    fs=FileSystem.get(conf);
    try {
      fs.mkdirs(new Path("String_Node_Str"));
    }
 catch (    IOException ioe) {
      ioe.printStackTrace();
      fail("String_Node_Str");
    }
    FSDataOutputStream output=fs.create(new Path("String_Node_Str"));
    FileInputStream input=new FileInputStream(new File(PROJECT_PATH + "String_Node_Str"));
    try {
      int read=0;
      while ((read=input.read()) != -1) {
        output.write(read);
      }
    }
  finally {
      output.close();
      input.close();
    }
    WordCount.setConf(conf);
    WordCount.main(null);
    assertTrue(fs.exists(new Path("String_Node_Str")));
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw e;
  }
 finally {
    fs.close();
    FileSystem.closeAll();
    httpclient.getConnectionManager().shutdown();
  }
}
Program: 40016
Project: 40016
Buggy source:
public String deploy(Service service) throws MalformedURLException {
  RecipeFactory factory=new RecipeFactory();
  Recipe serviceDeployRecipe=factory.createRecipe(service);
  RecipeDeployer deployer=new RecipeDeployer(new NodePoolManagerHandler());
  deployer.uploadRecipe(serviceDeployRecipe);
  String deployedHost=deployer.deployRecipe(serviceDeployRecipe,service);
  String serviceURL;
  if (deployedHost.contains("String_Node_Str"))   serviceURL=service.getUri() + "String_Node_Str" + service.getPort()+ "String_Node_Str"+ service.getId()+ "String_Node_Str";
 else   serviceURL="String_Node_Str" + service.getUri() + "String_Node_Str"+ service.getPort()+ "String_Node_Str"+ service.getId()+ "String_Node_Str";
  return serviceURL;
}

Fixed version (ground truth):
public String deploy(Service service) throws MalformedURLException {
  RecipeFactory factory=new RecipeFactory();
  Recipe serviceDeployRecipe=factory.createRecipe(service);
  RecipeDeployer deployer=new RecipeDeployer(new NodePoolManagerHandler());
  deployer.uploadRecipe(serviceDeployRecipe);
  String deployedHost=deployer.deployRecipe(serviceDeployRecipe,service);
  String serviceURL;
  if (deployedHost.contains("String_Node_Str"))   serviceURL=service.getUri() + "String_Node_Str" + service.getPort()+ "String_Node_Str"+ "String_Node_Str"+ service.getId()+ "String_Node_Str";
 else   serviceURL="String_Node_Str" + service.getUri() + "String_Node_Str"+ service.getPort()+ "String_Node_Str"+ service.getId()+ "String_Node_Str";
  return serviceURL;
}
Program: 40017
Project: 40017
Buggy source:
public String copyTemplate(Service service) throws IOException {
  URL scriptFile=ClassLoader.getSystemResource("String_Node_Str");
  URL destURL=ClassLoader.getSystemResource("String_Node_Str");
  File srcFolder=new File(scriptFile.getFile());
  File destFolder=new File(destURL.getFile().concat("String_Node_Str" + service.getId()));
  FileUtils.copyDirectory(srcFolder,destFolder);
  return destFolder.getAbsolutePath();
}

Fixed version (ground truth):
public String copyTemplate(Service service) throws IOException {
  URL scriptFile=ClassLoader.getSystemResource("String_Node_Str");
  URL destURL=RecipeDeployer.destURL;
  File srcFolder=new File(scriptFile.getFile());
  File destFolder=new File(destURL.getFile().concat("String_Node_Str" + service.getId()));
  FileUtils.copyDirectory(srcFolder,destFolder);
  return destFolder.getAbsolutePath();
}
Program: 40018
Project: 40018
Buggy source:
public void testInitDesktopBackgrounds() throws Exception {
  List<DesktopBackground> bgs=desktopBackgroundService.findDesktopBackgrounds(userSiteKey);
  assertEquals(8,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.USER_TYPE,"String_Node_Str"));
  assertEquals(1,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(0,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(1,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(8,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.PORTAL_TYPE,"String_Node_Str"));
  assertEquals(0,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.PORTAL_TYPE,"String_Node_Str"));
  assertEquals(8,bgs.size());
}

Fixed version (ground truth):
public void testInitDesktopBackgrounds() throws Exception {
  List<DesktopBackground> bgs=desktopBackgroundService.findDesktopBackgrounds(userSiteKey);
  assertEquals(8,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.USER_TYPE,"String_Node_Str"));
  assertEquals(1,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(1,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(8,bgs.size());
  createEmptyDir("String_Node_Str");
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.GROUP_TYPE,"String_Node_Str"));
  assertEquals(0,bgs.size());
  createEmptyDir("String_Node_Str");
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.PORTAL_TYPE,"String_Node_Str"));
  assertEquals(0,bgs.size());
  bgs=desktopBackgroundService.findDesktopBackgrounds(new PortalKey(PortalConfig.PORTAL_TYPE,"String_Node_Str"));
  assertEquals(8,bgs.size());
}
Program: 40019
Project: 40019
Buggy source:
public String createNewPageNode(String nodeLabel){
  try {
    if (nodeLabel == null || nodeLabel.length() == 0) {
      nodeLabel="String_Node_Str" + getCurrentNumberOfTabs();
    }
    Page page=configService.createPageTemplate(UIWebOSTabPaneDashboard.PAGE_TEMPLATE,pageNavigation.getOwnerType(),pageNavigation.getOwnerId());
    page.setTitle(nodeLabel);
    List<PageNode> selectedPath=uiPortal.getSelectedPath();
    PageNode parentNode=null;
    if (selectedPath != null && selectedPath.size() > 1) {
      parentNode=selectedPath.get(selectedPath.size() - 2);
    }
    PageNode pageNode=new PageNode();
    pageNode.setLabel(nodeLabel);
    String uniqueNodeName=nodeLabel.toLowerCase().replace(' ','_');
    if (nameExisted(uniqueNodeName)) {
      uniqueNodeName=uniqueNodeName + "String_Node_Str" + System.currentTimeMillis();
    }
    String fullName=(parentNode != null) ? parentNode.getUri() + "String_Node_Str" + uniqueNodeName : uniqueNodeName;
    page.setName(uniqueNodeName);
    pageNode.setName(uniqueNodeName);
    pageNode.setUri(fullName);
    pageNode.setPageReference(page.getPageId());
    if (parentNode == null) {
      pageNavigation.addNode(pageNode);
    }
 else     if (parentNode.getChildren() != null) {
      parentNode.getChildren().add(pageNode);
    }
    dataService.create(page);
    dataService.save(pageNavigation);
    return fullName;
  }
 catch (  Exception ex) {
    logger.info("String_Node_Str",ex);
    return null;
  }
}

Fixed version (ground truth):
public String createNewPageNode(String nodeLabel){
  try {
    if (nodeLabel == null || nodeLabel.length() == 0) {
      nodeLabel="String_Node_Str" + getCurrentNumberOfTabs();
    }
    Page page=configService.createPageTemplate(UIWebOSTabPaneDashboard.PAGE_TEMPLATE,pageNavigation.getOwnerType(),pageNavigation.getOwnerId());
    page.setTitle(nodeLabel);
    List<PageNode> selectedPath=uiPortal.getSelectedPath();
    PageNode parentNode=null;
    if (selectedPath != null && selectedPath.size() > 1) {
      parentNode=selectedPath.get(selectedPath.size() - 2);
    }
    PageNode pageNode=new PageNode();
    pageNode.setLabel(nodeLabel);
    String uniqueNodeName=nodeLabel.toLowerCase().replace(' ','_');
    if (nameExisted(uniqueNodeName)) {
      uniqueNodeName=uniqueNodeName + "String_Node_Str" + System.currentTimeMillis();
    }
    String fullName=(parentNode != null) ? parentNode.getUri() + "String_Node_Str" + uniqueNodeName : uniqueNodeName;
    page.setName(uniqueNodeName + "String_Node_Str" + page.hashCode());
    pageNode.setName(uniqueNodeName);
    pageNode.setUri(fullName);
    pageNode.setPageReference(page.getPageId());
    if (parentNode == null) {
      pageNavigation.addNode(pageNode);
    }
 else     if (parentNode.getChildren() != null) {
      parentNode.getChildren().add(pageNode);
    }
    dataService.create(page);
    dataService.save(pageNavigation);
    return fullName;
  }
 catch (  Exception ex) {
    logger.info("String_Node_Str",ex);
    return null;
  }
}
Program: 40020
Project: 40020
Buggy source:
@Override public String toString(){
  StringBuffer param=new StringBuffer();
  param.append(KEY_PARAM).append("String_Node_Str").append(this.getKey()).append(SEPARATOR);
  param.append(FILTER_TYPE_PARAM).append("String_Node_Str").append(Boolean.toString(this.isAttributeFilter()));
  this.appendParamValue(param,this.getValue(),VALUE_PARAM);
  this.appendParamValue(param,this.getOrder(),LIKE_OPTION_PARAM);
  if (this.getValue() instanceof String) {
    this.appendParamValue(param,this.isLikeOption(),LIKE_OPTION_PARAM);
  }
  if (null != this.getAllowedValues() && !this.getAllowedValues().isEmpty()) {
    this.appendParamValue(param,this.getAllowedValues(),ALLOWED_VALUES_PARAM);
  }
  this.appendParamValue(param,this.getLangCode(),LANG_PARAM);
  this.appendParamValue(param,this.getStart(),START_PARAM);
  this.appendParamValue(param,this.getEnd(),END_PARAM);
  this.appendParamValue(param,this.getOrder(),ORDER_PARAM);
  return param.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer param=new StringBuffer();
  param.append(KEY_PARAM).append("String_Node_Str").append(this.getKey()).append(SEPARATOR);
  param.append(FILTER_TYPE_PARAM).append("String_Node_Str").append(Boolean.toString(this.isAttributeFilter()));
  this.appendParamValue(param,this.getValue(),VALUE_PARAM);
  this.appendParamValue(param,this.getOrder(),ORDER_PARAM);
  if (this.getValue() instanceof String) {
    this.appendParamValue(param,this.isLikeOption(),LIKE_OPTION_PARAM);
  }
  if (null != this.getAllowedValues() && !this.getAllowedValues().isEmpty()) {
    this.appendParamValue(param,this.getAllowedValues(),ALLOWED_VALUES_PARAM);
  }
  this.appendParamValue(param,this.getLangCode(),LANG_PARAM);
  this.appendParamValue(param,this.getStart(),START_PARAM);
  this.appendParamValue(param,this.getEnd(),END_PARAM);
  this.appendParamValue(param,this.getOrder(),ORDER_PARAM);
  return param.toString();
}
Program: 40021
Project: 40021
Buggy source:
public String[] getUserConfig(){
  String[] config=null;
  try {
    config=(String[])this.getRequest().getSession().getAttribute(SESSION_PARAM_MY_SHORTCUTS);
    if (null == config) {
      config=this.getShortcutManager().getUserConfig(this.getCurrentUser());
      this.setUserConfig(config);
    }
  }
 catch (  Throwable t) {
    ApsSystemUtils.logThrowable(t,this,"String_Node_Str");
    throw new RuntimeException("String_Node_Str" + this.getCurrentUser(),t);
  }
  return config;
}

Fixed version (ground truth):
public String[] getUserConfig(){
  return this.getUserConfigBean().getConfig();
}
Program: 40022
Project: 40022
Buggy source:
protected void setUserConfig(String[] userConfig){
  this.getRequest().getSession().setAttribute(SESSION_PARAM_MY_SHORTCUTS,userConfig);
}

Fixed version (ground truth):
protected void setUserConfig(String[] config){
  UserConfigBean userConfig=new UserConfigBean(this.getCurrentUser().getUsername(),config);
  this.setUserConfigBean(userConfig);
}
Program: 40023
Project: 40023
Buggy source:
/** 
 * Save a shortcut config of the given user. THe saved confif shold be not equals than the given, the invalid position  (whith invalid shortcut code, or with shortcut not allowed to the user) will be emptied.
 * @param user The user owner of the config to save.
 * @param config The config to save.
 * @return The saved config.
 * @throws ApsSystemException In case of error.
 */
public String[] saveUserConfig(UserDetails user,String[] config) throws ApsSystemException ;

Fixed version (ground truth):
/** 
 * Save a shortcut config of the given user. The saved config shold be not equals than the given, the invalid position  (with invalid shortcut code, or with shortcut not allowed to the user) will be emptied.
 * @param user The user owner of the config to save.
 * @param config The config to save.
 * @return The saved config.
 * @throws ApsSystemException In case of error.
 */
public String[] saveUserConfig(UserDetails user,String[] config) throws ApsSystemException ;
Program: 40024
Project: 40024
Buggy source:
abstract public boolean updateLandAddons(int id,HashMap<String,Boolean> newAddons);

Fixed version (ground truth):
abstract public boolean updateLandAddons(int id,String addons);
Program: 40025
Project: 40025
Buggy source:
abstract public boolean updateLandPerms(int id,HashMap<String,Boolean> newPerms);

Fixed version (ground truth):
abstract public boolean updateLandPerms(int id,String perms);
Program: 40026
Project: 40026
Buggy source:
public boolean updateLandAddons(int id,HashMap<String,Boolean> newAddons){
  String addons=Land.writeAddonTags(newAddons);
  int ret=0;
  Connection conn=null;
  PreparedStatement ps=null;
  try {
    conn=getConnection();
    ps=conn.prepareStatement("String_Node_Str" + Config.sqlTableName + "String_Node_Str");
    ps.setString(1,addons);
    ps.setInt(2,id);
    if (Config.debugMode)     iCoLand.info(ps.toString());
    ret=ps.executeUpdate();
    ps.close();
    conn.close();
  }
 catch (  SQLException ex) {
    ex.printStackTrace();
  }
  return (ret > 0);
}

Fixed version (ground truth):
public boolean updateLandAddons(int id,String addons){
  int ret=0;
  Connection conn=null;
  PreparedStatement ps=null;
  try {
    conn=getConnection();
    ps=conn.prepareStatement("String_Node_Str" + Config.sqlTableName + "String_Node_Str");
    ps.setString(1,addons);
    ps.setInt(2,id);
    if (Config.debugMode)     iCoLand.info(ps.toString());
    ret=ps.executeUpdate();
    ps.close();
    conn.close();
  }
 catch (  SQLException ex) {
    ex.printStackTrace();
  }
  return (ret > 0);
}
Program: 40027
Project: 40027
Buggy source:
public boolean updateLandPerms(int id,HashMap<String,Boolean> newPerms){
  String perms=Land.writePermTags(newPerms);
  int ret=0;
  Connection conn=null;
  PreparedStatement ps=null;
  try {
    conn=getConnection();
    ps=conn.prepareStatement("String_Node_Str" + Config.sqlTableName + "String_Node_Str");
    ps.setString(1,perms);
    ps.setInt(2,id);
    if (Config.debugMode)     iCoLand.info(ps.toString());
    ret=ps.executeUpdate();
    ps.close();
    conn.close();
  }
 catch (  SQLException ex) {
    ex.printStackTrace();
  }
  return (ret > 0);
}

Fixed version (ground truth):
public boolean updateLandPerms(int id,String perms){
  int ret=0;
  Connection conn=null;
  PreparedStatement ps=null;
  try {
    conn=getConnection();
    ps=conn.prepareStatement("String_Node_Str" + Config.sqlTableName + "String_Node_Str");
    ps.setString(1,perms);
    ps.setInt(2,id);
    if (Config.debugMode)     iCoLand.info(ps.toString());
    ret=ps.executeUpdate();
    ps.close();
    conn.close();
  }
 catch (  SQLException ex) {
    ex.printStackTrace();
  }
  return (ret > 0);
}
Program: 40029
Project: 40029
Buggy source:
public static void getConfig(File dataFolder){
  File configFile=new File(dataFolder + File.separator + "String_Node_Str");
  debugMode=false;
  debugModeSQL=false;
  sellTax=0.80;
  taxRate=0.05;
  maxBlocksClaimable=1000;
  maxLandsClaimable=10;
  maxLandVolume=1000;
  minLandVolume=10;
  addonsEnabled=new HashMap<String,Boolean>();
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  pricePerBlock=new HashMap<String,Double>();
  pricePerBlock.put("String_Node_Str",20.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",100.0);
  pricePerBlock.put("String_Node_Str",200.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",10.0);
  pricePerBlock.put("String_Node_Str",10.0);
  healTime=30;
  mobRemovalTime=2;
  taxTimeMinutes=0;
  announceCheckInterval=1000;
  unclaimedLandCanBuild=true;
  unclaimedLandCanBoom=true;
  unclaimedLandCanBurn=true;
  allLandFullHeight=false;
  bankName="String_Node_Str";
  if (!configFile.exists()) {
    saveConfig(configFile);
  }
 else {
    loadConfig(configFile);
    saveConfig(configFile);
  }
  loaded=true;
}

Fixed version (ground truth):
public static void getConfig(File dataFolder){
  File configFile=new File(dataFolder + File.separator + "String_Node_Str");
  debugMode=false;
  debugMode1=false;
  debugModeSQL=false;
  sellTax=0.80;
  taxRate=0.05;
  maxBlocksClaimable=1000;
  maxLandsClaimable=10;
  maxLandVolume=1000;
  minLandVolume=10;
  addonsEnabled=new HashMap<String,Boolean>();
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  addonsEnabled.put("String_Node_Str",true);
  pricePerBlock=new HashMap<String,Double>();
  pricePerBlock.put("String_Node_Str",20.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",100.0);
  pricePerBlock.put("String_Node_Str",200.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",50.0);
  pricePerBlock.put("String_Node_Str",10.0);
  pricePerBlock.put("String_Node_Str",10.0);
  healTime=30;
  mobRemovalTime=2;
  taxTimeMinutes=0;
  announceCheckInterval=1000;
  unclaimedLandCanBuild=true;
  unclaimedLandCanBoom=true;
  unclaimedLandCanBurn=true;
  allLandFullHeight=false;
  bankName="String_Node_Str";
  if (!configFile.exists()) {
    saveConfig(configFile);
  }
 else {
    loadConfig(configFile);
    saveConfig(configFile);
  }
  loaded=true;
}