test_class.declarator: CLASS_NAME = "group.artifact.OneClass"
test_class.modifier: private static final
test_class.original_string: private static final String CLASS_NAME = "group.artifact.OneClass";
test_class.type: String
test_class.var_name: CLASS_NAME
test_class.declarator: METHOD_NAME = "getVersion"
test_class.modifier: private static final
test_class.original_string: private static final String METHOD_NAME = "getVersion";
test_class.type: String
test_class.var_name: METHOD_NAME
test_class.declarator: PARAM_PROVIDER = new JavaExecutionParametersProvider() {
          @Override
          public Object[] getExecutionParameters(Method executionMethod) {
              return new Object[0];
          }
      }
test_class.modifier: private static final
test_class.original_string: private static final JavaExecutionParametersProvider PARAM_PROVIDER = new JavaExecutionParametersProvider() {
          @Override
          public Object[] getExecutionParameters(Method executionMethod) {
              return new Object[0];
          }
      };
test_class.type: JavaExecutionParametersProvider
test_class.var_name: PARAM_PROVIDER
test_class.declarator: expectedEx = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException expectedEx = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: expectedEx
test_class.file: runtime-management/runtime-management-impl/src/test/java/io/cloudslang/runtime/impl/java/JavaExecutorTest.java
test_class.identifier: JavaExecutorTest
test_case.body: @Test
      public void testJavaExecutorDifferentClassloaders() {
  
          File one1 = new File(getClass().getClassLoader().getResource("one1.zip").getFile());
          File one2 = new File(getClass().getClassLoader().getResource("one2.zip").getFile());
          File one3 = new File(getClass().getClassLoader().getResource("one3.zip").getFile());
  
          File another1 = new File(getClass().getClassLoader().getResource("another1.zip").getFile());
          File another2 = new File(getClass().getClassLoader().getResource("another2.zip").getFile());
          File another3 = new File(getClass().getClassLoader().getResource("another3.zip").getFile());
  
          JavaExecutor javaExecutor1 = new JavaExecutor(new HashSet<>(Arrays.asList(one1.getAbsolutePath(), another2.getAbsolutePath())));
          JavaExecutor javaExecutor2 = new JavaExecutor(new HashSet<>(Arrays.asList(one2.getAbsolutePath(), another3.getAbsolutePath())));
          JavaExecutor javaExecutor3 = new JavaExecutor(new HashSet<>(Arrays.asList(one3.getAbsolutePath(), another1.getAbsolutePath())));
  
          assertEquals("The version is One 1 and [The version is Another 2]", javaExecutor1.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
          assertEquals("The version is One 2 and [The version is Another 3]", javaExecutor2.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
          assertEquals("The version is One 3 and [The version is Another 1]", javaExecutor3.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
  
          assertEquals("The version is One 1 and [The version is Another 2]", javaExecutor1.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
          assertEquals("The version is One 2 and [The version is Another 3]", javaExecutor2.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
          assertEquals("The version is One 3 and [The version is Another 1]", javaExecutor3.execute(CLASS_NAME, METHOD_NAME, PARAM_PROVIDER).toString());
      }
test_case.class_method_signature: JavaExecutorTest.testJavaExecutorDifferentClassloaders()
test_case.full_signature: @Test public void testJavaExecutorDifferentClassloaders()
test_case.identifier: testJavaExecutorDifferentClassloaders
test_case.invocations: getFile getResource getClassLoader getClass getFile getResource getClassLoader getClass getFile getResource getClassLoader getClass getFile getResource getClassLoader getClass getFile getResource getClassLoader getClass getFile getResource getClassLoader getClass asList getAbsolutePath getAbsolutePath asList getAbsolutePath getAbsolutePath asList getAbsolutePath getAbsolutePath assertEquals toString execute assertEquals toString execute assertEquals toString execute assertEquals toString execute assertEquals toString execute assertEquals toString execute
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJavaExecutorDifferentClassloaders()
focal_class.declarator: logger = Logger.getLogger(JavaExecutor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(JavaExecutor.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: SCORE_CONTENT_SDK_JAR = "score-content-sdk*.jar"
focal_class.modifier: private static final
focal_class.original_string: private static final String SCORE_CONTENT_SDK_JAR = "score-content-sdk*.jar";
focal_class.type: String
focal_class.var_name: SCORE_CONTENT_SDK_JAR
focal_class.declarator: APP_HOME = "app.home"
focal_class.modifier: private static final
focal_class.original_string: private static final String APP_HOME = "app.home";
focal_class.type: String
focal_class.var_name: APP_HOME
focal_class.declarator: PARENT_CLASS_LOADER
focal_class.modifier: private static final
focal_class.original_string: private static final ClassLoader PARENT_CLASS_LOADER;
focal_class.type: ClassLoader
focal_class.var_name: PARENT_CLASS_LOADER
focal_class.declarator: classLoader
focal_class.modifier: private final
focal_class.original_string: private final ClassLoader classLoader;
focal_class.type: ClassLoader
focal_class.var_name: classLoader
focal_class.file: runtime-management/runtime-management-impl/src/main/java/io/cloudslang/runtime/impl/java/JavaExecutor.java
focal_class.identifier: JavaExecutor
focal_class.interfaces: implements Executor
focal_class.class_method_signature: JavaExecutor.JavaExecutor(Set<String> filePaths)
focal_class.full_signature:   JavaExecutor(Set<String> filePaths)
focal_class.identifier: JavaExecutor
focal_class.parameters: (Set<String> filePaths)
focal_class.signature:  JavaExecutor(Set<String> filePaths)
focal_class.class_method_signature: JavaExecutor.getParentClassLoader()
focal_class.full_signature: public static ClassLoader getParentClassLoader()
focal_class.identifier: getParentClassLoader
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getParentClassLoader()
focal_class.class_method_signature: JavaExecutor.execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_class.full_signature:  Object execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_class.identifier: execute
focal_class.parameters: (String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_class.return: Object
focal_class.signature: Object execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_class.class_method_signature: JavaExecutor.transformExecutionParameters(Object[] oldExecutionParameters, Method executionMethod)
focal_class.full_signature: private Object[] transformExecutionParameters(Object[] oldExecutionParameters, Method executionMethod)
focal_class.identifier: transformExecutionParameters
focal_class.modifiers: private
focal_class.parameters: (Object[] oldExecutionParameters, Method executionMethod)
focal_class.return: Object[]
focal_class.signature: Object[] transformExecutionParameters(Object[] oldExecutionParameters, Method executionMethod)
focal_class.class_method_signature: JavaExecutor.getFieldValue(String fieldName, Class<?> currentParameterClass, Object currentParameter)
focal_class.full_signature: private Object getFieldValue(String fieldName, Class<?> currentParameterClass, Object currentParameter)
focal_class.identifier: getFieldValue
focal_class.modifiers: private
focal_class.parameters: (String fieldName, Class<?> currentParameterClass, Object currentParameter)
focal_class.return: Object
focal_class.signature: Object getFieldValue(String fieldName, Class<?> currentParameterClass, Object currentParameter)
focal_class.class_method_signature: JavaExecutor.getFieldValueFromSuperClass(String fieldName, Class<?> currentParameterClass,
                                                 Object currentParameter)
focal_class.full_signature: private Object getFieldValueFromSuperClass(String fieldName, Class<?> currentParameterClass,
                                                 Object currentParameter)
focal_class.identifier: getFieldValueFromSuperClass
focal_class.modifiers: private
focal_class.parameters: (String fieldName, Class<?> currentParameterClass,
                                                 Object currentParameter)
focal_class.return: Object
focal_class.signature: Object getFieldValueFromSuperClass(String fieldName, Class<?> currentParameterClass,
                                                 Object currentParameter)
focal_class.class_method_signature: JavaExecutor.setValue(Object value, Class<?> currentParameterClass, Object currentParameter)
focal_class.full_signature: private void setValue(Object value, Class<?> currentParameterClass, Object currentParameter)
focal_class.identifier: setValue
focal_class.modifiers: private
focal_class.parameters: (Object value, Class<?> currentParameterClass, Object currentParameter)
focal_class.return: void
focal_class.signature: void setValue(Object value, Class<?> currentParameterClass, Object currentParameter)
focal_class.class_method_signature: JavaExecutor.setName(Object name, Class<?> currentParameterClass, Object currentParameter)
focal_class.full_signature: private void setName(Object name, Class<?> currentParameterClass, Object currentParameter)
focal_class.identifier: setName
focal_class.modifiers: private
focal_class.parameters: (Object name, Class<?> currentParameterClass, Object currentParameter)
focal_class.return: void
focal_class.signature: void setName(Object name, Class<?> currentParameterClass, Object currentParameter)
focal_class.class_method_signature: JavaExecutor.setField(String fieldId, Object fieldValue, Class<?> fieldType, Class<?> currentParameterClass,
                            Object currentParameter)
focal_class.full_signature: private void setField(String fieldId, Object fieldValue, Class<?> fieldType, Class<?> currentParameterClass,
                            Object currentParameter)
focal_class.identifier: setField
focal_class.modifiers: private
focal_class.parameters: (String fieldId, Object fieldValue, Class<?> fieldType, Class<?> currentParameterClass,
                            Object currentParameter)
focal_class.return: void
focal_class.signature: void setField(String fieldId, Object fieldValue, Class<?> fieldType, Class<?> currentParameterClass,
                            Object currentParameter)
focal_class.class_method_signature: JavaExecutor.isSerializableSessionObjectMismatch(Class<?> expectedClass, Class<?> currentParameterClass)
focal_class.full_signature: private boolean isSerializableSessionObjectMismatch(Class<?> expectedClass, Class<?> currentParameterClass)
focal_class.identifier: isSerializableSessionObjectMismatch
focal_class.modifiers: private
focal_class.parameters: (Class<?> expectedClass, Class<?> currentParameterClass)
focal_class.return: boolean
focal_class.signature: boolean isSerializableSessionObjectMismatch(Class<?> expectedClass, Class<?> currentParameterClass)
focal_class.class_method_signature: JavaExecutor.getActionClass(String className)
focal_class.full_signature: private Class getActionClass(String className)
focal_class.identifier: getActionClass
focal_class.modifiers: private
focal_class.parameters: (String className)
focal_class.return: Class
focal_class.signature: Class getActionClass(String className)
focal_class.class_method_signature: JavaExecutor.getMethodByName(Class actionClass, String methodName)
focal_class.full_signature: private Method getMethodByName(Class actionClass, String methodName)
focal_class.identifier: getMethodByName
focal_class.modifiers: private
focal_class.parameters: (Class actionClass, String methodName)
focal_class.return: Method
focal_class.signature: Method getMethodByName(Class actionClass, String methodName)
focal_class.class_method_signature: JavaExecutor.allocate()
focal_class.full_signature: @Override public void allocate()
focal_class.identifier: allocate
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void allocate()
focal_class.class_method_signature: JavaExecutor.release()
focal_class.full_signature: @Override public void release()
focal_class.identifier: release
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void release()
focal_class.class_method_signature: JavaExecutor.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: Object execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider) {
          ClassLoader origCL = Thread.currentThread().getContextClassLoader();
          try {
              Thread.currentThread().setContextClassLoader(classLoader);
              Class actionClass = getActionClass(className);
              Method executionMethod = getMethodByName(actionClass, methodName);
  
              Object[] executionParameters = parametersProvider.getExecutionParameters(executionMethod);
              Object[] transformedExecutionParameters = transformExecutionParameters(executionParameters,
                      executionMethod);
  
              return executionMethod.invoke(actionClass.newInstance(), transformedExecutionParameters);
          } catch (Exception e) {
              throw new RuntimeException(
                      "Method [" + methodName + "] invocation of class [" + className + "] failed: " + e.getMessage(), e);
          } finally {
              Thread.currentThread().setContextClassLoader(origCL);
          }
      }
focal_method.class_method_signature: JavaExecutor.execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_method.full_signature:  Object execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_method.identifier: execute
focal_method.invocations: getContextClassLoader currentThread setContextClassLoader currentThread getActionClass getMethodByName getExecutionParameters transformExecutionParameters invoke newInstance getMessage setContextClassLoader currentThread
focal_method.parameters: (String className, String methodName, JavaExecutionParametersProvider parametersProvider)
focal_method.return: Object
focal_method.signature: Object execute(String className, String methodName, JavaExecutionParametersProvider parametersProvider)