nus-yam/ex-repair huggingface dataset:
Program: 24543
Project: 24543
Buggy source:
@Override public boolean hasSupportFor(NativeFunction nativeFunc){
switch (nativeFunc) {
case WINDOWS_PROCESS:
    return true;
case WINDOWS_EXEC:
  return true;
case WINDOWS_FILE_MOVE:
return true;
case ERROR:
return true;
}
return false;
}

Fixed version (ground truth):
@Override public boolean hasSupportFor(NativeFunction nativeFunc){
switch (nativeFunc) {
case DOTNET:
    return true;
case WINDOWS_PROCESS:
  return true;
case WINDOWS_EXEC:
return true;
case WINDOWS_FILE_MOVE:
return true;
case ERROR:
return true;
}
return false;
}
Program: 24544
Project: 24544
Buggy source:
@Override public void windowsMoveFile(File fromFile,File toFile){
  Kernel32.INSTANCE.MoveFileExA(fromFile.getAbsolutePath(),toFile.getAbsolutePath(),MOVEFILE_DELAY_UNTIL_REBOOT | MOVEFILE_REPLACE_EXISTING);
}

Fixed version (ground truth):
@Override public void windowsMoveFile(File fromFile,File toFile){
  Kernel32.INSTANCE.MoveFileExA(fromFile.getAbsolutePath(),toFile.getAbsolutePath(),MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
}
Program: 24545
Project: 24545
Buggy source:
/** 
 * Test of getMacProcesses method, of class JnaNativeMacSupport.
 */
@Test public void testGetMacProcesses(){
  System.out.println("String_Node_Str");
  JnaNativeMacSupport instance=new JnaNativeMacSupport();
  List<NativeProcess> result=instance.getMacProcesses();
  for (  NativeProcess process : result) {
    System.out.println("String_Node_Str" + process.getPid());
    System.out.println("String_Node_Str" + process.getPpid());
    System.out.println("String_Node_Str" + process.getCommandLine());
    System.out.println("String_Node_Str");
    Map<String,String> envs=process.getEnvironmentVariables();
    for (    String envStr : envs.keySet()) {
      System.out.println(envStr + "String_Node_Str" + envs.get(envStr));
    }
    process.getPid();
  }
}

Fixed version (ground truth):
/** 
 * Test of getMacProcesses method, of class JnaNativeMacSupport. Nothing special but simply prints process info and verifies the method works
 */
@Test public void testGetMacProcesses(){
  if (Functions.isWindows())   return;
  String osName=Util.fixNull(System.getProperty("String_Node_Str"));
  if (!osName.contains("String_Node_Str"))   return;
  System.out.println("String_Node_Str");
  JnaNativeMacSupport instance=new JnaNativeMacSupport();
  List<NativeProcess> result=instance.getMacProcesses();
  for (  NativeProcess process : result) {
    System.out.println("String_Node_Str" + process.getPid());
    System.out.println("String_Node_Str" + process.getPpid());
    System.out.println("String_Node_Str" + process.getCommandLine());
    System.out.println("String_Node_Str");
    Map<String,String> envs=process.getEnvironmentVariables();
    for (    String envStr : envs.keySet()) {
      System.out.println(envStr + "String_Node_Str" + envs.get(envStr));
    }
  }
}
Program: 24546
Project: 24546
Buggy source:
/** 
 * Test of makeFileWritable method, of class JnaNativeUnixSupport.
 */
@Test public void testMakeFileWritable() throws IOException {
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  file.deleteOnExit();
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int mask=Integer.parseInt("String_Node_Str",8);
  instance.chmod(file,mask);
  System.out.println("String_Node_Str" + Integer.toOctalString(instance.mode(file)));
  boolean result=instance.makeFileWritable(file);
  Assert.assertTrue(result);
  int expResult=33188;
  int resultMode=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(resultMode));
  Assert.assertEquals(expResult,resultMode);
}

Fixed version (ground truth):
/** 
 * Test of makeFileWritable method, of class JnaNativeUnixSupport.
 */
@Test public void testMakeFileWritable() throws IOException {
  if (Functions.isWindows())   return;
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  file.deleteOnExit();
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int mask=Integer.parseInt("String_Node_Str",8);
  instance.chmod(file,mask);
  System.out.println("String_Node_Str" + Integer.toOctalString(instance.mode(file)));
  boolean result=instance.makeFileWritable(file);
  Assert.assertTrue(result);
  int expResult=33188;
  int resultMode=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(resultMode));
  Assert.assertEquals(expResult,resultMode);
}
Program: 24547
Project: 24547
Buggy source:
/** 
 * Test of chmod method, of class JnaNativeUnixSupport.
 */
@Test public void testChmod() throws IOException {
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  int mask=Integer.parseInt("String_Node_Str",8);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.chmod(file,mask);
  Assert.assertTrue(result);
  int resultMask=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(resultMask));
  Assert.assertEquals(mask,resultMask);
}

Fixed version (ground truth):
/** 
 * Test of chmod method, of class JnaNativeUnixSupport.
 */
@Test public void testChmod() throws IOException {
  if (Functions.isWindows())   return;
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  int mask=Integer.parseInt("String_Node_Str",8);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.chmod(file,mask);
  Assert.assertTrue(result);
  int resultMask=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(resultMask));
  Assert.assertEquals(mask,resultMask);
}
Program: 24548
Project: 24548
Buggy source:
/** 
 * Test of resolveSymlink method, of class JnaNativeUnixSupport.
 */
