Input:
public static boolean temporalInductionChain(final Sentence s1, final Sentence s2, final nars.core.control.NAL nal) {
    if ((s1.truth == null) || (s2.truth == null))
        return false;
    Implication S1 = (Implication) s1.content;
    Implication S2 = (Implication) s2.content;
    Term A = S1.getSubject();
    Term B1 = S1.getPredicate();
    Term B2 = S2.getSubject();
    Term C = S2.getPredicate();
    ArrayList<Term> args = null;
    int beginoffset = 0;
    if (B2 instanceof Conjunction) {
        Conjunction CB2 = ((Conjunction) B2);
        if (CB2.getTemporalOrder() == TemporalRules.ORDER_FORWARD) {
            if (A instanceof Conjunction && ((Conjunction) A).getTemporalOrder() == TemporalRules.ORDER_FORWARD) {
                Conjunction ConjA = (Conjunction) A;
                args = new ArrayList(CB2.term.length + ConjA.term.length);
                beginoffset = ConjA.size();
                for (final Term t : ConjA.term) args.add(t);
            } else {
                args = new ArrayList(CB2.term.length + 1);
                args.add(A);
                beginoffset = 1;
            }
            for (final Term t : CB2.term) args.add(t);
        }
    } else {
        args = Lists.newArrayList(A, B1);
    }
    if (args == null)
        return false;
    Term[] term = args.toArray(new Term[args.size()]);
    Term realB2 = term[beginoffset];
    HashMap<Term, Term> res1 = new HashMap<>();
    HashMap<Term, Term> res2 = new HashMap<>();
    if (Variables.findSubstitute(Symbols.VAR_INDEPENDENT, B1, realB2, res1, res2)) {
        for (int i = 0; i < term.length; i++) {
            if (term[i] instanceof CompoundTerm) {
                term[i] = ((CompoundTerm) term[i]).applySubstitute(res1);
                if (term[i] == null) {
                    return false;
                }
            }
        }
        int order1 = s1.getTemporalOrder();
        int order2 = s2.getTemporalOrder();
        Conjunction S = (Conjunction) Conjunction.make(term, order1);
        for (Term t : term) {
            if (Terms.equalSubTermsInRespectToImageAndProduct(t, C)) {
                return false;
            }
            for (Term u : term) {
                if (u != t) {
                    if (Terms.equalSubTermsInRespectToImageAndProduct(t, u)) {
                        return false;
                    }
                }
            }
        }
        Implication whole = Implication.make(S, C, order2);
        if (whole != null) {
            TruthValue truth = TruthFunctions.deduction(s1.truth, s2.truth);
            BudgetValue budget = BudgetFunctions.forward(truth, nal);
            budget.setPriority((float) Math.min(0.99, budget.getPriority()));
            if (whole.getTemporalOrder() == TemporalRules.ORDER_FORWARD && whole.getSubject() instanceof Conjunction) {
                Conjunction conj = (Conjunction) whole.getSubject();
                if (conj.getTemporalOrder() == TemporalRules.ORDER_FORWARD && conj.term.length > 0 && !(conj.term[0] instanceof Interval)) {
                    Term[] t2 = new Term[conj.term.length - 2];
                    for (int i = 0; i < t2.length; i++) {
                        t2[i] = conj.term[i + 2];
                    }
                    Term reduced = Conjunction.make(t2, TemporalRules.ORDER_FORWARD);
                    Implication impnew = Implication.make(reduced, whole.getPredicate(), TemporalRules.ORDER_FORWARD);
                    for (Concept c : nal.memory.concepts) {
                        if (!(reduced instanceof Interval) && !c.beliefs.isEmpty() && c.term.equals(impnew)) {
                            ArrayList<Long> newBases = new ArrayList<Long>();
                            for (int i = 0; i < s1.stamp.evidentialBase.length; i++) {
                                newBases.add(s1.stamp.evidentialBase[i]);
                            }
                            for (int i = 0; i < s2.stamp.evidentialBase.length; i++) {
                                newBases.add(s2.stamp.evidentialBase[i]);
                            }
                            boolean isCompletelyIn = false;
                            for (ArrayList<Long> ev : c.evidentalDiscountBases) {
                                if (ev.size() == newBases.size()) {
                                    boolean isAllIn = true;
                                    for (Long bas : ev) {
                                        boolean isIn = false;
                                        for (Long bas2 : newBases) {
                                            if (Objects.equals(bas, bas2)) {
                                                isIn = true;
                                                break;
                                            }
                                        }
                                        if (isIn == false) {
                                            isAllIn = false;
                                        }
                                    }
                                    if (isAllIn) {
                                        isCompletelyIn = true;
                                        break;
                                    }
                                }
                            }
                            if (!isCompletelyIn) {
                                c.evidentalDiscountBases.add(newBases);
                                c.discountConfidence(true);
                            }
                        }
                    }
                }
            }
            return nal.doublePremiseTask(whole, truth, budget, true) != null;
        }
    }
    return false;
}

Output:
         int order2 = s2.getTemporalOrder();
-        Conjunction S = (Conjunction) Conjunction.make(term, order1);
+        Term S = Conjunction.make(term, order1);
         for (Term t : term) {


Input:
private boolean checkForMethod(final int oldPosition, final String rem_expr) {
    final Pattern FUNK = Pattern.compile("String_Node_Str");
    Matcher matcher = FUNK.matcher(rem_expr);
    if (matcher.find()) {
        String token = matcher.group(1);
        curPosition = curPosition + token.length();
        tokens.appendToken(oldPosition, TokenKind.LITERAL, token);
        return true;
    }
    return false;
}

Output:
 private boolean checkForMethod(final int oldPosition, final String rem_expr) {
-    final Pattern FUNK = Pattern.compile("String_Node_Str");
+    boolean isMethod = false;
     Matcher matcher = FUNK.matcher(rem_expr);


Input:
public void startUserSession(byte[] symetricKey, UserKeyRecord record, boolean restoreSession) {
    synchronized (serviceLock) {
        if (this.mIsBound) {
            releaseUserResourcesAndServices();
        }
        bindUserSessionService(symetricKey, record, restoreSession);
    }
}

Output:
         }
-        bindUserSessionService(symetricKey, record, restoreSession);
+        bindUserSessionService(symmetricKey, record, restoreSession);
     }


Input:
public boolean isClosed() {
    return this.messageDispatcher.isEmpty() && (this.stateManager.isDoneOrFailedOrKilled());
}

Output:
 public boolean isClosed() {
-    return this.messageDispatcher.isEmpty() && (this.stateManager.isDoneOrFailedOrKilled());
+    return this.messageDispatcher.isEmpty() && this.stateManager.isDoneOrFailedOrKilled();
 }


Input:
public void noteAudioOnLocked(int uid) {
    if (!mAudioOn) {
        mAudioOn = true;
        mAudioOnTimer.startRunningLocked(this);
    }
    Uid u = mUidStats.get(uid);
    if (u != null) {
        u.noteAudioTurnedOnLocked();
    }
}

Output:
     }
-    Uid u = mUidStats.get(uid);
-    if (u != null) {
-        u.noteAudioTurnedOnLocked();
-    }
+    getUidStatsLocked(uid).noteAudioTurnedOnLocked();
 }


Input:
private void playBackgroundMusic() {
    if (!SoundConfig.isBGMEnabled())
        return;
    String currentRoundConfigKey = null;
    if (currentRound instanceof StartRound) {
        currentRoundConfigKey = SoundConfig.KEY_BGM_StartRound;
    } else if (currentRound instanceof StockRound) {
        currentRoundConfigKey = SoundConfig.KEY_BGM_StockRound;
    } else if (currentRound instanceof OperatingRound) {
        currentRoundConfigKey = SoundConfig.KEY_BGM_OperatingRound;
    } else if (currentRound instanceof EndOfGameRound) {
        currentRoundConfigKey = SoundConfig.KEY_BGM_EndOfGameRound;
    }
    if (currentRoundConfigKey != null) {
        String currentPhaseName = "String_Node_Str";
        if (currentPhase != null)
            currentPhaseName = currentPhase.getName();
        String newBackgroundMusicFileName = SoundConfig.get(currentRoundConfigKey, currentPhaseName);
        if (!newBackgroundMusicFileName.equals(currentBackgroundMusicFileName)) {
            currentBackgroundMusicFileName = newBackgroundMusicFileName;
            player.playBGM(newBackgroundMusicFileName);
        }
    }
}

