nus-yam/ex-repair huggingface dataset:
Program: 59210
Project: 59210
Buggy source:
public void updateLocations(Location fromLocation,Location toLocation,Product product,BigDecimal qty,int fromStatus,int toStatus,LocalDate lastFutureStockMoveDate,TrackingNumber trackingNumber,ProductVariant productVariant){
switch (fromStatus) {
case IStockMove.PLANNED:
    locationLineService.updateLocation(fromLocation,product,qty,false,true,true,null,trackingNumber,productVariant);
  locationLineService.updateLocation(toLocation,product,qty,false,true,false,null,trackingNumber,productVariant);
break;
case IStockMove.REALIZED:
locationLineService.updateLocation(fromLocation,product,qty,true,true,true,null,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,true,true,false,null,trackingNumber,productVariant);
break;
default :
break;
}
switch (toStatus) {
case IStockMove.PLANNED:
locationLineService.updateLocation(fromLocation,product,qty,false,true,false,lastFutureStockMoveDate,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,false,true,true,lastFutureStockMoveDate,trackingNumber,productVariant);
break;
case IStockMove.REALIZED:
locationLineService.updateLocation(fromLocation,product,qty,true,true,false,null,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,true,true,true,null,trackingNumber,productVariant);
break;
default :
break;
}
}