@Test public void testResolveSymlink() throws IOException {
  File symlinkToFile=File.createTempFile("String_Node_Str","String_Node_Str");
  symlinkToFile.deleteOnExit();
  File tempDir=symlinkToFile.getParentFile();
  String targetPath=tempDir.getAbsolutePath() + "String_Node_Str" + RandomStringUtils.randomAlphanumeric(8);
  System.out.println(targetPath);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.createSymlink(targetPath,symlinkToFile);
  File linkFile=new File(targetPath);
  String result=instance.resolveSymlink(linkFile);
  Assert.assertEquals(symlinkToFile.getAbsolutePath(),result);
}

Fixed version (ground truth):
/** 
 * Test of resolveSymlink method, of class JnaNativeUnixSupport.
 */
@Test public void testResolveSymlink() throws IOException {
  if (Functions.isWindows())   return;
  File symlinkToFile=File.createTempFile("String_Node_Str","String_Node_Str");
  symlinkToFile.deleteOnExit();
  File tempDir=symlinkToFile.getParentFile();
  String targetPath=tempDir.getAbsolutePath() + "String_Node_Str" + RandomStringUtils.randomAlphanumeric(8);
  System.out.println(targetPath);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.createSymlink(targetPath,symlinkToFile);
  File linkFile=new File(targetPath);
  String result=instance.resolveSymlink(linkFile);
  Assert.assertEquals(symlinkToFile.getAbsolutePath(),result);
}
Program: 24549
Project: 24549
Buggy source:
/** 
 * Test of createSymlink method, of class JnaNativeUnixSupport.
 */
@Test public void testCreateSymlink() throws IOException {
  File symlinkToFile=File.createTempFile("String_Node_Str","String_Node_Str");
  symlinkToFile.deleteOnExit();
  File tempDir=symlinkToFile.getParentFile();
  String targetPath=tempDir.getAbsolutePath() + "String_Node_Str" + RandomStringUtils.randomAlphanumeric(8);
  System.out.println(targetPath);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.createSymlink(targetPath,symlinkToFile);
  if (!result) {
    System.out.println("String_Node_Str" + instance.getLastError());
  }
  Assert.assertTrue(result);
}

Fixed version (ground truth):
/** 
 * Test of createSymlink method, of class JnaNativeUnixSupport.
 */
@Test public void testCreateSymlink() throws IOException {
  if (Functions.isWindows())   return;
  File symlinkToFile=File.createTempFile("String_Node_Str","String_Node_Str");
  symlinkToFile.deleteOnExit();
  File tempDir=symlinkToFile.getParentFile();
  String targetPath=tempDir.getAbsolutePath() + "String_Node_Str" + RandomStringUtils.randomAlphanumeric(8);
  System.out.println(targetPath);
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.createSymlink(targetPath,symlinkToFile);
  if (!result) {
    System.out.println("String_Node_Str" + instance.getLastError());
  }
  Assert.assertTrue(result);
}
Program: 24550
Project: 24550
Buggy source:
/** 
 * Test of mode method, of class JnaNativeUnixSupport.
 */
@Test public void testMode() throws IOException {
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int expResult=33188;
  int result=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(result));
  Assert.assertEquals(expResult,result);
}

Fixed version (ground truth):
/** 
 * Test of mode method, of class JnaNativeUnixSupport.
 */
@Test public void testMode() throws IOException {
  if (Functions.isWindows())   return;
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int expResult=33188;
  int result=instance.mode(file);
  System.out.println("String_Node_Str" + Integer.toOctalString(result));
  Assert.assertEquals(expResult,result);
}
Program: 24551
Project: 24551
Buggy source:
/** 
 * Test of chown method, of class JnaNativeUnixSupport.
 */
@Test public void testChown() throws IOException {
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int uid=instance.getEuid();
  int gid=instance.getEgid();
  boolean result=instance.chown(file,uid,gid);
  Assert.assertTrue(result);
  boolean result2=instance.chown(file,uid + 1,gid);
  System.out.println("String_Node_Str" + instance.getLastError());
  Assert.assertFalse(result2);
}

Fixed version (ground truth):
/** 
 * Test of chown method, of class JnaNativeUnixSupport.
 */