Output:
 private void playBackgroundMusic() {
-    if (!SoundConfig.isBGMEnabled())
+    if (!SoundConfig.isBGMEnabled() || currentPhase == null)
         return;


Input:
public void recoveryComplete() {
    logger.info("String_Node_Str" + "String_Node_Str");
    logger.info("String_Node_Str" + "String_Node_Str");
    neoStore.makeStoreOk();
    logger.info("String_Node_Str");
}

Output:
 public void recoveryComplete() {
-    logger.info("String_Node_Str" + "String_Node_Str");
-    logger.info("String_Node_Str" + "String_Node_Str");
+    logger.fine("String_Node_Str" + "String_Node_Str");
+    logger.fine("String_Node_Str" + "String_Node_Str");
     neoStore.makeStoreOk();


Input:
private void initState() {
    mBufferState = new int[10];
    mAllocState = Allocation.createSized(mRS, Element.USER_FLOAT, mBufferState.length);
    mBufferState[STATE_LAST_FOCUS] = -1;
    mAllocState.data(mBufferState);
}

Output:
     mBufferState = new int[10];
-    mAllocState = Allocation.createSized(mRS, Element.USER_FLOAT, mBufferState.length);
+    mAllocState = Allocation.createSized(mRS, Element.USER_F32(mRS), mBufferState.length);
     mBufferState[STATE_LAST_FOCUS] = -1;


Input:
private List<ElementDefinition> getDiffMatches(StructureDefinitionDifferentialComponent context, String path, int start, int end, String profileName, String url) throws DefinitionException {
    List<ElementDefinition> result = new ArrayList<ElementDefinition>();
    for (int i = start; i <= end; i++) {
        String statedPath = context.getElement().get(i).getPath();
        if (statedPath.equals(path) || (path.endsWith("String_Node_Str") && statedPath.length() > path.length() - 2 && statedPath.substring(0, path.length() - 3).equals(path.substring(0, path.length() - 3)) && !statedPath.substring(path.length()).contains("String_Node_Str"))) {
            result.add(context.getElement().get(i));
        }
    }
    return result;
}

Output:
         String statedPath = context.getElement().get(i).getPath();
-        if (statedPath.equals(path) || (path.endsWith("String_Node_Str") && statedPath.length() > path.length() - 2 && statedPath.substring(0, path.length() - 3).equals(path.substring(0, path.length() - 3)) && !statedPath.substring(path.length()).contains("String_Node_Str"))) {
+        if (statedPath.equals(path) || (path.endsWith("String_Node_Str") && statedPath.length() > path.length() - 2 && statedPath.substring(0, path.length() - 3).equals(path.substring(0, path.length() - 3)) && (statedPath.length() < path.length() || !statedPath.substring(path.length()).contains("String_Node_Str")))) {
             result.add(context.getElement().get(i));


Input:
protected DataSetDesign collectDataSetDesign(DataSetDesign design) {
    if (design != null && doc != null)
        design.setQueryText(doc.get());
    if (!formerQueryTxt.equals(design.getQueryText())) {
        SQLUtility.saveDataSetDesign(design);
        formerQueryTxt = design.getQueryText();
    }
    return design;
}

Output:
         design.setQueryText(doc.get());
-    if (!formerQueryTxt.equals(design.getQueryText())) {
+    if (this.shouldUpdateDataSetDesign || !formerQueryTxt.equals(design.getQueryText())) {
         SQLUtility.saveDataSetDesign(design);


Input:
public void modifyText(ModifyEvent e) {
    KeyWrapper[] selectedKeys = getSelectedKeys();
    if (selectedKeys.length > 0 && selectedKeys[0].getName().equals(txtKeyName.getText().trim()))
        return;
    String errMsg = isKeyNameValid(txtKeyName.getText().trim(), selectedKeys[0]);
    lblKeyNameErrIndicator.setVisible(errMsg != null);
    lblKeyNameErrIndicator.setToolTipText(errMsg == null ? "String_Node_Str" : errMsg);
    getSelectedKeys()[0].setName(txtKeyName.getText().trim());
    tvKeys.refresh();
    if (section != null)
        section.autoCommit();
}

Output:
     KeyWrapper[] selectedKeys = getSelectedKeys();
-    if (selectedKeys.length > 0 && selectedKeys[0].getName().equals(txtKeyName.getText().trim()))
+    if (selectedKeys.length > 0 && selectedKeys[0].getName().equals(txtKeyName.getText().trim())) {
         return;


Input:
public static Long toInt(Object o) {
    Double val = toNumeric(o);
    return new Long((long) Math.floor(val.doubleValue()));
}

Output:
     Double val = toNumeric(o);
-    return new Long((long) Math.floor(val.doubleValue()));
+    if (val.isInfinite() || val.isNaN()) {
+        return val;
+    } else if (val.doubleValue() >= Long.MAX_VALUE || val.doubleValue() <= Long.MIN_VALUE) {
+        return val;
+    } else {
+        long l = val.longValue();
+        Double dbl = new Double(l);
+        if (l == 0 && (val.doubleValue() < 0. || val.equals(new Double(-0.)))) {
+            dbl = new Double(-0.);
+        }
+        return dbl;
+    }
 }


Input:
private Node getNode(Object entity, ObjectGraph graph, NodeState initialNodeState) {
    EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(entity.getClass());
    if (entityMetadata == null) {
        throw new IllegalArgumentException("String_Node_Str");
    }
    if (initialNodeState != null && initialNodeState.getClass().equals(TransientState.class)) {
        Object id = PropertyAccessorHelper.getId(entity, entityMetadata);
        Node nodeInPersistenceCache = null;
        if (id != null) {
            String nodeId = ObjectGraphUtils.getNodeId(id, entity.getClass());
            nodeInPersistenceCache = persistenceCache.getMainCache().getNodeFromCache(nodeId);
        }
        if (nodeInPersistenceCache == null) {
            idGenerator.generateAndSetId(entity, entityMetadata, pd);
        }
    }
    if (!validator.isValidEntityObject(entity)) {
        throw new IllegalArgumentException("String_Node_Str");
    }
    Object id = PropertyAccessorHelper.getId(entity, entityMetadata);
    String nodeId = ObjectGraphUtils.getNodeId(id, entity.getClass());
    Node node = graph.getNode(nodeId);
    if (node != null) {
        if (node.isGraphCompleted()) {
            return node;
        }
        return null;
    }
    Node nodeInPersistenceCache = persistenceCache.getMainCache().getNodeFromCache(nodeId);
    if (nodeInPersistenceCache == null) {
        node = new Node(nodeId, entity, initialNodeState, persistenceCache, id);
    } else {
        node = nodeInPersistenceCache;
        if (!DeepEquals.deepEquals(node.getData(), entity)) {
            node.setData(entity);
            node.setDirty(true);
        } else if (node.isProcessed()) {
            node.setDirty(false);
        }
    }
    graph.addNode(nodeId, node);
    for (Relation relation : entityMetadata.getRelations()) {
        Object childObject = PropertyAccessorHelper.getObject(entity, relation.getProperty());
        if (childObject != null && !ProxyHelper.isProxy(childObject)) {
            EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(childObject.getClass());
            if (metadata != null && relation.isJoinedByPrimaryKey()) {
                PropertyAccessorHelper.setId(childObject, metadata, PropertyAccessorHelper.getId(entity, entityMetadata));
            }
            if (Collection.class.isAssignableFrom(childObject.getClass())) {
                Collection childrenObjects = (Collection) childObject;
                if (childrenObjects != null && !ProxyHelper.isProxyCollection(childrenObjects))
                    for (Object childObj : childrenObjects) {
                        if (childObj != null) {
                            addChildNodesToGraph(graph, node, relation, childObj, initialNodeState);
                        }
                    }
            } else if (Map.class.isAssignableFrom(childObject.getClass())) {
                Map childrenObjects = (Map) childObject;
                if (childrenObjects != null && !ProxyHelper.isProxyCollection(childrenObjects)) {
                    for (Map.Entry entry : (Set<Map.Entry>) childrenObjects.entrySet()) {
                        addChildNodesToGraph(graph, node, relation, entry, initialNodeState);
                    }
                }
            } else {
                addChildNodesToGraph(graph, node, relation, childObject, initialNodeState);
            }
        }
    }
    node.setGraphCompleted(true);
    return node;
}

Output:
     }
-    if (initialNodeState != null && initialNodeState.getClass().equals(TransientState.class)) {
+    if (((Field) entityMetadata.getIdAttribute().getJavaMember()).isAnnotationPresent(GeneratedValue.class)) {
         Object id = PropertyAccessorHelper.getId(entity, entityMetadata);


Input:
public void subProductIdCopiedOntoPoolWhenCreatingNewPool() {
    Product product = TestUtil.createProduct(owner);
    Product subProduct = TestUtil.createProduct(owner);
    Subscription sub = TestUtil.createSubscription(owner, product);
    sub.setDerivedProduct(subProduct);
    when(this.productAdapterMock.getProductById(anyString())).thenReturn(product);
    when(this.productAdapterMock.getProductById(anyString())).thenReturn(subProduct);
    List<Pool> pools = this.poolRules.createPools(sub);
    assertEquals(1, pools.size());
    Pool resultPool = pools.get(0);
    assertEquals(subProduct, resultPool.getDerivedProduct());
}

Output:
     sub.setDerivedProduct(subProduct);
-    when(this.productAdapterMock.getProductById(anyString())).thenReturn(product);
-    when(this.productAdapterMock.getProductById(anyString())).thenReturn(subProduct);
+    when(this.productAdapterMock.getProductById(product.getOwner(), product.getId())).thenReturn(product);
+    when(this.productAdapterMock.getProductById(subProduct.getOwner(), subProduct.getId())).thenReturn(subProduct);
     List<Pool> pools = this.poolRules.createPools(sub);


Input:
public Mapping union(List<Mapping> rawMembers) {
    List<Mapping> members = new ArrayList<Mapping>(rawMembers.size());
    for (Mapping rawMember : rawMembers) {
        if (!rawMember.isEmpty()) {
            members.add(rawMember);
        }
    }
    if (members.isEmpty()) {
        Mapping result = createEmptyMapping();
        return result;
    }
    Generator aliasGen = Gensym.create("String_Node_Str");
    if (members.size() == 1) {
        logger.warn("String_Node_Str");
        Mapping result = members.get(0);
        return result;
    }
    Multimap<Var, RestrictedExpr> unionVarDefs = HashMultimap.create();
    List<Map<String, SqlExpr>> unionMemberProjections = new ArrayList<Map<String, SqlExpr>>();
    for (int i = 0; i < members.size(); ++i) {
        Map<String, SqlExpr> tmp = new HashMap<String, SqlExpr>();
        unionMemberProjections.add(tmp);
    }
    Multimap<Var, Integer> varToMembers = HashMultimap.create();
    for (int i = 0; i < members.size(); ++i) {
        Mapping mapping = members.get(i);
        for (Var var : mapping.getVarDefinition().getMap().keySet()) {
            varToMembers.put(var, i);
        }
    }
    ExprCommonFactor factorizer = new ExprCommonFactor(aliasGen);
    Map<String, TypeToken> unionTypeMap = new HashMap<String, TypeToken>();
    for (Entry<Var, Collection<Integer>> entry : varToMembers.asMap().entrySet()) {
        Var var = entry.getKey();
        Collection<Integer> memberIndexes = entry.getValue();
        Multimap<String, ArgExpr> cluster = HashMultimap.create();
        for (int index : memberIndexes) {
            Mapping member = members.get(index);
            Collection<RestrictedExpr> exprsForVar = member.getVarDefinition().getDefinitions(var);
            for (RestrictedExpr def : exprsForVar) {
                Map<String, TypeToken> typeMap = member.getSqlOp().getSchema().getTypeMap();
                Expr expr = def.getExpr();
                Expr datatypeNorm = exprNormalizer.normalize(expr, typeMap);
                String hash = datatypeNorm.toString();
                logger.debug("String_Node_Str" + expr + "String_Node_Str" + hash + "String_Node_Str");
                cluster.put(hash, new ArgExpr(expr, index));
            }
        }
        for (Entry<String, Collection<ArgExpr>> clusterEntry : cluster.asMap().entrySet()) {
            Collection<ArgExpr> argExprs = clusterEntry.getValue();
            List<Expr> exprs = new ArrayList<Expr>();
            Map<Integer, Integer> exprToOp = new HashMap<Integer, Integer>();
            int i = 0;
            for (ArgExpr argExpr : argExprs) {
                Expr expr = argExpr.getExpr();
                exprs.add(expr);
                exprToOp.put(i, argExpr.getIndex());
                ++i;
            }
            List<Map<Var, Expr>> tmpPartialProjections = new ArrayList<Map<Var, Expr>>();
            Expr common = factorizer.transform(exprs, tmpPartialProjections);
            List<Map<String, SqlExpr>> partialProjections = new ArrayList<Map<String, SqlExpr>>();
            for (int j = 0; j < tmpPartialProjections.size(); ++j) {
                int memberIndex = exprToOp.get(j);
                Mapping member = members.get(memberIndex);
                Map<String, TypeToken> typeMap = member.getSqlOp().getSchema().getTypeMap();
                Map<Var, Expr> tmpMap = tmpPartialProjections.get(j);
                Map<String, SqlExpr> map = new HashMap<String, SqlExpr>();
                for (Entry<Var, Expr> e : tmpMap.entrySet()) {
                    String columnName = e.getKey().getVarName();
                    Expr expr = e.getValue();
                    ExprSqlRewrite exprRewrite = sqlTranslator.translate(expr, null, typeMap);
                    SqlExpr sqlExpr = SqlTranslatorImpl2.asSqlExpr(exprRewrite);
                    map.put(columnName, sqlExpr);
                    unionTypeMap.put(columnName, sqlExpr.getDatatype());
                }
                partialProjections.add(map);
            }
            unionVarDefs.put(var, new RestrictedExpr(common));
            for (int j = 0; j < partialProjections.size(); ++j) {
                int originalIndex = exprToOp.get(j);
                Map<String, SqlExpr> projection = unionMemberProjections.get(originalIndex);
                Map<String, SqlExpr> partialProjection = partialProjections.get(j);
                for (Entry<String, SqlExpr> ppEntry : partialProjection.entrySet()) {
                    projection.put(ppEntry.getKey(), ppEntry.getValue());
                }
            }
        }
    }
    List<String> unionColumnOrder = new ArrayList<String>(unionTypeMap.keySet());
    List<SqlOp> extended = new ArrayList<SqlOp>();
    for (int i = 0; i < members.size(); ++i) {
        Mapping member = members.get(i);
        Map<String, SqlExpr> unionMemberProjection = unionMemberProjections.get(i);
        Set<String> names = new HashSet<String>(unionMemberProjection.keySet());
        Set<String> unboundColumns = Sets.difference(unionTypeMap.keySet(), names);
        for (String columnName : unboundColumns) {
            TypeToken datatype = unionTypeMap.get(columnName);
            S_Constant nullValue = new S_Constant(datatype);
            unionMemberProjection.put(columnName, nullValue);
        }
        Projection finalMemberProjection = new Projection(unionColumnOrder, unionMemberProjection);
        SqlOpExtend extend = SqlOpExtend.create(member.getSqlOp(), finalMemberProjection);
        SqlOpProject opProject = SqlOpProject.create(extend, unionColumnOrder);
        extended.add(opProject);
    }
    SqlOpUnionN newUnion = SqlOpUnionN.create(extended);
    VarDefinition varDefinition = new VarDefinition(unionVarDefs);
    Mapping result = new Mapping(varDefinition, newUnion);
    logger.info("String_Node_Str" + result);
    return result;
}

Output:
     }
-    Generator aliasGen = Gensym.create("String_Node_Str");
+    Set<String> columnNameBlacklist = new HashSet<String>();
+    for (Mapping member : members) {
+        List<String> memberColumnNames = member.getSqlOp().getSchema().getColumnNames();
+        columnNameBlacklist.addAll(memberColumnNames);
+    }
+    Generator aliasGen = GeneratorBlacklist.create("String_Node_Str", columnNameBlacklist);
     if (members.size() == 1) {


Input:
private void parseComplexTypes(Document srcDoc, XSDDocument xsdDocument) throws ParserException {
    logger.log(Level.FINER, "String_Node_Str", new Object[] { srcDoc, xsdDocument });
    NodeList ctypeElements = srcDoc.getElementsByTagNameNS("String_Node_Str", "String_Node_Str");
    this.setCtypes(ctypeElements);
    int noOfDomElements = ctypeElements.getLength();
    for (int i = 0; i < noOfDomElements; i++) {
        org.w3c.dom.Element obj = (org.w3c.dom.Element) ctypeElements.item(i);
        String name = obj.getAttribute("String_Node_Str");
        ComplexType cType = Context.getContext().getNewComplexType();
        cType.setName(name);
        cType.setAnnotationInfo(parseAnnotation(obj));
        NamedNodeMap nameNodeMap = obj.getAttributes();
        int size = nameNodeMap.getLength();
        for (int j = 0; j < size; j++) {
            Attr attr = (Attr) nameNodeMap.item(j);
            if (attr != null) {
                Attribute attribute = new Attribute();
                attribute.setName(attr.getName());
                attribute.setValue(attr.getValue());
                cType.getAttributes().add(attribute);
            }
        }
        cType.setChildElements(this.parseChildElements(cType, ctypeElements, obj, xsdDocument));
        List<Element> instances = (List<Element>) typeElementsMap.get(name);
        if (instances != null) {
            cType.setInstanceElements(instances);
        }
        postProcessComplexType(cType, obj);
        xsdDocument.addComplexType(cType);
    }
    logger.log(Level.FINER, "String_Node_Str", xsdDocument);
}

Output:
         org.w3c.dom.Element obj = (org.w3c.dom.Element) ctypeElements.item(i);
-        String name = obj.getAttribute("String_Node_Str");
-        ComplexType cType = Context.getContext().getNewComplexType();
-        cType.setName(name);
-        cType.setAnnotationInfo(parseAnnotation(obj));
-        NamedNodeMap nameNodeMap = obj.getAttributes();
-        int size = nameNodeMap.getLength();
-        for (int j = 0; j < size; j++) {
-            Attr attr = (Attr) nameNodeMap.item(j);
-            if (attr != null) {
-                Attribute attribute = new Attribute();
-                attribute.setName(attr.getName());
-                attribute.setValue(attr.getValue());
-                cType.getAttributes().add(attribute);
-            }
-        }
-        cType.setChildElements(this.parseChildElements(cType, ctypeElements, obj, xsdDocument));
-        List<Element> instances = (List<Element>) typeElementsMap.get(name);
-        if (instances != null) {
-            cType.setInstanceElements(instances);
-        }
-        postProcessComplexType(cType, obj);
-        xsdDocument.addComplexType(cType);
+        xsdDocument.addComplexType(processComplexType(xsdDocument, obj));
     }


Input:
public static boolean handleApplicationUndeployed(String appId) {
    if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + appId);
    }
    Set<ClusterDataHolder> clusterData;
    ApplicationHolder.acquireWriteLock();
    try {
        Applications applications = ApplicationHolder.getApplications();
        Application application = applications.getApplication(appId);
        if (application == null) {
            log.warn(String.format("String_Node_Str", appId));
            return false;
        }
        clusterData = application.getClusterDataRecursively();
        Collection<ApplicationInstance> context = application.getInstanceIdToInstanceContextMap().values();
        ApplicationStatus status = ApplicationStatus.Terminating;
        for (ApplicationInstance context1 : context) {
            if (context1.isStateTransitionValid(status)) {
                application.setStatus(status, context1.getInstanceId());
                updateApplicationMonitor(appId, status, context1.getInstanceId());
                ApplicationHolder.persistApplication(application);
                ApplicationsEventPublisher.sendApplicationInstanceTerminatingEvent(appId, context1.getInstanceId());
            } else {
                log.warn(String.format("String_Node_Str" + "String_Node_Str", appId, context1.getInstanceId() + context1.getStatus(), status));
            }
        }
    } finally {
        ApplicationHolder.releaseWriteLock();
    }
    for (ClusterDataHolder aClusterData : clusterData) {
        if (AutoscalerContext.getInstance().getClusterMonitor(aClusterData.getClusterId()) == null) {
            TopologyManager.acquireReadLockForCluster(aClusterData.getServiceType(), aClusterData.getClusterId());
            try {
                Service service = TopologyManager.getTopology().getService(aClusterData.getServiceType());
                if (service != null) {
                    Cluster cluster = service.getCluster(aClusterData.getClusterId());
                    if (cluster != null) {
                        for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
                            ClusterStatusEventPublisher.sendClusterTerminatingEvent(appId, aClusterData.getServiceType(), aClusterData.getClusterId(), instance.getInstanceId());
                        }
                    }
                }
            } finally {
                TopologyManager.releaseReadLockForCluster(aClusterData.getServiceType(), aClusterData.getClusterId());
            }
        }
    }
    return true;
}

Output:
                 application.setStatus(status, context1.getInstanceId());
-                updateApplicationMonitor(appId, status, context1.getInstanceId());
+                updateApplicationMonitor(appId, status, context1.getNetworkPartitionId(), context1.getInstanceId());
                 ApplicationHolder.persistApplication(application);


Input:
public void upgradePortForwardingRules(Connection conn) {
    try {
        PreparedStatement pstmt = conn.prepareStatement("String_Node_Str");
        ResultSet rs = pstmt.executeQuery();
        ArrayList<Object[]> rules = new ArrayList<Object[]>();
        while (rs.next()) {
            Object[] rule = new Object[10];
            rule[0] = rs.getLong(1);
            rule[1] = rs.getString(2);
            rule[2] = rs.getString(3);
            rule[3] = rs.getString(4);
            rule[4] = rs.getString(5);
            rule[5] = rs.getString(6);
            rules.add(rule);
        }
        rs.close();
        pstmt.close();
        if (!rules.isEmpty()) {
            s_logger.debug("String_Node_Str" + rules.size() + "String_Node_Str");
            for (Object[] rule : rules) {
                long id = (Long) rule[0];
                String sourcePort = (String) rule[2];
                String protocol = (String) rule[5];
                String publicIp = (String) rule[1];
                pstmt = conn.prepareStatement("String_Node_Str");
                pstmt.setString(1, publicIp);
                rs = pstmt.executeQuery();
                if (!rs.next()) {
                    s_logger.error("String_Node_Str" + publicIp);
                    throw new CloudRuntimeException("String_Node_Str" + publicIp);
                }
                int ipAddressId = rs.getInt(1);
                long accountId = rs.getLong(2);
                long domainId = rs.getLong(3);
                long networkId = rs.getLong(4);
                String privateIp = (String) rule[3];
                rs.close();
                pstmt.close();
                s_logger.trace("String_Node_Str");
                pstmt = conn.prepareStatement("String_Node_Str");
                pstmt.setLong(1, networkId);
                pstmt.setString(2, privateIp);
                rs = pstmt.executeQuery();
                if (!rs.next()) {
                    s_logger.warn("String_Node_Str" + privateIp + "String_Node_Str" + accountId + "String_Node_Str");
                } else {
                    long instanceId = rs.getLong(1);
                    s_logger.debug("String_Node_Str" + instanceId);
                    s_logger.trace("String_Node_Str");
                    pstmt = conn.prepareStatement("String_Node_Str");
                    pstmt.setLong(1, id);
                    pstmt.setInt(2, ipAddressId);
                    pstmt.setInt(3, Integer.valueOf(sourcePort.trim()));
                    pstmt.setInt(4, Integer.valueOf(sourcePort.trim()));
                    pstmt.setString(5, protocol);
                    pstmt.setLong(6, accountId);
                    pstmt.setLong(7, domainId);
                    pstmt.setLong(8, networkId);
                    pstmt.setString(9, UUID.randomUUID().toString());
                    pstmt.executeUpdate();
                    pstmt.close();
                    s_logger.trace("String_Node_Str");
                    rs.close();
                    pstmt.close();
                    String privatePort = (String) rule[4];
                    pstmt = conn.prepareStatement("String_Node_Str");
                    pstmt.setLong(1, id);
                    pstmt.setLong(2, instanceId);
                    pstmt.setString(3, privateIp);
                    pstmt.setInt(4, Integer.valueOf(privatePort.trim()));
                    pstmt.setInt(5, Integer.valueOf(privatePort.trim()));
                    pstmt.executeUpdate();
                    pstmt.close();
                    s_logger.trace("String_Node_Str");
                }
            }
        }
        s_logger.debug("String_Node_Str");
    } catch (SQLException e) {
        throw new CloudRuntimeException("String_Node_Str", e);
    }
}

Output:
                     pstmt.setInt(2, ipAddressId);
-                    pstmt.setInt(3, Integer.valueOf(sourcePort.trim()));
-                    pstmt.setInt(4, Integer.valueOf(sourcePort.trim()));
+                    pstmt.setInt(3, Integer.parseInt(sourcePort.trim()));
+                    pstmt.setInt(4, Integer.parseInt(sourcePort.trim()));
                     pstmt.setString(5, protocol);


Input:
public void destory(boolean rollback) {
    if (rollback) {
        if (ds instanceof OdaDataSetHandle) {
            try {
                ((OdaDataSetHandle) ds).setQueryText(this.savedQueryText);
                DataSetProvider.getCurrentInstance().getDataSetDesign(ds, true, true);
            } catch (SemanticException e) {
            } catch (BirtException e) {
            }
        }
        DataSetProvider.getCurrentInstance().setModelOfDataSetHandle(this.ds, savedItemModel);
    }
    Thread.currentThread().setContextClassLoader(oldContextLoader);
    ds.removeListener(this);
}

Output:
     Thread.currentThread().setContextClassLoader(oldContextLoader);
-    ds.removeListener(this);
+    if (ds != null)
+        ds.removeListener(this);
 }


Input:
public synchronized void registerCall() {
    if (needToWait) {
        needToWait = false;
        final Thread t = new Thread(new ResetThread());
        t.setDaemon(true);
        t.start();
    }
}

Output:
 public synchronized void registerCall() {
-    if (needToWait) {
-        needToWait = false;
-        final Thread t = new Thread(new ResetThread());
-        t.setDaemon(true);
-        t.start();
+    if (!resetRunning) {
+        timer.schedule(new ResetTask(), millisPerEpoch);
+        resetRunning = true;
     }


Input:
public static boolean isIpAddress(String address) {
    try {
        return getAddressMatcher(address) != null;
    } catch (InvalidAddressException e) {
        return false;
    }
}

Output:
     try {
-        return getAddressMatcher(address) != null;
+        getAddressMatcher(address);
+        return true;
     } catch (InvalidAddressException e) {


Input:
public void setReceivingVideo(boolean receiving) {
    if (_phone.getCallService().getCall(this._key).isAudioCall()) {
        Ln.d("String_Node_Str");
        return;
    }
    _phone.getCallService().muteRemoteVideos(getKey(), !receiving);
    CallObserver observer = getObserver();
    if (observer != null) {
        observer.onMediaChanged(new CallObserver.ReceivingVideo(this, receiving));
    }
}

Output:
 public void setReceivingVideo(boolean receiving) {
-    if (_phone.getCallService().getCall(this._key).isAudioCall()) {
+    if (!_option.hasVideo()) {
         Ln.d("String_Node_Str");


Input:
public int getRowIndex(Object dataset, Comparable key) {
    if (isServiceInstalled()) {
        return chartService.getRowIndex(dataset, key);
    }
    return Integer.MIN_VALUE;
}

Output:
 public int getRowIndex(Object dataset, Comparable key) {
-    if (isServiceInstalled()) {
+    if (isTOPChartInstalled()) {
         return chartService.getRowIndex(dataset, key);


Input:
private static void addContextForElementParameters(final IProcess2 process, final ConnectionItem connItem, List<? extends IElementParameter> elementParameters, final EComponentCategory category, final boolean ignoreContextMode) {
    if (connItem == null || elementParameters == null || process == null) {
        return;
    }
    Connection connection = connItem.getConnection();
    if (connection != null && connection.isContextMode()) {
        Set<String> neededVars = retrieveContextVar(elementParameters, connection, category);
        if (neededVars != null && !neededVars.isEmpty()) {
            ContextItem contextItem = ContextUtils.getContextItemById2(connection.getContextId());
            if (contextItem != null) {
                Set<String> addedVars = checkAndAddContextVariables(contextItem, neededVars, process.getContextManager(), false);
                if (addedVars != null && !addedVars.isEmpty()) {
                    boolean added = false;
                    if (ignoreContextMode) {
                        addContextVarForJob(process, contextItem, addedVars);
                        added = true;
                    } else {
                        Map<String, Set<String>> addedVarsMap = new HashMap<String, Set<String>>();
                        addedVarsMap.put(connItem.getProperty().getId(), addedVars);
                        ShowAddedContextdialog showDialog = new ShowAddedContextdialog(addedVarsMap, true);
                        if (showDialog.open() == Window.OK) {
                            addContextVarForJob(process, contextItem, addedVars);
                            added = true;
                        }
                    }
                    if (added) {
                        if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
                            IDesignerCoreService service = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
                            service.switchToCurContextsView();
                        }
                    }
                }
            }
        }
    }
}

Output:
                 Set<String> addedVars = checkAndAddContextVariables(contextItem, neededVars, process.getContextManager(), false);
-                if (addedVars != null && !addedVars.isEmpty()) {
+                if (addedVars != null && !addedVars.isEmpty() && !isAddContextVar(contextItem, process.getContextManager(), neededVars)) {
                     boolean added = false;


Input:
JsonObject toJson() {
    JsonObject root = new JsonObject();
    DataModelField f = this.dataModelObject.getField(fieldName);
    root.addProperty("String_Node_Str", this.fieldName);
    root.addProperty("String_Node_Str", f.getOwnerName());
    root.addProperty("String_Node_Str", f.getType().toString());
    root.addProperty("String_Node_Str", this.label);
    root.addProperty("String_Node_Str", this.generateSparkline);
    root.addProperty("String_Node_Str", this.statsFunction.toString());
    return root;
}

Output:
     root.addProperty("String_Node_Str", this.fieldName);
-    root.addProperty("String_Node_Str", f.getOwnerName());
+    root.addProperty("String_Node_Str", Util.join("String_Node_Str", f.getOwnerLineage()));
     root.addProperty("String_Node_Str", f.getType().toString());


Input:
private void refreshValues() {
    resultList.clear();
    if (columnChooser.isEnabled()) {
        ResultSetColumnHandle selectedColumn = null;
        try {
            IQueryDefinition query = DataUtil.getPreparedQuery(engine, getDataSetHandle()).getReportQueryDefn();
            String queryExpr = null;
            for (Iterator iter = columnList.iterator(); iter.hasNext(); ) {
                ResultSetColumnHandle column = (ResultSetColumnHandle) iter.next();
                if (column.getColumnName().equals(columnChooser.getText())) {
                    queryExpr = DEUtil.getResultSetColumnExpression(column.getColumnName());
                    selectedColumn = column;
                    break;
                }
            }
            if (queryExpr == null) {
                return;
            }
            ScriptExpression expression = new ScriptExpression(queryExpr);
            String columnBindingName = "String_Node_Str";
            Binding binding = new Binding(columnBindingName);
            binding.setExpression(expression);
            if (expression != null)
                binding.setDataType(expression.getDataType());
            query.addBinding(binding);
            DataSessionContext context = new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION, getDataSetHandle().getModuleHandle());
            DataRequestSession session = DataRequestSession.newSession(context);
            IQueryResults results = DataSetProvider.getCurrentInstance().execute(getDataSetHandle(), query, true, true, true, session);
            if (results != null) {
                IResultIterator iter = results.getResultIterator();
                if (iter != null) {
                    while (iter.next()) {
                        String result = null;
                        Object data = iter.getValue(columnBindingName);
                        if (data instanceof Date) {
                            result = convertToStandardFormat((Date) data);
                        } else {
                            if (data == null) {
                                result = nullValue;
                                hasNullValue = true;
                            } else {
                                result = String.valueOf(data);
                            }
                        }
                        if (!resultList.contains(result)) {
                            resultList.add(result);
                        }
                    }
                }
                results.close();
                session.shutdown();
            }
        } catch (Exception e) {
            ExceptionHandler.handle(e);
            valueList.removeAll();
            valueList.deselectAll();
            updateButtons();
        }
        filteValues();
    } else {
        valueList.removeAll();
        valueList.deselectAll();
        updateButtons();
    }
}

Output:
             binding.setExpression(expression);
-            if (expression != null)
-                binding.setDataType(expression.getDataType());
+            binding.setDataType(queryValueType);
             query.addBinding(binding);


Input:
private URLConnection openConnection(URL aSource) throws IOException {
    URLConnection connection = aSource.openConnection();
    if (hasTimestamp) {
        connection.setIfModifiedSince(timestamp);
    }
    if (uname != null || pword != null) {
        String up = uname + "String_Node_Str" + pword;
        String encoding;
        Base64Converter encoder = new Base64Converter();
        encoding = encoder.encode(up.getBytes());
        connection.setRequestProperty("String_Node_Str", "String_Node_Str" + encoding);
    }
    if (connection instanceof HttpURLConnection) {
        ((HttpURLConnection) connection).setInstanceFollowRedirects(false);
        ((HttpURLConnection) connection).setUseCaches(httpUseCaches);
    }
    try {
        connection.connect();
    } catch (NullPointerException e) {
        throw new BuildException("String_Node_Str" + source.toString(), e);
    }
    if (connection instanceof HttpURLConnection) {
        HttpURLConnection httpConnection = (HttpURLConnection) connection;
        int responseCode = httpConnection.getResponseCode();
        if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP || responseCode == HttpURLConnection.HTTP_SEE_OTHER) {
            String newLocation = httpConnection.getHeaderField("String_Node_Str");
            String message = aSource + (responseCode == HttpURLConnection.HTTP_MOVED_PERM ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + newLocation;
            log(message, logLevel);
            URL newURL = new URL(newLocation);
            if (!redirectionAllowed(aSource, newURL)) {
                return null;
            }
            return openConnection(newURL);
        }
        long lastModified = httpConnection.getLastModified();
        if (responseCode == HttpURLConnection.HTTP_NOT_MODIFIED || (lastModified != 0 && hasTimestamp && timestamp >= lastModified)) {
            log("String_Node_Str", logLevel);
            return null;
        }
        if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
            String message = "String_Node_Str";
            if (ignoreErrors) {
                log(message, logLevel);
                return null;
            } else {
                throw new BuildException(message);
            }
        }
    }
    return connection;
}

Output:
             log(message, logLevel);
-            URL newURL = new URL(newLocation);
+            URL newURL = new URL(aSource, newLocation);
             if (!redirectionAllowed(aSource, newURL)) {


Input:
public void selectByVisibleText(Object text) {
    log.info("String_Node_Str" + this + "String_Node_Str" + text + "String_Node_Str");
    locate().selectByVisibleText(text.toString());
    if (!locate().getFirstSelectedOption().getAttribute("String_Node_Str").equals(text.toString())) {
        locate().getOptions().stream().filter((WebElement e) -> e.getText().equals(text.toString())).findFirst().get().click();
    }
}

Output:
     locate().selectByVisibleText(text.toString());
-    if (!locate().getFirstSelectedOption().getAttribute("String_Node_Str").equals(text.toString())) {
-        locate().getOptions().stream().filter((WebElement e) -> e.getText().equals(text.toString())).findFirst().get().click();
+    try {
+        if (!locate().getFirstSelectedOption().getAttribute("String_Node_Str").equals(text.toString())) {
+            locate().getOptions().stream().filter((WebElement e) -> e.getText().equals(text.toString())).findFirst().get().click();
+        }
+    } catch (Exception e) {
     }


Input:
private final boolean unscheduleServiceRestartLocked(ServiceRecord r) {
    if (r.restartDelay == 0) {
        return false;
    }
    r.resetRestartCounter();
    mRestartingServices.remove(r);
    mAm.mHandler.removeCallbacks(r.restarter);
    return true;
}

Output:
     }
-    r.resetRestartCounter();
-    mRestartingServices.remove(r);
+    boolean removed = mRestartingServices.remove(r);
+    if (removed || callingUid != r.appInfo.uid) {
+        r.resetRestartCounter();
+    }
     mAm.mHandler.removeCallbacks(r.restarter);


Input:
public String[] next() {
    if (!headerReturned) {
        headerReturned = true;
        return createHeader();
    }
    if (row.getPhysicalNumberOfCells() > numberOfColumns) {
        throw new IllegalArgumentException("String_Node_Str" + currentRow + "String_Node_Str");
    }
    String[] result = new String[indexes.length];
    for (int i = 0; i < indexes.length; i++) {
        row.getCell(indexes[i]).setCellType(Cell.CELL_TYPE_STRING);
        result[i] = row.getCell(indexes[i]).getStringCellValue();
        if (!dataTypes[i].isValid(result[i])) {
            throw new IllegalArgumentException("String_Node_Str");
        }
    }
    if (iterator.hasNext()) {
        row = iterator.next();
        currentRow++;
    } else {
        row = null;
    }
    return result;
}

Output:
         headerReturned = true;
-        return createHeader();
+        return header;
     }


Input:
public void disable() {
    if (Build.VERSION.SDK_INT >= 19) {
        decorView.getViewTreeObserver().removeOnGlobalLayoutListener(onGlobalLayoutListener);
    }
}

Output:
 public void disable() {
-    if (Build.VERSION.SDK_INT >= 19) {
-        decorView.getViewTreeObserver().removeOnGlobalLayoutListener(onGlobalLayoutListener);
-    }
+    decorView.getViewTreeObserver().removeOnGlobalLayoutListener(onGlobalLayoutListener);
 }


Input:
public boolean canStructureInsertItem(int slot, ItemStack item, EnumFacing side, BlockPos local) {
    return isSide(globalDirectionsMaterialInput, side) && local.equals(LOCATION_MATERIAL_INPUT) && isItemValidForSlot(slot, item);
}

Output:
 public boolean canStructureInsertItem(int slot, ItemStack item, EnumFacing side, BlockPos local) {
-    return isSide(globalDirectionsMaterialInput, side) && local.equals(LOCATION_MATERIAL_INPUT) && isItemValidForSlot(slot, item);
+    return isSide(globalDirectionsMaterialInput, side) && local.equals(globalLocationMaterialInput) && isItemValidForSlot(slot, item);
 }


Input:
public String toString() {
    return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str" + driverResources + "String_Node_Str" + extraJavaOpts + '\'' + "String_Node_Str" + super.toString();
}

Output:
 public String toString() {
-    return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str" + driverResources + "String_Node_Str" + extraJavaOpts + '\'' + "String_Node_Str" + super.toString();
+    return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str" + extraJavaOpts + '\'' + "String_Node_Str" + super.toString();
 }


Input:
protected void writeComplexValue(final EdmComplexType type, final List<Property> properties, final Set<List<String>> selectedPaths, final JsonGenerator json) throws IOException, SerializerException {
    json.writeStartObject();
    for (final String propertyName : type.getPropertyNames()) {
        final Property property = findProperty(propertyName, properties);
        if (selectedPaths == null || ExpandSelectHelper.isSelected(selectedPaths, propertyName)) {
            writeProperty((EdmProperty) type.getProperty(propertyName), property, selectedPaths == null ? null : ExpandSelectHelper.getReducedSelectedPaths(selectedPaths, propertyName), json);
        }
    }
    json.writeEndObject();
}

Output:
     json.writeStartObject();
-    for (final String propertyName : type.getPropertyNames()) {
+    final EdmComplexType resolvedType = resolveComplexType(metadata, type, complexProperty.getType());
+    if (!isODataMetadataNone && !resolvedType.equals(type)) {
+        json.writeStringField(Constants.JSON_TYPE, "String_Node_Str" + complexProperty.getType());
+    }
+    for (final String propertyName : resolvedType.getPropertyNames()) {
         final Property property = findProperty(propertyName, properties);


Input:
public void setShowOffline(boolean showOffline) {
    this.showOffline = showOffline;
    this.contentChanged(0, getSize() - 1);
}

Output:
     this.showOffline = showOffline;
-    this.contentChanged(0, getSize() - 1);
+    this.contentChanged(0, size - 1);
 }


Input:
private Connection buildConnection(ChannelHandlerContext ctx, PBAPNSEvent pbapnsEvent) {
    Connection conn = ConnectionKeeper.get(pbapnsEvent.getAppKey(), pbapnsEvent.getUserId());
    boolean newOne = true;
    if (null != conn) {
        if (!conn.getDeviceId().equalsIgnoreCase(pbapnsEvent.getDeviceId())) {
            ConnectionKeeper.remove(pbapnsEvent.getAppKey(), pbapnsEvent.getUserId());
            logger.error("String_Node_Str", ctx, conn);
            ack(ctx, conn, pbapnsEvent, MULTI_CLIENTS);
            newOne = true;
        } else if (conn.getContext().channel().hashCode() != ctx.channel().hashCode()) {
            InetSocketAddress ip = (InetSocketAddress) conn.getContext().channel().remoteAddress();
            InetSocketAddress ip2 = (InetSocketAddress) ctx.channel().remoteAddress();
            if (ip.getAddress().getHostAddress().equalsIgnoreCase(ip2.getAddress().getHostAddress())) {
                if (pbapnsEvent.getOp() == PBAPNSEvent.Ops.Online_VALUE) {
                    logger.warn("String_Node_Str", ip, ip);
                    ack(ctx, conn, pbapnsEvent, MULTI_CLIENTS);
                    newOne = true;
                } else {
                    ConnectionKeeper.remove(pbapnsEvent.getAppKey(), pbapnsEvent.getUserId());
                    newOne = true;
                }
            } else {
                logger.warn("String_Node_Str", ip, ip2);
                ConnectionKeeper.remove(pbapnsEvent.getAppKey(), pbapnsEvent.getUserId());
                newOne = true;
            }
        } else {
            newOne = false;
            conn.setStatusId(ClientStatus.Online);
        }
    }
    if (newOne) {
        logger.debug("String_Node_Str", pbapnsEvent.getUserId(), ctx.channel().remoteAddress());
        conn = new Connection(ctx);
        conn.setUserId(pbapnsEvent.getUserId());
        conn.setAppKey(pbapnsEvent.getAppKey());
        conn.setDeviceId(pbapnsEvent.getDeviceId());
        ConnectionKeeper.add(pbapnsEvent.getAppKey(), pbapnsEvent.getUserId(), conn);
    }
    return conn;
}

Output:
         } else {
-            newOne = false;
+            newOne = true;
             conn.setStatusId(ClientStatus.Online);


Input:
public static void invertProjection(MultivariateGaussian dist, PathEdge edge) {
    Preconditions.checkNotNull(edge);
    Preconditions.checkArgument(edge != PathEdge.getEmptyPathEdge());
    Preconditions.checkArgument(dist.getInputDimensionality() == 2 || dist.getInputDimensionality() == 4);
    Entry<Matrix, Vector> projPair = posVelProjectionPair(edge);
    if (dist.getInputDimensionality() == 2) {
        Vector a = projPair.getKey().times(dist.getMean()).plus(projPair.getValue());
        Matrix R = projPair.getKey().times(dist.getCovariance()).times(projPair.getKey().transpose());
        dist.setCovariance(R);
        dist.setMean(a);
    } else {
        Vector m = projPair.getKey().transpose().times(dist.getMean().minus(projPair.getValue()));
        final double totalDist = edge.getDistToStartOfEdge() + edge.getInferredEdge().getLength();
        double dist2 = m.getElement(0);
        if (dist2 < edge.getDistToStartOfEdge()) {
            dist2 = 0d;
        } else if (dist2 > totalDist) {
            dist2 = totalDist;
        }
        m.setElement(0, dist2);
        Matrix C = projPair.getKey().transpose().times(dist.getCovariance()).times(projPair.getKey());
        dist.setCovariance(C);
        dist.setMean(m);
    }
}

Output:
     if (dist.getInputDimensionality() == 2) {
-        Vector a = projPair.getKey().times(dist.getMean()).plus(projPair.getValue());
-        Matrix R = projPair.getKey().times(dist.getCovariance()).times(projPair.getKey().transpose());
-        dist.setCovariance(R);
-        dist.setMean(a);
+        convertToGroundBelief(dist, edge);
     } else {


Input:
public void mouseReleased(Canvas canvas, Graphics g, MouseEvent e) {
    Project proj = canvas.getProject();
    if (state == MOVING) {
        setState(proj, IDLE);
        computeDxDy(proj, e, g);
        int dx = curDx;
        int dy = curDy;
        if (dx != 0 || dy != 0) {
            if (!proj.getLogisimFile().contains(canvas.getCircuit())) {
                canvas.setErrorMessage(Strings.getter("String_Node_Str"));
            } else if (proj.getSelection().hasConflictWhenMoved(dx, dy)) {
                canvas.setErrorMessage(Strings.getter("String_Node_Str"));
            } else {
                boolean connect = shouldConnect(canvas, e.getModifiersEx());
                drawConnections = false;
                ReplacementMap repl;
                if (connect) {
                    MoveGesture gesture = moveGesture;
                    if (gesture == null) {
                        gesture = new MoveGesture(new MoveRequestHandler(canvas), canvas.getCircuit(), canvas.getSelection().getAnchoredComponents());
                    }
                    canvas.setErrorMessage(new ComputingMessage(dx, dy), COLOR_COMPUTING);
                    MoveResult result = gesture.forceRequest(dx, dy);
                    clearCanvasMessage(canvas, dx, dy);
                    repl = result.getReplacementMap();
                } else {
                    repl = null;
                }
                Selection sel = proj.getSelection();
                proj.doAction(SelectionActions.translate(sel, dx, dy, repl));
            }
        }
        moveGesture = null;
        proj.repaintCanvas();
    } else if (state == RECT_SELECT) {
        Bounds bds = Bounds.create(start).add(start.getX() + curDx, start.getY() + curDy);
        Circuit circuit = canvas.getCircuit();
        Selection sel = proj.getSelection();
        Collection<Component> in_sel = sel.getComponentsWithin(bds, g);
        for (Component comp : circuit.getAllWithin(bds, g)) {
            if (!in_sel.contains(comp))
                sel.add(comp);
        }
        Action act = SelectionActions.drop(sel, in_sel);
        if (act != null) {
            proj.doAction(act);
        }
        setState(proj, IDLE);
        proj.repaintCanvas();
    }
    if (e.getClickCount() >= 2) {
        Set<Component> comps = canvas.getProject().getSelection().getComponents();
        if (comps.size() == 1) {
            for (Component comp : comps) {
                if (comp.getAttributeSet().containsAttribute(StdAttr.LABEL)) {
                    String OldLabel = comp.getAttributeSet().getValue(StdAttr.LABEL);
                    SetAttributeAction act = new SetAttributeAction(canvas.getCircuit(), Strings.getter("String_Node_Str"));
                    AutoLabler.AskAndSetLabel(comp.getFactory().getDisplayName(), OldLabel, canvas.getCircuit(), comp, comp.getAttributeSet(), act, true);
                    if (!act.isEmpty())
                        canvas.getProject().doAction(act);
                }
            }
        }
    }
}

Output:
                     SetAttributeAction act = new SetAttributeAction(canvas.getCircuit(), Strings.getter("String_Node_Str"));
-                    AutoLabler.AskAndSetLabel(comp.getFactory().getDisplayName(), OldLabel, canvas.getCircuit(), comp, comp.getAttributeSet(), act, true);
+                    AutoLabler.AskAndSetLabel(comp.getFactory().getDisplayName(), OldLabel, canvas.getCircuit(), comp, comp.getFactory(), comp.getAttributeSet(), act, true);
                     if (!act.isEmpty())


Input:
public void showSwitchProject() {
    bottomNavigationBar.setSelectedItemId(R.id.tab_project);
}

Output:
 public void showSwitchProject() {
-    bottomNavigationBar.setSelectedItemId(R.id.tab_project);
+    mBottomNavigationView.setSelectedItemId(R.id.tab_project);
 }


Input:
public void renderAxisLabels(Canvas c) {
    if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
        return;
    mAxisPaint.setTypeface(mYAxis.getTypeface());
    mAxisPaint.setTextSize(mYAxis.getTextSize());
    mAxisPaint.setColor(mYAxis.getTextColor());
    PointF center = mChart.getCenterOffsets();
    float factor = mChart.getFactor();
    int labelCount = mYAxis.mEntryCount;
    for (int j = 0; j < labelCount; j++) {
        if (j == labelCount - 1 && mYAxis.isDrawTopYLabelEntryEnabled() == false)
            break;
        float r = mYAxis.mEntries[j] * factor;
        PointF p = Utils.getPosition(center, r, mChart.getRotationAngle());
        String label = mYAxis.getFormattedLabel(j);
        c.drawText(label, p.x + 10, p.y, mAxisPaint);
    }
}

Output:
             break;
-        float r = mYAxis.mEntries[j] * factor;
+        float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
         PointF p = Utils.getPosition(center, r, mChart.getRotationAngle());


Input:
private NetworkPartitionAlgorithm getNetworkPartitionAlgorithm(String algorithmName) {
    if (algorithmName == null || algorithmName.isEmpty()) {
        return null;
    }
    if (algorithmName.equals(StratosConstants.NETWORK_PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID)) {
        if (log.isDebugEnabled()) {
            String msg = String.format("String_Node_Str", StratosConstants.NETWORK_PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID);
            log.debug(msg);
        }
        return new OneAfterAnotherAlgorithm();
    } else if (algorithmName.equals(StratosConstants.NETWORK_PARTITION_ALL_AT_ONCE_ALGORITHM_ID)) {
        if (log.isDebugEnabled()) {
            String msg = String.format("String_Node_Str", StratosConstants.NETWORK_PARTITION_ALL_AT_ONCE_ALGORITHM_ID);
            log.debug(msg);
        }
        return new AllAtOnceAlgorithm();
    }
    if (log.isDebugEnabled()) {
        String msg = String.format("String_Node_Str", StratosConstants.NETWORK_PARTITION_ALL_AT_ONCE_ALGORITHM_ID);
        log.debug(msg);
    }
    return null;
}

Output:
         if (log.isDebugEnabled()) {
-            String msg = String.format("String_Node_Str", StratosConstants.NETWORK_PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID);
+            String msg = String.format("String_Node_Str" + "String_Node_Str", StratosConstants.NETWORK_PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID);
             log.debug(msg);


Input:
private void initialize() {
    assertTrue(!isInitialized(), "String_Node_Str");
    final Iterator<Object> iterator = this._serviceOrdering.iterator();
    while (iterator.hasNext()) {
        final Object service = iterator.next();
        if (service instanceof Lifecycle) {
            try {
                ((Lifecycle) service).initialize();
            } catch (final Exception e) {
                throw new Ant4EclipseException(CoreExceptionCode.SERVICE_COULD_NOT_BE_INITIALIZED, e, service.getClass().getName());
            }
        }
    }
    setInitialized(true);
}

Output:
             } catch (final Exception e) {
-                throw new Ant4EclipseException(CoreExceptionCode.SERVICE_COULD_NOT_BE_INITIALIZED, e, service.getClass().getName());
+                throw new Ant4EclipseException(e, CoreExceptionCode.SERVICE_COULD_NOT_BE_INITIALIZED, service.getClass().getName());
             }


Input:
public void run() {
    search = crawlSearchResultsButton.getSelection();
    trendingData = crawlTrendingDataButton.getSelection();
    labeledData = crawlLabeledButton.getSelection();
    if (search) {
        query = queryText.getText();
        title = titleText.getText();
        author = authorText.getText();
        site = siteText.getText();
        linkId = linkText.getText();
        sortType = sortTypes[cmbSortType.getSelectionIndex()].toLowerCase();
        timeFrame = timeFrames[cmbTimeFrames.getSelectionIndex()].toLowerCase();
    } else if (trendingData) {
        trendType = trendTypes[cmbTrendType.getSelectionIndex()].toLowerCase();
    } else if (labeledData) {
        labelType = labelDataTypes[cmbLabelType.getSelectionIndex()].toLowerCase();
        timeFrame = timeFrames[cmbTimeFrames.getSelectionIndex()].toLowerCase();
    }
    limitLinks = Integer.parseInt(numLinksText.getText());
    limitComments = Integer.parseInt(numCommentsText.getText());
    outputDir = outputLayout.getOutputLabel().getText();
}

Output:
         sortType = sortTypes[cmbSortType.getSelectionIndex()].toLowerCase();
-        timeFrame = timeFrames[cmbTimeFrames.getSelectionIndex()].toLowerCase();
+        timeFrame = timeFramesMap.get(cmbTimeFrames.getSelectionIndex()).toLowerCase();
     } else if (trendingData) {


Input:
public String[] getFieldNames() {
    return fFieldNames;
}

Output:
 public String[] getFieldNames() {
-    return fFieldNames;
+    return Arrays.copyOf(fFieldNames, fFieldNames.length);
 }


Input:
private boolean checkUnrarCommandIntern() {
    String path = this.getPluginConfig().getStringProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);
    String hash = this.getPluginConfig().getStringProperty(JDUnrarConstants.UNRAR_HASH, null);
    if (hash != null && hash.length() == 32 && path != null && path.length() != 0) {
        String curhash = JDHash.getMD5(path);
        if (curhash != null && curhash.equalsIgnoreCase(hash))
            return true;
    } else {
        path = null;
        hash = null;
    }
    if (path == null || path.length() == 0) {
        if (OSDetector.isWindows()) {
            path = JDUtilities.getResourceFile("String_Node_Str").getAbsolutePath();
            this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
            this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
            this.getPluginConfig().save();
            return true;
        } else {
            if (OSDetector.isLinux()) {
                path = JDUtilities.getResourceFile("String_Node_Str").getAbsolutePath();
                chmodUnrar(path);
                if (isUnrarCommandValid(path)) {
                    this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                    this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                    this.getPluginConfig().save();
                    return true;
                }
            }
            if (OSDetector.isMac()) {
                path = JDUtilities.getResourceFile("String_Node_Str").getAbsolutePath();
                chmodUnrar(path);
                if (isUnrarCommandValid(path)) {
                    this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                    this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                    this.getPluginConfig().save();
                    return true;
                }
            }
            if (isUnrarCommandValid("String_Node_Str")) {
                path = "String_Node_Str";
                this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                this.getPluginConfig().save();
                return true;
            }
            if (isUnrarCommandValid("String_Node_Str")) {
                path = "String_Node_Str";
                this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                this.getPluginConfig().save();
                return true;
            }
            try {
                String[] charset = System.getenv("String_Node_Str").split("String_Node_Str");
                for (String element : charset) {
                    File fi = new File(element, "String_Node_Str");
                    File fi2 = new File(element, "String_Node_Str");
                    if (fi.isFile() && isUnrarCommandValid(fi.getAbsolutePath())) {
                        path = fi.getAbsolutePath();
                        this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                        this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                        this.getPluginConfig().save();
                        return true;
                    } else if (fi2.isFile() && isUnrarCommandValid(fi2.getAbsolutePath())) {
                        path = fi2.getAbsolutePath();
                        this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);
                        this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));
                        this.getPluginConfig().save();
                        return true;
                    }
                }
            } catch (Throwable e) {
            }
            this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);
            this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, null);
            this.getPluginConfig().save();
            return false;
        }
    }
    this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);
    this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, null);
    this.getPluginConfig().save();
    return false;
}

Output:
     if (hash != null && hash.length() == 32 && path != null && path.length() != 0) {
-        String curhash = JDHash.getMD5(path);
+        String curhash = JDHash.getMD5(new File(path));
         if (curhash != null && curhash.equalsIgnoreCase(hash))


Input:
public void addMemberVariable(FElement element, boolean isTopLevel) {
    if ((isTopLevel && !this.incompleteBuilders.empty()) || this.hasIncompleteLocalBuilders()) {
        String typeName = "String_Node_Str";
        if (SchemaHelper.isBuiltinTypedElement(element)) {
            FSchemaType ftype = null;
            if (FSchemaTypeHelper.isList(element)) {
                FList listType = (FList) element.getSchemaType();
                ftype = listType.getItemType();
            } else {
                ftype = element.getSchemaType();
            }
            typeName = this.mapper.lookup(JavaTypeGen.getFabricTypeName(ftype));
            LOGGER.debug(String.format("String_Node_Str", typeName));
        } else {
            typeName = element.getSchemaType().getName();
            LOGGER.debug(String.format("String_Node_Str", typeName));
            if (!element.getSchemaType().isTopLevel() && !element.getSchemaType().isSimple()) {
                typeName += "String_Node_Str";
            }
        }
        AttributeContainer.Builder current = (isTopLevel ? this.incompleteBuilders.pop() : this.incompleteLocalBuilders.get(this.incompleteBuilders.peek().getName()).pop());
        AttributeContainer.Restriction restrictions = new AttributeContainer.Restriction();
        if (element.getSchemaType().isSimple() && !element.getSchemaType().isTopLevel()) {
            restrictions = this.createRestrictions((FSimpleType) (element.getSchemaType()));
        }
        if (!element.getSchemaType().isTopLevel() && FSchemaTypeHelper.isEnum(element.getSchemaType())) {
            Object[] constants = FSchemaTypeHelper.extractEnumArray((FSimpleType) element.getSchemaType());
            String[] enumConstants = Arrays.copyOf(constants, constants.length, String[].class);
            current.addEnumElement(element.getName() + "String_Node_Str", element.getName(), enumConstants);
        } else if (FSchemaTypeHelper.isArray(element)) {
            current.addElementArray(typeName, element.getName(), element.getMinOccurs(), element.getMaxOccurs());
        } else if (FSchemaTypeHelper.isList(element)) {
            FList listType = (FList) element.getSchemaType();
            current.addElementList(typeName, element.getName(), FSchemaTypeHelper.getMinLength(listType), FSchemaTypeHelper.getMaxLength(listType));
        } else if (FSchemaTypeHelper.hasDefaultValue(element)) {
            current.addElement(typeName, element.getName(), element.getDefaultValue(), restrictions);
        } else if (FSchemaTypeHelper.hasFixedValue(element)) {
            current.addConstantElement(typeName, element.getName(), element.getFixedValue());
        } else {
            current.addElement(typeName, element.getName(), restrictions);
        }
        if (isTopLevel) {
            this.incompleteBuilders.push(current);
        } else {
            String parentContainerName = this.incompleteBuilders.peek().getName();
            Stack<AttributeContainer.Builder> currentStack = this.incompleteLocalBuilders.get(parentContainerName);
            if (null == currentStack) {
                currentStack = new Stack<AttributeContainer.Builder>();
            }
            currentStack.push(current);
            this.incompleteLocalBuilders.put(parentContainerName, currentStack);
        }
        LOGGER.debug(String.format("String_Node_Str", element.getName(), (SchemaHelper.isBuiltinTypedElement(element) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str", typeName, current.getName()));
    }
}

Output:
             current.addElementArray(typeName, element.getName(), element.getMinOccurs(), element.getMaxOccurs());
-        } else if (FSchemaTypeHelper.isList(element)) {
+        } else if (FSchemaTypeHelper.isList(element) && !isCustomTyped) {
             FList listType = (FList) element.getSchemaType();


Input:
private void hideBottomBar() {
    if (isBottomBarShowing() && mBrowserType != MediaBrowserType.AZTEC_EDITOR_PICKER) {
        AniUtils.animateBottomBar(mBottomBar, false);
    }
}

Output:
 private void hideBottomBar() {
-    if (isBottomBarShowing() && mBrowserType != MediaBrowserType.AZTEC_EDITOR_PICKER) {
+    if (isBottomBarShowing() && canShowBottomBar()) {
         AniUtils.animateBottomBar(mBottomBar, false);


Input:
private void processIncomingRPCRequest(final InetSocketAddress remoteSocketAddress, final RPCRequest rpcRequest) {
    final Integer messageID = Integer.valueOf(rpcRequest.getMessageID());
    final CachedResponse cachedResponse = this.cachedResponses.get(messageID);
    if (cachedResponse != null) {
        try {
            sendPackets(cachedResponse.packets);
        } catch (IOException e) {
            Log.error("String_Node_Str", e);
        }
        return;
    }
    final Runnable runnable = new Runnable() {
        public void run() {
            final RPCProtocol callbackHandler = callbackHandlers.get(rpcRequest.getInterfaceName());
            if (callbackHandler == null) {
                Log.error("String_Node_Str" + rpcRequest.getInterfaceName());
                return;
            }
            Method method = null;
            try {
                method = callbackHandler.getClass().getMethod(rpcRequest.getMethodName(), rpcRequest.getParameterTypes());
            } catch (Exception e) {
                e.printStackTrace();
                Log.error("String_Node_Str", e);
                return;
            }
            RPCResponse rpcResponse = null;
            try {
                final Object retVal = method.invoke(callbackHandler, rpcRequest.getArgs());
                rpcResponse = new RPCReturnValue(rpcRequest.getMessageID(), retVal);
            } catch (InvocationTargetException ite) {
                rpcResponse = new RPCThrowable(rpcRequest.getMessageID(), ite.getTargetException());
            } catch (Exception e) {
                e.printStackTrace();
                Log.error("String_Node_Str", e);
                return;
            }
            final DatagramPacket[] packets = messageToPackets(remoteSocketAddress, rpcResponse);
            cachedResponses.put(messageID, new CachedResponse(System.currentTimeMillis(), packets));
            try {
                sendPackets(packets);
            } catch (IOException e) {
                Log.error("String_Node_Str", e);
            }
        }
    };
    this.rpcHandlers.execute(runnable);
}

Output:
     }
-    final Runnable runnable = new Runnable() {
-        public void run() {
-            final RPCProtocol callbackHandler = callbackHandlers.get(rpcRequest.getInterfaceName());
-            if (callbackHandler == null) {
-                Log.error("String_Node_Str" + rpcRequest.getInterfaceName());
-                return;
-            }
-            Method method = null;
-            try {
-                method = callbackHandler.getClass().getMethod(rpcRequest.getMethodName(), rpcRequest.getParameterTypes());
-            } catch (Exception e) {
-                e.printStackTrace();
-                Log.error("String_Node_Str", e);
-                return;
-            }
-            RPCResponse rpcResponse = null;
-            try {
-                final Object retVal = method.invoke(callbackHandler, rpcRequest.getArgs());
-                rpcResponse = new RPCReturnValue(rpcRequest.getMessageID(), retVal);
-            } catch (InvocationTargetException ite) {
-                rpcResponse = new RPCThrowable(rpcRequest.getMessageID(), ite.getTargetException());
-            } catch (Exception e) {
-                e.printStackTrace();
-                Log.error("String_Node_Str", e);
-                return;
-            }
-            final DatagramPacket[] packets = messageToPackets(remoteSocketAddress, rpcResponse);
-            cachedResponses.put(messageID, new CachedResponse(System.currentTimeMillis(), packets));
-            try {
-                sendPackets(packets);
-            } catch (IOException e) {
-                Log.error("String_Node_Str", e);
-            }
+    final RPCProtocol callbackHandler = callbackHandlers.get(rpcRequest.getInterfaceName());
+    if (callbackHandler == null) {
+        Log.error("String_Node_Str" + rpcRequest.getInterfaceName());
+        this.requestsBeingProcessed.remove(messageID);
+        return;
+    }
+    try {
+        final Method method = callbackHandler.getClass().getMethod(rpcRequest.getMethodName(), rpcRequest.getParameterTypes());
+        RPCResponse rpcResponse = null;
+        try {
+            final Object retVal = method.invoke(callbackHandler, rpcRequest.getArgs());
+            rpcResponse = new RPCReturnValue(rpcRequest.getMessageID(), retVal);
+        } catch (InvocationTargetException ite) {
+            rpcResponse = new RPCThrowable(rpcRequest.getMessageID(), ite.getTargetException());
         }


Input:
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType) {
    OlapElement oe = lookupHierarchy(s);
    if (!MondrianProperties.instance().SsasCompatibleNaming.get()) {
        if (oe == null || oe.getName().equalsIgnoreCase(getName())) {
            OlapElement oeLevel = getHierarchy().lookupChild(schemaReader, s, matchType);
            if (oeLevel != null) {
                return oeLevel;
            }
        }
        return oe;
    } else {
        if (oe != null) {
            return oe;
        }
        final List<Hierarchy> hierarchyList = schemaReader.getDimensionHierarchies(this);
        for (Hierarchy hierarchy : hierarchyList) {
            oe = hierarchy.lookupChild(schemaReader, s, matchType);
            if (oe != null) {
                return oe;
            }
        }
        return null;
    }
}

Output:
 public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType) {
-    OlapElement oe = lookupHierarchy(s);
+    OlapElement oe = null;
+    if (s instanceof Id.NameSegment) {
+        oe = lookupHierarchy((Id.NameSegment) s);
+    }
     if (!MondrianProperties.instance().SsasCompatibleNaming.get()) {


Input:
public void selectArea(boolean selected, Object data) {
    dateComponent.selectArea(selected, data);
}

Output:
 public void selectArea(boolean selected, Object data) {
-    dateComponent.selectArea(selected, data);
+    dataComponent.selectArea(selected, data);
 }


Input:
public byte[] getContent() {
    synchronized (mutex) {
        if (content == null) {
            InputStream in = null;
            try {
                in = response.getEntity().getContent();
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                ByteStreams.copy(in, out);
                content = out.toByteArray();
            } catch (IOException e) {
                throw Throwables.propagate(e);
            } finally {
                Closeables.closeQuietly(in);
            }
        }
    }
    return content;
}

Output:
             } finally {
-                Closeables.closeQuietly(in);
+                Streams.closeQuietly(in);
             }


Input:
private void toggleDropDown() {
    if (bJustFocusLost) {
        bJustFocusLost = false;
        return;
    }
    if (cmpDropDown == null || cmpDropDown.isDisposed() || !cmpDropDown.isVisible()) {
        fireDropDownEvent();
        Point pLoc = UIHelper.getScreenLocation(this);
        createDropDownComponent(pLoc.x, pLoc.y + this.getSize().y);
    } else {
        cmpDropDown.getShell().close();
    }
}

Output:
         Point pLoc = UIHelper.getScreenLocation(this);
-        createDropDownComponent(pLoc.x, pLoc.y + this.getSize().y);
+        if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+            createDropDownComponent(pLoc.x, pLoc.y);
+        } else {
+            createDropDownComponent(pLoc.x, pLoc.y + this.getSize().y);
+        }
     } else {


Input:
public void afterUnmarshal(Object target, Object parent) {
    SDODataObject targetDataObject;
    try {
        targetDataObject = (SDODataObject) target;
    } catch (ClassCastException ccex) {
        ((SDOChangeSummary) target).setRootDataObject((DataObject) parent);
        changeSummaries.add(target);
        return;
    }
    if (targetDataObject.getType().isSequenced()) {
        ((SDOSequence) (targetDataObject.getSequence())).afterUnmarshal();
    }
    if (parent == null) {
        SDOChangeSummary nextCS = null;
        XMLUnmarshaller unmarshaller = ((SDOXMLHelper) aHelperContext.getXMLHelper()).getXmlContext().createUnmarshaller();
        for (int i = 0; i < changeSummaries.size(); i++) {
            nextCS = (SDOChangeSummary) changeSummaries.get(i);
            nextCS.setLogging(nextCS.isLoggingMapping());
            List xpaths = nextCS.getCreatedXPaths();
            String nextXPath = null;
            SDODataObject nextCreatedDO = null;
            for (int j = 0; j < xpaths.size(); j++) {
                nextXPath = (String) xpaths.get(j);
                nextCreatedDO = (SDODataObject) targetDataObject.getDataObject(convertXPathToSDOPath(nextXPath));
                if (nextCreatedDO != null) {
                    nextCreatedDO._setCreated(true);
                    nextCS.getOldContainers().remove(nextCreatedDO);
                } else {
                    throw SDOException.errorProcessingXPath(nextXPath);
                }
            }
            nextCS.setCreatedXPaths(null);
            List modifiedDoms = nextCS.getModifiedDoms();
            Element nextNode = null;
            String refValue = null;
            SDODataObject nextModifiedDO;
            for (int j = 0; j < modifiedDoms.size(); j++) {
                nextNode = (Element) modifiedDoms.get(j);
                refValue = nextNode.getAttributeNS(SDOConstants.SDO_URL, SDOConstants.CHANGESUMMARY_REF);
                if ((refValue == null) || (refValue.length() == 0)) {
                    throw SDOException.missingRefAttribute();
                }
                nextModifiedDO = (SDODataObject) targetDataObject.getDataObject(convertXPathToSDOPath(refValue));
                String unsetValue = nextNode.getAttributeNS(SDOConstants.SDO_URL, SDOConstants.CHANGESUMMARY_UNSET);
                List unsetValueList = new ArrayList();
                if ((unsetValue != null) && (unsetValue.length() > 0)) {
                    unsetValueList = (List) XMLConversionManager.getDefaultXMLManager().convertObject(unsetValue, List.class);
                }
                if (nextModifiedDO != null) {
                    nextModifiedDO._setModified(true);
                    SDOCSUnmarshalListener listener = new SDOCSUnmarshalListener(nextModifiedDO._getHelperContext(), true);
                    unmarshaller.setUnmarshalListener(listener);
                    unmarshaller.getProperties().put("String_Node_Str", aHelperContext);
                    unmarshaller.setUnmappedContentHandlerClass(SDOUnmappedContentHandler.class);
                    Object unmarshalledNode = unmarshaller.unmarshal(nextNode, ((SDOType) nextModifiedDO.getType()).getXmlDescriptor().getJavaClass());
                    DataObject unmarshalledDO = null;
                    if (unmarshalledNode instanceof XMLRoot) {
                        unmarshalledDO = (DataObject) ((XMLRoot) unmarshalledNode).getObject();
                    } else if (unmarshalledNode instanceof DataObject) {
                        unmarshalledDO = (DataObject) unmarshalledNode;
                    }
                    List modifiedProps = new ArrayList();
                    NodeList children = nextNode.getChildNodes();
                    for (int p = 0; p < children.getLength(); p++) {
                        Node n = children.item(p);
                        if (n.getNodeType() == Node.ELEMENT_NODE) {
                            String propName = n.getLocalName();
                            Property nextProp = unmarshalledDO.getInstanceProperty(propName);
                            if (nextProp == null) {
                                nextProp = aHelperContext.getTypeHelper().getOpenContentProperty(n.getNamespaceURI(), propName);
                            }
                            if (!modifiedProps.contains(nextProp)) {
                                modifiedProps.add(nextProp);
                            }
                        }
                    }
                    for (int k = 0; k < modifiedProps.size(); k++) {
                        Property nextProp = (Property) modifiedProps.get(k);
                        if (!nextProp.getType().isDataType()) {
                            if (nextProp.isMany()) {
                                List originalValue = unmarshalledDO.getList(nextProp);
                                List newList = new ArrayList();
                                List toDelete = new ArrayList();
                                List indexsToDelete = new ArrayList();
                                for (int l = 0; l < originalValue.size(); l++) {
                                    SDODataObject nextInList = (SDODataObject) originalValue.get(l);
                                    String sdoRef = nextInList._getSdoRef();
                                    if (sdoRef != null) {
                                        newList.add(targetDataObject.getDataObject(convertXPathToSDOPath(sdoRef)));
                                    } else {
                                        toDelete.add(nextInList);
                                        indexsToDelete.add(new Integer(l));
                                        newList.add(nextInList);
                                    }
                                }
                                ListWrapper lw = ((ListWrapper) nextModifiedDO.getList(nextProp));
                                if (indexsToDelete.size() > 0) {
                                    nextCS.pauseLogging();
                                    for (int m = 0; m < indexsToDelete.size(); m++) {
                                        int toDeleteIndex = ((Integer) indexsToDelete.get(m)).intValue();
                                        SDODataObject nextToDelete = (SDODataObject) toDelete.get(m);
                                        lw.add(toDeleteIndex, nextToDelete);
                                    }
                                    nextCS.setPropertyInternal(nextModifiedDO, nextProp, lw);
                                    SDOSequence nextSeq = ((SDOSequence) nextCS.getOriginalSequences().get(nextModifiedDO));
                                    nextCS.resumeLogging();
                                    nextModifiedDO._setModified(true);
                                    for (int m = indexsToDelete.size() - 1; m >= 0; m--) {
                                        int toDeleteIndex = ((Integer) indexsToDelete.get(m)).intValue();
                                        SDODataObject nextToDelete = (SDODataObject) toDelete.get(m);
                                        if (nextSeq != null) {
                                            nextSeq.addSettingWithoutModifyingDataObject(-1, nextProp, nextToDelete);
                                        }
                                        nextToDelete.resetChanges();
                                        lw.remove(toDeleteIndex);
                                    }
                                }
                                nextCS.getOriginalElements().put(lw, newList);
                            } else {
                                SDODataObject value = (SDODataObject) unmarshalledDO.getDataObject(nextProp);
                                if (value != null) {
                                    String sdoRef = value._getSdoRef();
                                    if (sdoRef != null) {
                                        nextModifiedDO._setModified(true);
                                    } else {
                                        value._setChangeSummary(nextCS);
                                        nextModifiedDO._setModified(true);
                                        nextCS.pauseLogging();
                                        boolean wasSet = nextModifiedDO.isSet(nextProp);
                                        Object existingValue = nextModifiedDO.get(nextProp);
                                        Sequence nextModifiedDOSequence = nextModifiedDO.getSequence();
                                        int settingIdx = -1;
                                        if (nextModifiedDOSequence != null) {
                                            settingIdx = ((SDOSequence) nextModifiedDOSequence).getIndexForProperty(nextProp);
                                        }
                                        value._setContainmentPropertyName(null);
                                        value._setContainer(null);
                                        nextModifiedDO.set(nextProp, value);
                                        nextCS.setPropertyInternal(nextModifiedDO, nextProp, value);
                                        SDOSequence nextSeq = ((SDOSequence) nextCS.getOriginalSequences().get(nextModifiedDO));
                                        if (nextSeq != null) {
                                            nextSeq.addSettingWithoutModifyingDataObject(-1, nextProp, value);
                                        }
                                        nextCS.resumeLogging();
                                        nextModifiedDO._setModified(true);
                                        value.resetChanges();
                                        value.delete();
                                        if (wasSet) {
                                            nextModifiedDO.set(nextProp, existingValue, false);
                                            if (settingIdx != -1) {
                                                ((SDOSequence) nextModifiedDO.getSequence()).addSettingWithoutModifyingDataObject(settingIdx, nextProp, existingValue);
                                            }
                                        } else {
                                            nextModifiedDO.unset(nextProp);
                                        }
                                    }
                                } else {
                                    nextModifiedDO._setModified(true);
                                    nextCS.setPropertyInternal(nextModifiedDO, nextProp, null);
                                }
                            }
                        } else {
                            nextModifiedDO._setModified(true);
                            Object value = unmarshalledDO.get(nextProp);
                            if (nextProp.isMany()) {
                                Property theProp = nextModifiedDO.getInstanceProperty(nextProp.getName());
                                if (theProp == null) {
                                    Property newProp = nextModifiedDO.defineOpenContentProperty(nextProp.getName(), new ArrayList(), nextProp.getType());
                                    nextModifiedDO.set(newProp, new ArrayList());
                                    theProp = newProp;
                                }
                                List lw = nextModifiedDO.getList(theProp.getName());
                                nextCS.setPropertyInternal(nextModifiedDO, theProp, lw);
                                nextCS.getOriginalElements().put(lw, ((ListWrapper) value).getCurrentElements());
                            } else {
                                nextCS.setPropertyInternal(nextModifiedDO, nextProp, value);
                            }
                        }
                    }
                    for (int k = 0; k < unsetValueList.size(); k++) {
                        Property nextProp = unmarshalledDO.getInstanceProperty((String) unsetValueList.get(k));
                        if (nextProp != null) {
                            Object oldValue = null;
                            if (nextProp.getType().isDataType() || nextProp.isMany()) {
                                oldValue = unmarshalledDO.get(nextProp);
                            }
                            nextModifiedDO._setModified(true);
                            nextCS.setPropertyInternal(nextModifiedDO, nextProp, oldValue);
                            nextCS.unsetPropertyInternal(nextModifiedDO, nextProp);
                        } else {
                            nextProp = nextModifiedDO.getInstanceProperty((String) unsetValueList.get(k));
                            nextModifiedDO._setModified(true);
                            nextCS.setPropertyInternal(nextModifiedDO, nextProp, null);
                            nextCS.unsetPropertyInternal(nextModifiedDO, nextProp);
                        }
                    }
                } else {
                    throw SDOException.errorProcessingXPath(refValue);
                }
            }
            nextCS.setModifiedDoms(null);
            nextCS.setDeletedXPaths(null);
        }
        initialize();
    }
}

Output:
                     nextModifiedDO._setModified(true);
-                    SDOCSUnmarshalListener listener = new SDOCSUnmarshalListener(nextModifiedDO._getHelperContext(), true);
+                    SDOCSUnmarshalListener listener = new SDOCSUnmarshalListener(((SDOType) nextModifiedDO.getType()).getHelperContext(), true);
                     unmarshaller.setUnmarshalListener(listener);


Input:
public void close() {
    if (this.getServerSession().getServerChannel().isActive()) {
        serverSession.getServerChannel().writeAndFlush(new InvalidSessionPackage(this.getContextName(), sessionId));
    }
}

Output:
 public void close() {
-    if (this.getServerSession().getServerChannel().isActive()) {
+    if (this.getServerSession().getServerChannel().isOpen()) {
         serverSession.getServerChannel().writeAndFlush(new InvalidSessionPackage(this.getContextName(), sessionId));


Input:
public void createInstance(ServerContext context, CreateRequest request, ResultHandler<Resource> handler) {
    try {
        if (objectClassInfoHelper.isCreateable()) {
            if (null == request.getNewResourceId()) {
                final ConnectorFacade facade = getConnectorFacade0(handler, CreateApiOp.class);
                if (null == facade) {
                    return;
                }
                final Set<Attribute> createAttributes = objectClassInfoHelper.getCreateAttributes(request, cryptoService);
                OperationOptions operationOptions = operations.get(CreateApiOp.class).build(jsonConfiguration, objectClassInfoHelper).build();
                Uid uid = facade.create(objectClassInfoHelper.getObjectClass(), AttributeUtil.filterUid(createAttributes), operationOptions);
                returnResource(request, handler, facade, uid);
            } else {
                final ResourceException e = new NotSupportedException("String_Node_Str");
                handler.handleError(e);
            }
        } else {
            final ResourceException e = new NotSupportedException("String_Node_Str" + objectClassInfoHelper.getObjectClass());
            handler.handleError(e);
        }
    } catch (ResourceException e) {
        handler.handleError(e);
    } catch (ConnectorException e) {
        handleConnectorException(context, request, e, request.getNewResourceId(), request.getContent(), null, handler, activityLogger);
    } catch (JsonValueException e) {
        handler.handleError(new BadRequestException(e.getMessage()));
    } catch (Exception e) {
        handler.handleError(new InternalServerErrorException(e.getMessage()));
    }
}

Output:
     } catch (JsonValueException e) {
-        handler.handleError(new BadRequestException(e.getMessage()));
+        handler.handleError(new BadRequestException(e.getMessage(), e));
     } catch (Exception e) {


Input:
public void SeparationOn() {
    flags |= separation;
}

Output:
 public void SeparationOn() {
-    flags |= separation;
+    flags |= BehaviorType.separation.getValue();
 }


Input:
public void resetEntireInputState(final SettingsValues settingsValues, final int newSelStart, final int newSelEnd) {
    final boolean shouldFinishComposition = mWordComposer.isComposingWord();
    resetComposingState(true);
    mSuggestionStripViewAccessor.setNeutralSuggestionStrip();
    mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd, shouldFinishComposition);
}

Output:
     resetComposingState(true);
-    mSuggestionStripViewAccessor.setNeutralSuggestionStrip();
+    if (clearSuggestionStrip) {
+        mSuggestionStripViewAccessor.setNeutralSuggestionStrip();
+    }
     mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd, shouldFinishComposition);