Fixed version (ground truth):
public void updateLocations(Location fromLocation,Location toLocation,Product product,BigDecimal qty,int fromStatus,int toStatus,LocalDate lastFutureStockMoveDate,ProductVariant productVariant,TrackingNumber trackingNumber){
switch (fromStatus) {
case IStockMove.PLANNED:
    locationLineService.updateLocation(fromLocation,product,qty,false,true,true,null,trackingNumber,productVariant);
  locationLineService.updateLocation(toLocation,product,qty,false,true,false,null,trackingNumber,productVariant);
break;
case IStockMove.REALIZED:
locationLineService.updateLocation(fromLocation,product,qty,true,true,true,null,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,true,true,false,null,trackingNumber,productVariant);
break;
default :
break;
}
switch (toStatus) {
case IStockMove.PLANNED:
locationLineService.updateLocation(fromLocation,product,qty,false,true,false,lastFutureStockMoveDate,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,false,true,true,lastFutureStockMoveDate,trackingNumber,productVariant);
break;
case IStockMove.REALIZED:
locationLineService.updateLocation(fromLocation,product,qty,true,true,false,null,trackingNumber,productVariant);
locationLineService.updateLocation(toLocation,product,qty,true,true,true,null,trackingNumber,productVariant);
break;
default :
break;
}
}
Program: 59211
Project: 59211
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void plan(StockMove stockMove) throws AxelorException {
  LOG.debug("String_Node_Str",new Object[]{stockMove.getName()});
  Location fromLocation=stockMove.getFromLocation();
  Location toLocation=stockMove.getToLocation();
  if (fromLocation == null) {
    throw new AxelorException(String.format("String_Node_Str",exceptionMsg,stockMove.getName()),IException.CONFIGURATION_ERROR);
  }
  if (toLocation == null) {
    throw new AxelorException(String.format("String_Node_Str",exceptionMsg,stockMove.getName()),IException.CONFIGURATION_ERROR);
  }
  if (stockMove.getTypeSelect() == null || stockMove.getTypeSelect() == 0) {
    stockMove.setTypeSelect(this.getStockMoveType(fromLocation,toLocation));
  }
  if (stockMove.getStockMoveSeq() == null || stockMove.getStockMoveSeq().isEmpty()) {
    String refSequence=this.getSequenceStockMove(stockMove.getTypeSelect(),stockMove.getCompany());
    stockMove.setStockMoveSeq(refSequence);
    stockMove.setName(refSequence);
  }
  this.updateLocations(fromLocation,toLocation,stockMove.getStatusSelect(),IStockMove.PLANNED,stockMove.getStockMoveLineList(),stockMove.getEstimatedDate());
  if (stockMove.getEstimatedDate() == null) {
    stockMove.setEstimatedDate(this.today);
  }
  stockMove.setStatusSelect(IStockMove.PLANNED);
  stockMove.save();
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void plan(StockMove stockMove) throws AxelorException {
  LOG.debug("String_Node_Str",new Object[]{stockMove.getName()});
  Location fromLocation=stockMove.getFromLocation();
  Location toLocation=stockMove.getToLocation();
  if (fromLocation == null) {
    throw new AxelorException(String.format("String_Node_Str",exceptionMsg,stockMove.getName()),IException.CONFIGURATION_ERROR);
  }
  if (toLocation == null) {
    throw new AxelorException(String.format("String_Node_Str",exceptionMsg,stockMove.getName()),IException.CONFIGURATION_ERROR);
  }
  if (stockMove.getTypeSelect() == null || stockMove.getTypeSelect() == 0) {
    stockMove.setTypeSelect(this.getStockMoveType(fromLocation,toLocation));
  }
  if (stockMove.getStockMoveSeq() == null || stockMove.getStockMoveSeq().isEmpty()) {
    stockMove.setStockMoveSeq(this.getSequenceStockMove(stockMove.getTypeSelect(),stockMove.getCompany()));
  }
  if (stockMove.getName() == null || stockMove.getName().isEmpty()) {
    stockMove.setName(stockMove.getStockMoveSeq());
  }
  this.updateLocations(fromLocation,toLocation,stockMove.getStatusSelect(),IStockMove.PLANNED,stockMove.getStockMoveLineList(),stockMove.getEstimatedDate());
  if (stockMove.getEstimatedDate() == null) {
    stockMove.setEstimatedDate(this.today);
  }
  stockMove.setStatusSelect(IStockMove.PLANNED);
  stockMove.save();
}
Program: 59212
Project: 59212
Buggy source:
/** 
 * Checks if the session resource has the specified domain create permissions on the specified domain. This method takes into account any direct and inherited domain create permissions.
 * @param domainCreatePermission  the domain create permission to be checked
 * @param domainCreatePermissions the other (optional) domain create permissions to be checked
 * @return  <strong>true</strong> if the session resource has the specified domain create permissions,<strong>false</strong> otherwise
 */
public boolean hasDomainCreatePermissions(DomainCreatePermission domainCreatePermission,DomainCreatePermission... domainCreatePermissions);

Fixed version (ground truth):
/** 
 * Checks if the session resource has the specified domain create permissions. This method takes into account any direct and inherited domain create permissions.
 * @param domainCreatePermission  the domain create permission to be checked
 * @param domainCreatePermissions the other (optional) domain create permissions to be checked
 * @return  <strong>true</strong> if the session resource has the specified domain create permissions,<strong>false</strong> otherwise
 */
public boolean hasDomainCreatePermissions(DomainCreatePermission domainCreatePermission,DomainCreatePermission... domainCreatePermissions);
Program: 59213
Project: 59213
Buggy source:
/** 
 * Checks if the session resource has the specified domain create permissions on the specified domain. This method takes into account any direct and inherited domain create permissions.
 * @param domainCreatePermission  the domain create permission to be checked
 * @param domainCreatePermissions the other (optional) domain create permissions to be checked
 * @throws com.acciente.oacc.NotAuthorizedException if the session resource <strong>does not</strong> have thespecified domain create permissions
 */
public void assertDomainCreatePermissions(DomainCreatePermission domainCreatePermission,DomainCreatePermission... domainCreatePermissions);

Fixed version (ground truth):
/** 
 * Checks if the session resource has the specified domain create permissions. This method takes into account any direct and inherited domain create permissions.
 * @param domainCreatePermission  the domain create permission to be checked
 * @param domainCreatePermissions the other (optional) domain create permissions to be checked
 * @throws com.acciente.oacc.NotAuthorizedException if the session resource <strong>does not</strong> have thespecified domain create permissions
 */
public void assertDomainCreatePermissions(DomainCreatePermission domainCreatePermission,DomainCreatePermission... domainCreatePermissions);
Program: 59214
Project: 59214
Buggy source:
/** 
 * Returns a String representation of the specified vararg sequence with a mandatory first element. <pre><code> first | others    | result -------|-----------|-------- null  | []        | [null] null  | null      | [null, null] a     | []        | [a] a     | null      | [a, null] a     | [b, a]    | [a, b, a] a     | [b, null] | [a, b, null] </code></pre> (*) the returned String representation will not guarantee any order of elements and will not de-duplicate
 */
private static <T>String toString(T first,T... others){
  List<T> resultList;
  if (others == null) {
    resultList=new ArrayList<T>(2);
    resultList.add(null);
  }
 else {
    resultList=new ArrayList<T>(others.length + 1);
    Collections.addAll(resultList,others);
  }
  resultList.add(first);
  return resultList.toString();
}

Fixed version (ground truth):
/** 
 * Returns a String representation of the specified vararg sequence with a mandatory first element. <pre><code> first | others    | result -------|-----------|-------- null  | []        | [null] null  | null      | [null, null] a     | []        | [a] a     | null      | [a, null] a     | [b, a]    | [a, b, a] a     | [b, null] | [a, b, null] </code></pre> (*) the returned String representation will not guarantee any order of elements and will not de-duplicate
 */
@SafeVarargs public static <T>String toString(T first,T... others){
  List<T> resultList;
  if (others == null) {
    resultList=new ArrayList<>(2);
    resultList.add(null);
  }
 else {
    resultList=new ArrayList<>(others.length + 1);
    Collections.addAll(resultList,others);
  }
  resultList.add(first);
  return resultList.toString();
}
Program: 59215
Project: 59215
Buggy source:
private void __assertPermissionValid(SQLConnection connection,String resourceClassName,ResourcePermission resourcePermission){
  if (!resourcePermission.isSystemPermission()) {
    final List<String> permissionNames=resourceClassPermissionPersister.getPermissionNames(connection,resourceClassName);
    if (!permissionNames.contains(resourcePermission.getPermissionName())) {
      throw new IllegalArgumentException("String_Node_Str" + resourcePermission + "String_Node_Str"+ resourceClassName);
    }
  }
}

Fixed version (ground truth):
private void __assertPermissionValid(SQLConnection connection,String resourceClassName,ResourcePermission resourcePermission){
  if (resourcePermission.isSystemPermission()) {
    if (ResourcePermissions.IMPERSONATE.equals(resourcePermission.getPermissionName()) || ResourcePermissions.RESET_CREDENTIALS.equals(resourcePermission.getPermissionName())) {
      final ResourceClassInternalInfo resourceClassInfo=resourceClassPersister.getResourceClassInfo(connection,resourceClassName);
      if (!resourceClassInfo.isAuthenticatable()) {
        throw new IllegalArgumentException("String_Node_Str" + String.valueOf(resourcePermission) + "String_Node_Str"+ resourceClassName);
      }
    }
  }
 else {
    final List<String> permissionNames=resourceClassPermissionPersister.getPermissionNames(connection,resourceClassName);
    if (!permissionNames.contains(resourcePermission.getPermissionName())) {
      throw new IllegalArgumentException("String_Node_Str" + resourcePermission + "String_Node_Str"+ resourceClassName);
    }
  }
}
Program: 59218
Project: 59218
Buggy source:
private void assertPasswordEmpty(String password) throws AccessControlException {
  if (password != null && !password.isEmpty()) {
    throw new AccessControlException("String_Node_Str",true);
  }
}

Fixed version (ground truth):
private void assertPasswordEmpty(String password) throws AccessControlException {
  if (password != null && !password.isEmpty()) {
    throw new AccessControlException("String_Node_Str");
  }
}
Program: 59219
Project: 59219
Buggy source:
private void assertPasswordOK(String password) throws AccessControlException {
  if (password == null) {
    throw new AccessControlException("String_Node_Str",true);
  }
  if (password.length() != password.trim().length()) {
    throw new AccessControlException("String_Node_Str",true);
  }
  if (password.length() < 6) {
    throw new AccessControlException("String_Node_Str",true);
  }
}

Fixed version (ground truth):
private void assertPasswordOK(String password) throws AccessControlException {
  if (password == null) {
    throw new AccessControlException("String_Node_Str");
  }
  if (password.length() != password.trim().length()) {
    throw new AccessControlException("String_Node_Str");
  }
  if (password.length() < 6) {
    throw new AccessControlException("String_Node_Str");
  }
}
Program: 59220
Project: 59220
Buggy source:
private void assertParentDomainSpecified(String domainName) throws AccessControlException {
  if (domainName == null || domainName.isEmpty()) {
    throw new AccessControlException("String_Node_Str",true);
  }
}

Fixed version (ground truth):
private void assertParentDomainSpecified(String domainName) throws AccessControlException {
  if (domainName == null || domainName.isEmpty()) {
    throw new AccessControlException("String_Node_Str");
  }
}
Program: 59221
Project: 59221
Buggy source:
private void assertDomainSpecified(String domainName) throws AccessControlException {
  if (domainName == null || domainName.trim().isEmpty()) {
    throw new AccessControlException("String_Node_Str",true);
  }
}

Fixed version (ground truth):
private void assertDomainSpecified(String domainName) throws AccessControlException {
  if (domainName == null || domainName.trim().isEmpty()) {
    throw new AccessControlException("String_Node_Str");
  }
}
Program: 59222
Project: 59222
Buggy source:
protected void preSerialize(){
  this.dataSource=null;
  this.connection=null;
}

Fixed version (ground truth):
protected void preSerialize(){
  this.dataSource=null;
  this.connection=null;
  this.passwordEncryptor=null;
}
Program: 59223
Project: 59223
Buggy source:
protected void postDeserialize(Connection connection){
  this.dataSource=null;
  this.connection=connection;
}

Fixed version (ground truth):
protected void postDeserialize(Connection connection){
  this.dataSource=null;
  this.connection=connection;
  this.passwordEncryptor=new StrongCleanablePasswordEncryptor();
}
Program: 59225
Project: 59225
Buggy source:
public void attachShutDownHookForceStopDockerContainers(@Observes(precedence=200) BeforeSuite event,final CubeRegistry cubeRegistry){
  Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    final List<Cube<?>> cubes=cubeRegistry.getCubes();
    for (    Cube cube : cubes) {
      cube.stop();
      cube.destroy();
    }
  }
));
}