@Test public void testChown() throws IOException {
  if (Functions.isWindows())   return;
  File file=File.createTempFile("String_Node_Str","String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int uid=instance.getEuid();
  int gid=instance.getEgid();
  boolean result=instance.chown(file,uid,gid);
  Assert.assertTrue(result);
  boolean result2=instance.chown(file,uid + 1,gid);
  System.out.println("String_Node_Str" + instance.getLastError());
  Assert.assertFalse(result2);
}
Program: 24552
Project: 24552
Buggy source:
/** 
 * Test of pamAuthenticate method, of class JnaNativeUnixSupport. Ignored, because specific user name and password is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testPamAuthenticate(){
  System.out.println("String_Node_Str");
  String serviceName="String_Node_Str";
  String userName="String_Node_Str";
  String password="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  Set<String> result=instance.pamAuthenticate(serviceName,userName,password);
  Iterator iter=result.iterator();
  while (iter.hasNext()) {
    System.out.println(iter.next());
  }
  Assert.assertTrue(result.contains(expResult));
}

Fixed version (ground truth):
/** 
 * Test of pamAuthenticate method, of class JnaNativeUnixSupport. Ignored, because specific user name and password is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testPamAuthenticate(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  String serviceName="String_Node_Str";
  String userName="String_Node_Str";
  String password="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  Set<String> result=instance.pamAuthenticate(serviceName,userName,password);
  Iterator iter=result.iterator();
  while (iter.hasNext()) {
    System.out.println(iter.next());
  }
  Assert.assertTrue(result.contains(expResult));
}
Program: 24553
Project: 24553
Buggy source:
/** 
 * Test of getLastError method, of class JnaNativeUnixSupport.
 */
@Test public void testGetLastError(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  String result=instance.getLastError();
  Assert.assertEquals(expResult,result);
  System.out.println(result);
}

Fixed version (ground truth):
/** 
 * Test of getLastError method, of class JnaNativeUnixSupport.
 */
@Test public void testGetLastError(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  String result=instance.getLastError();
  Assert.assertEquals(expResult,result);
  System.out.println(result);
}
Program: 24554
Project: 24554
Buggy source:
/** 
 * Test of canRestartJavaProcess method, of class JnaNativeUnixSupport.
 */
@Test public void testCanRestartJavaProcess(){
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.canRestartJavaProcess();
  Assert.assertTrue(result);
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of canRestartJavaProcess method, of class JnaNativeUnixSupport.
 */
@Test public void testCanRestartJavaProcess(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.canRestartJavaProcess();
  Assert.assertTrue(result);
  System.out.println("String_Node_Str" + result);
}
Program: 24555
Project: 24555
Buggy source:
/** 
 * Test of checkPamAuthentication method, of class JnaNativeUnixSupport.
 */
@Test public void testCheckPamAuthentication(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.checkPamAuthentication();
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of checkPamAuthentication method, of class JnaNativeUnixSupport.
 */
@Test public void testCheckPamAuthentication(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.checkPamAuthentication();
  System.out.println("String_Node_Str" + result);
}
Program: 24556
Project: 24556
Buggy source:
/** 
 * Test of getSystemMemory method, of class JnaNativeUnixSupport.  Just print out the result and make sure the method works Ignored because works fine on Solaris and Linux but on MAC fails with the following message No suitable implementation found: os.name=Mac OS X os.arch=x86_64 sun.arch.data.model=64
 */
@Ignore public void testGetSystemMemory(){
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  NativeSystemMemory result=instance.getSystemMemory();
  System.out.println("String_Node_Str" + result.getTotalSwapSpace());
  System.out.println("String_Node_Str" + result.getAvailableSwapSpace());
  System.out.println("String_Node_Str" + result.getTotalPhysicalMemory());
  System.out.println("String_Node_Str" + result.getAvailablePhysicalMemory());
}

Fixed version (ground truth):
/** 
 * Test of getSystemMemory method, of class JnaNativeUnixSupport.  Just print out the result and make sure the method works Ignored because works fine on Solaris and Linux but on MAC fails with the following message No suitable implementation found: os.name=Mac OS X os.arch=x86_64 sun.arch.data.model=64
 */
@Ignore public void testGetSystemMemory(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  NativeSystemMemory result=instance.getSystemMemory();
  System.out.println("String_Node_Str" + result.getTotalSwapSpace());
  System.out.println("String_Node_Str" + result.getAvailableSwapSpace());
  System.out.println("String_Node_Str" + result.getTotalPhysicalMemory());
  System.out.println("String_Node_Str" + result.getAvailablePhysicalMemory());
}
Program: 24557
Project: 24557
Buggy source:
/** 
 * Test of restartJavaProcess method, of class JnaNativeUnixSupport. This test must be ignored and tested only in a controlled condition, because it restarts the process again and the Test runs in an endless loop. It is exists just to test once in case of library changes
 */
@Ignore public void testRestartJavaProcess(){
  System.out.println("String_Node_Str");
  Map<String,String> properties=null;
  boolean daemonExec=false;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.restartJavaProcess(properties,daemonExec);
}

Fixed version (ground truth):
/** 
 * Test of restartJavaProcess method, of class JnaNativeUnixSupport. This test must be ignored and tested only in a controlled condition, because it restarts the process again and the Test runs in an endless loop. It is exists just to test once in case of library changes
 */
@Ignore public void testRestartJavaProcess(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  Map<String,String> properties=null;
  boolean daemonExec=false;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.restartJavaProcess(properties,daemonExec);
}
Program: 24558
Project: 24558
Buggy source:
/** 
 * Test of pamAuthenticate method, of class JnaNativeUnixSupport. Ignored, because specific user name and password is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testPamAuthenticate(){
  System.out.println("String_Node_Str");
  String serviceName="String_Node_Str";
  String userName="String_Node_Str";
  String password="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  Set<String> result=instance.pamAuthenticate(serviceName,userName,password);
  Iterator iter=result.iterator();
  while (iter.hasNext()) {
    System.out.println(iter.next());
  }
  Assert.assertTrue(result.contains(expResult));
}

Fixed version (ground truth):
/** 
 * Test of pamAuthenticate method, of class JnaNativeUnixSupport. Ignored, because specific user name and password is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testPamAuthenticate(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  String serviceName="String_Node_Str";
  String userName="String_Node_Str";
  String password="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String expResult="String_Node_Str";
  Set<String> result=instance.pamAuthenticate(serviceName,userName,password);
  Iterator iter=result.iterator();
  while (iter.hasNext()) {
    System.out.println(iter.next());
  }
  Assert.assertTrue(result.contains(expResult));
}
Program: 24559
Project: 24559
Buggy source:
/** 
 * Test of checkUnixUser method, of class JnaNativeUnixSupport. Ignored, because specific user name is needed Remove @Ignore to test in your specific environment
 */
@Ignore public void testCheckUnixUser(){
  String userName="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.checkUnixUser(userName);
  Assert.assertTrue(result);
}

Fixed version (ground truth):
/** 
 * Test of checkUnixUser method, of class JnaNativeUnixSupport. Ignored, because specific user name is needed Remove @Ignore to test in your specific environment
 */
@Ignore public void testCheckUnixUser(){
  if (Functions.isWindows())   return;
  String userName="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.checkUnixUser(userName);
  Assert.assertTrue(result);
}
Program: 24560
Project: 24560
Buggy source:
/** 
 * Test of getEuid method, of class JnaNativeUnixSupport. Simply get an print the current Effective User ID and make sure the function indeed works
 */
@Test public void testGetEuid(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int result=instance.getEuid();
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of getEuid method, of class JnaNativeUnixSupport. Simply get an print the current Effective User ID and make sure the function indeed works
 */
@Test public void testGetEuid(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int result=instance.getEuid();
  System.out.println("String_Node_Str" + result);
}
Program: 24561
Project: 24561
Buggy source:
/** 
 * Test of getProcessUser method, of class JnaNativeUnixSupport. Just print out the result and make sure the method works
 */
@Test public void testGetProcessUser(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.getProcessUser();
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of getProcessUser method, of class JnaNativeUnixSupport. Just print out the result and make sure the method works
 */
@Test public void testGetProcessUser(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.getProcessUser();
  System.out.println("String_Node_Str" + result);
}
Program: 24562
Project: 24562
Buggy source:
/** 
 * Test of getEgid method, of class JnaNativeUnixSupport. Simply get an print the current Effective User ID and make sure the function indeed works
 */
@Test public void testGetEgid(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int result=instance.getEgid();
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of getEgid method, of class JnaNativeUnixSupport. Simply get an print the current Effective User ID and make sure the function indeed works
 */
@Test public void testGetEgid(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  int result=instance.getEgid();
  System.out.println("String_Node_Str" + result);
}
Program: 24563
Project: 24563
Buggy source:
/** 
 * Test of canRestartJavaProcess method, of class JnaNativeUnixSupport.
 */
@Test public void testCanRestartJavaProcess(){
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.canRestartJavaProcess();
  Assert.assertTrue(result);
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of canRestartJavaProcess method, of class JnaNativeUnixSupport.
 */
@Test public void testCanRestartJavaProcess(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.canRestartJavaProcess();
  Assert.assertTrue(result);
  System.out.println("String_Node_Str" + result);
}
Program: 24564
Project: 24564
Buggy source:
/** 
 * Test of checkPamAuthentication method, of class JnaNativeUnixSupport.
 */
@Test public void testCheckPamAuthentication(){
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.checkPamAuthentication();
  System.out.println("String_Node_Str" + result);
}

Fixed version (ground truth):
/** 
 * Test of checkPamAuthentication method, of class JnaNativeUnixSupport.
 */
@Test public void testCheckPamAuthentication(){
  if (Functions.isWindows())   return;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  String result=instance.checkPamAuthentication();
  System.out.println("String_Node_Str" + result);
}
Program: 24565
Project: 24565
Buggy source:
/** 
 * Test of checkUnixGroup method, of class JnaNativeUnixSupport. Ignored, because specific group name is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testCheckUnixGroup(){
  String groupName="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.checkUnixGroup(groupName);
  Assert.assertTrue(result);
}

Fixed version (ground truth):
/** 
 * Test of checkUnixGroup method, of class JnaNativeUnixSupport. Ignored, because specific group name is needed. Remove @Ignore to test in your specific environment
 */
@Ignore public void testCheckUnixGroup(){
  if (Functions.isWindows())   return;
  String groupName="String_Node_Str";
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  boolean result=instance.checkUnixGroup(groupName);
  Assert.assertTrue(result);
}
Program: 24566
Project: 24566
Buggy source:
/** 
 * Test of getSystemMemory method, of class JnaNativeUnixSupport.  Just print out the result and make sure the method works Ignored because works fine on Solaris and Linux but on MAC fails with the following message No suitable implementation found: os.name=Mac OS X os.arch=x86_64 sun.arch.data.model=64
 */
@Ignore public void testGetSystemMemory(){
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  NativeSystemMemory result=instance.getSystemMemory();
  System.out.println("String_Node_Str" + result.getTotalSwapSpace());
  System.out.println("String_Node_Str" + result.getAvailableSwapSpace());
  System.out.println("String_Node_Str" + result.getTotalPhysicalMemory());
  System.out.println("String_Node_Str" + result.getAvailablePhysicalMemory());
}

Fixed version (ground truth):
/** 
 * Test of getSystemMemory method, of class JnaNativeUnixSupport.  Just print out the result and make sure the method works Ignored because works fine on Solaris and Linux but on MAC fails with the following message No suitable implementation found: os.name=Mac OS X os.arch=x86_64 sun.arch.data.model=64
 */
@Ignore public void testGetSystemMemory(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  NativeSystemMemory result=instance.getSystemMemory();
  System.out.println("String_Node_Str" + result.getTotalSwapSpace());
  System.out.println("String_Node_Str" + result.getAvailableSwapSpace());
  System.out.println("String_Node_Str" + result.getTotalPhysicalMemory());
  System.out.println("String_Node_Str" + result.getAvailablePhysicalMemory());
}
Program: 24567
Project: 24567
Buggy source:
/** 
 * Test of restartJavaProcess method, of class JnaNativeUnixSupport. This test must be ignored and tested only in a controlled condition, because it restarts the process again and the Test runs in an endless loop. It is exists just to test once in case of library changes
 */
@Ignore public void testRestartJavaProcess(){
  System.out.println("String_Node_Str");
  Map<String,String> properties=null;
  boolean daemonExec=false;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.restartJavaProcess(properties,daemonExec);
}

Fixed version (ground truth):
/** 
 * Test of restartJavaProcess method, of class JnaNativeUnixSupport. This test must be ignored and tested only in a controlled condition, because it restarts the process again and the Test runs in an endless loop. It is exists just to test once in case of library changes
 */
@Ignore public void testRestartJavaProcess(){
  if (Functions.isWindows())   return;
  System.out.println("String_Node_Str");
  Map<String,String> properties=null;
  boolean daemonExec=false;
  JnaNativeUnixSupport instance=new JnaNativeUnixSupport();
  instance.restartJavaProcess(properties,daemonExec);
}
Program: 24568
Project: 24568
Buggy source:
private void writeToJson(SourceWriter sw){
  sw.println();
  sw.println("String_Node_Str");
  sw.println("String_Node_Str" + jc.getQualifiedSourceName() + "String_Node_Str");
  sw.indent();
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  Boolean first=true;
  String t="String_Node_Str";
  for (  JField f : fields) {
    if (!first) {
      sw.println();
      sw.println(t);
      sw.println();
    }
 else {
      sw.println();
      first=false;
    }
    sw.println("String_Node_Str" + getJsonName(f) + "String_Node_Str");
    sw.println("String_Node_Str");
    sw.println("String_Node_Str" + f.getName() + "String_Node_Str");
  }
  sw.println();
  sw.println("String_Node_Str");
  sw.outdent();
  sw.println("String_Node_Str");
}

Fixed version (ground truth):
private void writeToJson(SourceWriter sw){
  sw.println();
  sw.println("String_Node_Str");
  sw.println("String_Node_Str" + jc.getQualifiedSourceName() + suffix+ "String_Node_Str");
  sw.indent();
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  Boolean first=true;
  String t="String_Node_Str";
  for (  JField f : fields) {
    if (!first) {
      sw.println();
      sw.println(t);
      sw.println();
    }
 else {
      sw.println();
      first=false;
    }
    sw.println("String_Node_Str" + getJsonName(f) + "String_Node_Str");
    sw.println("String_Node_Str");
    sw.println("String_Node_Str" + f.getName() + "String_Node_Str");
  }
  sw.println();
  sw.println("String_Node_Str");
  sw.outdent();
  sw.println("String_Node_Str");
}
Program: 24570
Project: 24570
Buggy source:
private void writeFromJson(SourceWriter sw){
  sw.println();
  sw.println("String_Node_Str");
  sw.println("String_Node_Str" + jc.getSimpleSourceName() + "String_Node_Str");
  sw.indent();
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  sw.println();
  for (  JField f : fields) {
    sw.println(getFieldType(f) + "String_Node_Str" + f.getName()+ "String_Node_Str");
  }
  sw.println();
  int counter=0;
  for (  JField f : fields) {
    sw.print(f.getName() + "String_Node_Str" + getJsonName(f)+ "String_Node_Str");
    if (f.getType().isTypeParameter() == null) {
      sw.println(f.getName() + "String_Node_Str" + getFieldType(f,true)+ "String_Node_Str");
    }
 else {
      int l=getParametizedFieldCount(f);
      sw.println(f.getName() + "String_Node_Str" + counter+ "String_Node_Str"+ (counter + l)+ "String_Node_Str"+ (l + 1)+ "String_Node_Str");
      counter=counter + l + 1;
    }
  }
  sw.println();
  sw.println(jc.getParameterizedQualifiedSourceName() + "String_Node_Str" + jc.getParameterizedQualifiedSourceName()+ "String_Node_Str");
  sw.print("String_Node_Str");
  for (  JField f : fields) {
    sw.print("String_Node_Str" + f.getName());
  }
  sw.println("String_Node_Str");
  sw.println("String_Node_Str");
  sw.outdent();
  sw.println("String_Node_Str");
}

Fixed version (ground truth):
private void writeFromJson(SourceWriter sw){
  sw.println();
  sw.println("String_Node_Str");
  sw.println("String_Node_Str" + jc.getQualifiedSourceName() + suffix+ "String_Node_Str");
  sw.indent();
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  sw.indentln("String_Node_Str");
  sw.println("String_Node_Str");
  sw.println();
  for (  JField f : fields) {
    sw.println(getFieldType(f) + "String_Node_Str" + f.getName()+ "String_Node_Str");
  }
  sw.println();
  for (  JField f : fields) {
    sw.print(f.getName() + "String_Node_Str" + getJsonName(f)+ "String_Node_Str");
    if (f.getType().isTypeParameter() == null) {
      sw.println(f.getName() + "String_Node_Str" + getFieldType(f,true)+ "String_Node_Str");
    }
 else {
      sw.println(f.getName() + "String_Node_Str");
    }
  }
  sw.println();
  sw.println(jc.getQualifiedSourceName() + suffix + "String_Node_Str"+ jc.getQualifiedSourceName()+ suffix+ "String_Node_Str");
  sw.print("String_Node_Str");
  for (  JField f : fields) {
    sw.print("String_Node_Str" + f.getName());
  }
  sw.println("String_Node_Str");
  sw.println("String_Node_Str");
  sw.outdent();
  sw.println("String_Node_Str");
}
Program: 24571
Project: 24571
Buggy source:
/** 
 * @param context
 * @throws UnableToCompleteException 
 */
private void generateJsonFormatterClasses(GeneratorContext context) throws UnableToCompleteException {
  if (worklist == null || worklist.size() == 0) {
    return;
  }
  String localPackageName=packageName + "String_Node_Str";
  for (  JClassType jc : worklist) {
    String localClassName="String_Node_Str" + jc.getSimpleSourceName();
    if (!jc.isDefaultInstantiable()) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + jc.getSimpleSourceName() + "String_Node_Str");
    }
 else {
      SubClassGenerator gen=new SubClassGenerator();
      localClassName=gen.generateSubClass(context,localPackageName,jc,localClassName);
      map.put(jc.getQualifiedSourceName(),localPackageName + "String_Node_Str" + localClassName);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param context
 * @throws UnableToCompleteException 
 */
private void generateJsonFormatterClasses(GeneratorContext context) throws UnableToCompleteException {
  if (worklist == null || worklist.size() == 0) {
    return;
  }
  for (  JClassType jc : worklist) {
    if (!jc.isDefaultInstantiable()) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + jc.getSimpleSourceName() + "String_Node_Str");
    }
 else {
      SubClassGenerator gen=new SubClassGenerator();
      String implentationClassName;
      implentationClassName=gen.generateSubClass(context,jc);
      if (implentationClassName == null) {
        return;
      }
      map.put(jc.getQualifiedSourceName(),implentationClassName);
    }
  }
}
Program: 24572
Project: 24572
Buggy source:
private void writeNatives(SourceWriter sw){
  String s="String_Node_Str" + jc.getQualifiedSourceName() + "String_Node_Str";
  sw.println();
  sw.print("String_Node_Str" + jc.getParameterizedQualifiedSourceName() + "String_Node_Str");
  for (  JField f : fields) {
    sw.print("String_Node_Str" + getFieldType(f) + "String_Node_Str"+ f.getName());
  }
  sw.println("String_Node_Str");
  sw.indent();
  for (  JField f : fields) {
    sw.println(s + f.getName() + "String_Node_Str"+ f.getName()+ "String_Node_Str");
  }
  sw.outdent();
  sw.println("String_Node_Str");
  for (  JField f : fields) {
    sw.println();
    sw.println("String_Node_Str" + getFieldType(f) + "String_Node_Str"+ f.getName()+ "String_Node_Str"+ jc.getParameterizedQualifiedSourceName()+ "String_Node_Str");
    sw.indent();
    sw.println("String_Node_Str" + s + f.getName()+ "String_Node_Str");
    sw.outdent();
    sw.println("String_Node_Str");
  }
}

Fixed version (ground truth):
private void writeNatives(SourceWriter sw){
  String s="String_Node_Str" + jc.getQualifiedSourceName() + "String_Node_Str";
  sw.println();
  sw.print("String_Node_Str" + jc.getQualifiedSourceName() + suffix+ "String_Node_Str");
  for (  JField f : fields) {
    sw.print("String_Node_Str" + getFieldType(f) + "String_Node_Str"+ f.getName());
  }
  sw.println("String_Node_Str");
  sw.indent();
  for (  JField f : fields) {
    sw.println(s + f.getName() + "String_Node_Str"+ f.getName()+ "String_Node_Str");
  }
  sw.outdent();
  sw.println("String_Node_Str");
  for (  JField f : fields) {
    sw.println();
    sw.println("String_Node_Str" + getFieldType(f) + "String_Node_Str"+ f.getName()+ "String_Node_Str"+ jc.getQualifiedSourceName()+ suffix+ "String_Node_Str");
    sw.indent();
    sw.println("String_Node_Str" + s + f.getName()+ "String_Node_Str");
    sw.outdent();
    sw.println("String_Node_Str");
  }
}
Program: 24573
Project: 24573
Buggy source:
private boolean checkClass(JClassType type){
  if (!map.containsKey(type.getQualifiedSourceName()) && type.isWildcard() == null && !worklist.contains(type)) {
    return worklist.add(type);
  }
  return false;
}

Fixed version (ground truth):
private boolean checkClass(JClassType type){
  boolean b=false;
  if (!map.containsKey(type.getQualifiedSourceName()) && type.isWildcard() == null && !worklist.contains(type)) {
    b=worklist.add(type);
  }
  return b;
}
Program: 24574
Project: 24574
Buggy source:
/** 
 * @param context
 * @throws UnableToCompleteException 
 */
private void generateJsonFormatterClasses(GeneratorContext context) throws UnableToCompleteException {
  if (worklist == null || worklist.size() == 0) {
    return;
  }
  String localPackageName=packageName + "String_Node_Str";
  for (  JClassType jc : worklist) {
    String localClassName="String_Node_Str" + jc.getSimpleSourceName();
    JConstructor[] cs=jc.getConstructors();
    boolean emptyConstructor=false;
    for (    JConstructor jConstructor : cs) {
      if (jConstructor.getParameters().length == 0) {
        emptyConstructor=true;
        break;
      }
    }
    if (!emptyConstructor) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + jc.getSimpleSourceName() + "String_Node_Str");
    }
 else {
      SubClassGenerator gen=new SubClassGenerator();
      localClassName=gen.generateSubClass(context,localPackageName,jc,localClassName);
      map.put(jc.getQualifiedSourceName(),localPackageName + "String_Node_Str" + localClassName);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param context
 * @throws UnableToCompleteException 
 */
private void generateJsonFormatterClasses(GeneratorContext context) throws UnableToCompleteException {
  if (worklist == null || worklist.size() == 0) {
    return;
  }
  String localPackageName=packageName + "String_Node_Str";
  for (  JClassType jc : worklist) {
    String localClassName="String_Node_Str" + jc.getSimpleSourceName();
    JConstructor[] cs=jc.getConstructors();
    boolean emptyConstructor=false;
    for (    JConstructor jConstructor : cs) {
      if (jConstructor.getParameters().length == 0) {
        emptyConstructor=true;
        break;
      }
    }
    if (!emptyConstructor && cs.length > 0) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + jc.getSimpleSourceName() + "String_Node_Str");
    }
 else {
      SubClassGenerator gen=new SubClassGenerator();
      localClassName=gen.generateSubClass(context,localPackageName,jc,localClassName);
      map.put(jc.getQualifiedSourceName(),localPackageName + "String_Node_Str" + localClassName);
    }
  }
}
Program: 24575
Project: 24575
Buggy source:
@Inject public Wall(Display display,TechDemo service){
  this.service=service;
  display.setHandler(this);
  service.getWall(new AsyncCallback<List<String>>(){
    @Override public void onSuccess(    List<String> result){
      for (      String s : result) {
        addMessage(s);
      }
    }
    @Override public void onFailure(    Throwable caught){
      GWT.log("String_Node_Str");
    }
  }
);
  this.display=display;
  this.eventBus.addHandler(NewWallMessageEvent.TYPE,this);
}

Fixed version (ground truth):
@Inject public Wall(Display display,TechDemo service,EventBus eventBus){
  this.service=service;
  this.eventBus=eventBus;
  display.setHandler(this);
  service.getWall(new AsyncCallback<List<String>>(){
    @Override public void onSuccess(    List<String> result){
      for (      String s : result) {
        addMessage(s);
      }
    }
    @Override public void onFailure(    Throwable caught){
      GWT.log("String_Node_Str");
    }
  }
);
  this.display=display;
  this.eventBus.addHandler(NewWallMessageEvent.TYPE,this);
}
Program: 24576
Project: 24576
Buggy source:
@Override public Date fromJson(JSONValue jsonValue,List<Class<?>> subtypes,SimpleEncoder simpleEncoder) throws UnableToDeserialize {
  if (jsonValue.isNull() != null)   return null;
  if (jsonValue.isNumber() == null)   throw new UnableToDeserialize("String_Node_Str");
  JSONNumber o=jsonValue.isNumber();
  return new Date((long)(o.doubleValue()));
}

Fixed version (ground truth):
@Override public Date fromJson(JSONValue jsonValue,List<Class<?>> subtypes,JsonEncoder simpleEncoder) throws UnableToDeserialize {
  if (jsonValue.isNull() != null)   return null;
  if (jsonValue.isNumber() == null)   throw new UnableToDeserialize("String_Node_Str");
  JSONNumber o=jsonValue.isNumber();
  return new Date((long)(o.doubleValue()));
}
Program: 24577
Project: 24577
Buggy source:
@Override public TimeEntry fromJson(JSONValue jsonValue,List<Class<?>> subtypes,SimpleEncoder simpleEncoder) throws UnableToDeserialize {
  if (jsonValue.isNull() != null)   return null;
  if (jsonValue.isObject() == null)   throw new UnableToDeserialize("String_Node_Str");
  JSONObject o=jsonValue.isObject();
  return null;
}

Fixed version (ground truth):
@Override public TimeEntry fromJson(JSONValue jsonValue,List<Class<?>> subtypes,JsonEncoder jsonEncoder) throws UnableToDeserialize {
  if (jsonValue.isNull() != null)   return null;
  if (jsonValue.isObject() == null)   throw new UnableToDeserialize("String_Node_Str");
  JSONObject o=jsonValue.isObject();
  return null;
}
Program: 24578
Project: 24578
Buggy source:
@Override public void onSuccess(List<ModuleInfo> result){
  for (  ModuleInfo moduleInfo : result) {
    if (missing.remove(moduleInfo.getId())) {
      map.put(moduleInfo.getId(),moduleInfo);
    }
 else {
      continue;
    }
  }
  if (missing.isEmpty()) {
    for (    AsyncCallback<Map<Integer,ModuleInfo>> callback : asyncCallbacks) {
      callback.onSuccess(map);
    }
    asyncCallbacks=null;
  }
}

Fixed version (ground truth):
@Override public void onSuccess(List<ModuleInfo> result){
  for (  ModuleInfo moduleInfo : result) {
    if (missing.remove(moduleInfo.getId())) {
      map.put(moduleInfo.getId(),moduleInfo);
    }
 else {
      continue;
    }
  }
  if (missing.isEmpty() && asyncCallbacks != null) {
    for (    AsyncCallback<Map<Integer,ModuleInfo>> callback : asyncCallbacks) {
      callback.onSuccess(map);
    }
    asyncCallbacks=null;
  }
}
Program: 24579
Project: 24579
Buggy source:
@Override public void run(){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    updated=true;
  }
  if (i >= timerIterationCount) {
    i=0;
    if (updated) {
      saveModuleHeights();
    }
  }
 else {
    this.schedule(timerSchedule);
    i++;
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    updated=true;
  }
  if (i >= timerIterationCount) {
    i=0;
    if (updated) {
      saveModuleHeights();
      updated=false;
    }
  }
 else {
    this.schedule(timerSchedule);
    i++;
  }
}
Program: 24580
Project: 24580
Buggy source:
@Override public void onContentSizeChanged(ContentChangedEvent event){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    tabsModel.setModuleHeight(event.getModuleId(),event.getHeight());
  }
}

Fixed version (ground truth):
@Override public void onContentSizeChanged(ContentChangedEvent event){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    saveModuleHeights();
  }
}
Program: 24581
Project: 24581
Buggy source:
@Override public void run(){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    HashSet<Integer> needed=new HashSet<Integer>();
    for (    List<Integer> i : tabsModel.getSelectedTab().getModuleIds()) {
      needed.addAll(i);
    }
    moduleInfoProvider.translate(needed,new AsyncCallback<Map<Integer,ModuleInfo>>(){
      @Override public void onFailure(      Throwable caught){
        GWT.log("String_Node_Str",caught);
      }
      @Override public void onSuccess(      Map<Integer,ModuleInfo> result){
        for (        Entry<Integer,ModuleInfo> entry : result.entrySet()) {
          tabsModel.setModuleHeight(entry.getKey(),entry.getValue().getHeight());
        }
      }
    }
);
  }
  if (i >= 10) {
    i=0;
  }
 else {
    this.schedule(300);
    i++;
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (display.checkForResizes()) {
    showTab(tabsModel.getSelectedTab());
    updated=true;
  }
  if (i >= 10) {
    i=0;
    if (updated) {
      saveModuleHeights();
    }
  }
 else {
    this.schedule(300);
    i++;
  }
}
Program: 24582
Project: 24582
Buggy source:
@Override public int getDesiredHeight(){
  int magicInt=10;
  int a=this.content.getElement().getScrollHeight();
  int b=this.content.getElement().getOffsetTop();
  int r=a + b + magicInt;
  if (r == magicInt) {
    r=getLastHeight();
  }
  return r + 5;
}

Fixed version (ground truth):
@Override public int getDesiredHeight(){
  int magicInt=13;
  int a=this.content.getElement().getScrollHeight();
  int b=this.content.getElement().getOffsetTop();
  int r=a + b + magicInt;
  if (r == magicInt) {
    r=getLastHeight();
  }
  return r;
}
Program: 24583
Project: 24583
Buggy source:
/** 
 * The connect call POST an empty request to that and expects to receive a HTTP 201 Created with the url of where it can receive server frames.
 * @param url when opening a connection this url is used
 * @param subprotocol not used yet, mostly here for compatibility with websocket protocol
 */
@Override public void connect(String url,String subprotocol){
  if (status.equals(WebSocketStatus.CLOSED)) {
    this.url=url;
    RequestBuilder builder=new RequestBuilder(RequestBuilder.POST,url);
    try {
      builder.sendRequest("String_Node_Str",connectCallback);
    }
 catch (    RequestException e) {
      GWT.log("String_Node_Str",e);
    }
    this.status=WebSocketStatus.CONNECTING;
  }
}

Fixed version (ground truth):
/** 
 * The connect call POST an empty request to that and expects to receive a HTTP 201 Created with the url of where it can receive server frames.
 * @param url when opening a connection this url is used
 * @param subprotocol not used yet, mostly here for compatibility with websocket protocol
 */
@Override public void connect(String url,String subprotocol){
  if (status.equals(WebSocketStatus.CLOSED)) {
    this.url=url;
    RequestBuilder builder=new RequestBuilder(RequestBuilder.POST,url);
    try {
      builder.sendRequest("String_Node_Str",connectCallback);
    }
 catch (    RequestException e) {
      GWT.log("String_Node_Str",e);
      return;
    }
    this.status=WebSocketStatus.CONNECTING;
  }
}
Program: 24584
Project: 24584
Buggy source:
private void addFeature(final String featureName,final String securityName){
  final Class<? extends RemoteService> feature=clientFeatureMap.getClassFromKey(featureName);
  if (feature == null) {
    GWT.log("String_Node_Str" + featureName);
    return;
  }
  if (securityName == null) {
    GWT.log("String_Node_Str" + featureName + "String_Node_Str");
    authenticationMethods.put(feature,null);
  }
 else {
    Class<? extends SecurityMethod> security=clientSecurityMap.getClassFromKey(securityName);
    if (security == null) {
      GWT.log("String_Node_Str" + featureName + "String_Node_Str"+ securityName);
      return;
    }
    loadAuthenticationMethod(feature,security);
  }
}

Fixed version (ground truth):
private void addFeature(final String featureName,final String securityName){
  final Class<? extends RemoteService> feature=clientFeatureMap.getClassFromKey(featureName);
  if (feature == null) {
    GWT.log("String_Node_Str" + featureName);
    return;
  }
  if (securityName == null) {
    GWT.log("String_Node_Str" + featureName + "String_Node_Str");
    authenticationMethods.put(feature,null);
    sendCallsWithFeature(feature);
  }
 else {
    Class<? extends SecurityMethod> security=clientSecurityMap.getClassFromKey(securityName);
    if (security == null) {
      GWT.log("String_Node_Str" + featureName + "String_Node_Str"+ securityName);
      return;
    }
    loadAuthenticationMethod(feature,security);
  }
}