Source:
private String getArgument(AbstractFunctionCallExpression functionCall, Mutable<ILogicalOperator> opRef, int pos) { VXQueryConstantValue constantValue; ILogicalExpression logicalExpression2 = (ILogicalExpression) functionCall.getArguments().get(pos).getValue(); if (logicalExpression2.getExpressionTag() != LogicalExpressionTag.VARIABLE) { return null; } VariableReferenceExpression vre = (VariableReferenceExpression) logicalExpression2; Mutable<ILogicalOperator> opRef3 = OperatorToolbox.findProducerOf(opRef, vre.getVariableReference()); AbstractLogicalOperator op3 = (AbstractLogicalOperator) opRef3.getValue(); if (op3.getOperatorTag() == LogicalOperatorTag.ASSIGN) { AssignOperator assign2 = (AssignOperator) op3; ILogicalExpression logicalExpression3 = (ILogicalExpression) assign2.getExpressions().get(0).getValue(); if (logicalExpression3.getExpressionTag() != LogicalExpressionTag.CONSTANT) { return null; } ConstantExpression constantExpression = (ConstantExpression) logicalExpression3; constantValue = (VXQueryConstantValue) constantExpression.getValue(); if (constantValue.getType() != SequenceType.create(BuiltinTypeRegistry.XS_STRING, Quantifier.QUANT_ONE)) { return null; } } else { return null; } String args[] = new String[2]; tvp.set(constantValue.getValue(), 0, constantValue.getValue().length); String arg = null; if (tvp.getTag() == ValueTag.XS_STRING_TAG) { tvp.getValue(stringp); try { bbis.setByteBuffer( ByteBuffer.wrap(Arrays.copyOfRange(stringp.getByteArray(), stringp.getStartOffset(), stringp.getLength() + stringp.getStartOffset())), 0); arg = di.readUTF(); return arg; } catch (IOException e) { e.printStackTrace(); } } return null; }

Target:
private String getArgument(AbstractFunctionCallExpression functionCall, Mutable<ILogicalOperator> opRef, int pos) { VXQueryConstantValue constantValue; ILogicalExpression logicalExpression2 = (ILogicalExpression) functionCall.getArguments().get(pos).getValue(); if (logicalExpression2.getExpressionTag() != LogicalExpressionTag.VARIABLE) { return null; } VariableReferenceExpression vre = (VariableReferenceExpression) logicalExpression2; Mutable<ILogicalOperator> opRef3 = OperatorToolbox.findProducerOf(opRef, vre.getVariableReference()); AbstractLogicalOperator op3 = (AbstractLogicalOperator) opRef3.getValue(); if (op3.getOperatorTag() == LogicalOperatorTag.ASSIGN) { AssignOperator assign2 = (AssignOperator) op3; ILogicalExpression logicalExpression3 = (ILogicalExpression) assign2.getExpressions().get(0).getValue(); if (logicalExpression3.getExpressionTag() != LogicalExpressionTag.CONSTANT) { return null; } ConstantExpression constantExpression = (ConstantExpression) logicalExpression3; constantValue = (VXQueryConstantValue) constantExpression.getValue(); if (constantValue.getType() != SequenceType.create(BuiltinTypeRegistry.XS_STRING, Quantifier.QUANT_ONE)) { return null; } } else { return null; } tvp.set(constantValue.getValue(), 0, constantValue.getValue().length); String collectionName = null; if (tvp.getTag() == ValueTag.XS_STRING_TAG) { tvp.getValue(stringp); try { bbis.setByteBuffer(ByteBuffer.wrap(Arrays.copyOfRange(stringp.getByteArray(), stringp.getStartOffset(), stringp.getLength() + stringp.getStartOffset())), 0); collectionName = di.readUTF(); return collectionName; } catch (IOException e) { e.printStackTrace(); } } return null; }