Fixed version (ground truth):
public void attachShutDownHookForceStopDockerContainers(@Observes(precedence=200) BeforeSuite event,final CubeRegistry cubeRegistry){
  Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    final List<Cube<?>> cubes=cubeRegistry.getCubes();
    for (    Cube cube : cubes) {
      try {
        cube.stop();
      }
 catch (      final Throwable e) {
        Logger.getLogger(ForceStopDockerContainersShutdownHook.class.getName()).log(Level.WARNING,"String_Node_Str" + cube.getId(),e);
      }
 finally {
        try {
          cube.destroy();
        }
 catch (        final Throwable ignore) {
        }
      }
    }
  }
));
}
Program: 59226
Project: 59226
Buggy source:
@Override public boolean call(){
  try {
    urlConnection=(HttpURLConnection)url.openConnection();
    urlConnection.connect();
    int connectionResponseCode=urlConnection.getResponseCode();
    if (responseCode != connectionResponseCode) {
      return false;
    }
    if (matcher != null) {
      String content=IOUtil.asString(urlConnection.getInputStream());
      if (matcher.startsWith(REGEXP_PREFIX)) {
        String pattern=matcher.substring(REGEXP_PREFIX.length());
        final boolean matches=Pattern.compile(pattern,Pattern.DOTALL).matcher(content).matches();
        if (!matches)         return false;
      }
 else {
        final boolean matches=content.startsWith(matcher);
        if (!matches)         return false;
      }
    }
    if (headers != null) {
      final Set<String> keys=headers.keySet();
      for (      String key : keys) {
        if (urlConnection.getHeaderField(key) != null) {
          String connectionHeaderValue=urlConnection.getHeaderField(key);
          if (!connectionHeaderValue.equals(headers.get(key))) {
            return false;
          }
        }
 else {
          return false;
        }
      }
    }
  }
 catch (  IOException e) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean call(){
  try {
    urlConnection=(HttpURLConnection)url.openConnection();
    urlConnection.connect();
    int connectionResponseCode=urlConnection.getResponseCode();
    if (responseCode != connectionResponseCode) {
      return false;
    }
    if (matcher != null) {
      String content=IOUtil.asString(urlConnection.getInputStream());
      if (matcher.startsWith(REGEXP_PREFIX)) {
        String pattern=matcher.substring(REGEXP_PREFIX.length());
        final boolean matches=Pattern.compile(pattern,Pattern.DOTALL).matcher(content).matches();
        if (!matches)         return false;
      }
 else {
        final boolean matches=content.startsWith(matcher);
        if (!matches)         return false;
      }
    }
    if (headers != null) {
      final Set<String> keys=headers.keySet();
      for (      String key : keys) {
        if (urlConnection.getHeaderField(key) != null) {
          String connectionHeaderValue=urlConnection.getHeaderField(key);
          if (!connectionHeaderValue.equals(headers.get(key))) {
            return false;
          }
        }
 else {
          return false;
        }
      }
    }
  }
 catch (  IOException e) {
    return false;
  }
 finally {
    if (urlConnection != null) {
      urlConnection.disconnect();
    }
  }
  return true;
}
Program: 59228
Project: 59228
Buggy source:
protected String[] getAllowedSuffixes(){
  return getAllowedSuffixes();
}

Fixed version (ground truth):
protected String[] getAllowedSuffixes(){
  return ALLOWED_SUFFIXES;
}
Program: 59229
Project: 59229
Buggy source:
public PollingAwaitStrategy(Cube<?> cube,DockerClientExecutor dockerClientExecutor,Await params){
  super(params.getSleepPollingTime());
  this.cube=cube;
  this.dockerClientExecutor=dockerClientExecutor;
  if (params.getIterations() != null) {
    this.pollIterations=params.getIterations();
  }
  if (params.getType() != null) {
    this.type=params.getType();
  }
  if (params.getPorts() != null) {
    this.ports=params.getPorts();
  }
}

Fixed version (ground truth):
public PollingAwaitStrategy(Cube<?> cube,DockerClientExecutor dockerClientExecutor,Await params){
  super(params.getSleepPollingTime());
  this.cube=cube;
  this.dockerClientExecutor=dockerClientExecutor;
  if (params.getIterations() != null) {
    this.pollIterations=params.getIterations();
  }
  if (params.getType() != null) {
    this.type=params.getType();
  }
  if (params.getPorts() != null && params.getPorts().size() > 0) {
    this.ports=params.getPorts();
  }
}
Program: 59230
Project: 59230
Buggy source:
private CubeContainer createConfigurationFromDockerfie(String[] portBinding,Set<String> links,CubeDockerFile cubeContainerClazzAnnotation,File dockerfileLocation,Environment[] environments){
  CubeContainer configuration=new CubeContainer();
  List<PortBinding> bindings=new ArrayList<PortBinding>();
  for (  String binding : portBinding) {
    bindings.add(PortBinding.valueOf(binding));
  }
  configuration.setPortBindings(bindings);
  if (links.size() > 0) {
    configuration.setLinks(org.arquillian.cube.docker.impl.client.config.Link.valuesOf(links));
  }
  if (environments != null) {
    final List<String> collectEnvironments=Arrays.stream(environments).map(environment -> environment.value()).collect(Collectors.toList());
    configuration.setEnv(collectEnvironments);
  }
  BuildImage dockerfileConfiguration=new BuildImage(dockerfileLocation.getAbsolutePath(),null,cubeContainerClazzAnnotation.nocache(),cubeContainerClazzAnnotation.remove());
  configuration.setBuildImage(dockerfileConfiguration);
  return configuration;
}

Fixed version (ground truth):
private CubeContainer createConfigurationFromDockerfie(String[] portBinding,Integer[] awaitPorts,Set<String> links,CubeDockerFile cubeContainerClazzAnnotation,File dockerfileLocation,Environment[] environments){
  CubeContainer configuration=new CubeContainer();
  List<PortBinding> bindings=new ArrayList<PortBinding>();
  for (  String binding : portBinding) {
    bindings.add(PortBinding.valueOf(binding));
  }
  configuration.setPortBindings(bindings);
  if (links.size() > 0) {
    configuration.setLinks(org.arquillian.cube.docker.impl.client.config.Link.valuesOf(links));
  }
  if (environments != null) {
    final List<String> collectEnvironments=Arrays.stream(environments).map(environment -> environment.value()).collect(Collectors.toList());
    configuration.setEnv(collectEnvironments);
  }
  BuildImage dockerfileConfiguration=new BuildImage(dockerfileLocation.getAbsolutePath(),null,cubeContainerClazzAnnotation.nocache(),cubeContainerClazzAnnotation.remove());
  configuration.setBuildImage(dockerfileConfiguration);
  final Await await=createAwait(awaitPorts);
  configuration.setAwait(await);
  return configuration;
}
Program: 59231
Project: 59231
Buggy source:
private CubeContainer createConfigurationFromImage(String[] portBinding,Set<String> links,Image image,File dockerfileLocation,Environment[] environments){
  CubeContainer configuration=new CubeContainer();
  List<PortBinding> bindings=new ArrayList<PortBinding>();
  for (  String binding : portBinding) {
    bindings.add(PortBinding.valueOf(binding));
  }
  configuration.setPortBindings(bindings);
  if (links.size() > 0) {
    configuration.setLinks(org.arquillian.cube.docker.impl.client.config.Link.valuesOf(links));
  }
  if (environments != null) {
    final List<String> collectEnvironments=Arrays.stream(environments).map(environment -> environment.value()).collect(Collectors.toList());
    configuration.setEnv(collectEnvironments);
  }
  configuration.setImage(org.arquillian.cube.docker.impl.client.config.Image.valueOf(image.value()));
  return configuration;
}

Fixed version (ground truth):
private CubeContainer createConfigurationFromImage(String[] portBinding,Integer[] awaitPorts,Set<String> links,Image image,File dockerfileLocation,Environment[] environments){
  CubeContainer configuration=new CubeContainer();
  List<PortBinding> bindings=new ArrayList<PortBinding>();
  for (  String binding : portBinding) {
    bindings.add(PortBinding.valueOf(binding));
  }
  configuration.setPortBindings(bindings);
  if (links.size() > 0) {
    configuration.setLinks(org.arquillian.cube.docker.impl.client.config.Link.valuesOf(links));
  }
  if (environments != null) {
    final List<String> collectEnvironments=Arrays.stream(environments).map(environment -> environment.value()).collect(Collectors.toList());
    configuration.setEnv(collectEnvironments);
  }
  configuration.setImage(org.arquillian.cube.docker.impl.client.config.Image.valueOf(image.value()));
  final Await await=createAwait(awaitPorts);
  configuration.setAwait(await);
  return configuration;
}
Program: 59232
Project: 59232
Buggy source:
private org.arquillian.cube.spi.Cube<?> createCubeFromDockerfile(String cubeName,String[] portBinding,Set<String> links,CubeDockerFile cubeContainerClazzAnnotation,Environment[] environments,File dockerfileLocation,Class<?> testClass){
  CubeContainer configuration=createConfigurationFromDockerfie(portBinding,links,cubeContainerClazzAnnotation,dockerfileLocation,environments);
  DockerCube newCube=new DockerCube(cubeName,configuration,dockerClientExecutorInstance.get());
  newCube.addMetadata(IsContainerObject.class,new IsContainerObject(testClass));
  injectorInstance.get().inject(newCube);
  return newCube;
}

Fixed version (ground truth):
private org.arquillian.cube.spi.Cube<?> createCubeFromDockerfile(String cubeName,String[] portBinding,Integer[] awaitPorts,Set<String> links,CubeDockerFile cubeContainerClazzAnnotation,Environment[] environments,File dockerfileLocation,Class<?> testClass){
  CubeContainer configuration=createConfigurationFromDockerfie(portBinding,awaitPorts,links,cubeContainerClazzAnnotation,dockerfileLocation,environments);
  DockerCube newCube=new DockerCube(cubeName,configuration,dockerClientExecutorInstance.get());
  newCube.addMetadata(IsContainerObject.class,new IsContainerObject(testClass));
  injectorInstance.get().inject(newCube);
  return newCube;
}
Program: 59233
Project: 59233
Buggy source:
private org.arquillian.cube.spi.Cube<?> createCubeFromImage(String cubeName,String[] portBinding,Set<String> links,Image image,Environment[] environment,File dockerfileLocation,Class<?> testClass){
  final CubeContainer configuration=createConfigurationFromImage(portBinding,links,image,dockerfileLocation,environment);
  DockerCube newCube=new DockerCube(cubeName,configuration,dockerClientExecutorInstance.get());
  newCube.addMetadata(IsContainerObject.class,new IsContainerObject(testClass));
  injectorInstance.get().inject(newCube);
  return newCube;
}

Fixed version (ground truth):
private org.arquillian.cube.spi.Cube<?> createCubeFromImage(String cubeName,String[] portBinding,Integer[] awaitPorts,Set<String> links,Image image,Environment[] environment,File dockerfileLocation,Class<?> testClass){
  final CubeContainer configuration=createConfigurationFromImage(portBinding,awaitPorts,links,image,dockerfileLocation,environment);
  DockerCube newCube=new DockerCube(cubeName,configuration,dockerClientExecutorInstance.get());
  newCube.addMetadata(IsContainerObject.class,new IsContainerObject(testClass));
  injectorInstance.get().inject(newCube);
  return newCube;
}
Program: 59235
Project: 59235
Buggy source:
public static <T>T getTopCubeAttribute(final Class<?> source,final String nameField,final Class<? extends Annotation> annotationClass,final T defaultValue){
  return AccessController.doPrivileged(new PrivilegedAction<T>(){
    @Override public T run(){
      Method field=null;
      try {
        field=annotationClass.getMethod(nameField);
      }
 catch (      NoSuchMethodException e) {
        throw new IllegalArgumentException(e);
      }
      Class<?> nextSource=source;
      boolean foundAnnotation=false;
      while (nextSource != Object.class) {
        if (nextSource.isAnnotationPresent(annotationClass)) {
          foundAnnotation=true;
          final Annotation annotation=nextSource.getAnnotation(annotationClass);
          final T value=getValue(annotation,field);
          if (defaultValue.getClass().isArray()) {
            if (!Arrays.equals((Object[])value,(Object[])defaultValue)) {
              return (T)value;
            }
          }
 else {
            if (!value.equals(defaultValue)) {
              return (T)value;
            }
          }
        }
        nextSource=source.getSuperclass();
      }
      return foundAnnotation ? defaultValue : null;
    }
  }
);
}

Fixed version (ground truth):
public static <T>T getTopCubeAttribute(final Class<?> source,final String nameField,final Class<? extends Annotation> annotationClass,final T defaultValue){
  return AccessController.doPrivileged((PrivilegedAction<T>)() -> {
    Method field=null;
    try {
      field=annotationClass.getMethod(nameField);
    }
 catch (    NoSuchMethodException e) {
      throw new IllegalArgumentException(e);
    }
    Class<?> nextSource=source;
    boolean foundAnnotation=false;
    while (nextSource != Object.class) {
      if (nextSource.isAnnotationPresent(annotationClass)) {
        foundAnnotation=true;
        final Annotation annotation=nextSource.getAnnotation(annotationClass);
        final T value=getValue(annotation,field);
        if (defaultValue.getClass().isArray()) {
          if (defaultValue.getClass().getComponentType().isPrimitive()) {
            if (!Arrays.equals((int[])value,(int[])defaultValue)) {
              return value;
            }
          }
 else {
            if (!Arrays.equals((Object[])value,(Object[])defaultValue)) {
              return value;
            }
          }
        }
 else {
          if (!value.equals(defaultValue)) {
            return value;
          }
        }
      }
      nextSource=nextSource.getSuperclass();
    }
    return foundAnnotation ? defaultValue : null;
  }
);
}
Program: 59236
Project: 59236
Buggy source:
@Override public Object lookup(ArquillianResource resource,Annotation... qualifiers){
  return resolveUrl();
}

Fixed version (ground truth):
@Override public Object lookup(ArquillianResource resource,Annotation... qualifiers){
  try {
    return resolveUrl();
  }
 catch (  MalformedURLException e) {
    throw new IllegalArgumentException(e);
  }
}
Program: 59238
Project: 59238
Buggy source:
@Test public void should_resolve_internal_ip_of_container(){
  final DockerCompositions compositions=ConfigUtil.load(SIMPLE_SCENARIO);
  when(cubeDockerConfiguration.getDockerContainersContent()).thenReturn(compositions);
  when(grapheneConfiguration.getUrl()).thenReturn("String_Node_Str");
  final URL url=(URL)dockerCubeCustomizableURLResourceProvider.lookup(null);
}

Fixed version (ground truth):
@Test public void should_resolve_internal_ip_of_container(){
  final DockerCompositions compositions=ConfigUtil.load(SIMPLE_SCENARIO);
  when(cubeDockerConfiguration.getDockerContainersContent()).thenReturn(compositions);
  when(grapheneConfiguration.getUrl()).thenReturn("String_Node_Str");
  final URL url=(URL)dockerCubeCustomizableURLResourceProvider.lookup(null);
  assertThat(url).hasProtocol("String_Node_Str").hasHost("String_Node_Str").hasPort(80).hasPath("String_Node_Str");
}
Program: 59239
Project: 59239
Buggy source:
@Test public void should_resolve_to_docker_host_if_no_url_provided(){
  final DockerCompositions compositions=ConfigUtil.load(SIMPLE_SCENARIO);
  when(cubeDockerConfiguration.getDockerContainersContent()).thenReturn(compositions);
  when(grapheneConfiguration.getUrl()).thenReturn(null);
  final URL url=(URL)dockerCubeCustomizableURLResourceProvider.lookup(null);
  assertThat(url).hasProtocol("String_Node_Str").hasHost("String_Node_Str").hasPort(80).hasNoPath();
}

Fixed version (ground truth):
@Test public void should_resolve_to_docker_host_if_no_url_provided(){
  final DockerCompositions compositions=ConfigUtil.load(SIMPLE_SCENARIO);
  when(cubeDockerConfiguration.getDockerContainersContent()).thenReturn(compositions);
  when(grapheneConfiguration.getUrl()).thenReturn(null);
  assertThatThrownBy(() -> {
    dockerCubeCustomizableURLResourceProvider.lookup(null);
  }
).hasMessage("String_Node_Str");
}
Program: 59241
Project: 59241
Buggy source:
@Test public void shouldEnrichTestMethod() throws NoSuchMethodException {
  HostIpTestEnricher hostIpTestEnricher=new HostIpTestEnricher();
  hostIpTestEnricher.hostUriContext=new Instance<HostUriContext>(){
    @Override public HostUriContext get(){
      return new HostUriContext("String_Node_Str");
    }
  }
;
  MyTest test=new MyTest();
  Object[] myMethods=hostIpTestEnricher.resolve(test.getClass().getMethod("String_Node_Str",String.class,String.class));
  assertThat((String)myMethods[1],is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void shouldEnrichTestMethod() throws NoSuchMethodException {
  HostIpTestEnricher hostIpTestEnricher=new HostIpTestEnricher();
  hostIpTestEnricher.hostUriContext=new Instance<HostIpContext>(){
    @Override public HostIpContext get(){
      return new HostIpContext("String_Node_Str");
    }
  }
;
  MyTest test=new MyTest();
  Object[] myMethods=hostIpTestEnricher.resolve(test.getClass().getMethod("String_Node_Str",String.class,String.class));
  assertThat((String)myMethods[1],is("String_Node_Str"));
}
Program: 59242
Project: 59242
Buggy source:
@Override public HostUriContext get(){
  return new HostUriContext("String_Node_Str");
}

Fixed version (ground truth):
@Override public HostIpContext get(){
  return new HostIpContext("String_Node_Str");
}
Program: 59243
Project: 59243
Buggy source:
@Test public void shouldEnrichTest(){
  HostIpTestEnricher hostIpTestEnricher=new HostIpTestEnricher();
  hostIpTestEnricher.hostUriContext=new Instance<HostUriContext>(){
    @Override public HostUriContext get(){
      return new HostUriContext("String_Node_Str");
    }
  }
;
  MyTest test=new MyTest();
  hostIpTestEnricher.enrich(test);
  assertThat(test.hostIp,is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void shouldEnrichTest(){
  HostIpTestEnricher hostIpTestEnricher=new HostIpTestEnricher();
  hostIpTestEnricher.hostUriContext=new Instance<HostIpContext>(){
    @Override public HostIpContext get(){
      return new HostIpContext("String_Node_Str");
    }
  }
;
  MyTest test=new MyTest();
  hostIpTestEnricher.enrich(test);
  assertThat(test.hostIp,is("String_Node_Str"));
}
Program: 59244
Project: 59244
Buggy source:
private void configure(ArquillianDescriptor arquillianDescriptor){
  operatingSystemFamilyInstanceProducer.set(new OperatingSystemResolver().currentOperatingSystem().getFamily());
  Map<String,String> config=arquillianDescriptor.extension(EXTENSION_NAME).getExtensionProperties();
  config=resolveSystemEnvironmentVariables(config);
  config=resolveDockerInsideDocker(config);
  config=resolveDownloadDockerMachine(config);
  config=resolveAutoStartDockerMachine(config);
  config=resolveDefaultDockerMachine(config);
  config=resolveServerUriByOperativeSystem(config);
  config=resolveServerIp(config);
  config=resolveTlsVerification(config);
  CubeDockerConfiguration cubeConfiguration=CubeDockerConfiguration.fromMap(config,injectorInstance.get());
  cubeConfiguration=resolveDynamicNames(cubeConfiguration);
  System.out.println(cubeConfiguration);
  hostUriContextInstanceProducer.set(new HostUriContext(cubeConfiguration.getDockerServerUri()));
  configurationProducer.set(cubeConfiguration);
}

Fixed version (ground truth):
private void configure(ArquillianDescriptor arquillianDescriptor){
  operatingSystemFamilyInstanceProducer.set(new OperatingSystemResolver().currentOperatingSystem().getFamily());
  Map<String,String> config=arquillianDescriptor.extension(EXTENSION_NAME).getExtensionProperties();
  config=resolveSystemEnvironmentVariables(config);
  config=resolveDockerInsideDocker(config);
  config=resolveDownloadDockerMachine(config);
  config=resolveAutoStartDockerMachine(config);
  config=resolveDefaultDockerMachine(config);
  config=resolveServerUriByOperativeSystem(config);
  config=resolveServerIp(config);
  config=resolveTlsVerification(config);
  CubeDockerConfiguration cubeConfiguration=CubeDockerConfiguration.fromMap(config,injectorInstance.get());
  cubeConfiguration=resolveDynamicNames(cubeConfiguration);
  System.out.println(cubeConfiguration);
  hostUriContextInstanceProducer.set(new HostIpContext(cubeConfiguration.getDockerServerIp()));
  configurationProducer.set(cubeConfiguration);
}
Program: 59245
Project: 59245
Buggy source:
private static boolean noPreviousBindPortFound(int bindPort){
  return bindPort == -1;
}

Fixed version (ground truth):
private static boolean noPreviousBindPortFound(PortBindInfo bindPort){
  return bindPort == null;
}
Program: 59246
Project: 59246
Buggy source:
/** 
 * Method that tries to resolve a bind port by searching if there is only one binding port across all running containers
 * @param cubeDockerConfiguration where all docker configuration is exposed
 * @param excludedContainers where binding port search is ignored
 * @return binding port
 */
public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration,String... excludedContainers){
  final DockerCompositions dockerContainersContent=cubeDockerConfiguration.getDockerContainersContent();
  final Set<Map.Entry<String,CubeContainer>> containers=dockerContainersContent.getContainers().entrySet();
  int bindPort=-1;
  for (  Map.Entry<String,CubeContainer> cubeContainerEntry : containers) {
    if (shouldBeIgnored(cubeContainerEntry.getKey(),excludedContainers)) {
      continue;
    }
    final CubeContainer cubeContainer=cubeContainerEntry.getValue();
    if (hasMoreThanOneBindPort(cubeContainer)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (hasOnlyOneBindPort(cubeContainer)) {
      if (noPreviousBindPortFound(bindPort)) {
        bindPort=cubeContainer.getPortBindings().iterator().next().getBound();
      }
 else {
        throw new IllegalArgumentException("String_Node_Str");
      }
    }
  }
  if (noPreviousBindPortFound(bindPort)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return bindPort;
}

Fixed version (ground truth):
/** 
 * Method that tries to resolve a bind port by searching if there is only one binding port across all running containers
 * @param cubeDockerConfiguration where all docker configuration is exposed
 * @param excludedContainers      where binding port search is ignored
 * @return binding port
 */
public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration,String... excludedContainers){
  final PortBindInfo portBinding=resolvePortBindPort(cubeDockerConfiguration,excludedContainers);
  if (portBinding == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return portBinding.getBindPort();
}
Program: 59248
Project: 59248
Buggy source:
private int resolveBindPort(int port){
  final CubeDockerConfiguration cubeDockerConfiguration=cubeDockerConfigurationInstance.get();
  final SeleniumContainers seleniumContainers=seleniumContainersInstance.get();
  if (port == NO_PORT) {
    return SinglePortBindResolver.resolveBindPort(cubeDockerConfiguration,seleniumContainers.getSeleniumContainerName(),seleniumContainers.getVncContainerName());
  }
 else {
    return SinglePortBindResolver.resolveBindPort(cubeDockerConfiguration,port,seleniumContainers.getSeleniumContainerName(),seleniumContainers.getVncContainerName());
  }
}

Fixed version (ground truth):
private SinglePortBindResolver.PortBindInfo resolveBindPort(int port){
  final CubeDockerConfiguration cubeDockerConfiguration=cubeDockerConfigurationInstance.get();
  final SeleniumContainers seleniumContainers=seleniumContainersInstance.get();
  if (port == NO_PORT) {
    return SinglePortBindResolver.resolvePortBindPort(cubeDockerConfiguration,seleniumContainers.getSeleniumContainerName(),seleniumContainers.getVncContainerName());
  }
 else {
    return SinglePortBindResolver.resolvePortBindPort(cubeDockerConfiguration,port,seleniumContainers.getSeleniumContainerName(),seleniumContainers.getVncContainerName());
  }
}
Program: 59249
Project: 59249
Buggy source:
private int resolvePort(String url){
  int port=extractPort(url);
  return resolveBindPort(port);
}

Fixed version (ground truth):
private int resolvePort(String url){
  int port=extractPort(url);
  final SinglePortBindResolver.PortBindInfo portBindInfo=resolveBindPort(port);
  if (portBindInfo == null) {
    return port;
  }
  return portBindInfo.getBindPort();
}
Program: 59250
Project: 59250
Buggy source:
@Before public void prepareCubeDockerConfiguration(){
  when(cubeDockerConfiguration.getDockerServerIp()).thenReturn(DOCKER_HOST);
  when(seleniumContainers.getSeleniumContainerName()).thenReturn(SeleniumContainers.SELENIUM_CONTAINER_NAME);
  when(seleniumContainers.getVncContainerName()).thenReturn(SeleniumContainers.VNC_CONTAINER_NAME);
  dockerCubeCustomizableURLResourceProvider=new DockerCubeCustomizableURLResourceProvider();
  dockerCubeCustomizableURLResourceProvider.cubeDockerConfigurationInstance=new Instance<CubeDockerConfiguration>(){
    @Override public CubeDockerConfiguration get(){
      return cubeDockerConfiguration;
    }
  }
;
  dockerCubeCustomizableURLResourceProvider.grapheneConfiguration=new Instance<GrapheneConfiguration>(){
    @Override public GrapheneConfiguration get(){
      return grapheneConfiguration;
    }
  }
;
  dockerCubeCustomizableURLResourceProvider.seleniumContainersInstance=new Instance<SeleniumContainers>(){
    @Override public SeleniumContainers get(){
      return seleniumContainers;
    }
  }
;
}

Fixed version (ground truth):
@Before public void prepareCubeDockerConfiguration(){
  when(cubeDockerConfiguration.getDockerServerIp()).thenReturn(DOCKER_HOST);
  when(seleniumContainers.getSeleniumContainerName()).thenReturn(SeleniumContainers.SELENIUM_CONTAINER_NAME);
  when(seleniumContainers.getVncContainerName()).thenReturn(SeleniumContainers.VNC_CONTAINER_NAME);
  when(hasPortBindings.getInternalIP()).thenReturn("String_Node_Str");
  when(cube.hasMetadata(HasPortBindings.class)).thenReturn(true);
  when(cube.getMetadata(HasPortBindings.class)).thenReturn(hasPortBindings);
  when(cubeRegistry.getCube("String_Node_Str")).thenReturn(cube);
  dockerCubeCustomizableURLResourceProvider=new DockerCubeCustomizableURLResourceProvider();
  dockerCubeCustomizableURLResourceProvider.cubeDockerConfigurationInstance=new Instance<CubeDockerConfiguration>(){
    @Override public CubeDockerConfiguration get(){
      return cubeDockerConfiguration;
    }
  }
;
  dockerCubeCustomizableURLResourceProvider.grapheneConfiguration=new Instance<GrapheneConfiguration>(){
    @Override public GrapheneConfiguration get(){
      return grapheneConfiguration;
    }
  }
;
  dockerCubeCustomizableURLResourceProvider.seleniumContainersInstance=new Instance<SeleniumContainers>(){
    @Override public SeleniumContainers get(){
      return seleniumContainers;
    }
  }
;
  dockerCubeCustomizableURLResourceProvider.cubeRegistryInstance=new Instance<CubeRegistry>(){
    @Override public CubeRegistry get(){
      return cubeRegistry;
    }
  }
;
}
Program: 59251
Project: 59251
Buggy source:
@Override public SeleniumContainers get(){
  return seleniumContainers;
}

Fixed version (ground truth):
@Override public CubeRegistry get(){
  return cubeRegistry;
}
Program: 59252
Project: 59252
Buggy source:
@Override public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {
  String name=context.name();
  try {
    if (name != null && !name.isEmpty()) {
      String ip=commandLineExecutor.execCommand("String_Node_Str" + name);
      if (ip != null && !ip.isEmpty()) {
        throw new UnsatisfiedRequirementException("String_Node_Str" + name + "String_Node_Str");
      }
    }
 else {
      int machines=countLines(commandLineExecutor.execCommand("String_Node_Str")) - 1;
      if (machines > 0) {
        throw new UnsatisfiedRequirementException("String_Node_Str");
      }
    }
  }
 catch (  ExecutionException e) {
    throw new UnsatisfiedRequirementException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {
  String name=context.name();
  try {
    if (name != null && !name.isEmpty()) {
      String ip=commandLineExecutor.execCommand(new String[]{"String_Node_Str","String_Node_Str",name});
      if (ip == null || ip.isEmpty()) {
        throw new UnsatisfiedRequirementException("String_Node_Str" + name + "String_Node_Str");
      }
    }
 else {
      int machines=countLines(commandLineExecutor.execCommand(new String[]{"String_Node_Str","String_Node_Str"})) - 1;
      if (machines > 0) {
        throw new UnsatisfiedRequirementException("String_Node_Str");
      }
    }
  }
 catch (  ExecutionException e) {
    throw new UnsatisfiedRequirementException("String_Node_Str");
  }
}
Program: 59253
Project: 59253
Buggy source:
@Override public void destroy() throws CubeControlException {
  if (state != State.STOPPED) {
    return;
  }
  try {
    lifecycle.fire(new BeforeDestroy(id));
    try {
      executor.removeContainer(id,configuration.getRemoveVolumes());
    }
 catch (    NotFoundException e) {
    }
    state=State.DESTROYED;
    lifecycle.fire(new AfterDestroy(id));
  }
 catch (  Exception e) {
    state=State.DESTORY_FAILED;
    throw CubeControlException.failedDestroy(id,e);
  }
}

Fixed version (ground truth):
@Override public void destroy() throws CubeControlException {
  if (state != State.STOPPED) {
    return;
  }
  try {
    lifecycle.fire(new BeforeDestroy(id));
    try {
      executor.removeContainer(id,configuration.getRemoveVolumes());
    }
 catch (    NotFoundException e) {
    }
catch (    NotModifiedException e) {
    }
    state=State.DESTROYED;
    lifecycle.fire(new AfterDestroy(id));
  }
 catch (  Exception e) {
    state=State.DESTORY_FAILED;
    throw CubeControlException.failedDestroy(id,e);
  }
}
Program: 59254
Project: 59254
Buggy source:
@Override public void stop() throws CubeControlException {
  if (state == State.STOPPED || state == State.PRE_RUNNING) {
    return;
  }
  try {
    lifecycle.fire(new BeforeStop(id));
    try {
      executor.stopContainer(id);
    }
 catch (    NotFoundException e) {
    }
    state=State.STOPPED;
    lifecycle.fire(new AfterStop(id));
  }
 catch (  Exception e) {
    state=State.STOP_FAILED;
    throw CubeControlException.failedStop(id,e);
  }
}

Fixed version (ground truth):
@Override public void stop() throws CubeControlException {
  if (state == State.STOPPED || state == State.PRE_RUNNING) {
    return;
  }
  try {
    lifecycle.fire(new BeforeStop(id));
    try {
      executor.stopContainer(id);
    }
 catch (    NotFoundException e) {
    }
catch (    NotModifiedException e) {
    }
    state=State.STOPPED;
    lifecycle.fire(new AfterStop(id));
  }
 catch (  Exception e) {
    state=State.STOP_FAILED;
    throw CubeControlException.failedStop(id,e);
  }
}
Program: 59255
Project: 59255
Buggy source:
@Test public void should_be_able_to_create_http_await_strategy(){
  String containerDefinition="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final CubeContainers load=ConfigUtil.load(new ByteArrayInputStream(containerDefinition.getBytes()));
  final CubeContainer tomcat=load.getContainers().get("String_Node_Str");
  HttpAwaitStrategy awaitStrategy=new HttpAwaitStrategy(cube,dockerClientExecutor,tomcat.getAwait());
  assertThat(awaitStrategy.getPollIterations(),is(10));
  assertThat(awaitStrategy.getUrl(),is("String_Node_Str"));
  assertThat(awaitStrategy.getResponseCode(),is(201));
  assertThat(awaitStrategy.getMatcher(),is("String_Node_Str"));
  assertThat((String)awaitStrategy.getHeaders().get("String_Node_Str"),is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void should_be_able_to_create_http_await_strategy(){
  String containerDefinition="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final DockerCompositions load=ConfigUtil.load(new ByteArrayInputStream(containerDefinition.getBytes()));
  final CubeContainer tomcat=load.getContainers().get("String_Node_Str");
  HttpAwaitStrategy awaitStrategy=new HttpAwaitStrategy(cube,dockerClientExecutor,tomcat.getAwait());
  assertThat(awaitStrategy.getPollIterations(),is(10));
  assertThat(awaitStrategy.getUrl(),is("String_Node_Str"));
  assertThat(awaitStrategy.getResponseCode(),is(201));
  assertThat(awaitStrategy.getMatcher(),is("String_Node_Str"));
  assertThat((String)awaitStrategy.getHeaders().get("String_Node_Str"),is("String_Node_Str"));
}
Program: 59256
Project: 59256
Buggy source:
public Top(String rootDockerFile,String rootDockerSocket){
  super();
  this.rootDockerFile=rootDockerFile;
  this.rootDockerSocket=rootDockerSocket;
  this.dockerEnvPath=Paths.get(rootDockerFile,DOCKERENV);
  this.dockerInitPath=Paths.get(rootDockerFile,DOCKERINIT);
  this.dockerSocketFile=Paths.get(rootDockerSocket,DOCKER_SOCK);
}

Fixed version (ground truth):
public Top(String rootDockerFile,String rootDockerSocket){
  super();
  this.rootDockerFile=rootDockerFile;
  this.rootDockerSocket=rootDockerSocket;
  this.dockerEnvPath=new File(rootDockerFile,DOCKERENV);
  this.dockerInitPath=new File(rootDockerFile,DOCKERINIT);
  this.dockerSocketFile=new File(rootDockerSocket,DOCKER_SOCK);
}