}
@SuppressWarnings("unchecked")
private void generate_replace_method(RulePanel rule, HashMap<String, VariableContainer> variableList_right) {
ImplementationPanel rImplementationPanel = rule.getImplementationPanel();
RuleEditorPane rRuleEditorPane = rule.getRuleEditorPane();
this.replaceMethodCode = new StringBuffer();
StringBuffer spaces = new StringBuffer(" ");
if(rImplementationPanel.useGeneratedJavaCode_ReplaceMethod()) {
VisualGraph<Operator> leftGraph = rRuleEditorPane.getVisualGraphs().get(0);
VisualGraph<Operator> rightGraph = rRuleEditorPane.getVisualGraphs().get(1);
HashMap<String, AbstractRuleOperator> leftOperatorsMap = this.getOperatorsMap(leftGraph);
HashMap<String, AbstractRuleOperator> rightOperatorsMap = this.getOperatorsMap(rightGraph);
HashSet<String> leftOperators = new HashSet<String>(leftOperatorsMap.keySet());
HashSet<String> rightOperators = new HashSet<String>(rightOperatorsMap.keySet());
HashSet<String> originalLeftOperators = (HashSet<String>) leftOperators.clone();
leftOperators.removeAll(rightOperators); // determine operators which are only on the left side
rightOperators.removeAll(originalLeftOperators); // determine operators which are only on the right side
LinkedList<HashSet<ConnectionContainer>> connections = rRuleEditorPane.getConnections();
HashSet<ConnectionContainer> leftConnections = connections.get(0);
HashSet<ConnectionContainer> rightConnections = connections.get(1);
HashSet<ConnectionContainer> originalLeftConnections = (HashSet<ConnectionContainer>) leftConnections.clone();