Input:
protected void processChanges() {
    boolean windowNeedsValidate = false;
    logger.fine("String_Node_Str" + this);
    logger.fine("String_Node_Str" + type);
    logger.fine("String_Node_Str" + Integer.toHexString(changeMask));
    if ((changeMask & (CHANGED_GEOMETRY | CHANGED_SIZE_APP | CHANGED_TYPE | CHANGED_PARENT | CHANGED_VISIBLE | CHANGED_ORTHO)) != 0) {
        logger.fine("String_Node_Str" + this);
        switch(attachState) {
            case ATTACHED_TO_ENTITY:
                if (parentEntity != null) {
                    logger.fine("String_Node_Str" + entity + "String_Node_Str" + parentEntity);
                    RenderComponent rc = (RenderComponent) entity.getComponent(RenderComponent.class);
                    sgChangeAttachPointSet(rc, null);
                    parentEntity.removeEntity(entity);
                    parentEntity = null;
                }
                break;
            case ATTACHED_TO_WORLD:
                logger.fine("String_Node_Str" + entity + "String_Node_Str");
                ClientContextJME.getWorldManager().removeEntity(entity);
                break;
        }
        attachState = AttachState.DETACHED;
        if ((changeMask & CHANGED_GEOMETRY) != 0) {
            if (geometryNode != null) {
                sgChangeGeometryDetachFromView(viewNode, geometryNode);
                if (geometrySelfCreated) {
                    sgChangeGeometryCleanup(geometryNode);
                    geometrySelfCreated = false;
                }
            }
            if (newGeometryNode != null) {
                geometryNode = newGeometryNode;
                newGeometryNode = null;
            } else {
                geometryNode = new GeometryNodeQuad(this);
                geometrySelfCreated = true;
            }
            sgChangeGeometryAttachToView(viewNode, geometryNode);
        }
        if ((changeMask & (CHANGED_GEOMETRY | CHANGED_SIZE_APP)) != 0) {
            logger.fine("String_Node_Str" + this);
            if (geometryNode != null) {
                DrawingSurfaceBufferedImage surface = (DrawingSurfaceBufferedImage) getWindow().getSurface();
                if (surface != null) {
                    sgChangeGeometryTextureSet(geometryNode, getWindow().getTexture(), surface);
                    windowNeedsValidate = true;
                }
            }
        }
        if (isActuallyVisible()) {
            if (ortho) {
                logger.fine("String_Node_Str" + this);
                entity.getComponent(RenderComponent.class).setOrtho(true);
                if (type == Type.PRIMARY || type == Type.UNKNOWN) {
                    ClientContextJME.getWorldManager().addEntity(entity);
                    attachState = AttachState.ATTACHED_TO_WORLD;
                    logger.fine("String_Node_Str" + entity + "String_Node_Str");
                } else {
                    parentEntity = getParentEntity();
                    if (parentEntity == null) {
                        ClientContextJME.getWorldManager().addEntity(entity);
                        attachState = AttachState.ATTACHED_TO_WORLD;
                        logger.fine("String_Node_Str" + entity + "String_Node_Str");
                    } else {
                        parentEntity.addEntity(entity);
                        RenderComponent rc = (RenderComponent) entity.getComponent(RenderComponent.class);
                        RenderComponent rcParent = (RenderComponent) parentEntity.getComponent(RenderComponent.class);
                        sgChangeAttachPointSet(rc, rcParent.getSceneRoot());
                        attachState = AttachState.ATTACHED_TO_ENTITY;
                        logger.fine("String_Node_Str" + entity + "String_Node_Str" + parentEntity);
                    }
                }
            } else {
                logger.fine("String_Node_Str" + this);
                parentEntity = getParentEntity();
                if (parentEntity == null) {
                    logger.warning("String_Node_Str");
                } else {
                    logger.fine("String_Node_Str" + entity + "String_Node_Str" + parentEntity);
                    parentEntity.addEntity(entity);
                    RenderComponent rc = (RenderComponent) entity.getComponent(RenderComponent.class);
                    RenderComponent rcParent = (RenderComponent) parentEntity.getComponent(RenderComponent.class);
                    Node attachNode = rcParent.getSceneRoot();
                    if (window instanceof WindowSwingHeader) {
                        WindowSwingHeader wsh = (WindowSwingHeader) window;
                        if (wsh.getView().getType() == View2D.Type.SECONDARY) {
                            attachNode = (Node) attachNode.getChild(0);
                        }
                    }
                    sgChangeAttachPointSet(rc, attachNode);
                    attachState = AttachState.ATTACHED_TO_ENTITY;
                    entity.getComponent(RenderComponent.class).setOrtho(false);
                }
            }
        }
        if ((changeMask & CHANGED_VISIBLE) != 0) {
            logger.fine("String_Node_Str" + this);
            for (View2DEntity child : children) {
                child.updateVisibility();
            }
        }
    }
    if ((changeMask & (CHANGED_DECORATED | CHANGED_TITLE | CHANGED_ORTHO | CHANGED_TYPE | CHANGED_PIXEL_SCALE)) != 0) {
        logger.fine("String_Node_Str" + this);
        logger.fine("String_Node_Str" + decorated);
        if ((changeMask & (CHANGED_DECORATED | CHANGED_ORTHO)) != 0) {
            if (decorated && !ortho) {
                if (!hasFrame()) {
                    logger.fine("String_Node_Str");
                    attachFrame();
                }
            } else {
                if (hasFrame()) {
                    logger.fine("String_Node_Str");
                    detachFrame();
                }
            }
        }
        if ((changeMask & CHANGED_TITLE) != 0) {
            if (decorated && !ortho && hasFrame()) {
                frameUpdateTitle();
            }
        }
        if ((changeMask & (CHANGED_TYPE | CHANGED_ORTHO)) != 0) {
            if (decorated && !ortho) {
                reattachFrame();
            }
        }
    }
    if ((changeMask & (CHANGED_STACK | CHANGED_ORTHO)) != 0) {
        logger.fine("String_Node_Str" + this);
        if (ortho) {
            int zOrder = window.getZOrder();
            logger.fine("String_Node_Str" + zOrder);
            if (zOrder >= 0) {
                sgChangeGeometryOrthoZOrderSet(geometryNode, zOrder);
            }
        }
    }
    if ((changeMask & CHANGED_ORTHO) != 0) {
        if (isActuallyVisible()) {
            entity.getComponent(RenderComponent.class).setOrtho(ortho);
        }
        sgChangeViewNodeOrthoSet(viewNode, ortho);
    }
    if ((changeMask & (CHANGED_DECORATED | CHANGED_SIZE_APP | CHANGED_PIXEL_SCALE | CHANGED_ORTHO)) != 0) {
        float width = getDisplayerLocalWidth();
        float height = getDisplayerLocalHeight();
        sgChangeGeometrySizeSet(geometryNode, width, height);
        changeMask |= CHANGED_TEX_COORDS;
    }
    if ((changeMask & (CHANGED_TEX_COORDS | CHANGED_GEOMETRY | CHANGED_SIZE_APP)) != 0) {
        float width = (float) sizeApp.width;
        float height = (float) sizeApp.height;
        Image image = getWindow().getTexture().getImage();
        float widthRatio = width / image.getWidth();
        float heightRatio = height / image.getHeight();
        sgChangeGeometryTexCoordsSet(geometryNode, widthRatio, heightRatio);
        windowNeedsValidate = true;
    }
    if ((changeMask & (CHANGED_TYPE | CHANGED_PARENT | CHANGED_PIXEL_SCALE | CHANGED_SIZE_APP | CHANGED_OFFSET | CHANGED_ORTHO | CHANGED_LOCATION_ORTHO | CHANGED_STACK)) != 0) {
        CellTransform transform = null;
        switch(type) {
            case UNKNOWN:
            case PRIMARY:
                transform = new CellTransform(null, null, null);
                if (ortho) {
                    Vector3f orthoLocTranslation = new Vector3f();
                    orthoLocTranslation.x = locationOrtho.x;
                    orthoLocTranslation.y = locationOrtho.y;
                    transform.setTranslation(orthoLocTranslation);
                } else {
                }
                break;
            case SECONDARY:
            case POPUP:
                transform = calcOffsetStackTransform();
        }
        sgChangeGeometryTransformOffsetStackSet(geometryNode, transform);
    }
    if ((changeMask & (CHANGED_TYPE | CHANGED_USER_TRANSFORM | CHANGED_ORTHO)) != 0) {
        CellTransform currentUserTransform;
        if (ortho) {
            currentUserTransform = userTransformOrtho;
        } else {
            currentUserTransform = userTransformCell;
        }
        logger.fine("String_Node_Str" + currentUserTransform);
        userTransformApplyDeltas(currentUserTransform);
        logger.fine("String_Node_Str" + currentUserTransform);
        switch(type) {
            case UNKNOWN:
            case PRIMARY:
                updatePrimaryTransform(currentUserTransform);
                break;
            case SECONDARY:
                sgChangeTransformUserSet(viewNode, currentUserTransform);
                break;
            case POPUP:
                sgChangeTransformUserSet(viewNode, new CellTransform(null, null, null));
        }
    }
    sgProcessChanges();
    if (!ortho) {
        frameUpdate();
    }
    if (windowNeedsValidate) {
        if (window instanceof WindowSwing) {
            ((WindowSwing) window).validate();
        }
    }
    if (window != null) {
        DrawingSurface surface = window.getSurface();
        if (surface != null) {
            surface.setViewIsVisible(this, isActuallyVisible());
        }
    }
    logger.fine("String_Node_Str" + this);
    for (View2DEntity child : children) {
        if (child.changeMask != 0) {
            child.update();
        }
    }
}

Output:
                         RenderComponent rcParent = (RenderComponent) parentEntity.getComponent(RenderComponent.class);
-                        sgChangeAttachPointSet(rc, rcParent.getSceneRoot());
+                        Node attachNode = rcParent.getSceneRoot();
+                        attachNode = (Node) attachNode.getChild(0);
+                        sgChangeAttachPointSet(rc, attachNode);
                         attachState = AttachState.ATTACHED_TO_ENTITY;


Input:
public boolean activate() {
    Player owner = myPet.getOwner().getPlayer();
    final Beacon beacon = this;
    IconMenu menu = new IconMenu(Util.cutString("String_Node_Str" + myPet.getPetName(), 32), 27, new IconMenu.OptionClickEventHandler() {
        List<Integer> selectedBuffs = beacon.selectedBuffs;

        boolean active = beacon.active;
        private BeaconReciever reciever = beacon.reciever;
        public void onOptionClick(IconMenu.OptionClickEvent event) {
            event.setWillClose(false);
            event.setWillDestroy(false);
            IconMenu menu = event.getMenu();
            switch(event.getPosition()) {
                case 5:
                    event.setWillClose(true);
                    event.setWillDestroy(true);
                    return;
                case 4:
                    if (active) {
                        menu.getOption(4).setMaterial(REDSTONE_BLOCK).setTitle("String_Node_Str" + RED + "String_Node_Str").setLore(RESET + "String_Node_Str" + GREEN + "String_Node_Str");
                        active = false;
                    } else {
                        menu.getOption(4).setMaterial(EMERALD_BLOCK).setTitle("String_Node_Str" + GREEN + "String_Node_Str").setLore(RESET + "String_Node_Str" + RED + "String_Node_Str");
                        active = true;
                    }
                    menu.update();
                    break;
                case 3:
                    beacon.active = active;
                    beacon.selectedBuffs = selectedBuffs;
                    beacon.reciever = reciever;
                    event.setWillClose(true);
                    event.setWillDestroy(true);
                    break;
                case 21:
                    if (reciever != BeaconReciever.Owner) {
                        menu.getOption(21).setGlowing(true);
                        if (menu.getOption(22) != null) {
                            menu.getOption(22).setGlowing(false);
                        }
                        menu.getOption(23).setGlowing(false);
                        reciever = BeaconReciever.Owner;
                        menu.update();
                    }
                    break;
                case 22:
                    if (reciever != BeaconReciever.Party) {
                        menu.getOption(21).setGlowing(false);
                        menu.getOption(22).setGlowing(true);
                        menu.getOption(23).setGlowing(false);
                        reciever = BeaconReciever.Party;
                        menu.update();
                    }
                    break;
                case 23:
                    if (reciever != BeaconReciever.Everyone) {
                        menu.getOption(21).setGlowing(false);
                        if (menu.getOption(22) != null) {
                            menu.getOption(22).setGlowing(false);
                        }
                        menu.getOption(23).setGlowing(true);
                        reciever = BeaconReciever.Everyone;
                        menu.update();
                    }
                    break;
                default:
                    if (buffPositionItems.containsKey(event.getPosition())) {
                        int selectedBuff = buffPositionItems.get(event.getPosition());
                        if (selectableBuffs > 1) {
                            if (selectedBuffs.indexOf(selectedBuff) != -1) {
                                selectedBuffs.remove(selectedBuffs.indexOf(selectedBuff));
                                menu.getOption(buffItemPositions.get(selectedBuff)).setGlowing(false);
                                menu.update();
                            } else if (selectableBuffs > selectedBuffs.size()) {
                                selectedBuffs.add(selectedBuff);
                                menu.getOption(buffItemPositions.get(selectedBuff)).setGlowing(true);
                                menu.update();
                            } else {
                                break;
                            }
                            if (selectableBuffs > selectedBuffs.size()) {
                                menu.setOption(13, new IconMenuItem().setMaterial(POTION).setTitle(BLUE + Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), selectableBuffs - selectedBuffs.size())).setAmount(selectableBuffs - selectedBuffs.size()));
                            } else {
                                menu.setOption(13, new IconMenuItem().setMaterial(GLASS_BOTTLE).setTitle(GRAY + Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), 0)));
                            }
                        } else {
                            if (!selectedBuffs.contains(selectedBuff)) {
                                if (selectedBuffs.size() != 0 && menu.getOption(buffItemPositions.get(selectedBuff)) != null) {
                                    menu.getOption(buffItemPositions.get(selectedBuffs.get(0))).setGlowing(false);
                                    selectedBuffs.clear();
                                }
                                selectedBuffs.add(selectedBuff);
                                menu.getOption(buffItemPositions.get(selectedBuff)).setGlowing(true);
                                menu.update();
                            }
                        }
                    }
            }
        }
    }, MyPetPlugin.getPlugin());
    if (beacon.active) {
        menu.setOption(4, new IconMenuItem().setMaterial(EMERALD_BLOCK).setTitle(Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), GREEN + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()))).addLoreLine(RESET + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())));
    } else {
        menu.setOption(4, new IconMenuItem().setMaterial(REDSTONE_BLOCK).setTitle(Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), RED + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()))).addLoreLine(RESET + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())));
    }
    menu.setOption(3, new IconMenuItem().setMaterial(STAINED_GLASS_PANE).setData(5).setTitle(GREEN + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())));
    menu.setOption(5, new IconMenuItem().setMaterial(STAINED_GLASS_PANE).setData(14).setTitle(RED + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())));
    menu.setOption(21, new IconMenuItem().setMaterial(SKULL_ITEM).setData(3).setTitle(GOLD + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())).setGlowing(reciever == BeaconReciever.Owner));
    if (PARTY_SUPPORT && PartyManager.isInParty(getMyPet().getOwner().getPlayer())) {
        menu.setOption(22, new IconMenuItem().setMaterial(SKULL_ITEM).setData(1).setTitle(GOLD + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())).setGlowing(reciever == BeaconReciever.Party));
    }
    menu.setOption(23, new IconMenuItem().setMaterial(SKULL_ITEM).setData(2).setTitle(GOLD + Locales.getString("String_Node_Str", myPet.getOwner().getLanguage())).setGlowing(reciever == BeaconReciever.Everyone));
    if (buffLevel.get(1) > 0) {
        menu.setOption(0, new IconMenuItem().setMaterial(LEATHER_BOOTS).setAmount(buffLevel.get(1)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(1), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(1))));
    }
    if (buffLevel.get(3) > 0) {
        menu.setOption(9, new IconMenuItem().setMaterial(GOLD_PICKAXE).setAmount(buffLevel.get(3)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(3), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(3))));
    }
    if (buffLevel.get(5) > 0) {
        menu.setOption(18, new IconMenuItem().setMaterial(DIAMOND_SWORD).setAmount(buffLevel.get(5)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(5), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(5))));
    }
    if (buffLevel.get(8) > 0) {
        menu.setOption(1, new IconMenuItem().setMaterial(FIREWORK).setAmount(buffLevel.get(8)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(8), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(8))));
    }
    if (buffLevel.get(10) > 0) {
        menu.setOption(10, new IconMenuItem().setMaterial(APPLE).setAmount(buffLevel.get(10)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(10), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(10))));
    }
    if (buffLevel.get(11) > 0) {
        menu.setOption(19, new IconMenuItem().setMaterial(DIAMOND_CHESTPLATE).setAmount(buffLevel.get(11)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(11), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(11))));
    }
    if (buffLevel.get(12) > 0) {
        menu.setOption(7, new IconMenuItem().setMaterial(LAVA_BUCKET).setAmount(buffLevel.get(12)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(12), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(12))));
    }
    if (buffLevel.get(13) > 0) {
        menu.setOption(16, new IconMenuItem().setMaterial(RAW_FISH).setAmount(buffLevel.get(13)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(13), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(13))));
    }
    if (buffLevel.get(14) > 0) {
        menu.setOption(25, new IconMenuItem().setMaterial(EYE_OF_ENDER).setAmount(buffLevel.get(14)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(14), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(14))));
    }
    if (buffLevel.get(16) > 0) {
        menu.setOption(8, new IconMenuItem().setMaterial(TORCH).setAmount(buffLevel.get(16)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(16), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(16))));
    }
    if (buffLevel.get(21) > 0) {
        menu.setOption(17, new IconMenuItem().setMaterial(GOLDEN_APPLE).setAmount(buffLevel.get(21)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(21), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(21))));
    }
    if (buffLevel.get(22) > 0) {
        menu.setOption(26, new IconMenuItem().setMaterial(SPONGE).setAmount(buffLevel.get(22)).setTitle(GOLD + Locales.getString("String_Node_Str" + buffNames.get(22), myPet.getOwner().getLanguage()) + GRAY + "String_Node_Str" + Util.decimal2roman(buffLevel.get(22))));
    }
    for (int buff : selectedBuffs) {
        if (buffLevel.get(buff) > 0) {
            menu.getOption(buffItemPositions.get(buff)).setGlowing(true);
        } else {
            selectedBuffs.remove(buff);
        }
    }
    if (selectableBuffs > 1) {
        if (selectableBuffs > selectedBuffs.size()) {
            menu.setOption(13, new IconMenuItem().setMaterial(POTION).setTitle(BLUE + Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), selectableBuffs - selectedBuffs.size())).setAmount(selectableBuffs - selectedBuffs.size()));
        } else {
            menu.setOption(13, new IconMenuItem().setMaterial(GLASS_BOTTLE).setTitle(GRAY + Util.formatText(Locales.getString("String_Node_Str", myPet.getOwner().getLanguage()), 0)));
        }
    }
    menu.open(owner);
    return true;
}

Output:
     IconMenu menu = new IconMenu(Util.cutString("String_Node_Str" + myPet.getPetName(), 32), 27, new IconMenu.OptionClickEventHandler() {
-        List<Integer> selectedBuffs = beacon.selectedBuffs;
+        List<Integer> selectedBuffs = new ArrayList<Integer>(beacon.selectedBuffs);


Input:
public void checkPassword(String plainPassword) {
    if (!oldPassword) {
        try {
            EncryptionHelper.PBKDF2Credentials credentials = EncryptionHelper.generatePBKDF2Credentials(plainPassword, settings.getSalt(), settings.getIterations());
            byte[] passwordArray = Base64.decode(password, Base64.URL_SAFE);
            if (Arrays.equals(passwordArray, credentials.password)) {
                finishWithResult(true, credentials.key);
            } else {
                finishWithResult(false, null);
            }
        } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
            e.printStackTrace();
            finishWithResult(false, null);
        }
    } else {
        String hashedPassword = new String(Hex.encodeHex(DigestUtils.sha256(plainPassword)));
        if (hashedPassword.equals(password)) {
            byte[] key = settings.setAuthCredentials(plainPassword);
            if (key == null)
                Toast.makeText(this, R.string.settings_toast_auth_upgrade_failed, Toast.LENGTH_LONG).show();
            if (authMethod == AuthMethod.PASSWORD)
                settings.removeAuthPasswordHash();
            else if (authMethod == AuthMethod.PIN)
                settings.removeAuthPINHash();
            finishWithResult(true, key);
        } else {
            finishWithResult(false, null);
        }
    }
}

Output:
             }
-        } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
+        } catch (NoSuchAlgorithmException | InvalidKeySpecException | IllegalArgumentException e) {
             e.printStackTrace();


Input:
public Channel initSound(final Channel input) {
    if (this.note) {
        this.step = input.getSamplesLength();
        this.fsLimit = input.getSamplesLength();
        this.loudestfreqs = new float[1];
    } else {
        this.loudestfreqs = new float[(int) (input.getSamplesLength() / this.step) + 1];
        this.fsLimit = input.getSampleRate();
    }
    this.soundLength = input.getSamplesLength();
    return super.initSound(input);
}

Output:
     if (this.note) {
-        this.step = input.getSamplesLength();
-        this.fsLimit = input.getSamplesLength();
+        this.step = input1.getSamplesLength();
+        this.fsLimit = input1.getSamplesLength();
         this.loudestfreqs = new float[1];


Input:
public Type convertType(TypeReference typeReference) {
    org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations;
    if (typeReference instanceof Wildcard) {
        final Wildcard wildcard = (Wildcard) typeReference;
        final WildcardType wildcardType = new WildcardType(this.ast);
        if (wildcard.bound != null) {
            final Type bound = convertType(wildcard.bound);
            wildcardType.setBound(bound, wildcard.kind == Wildcard.EXTENDS);
            int start = wildcard.sourceStart;
            wildcardType.setSourceRange(start, bound.getStartPosition() + bound.getLength() - start);
        } else {
            final int start = wildcard.sourceStart;
            final int end = wildcard.sourceEnd;
            wildcardType.setSourceRange(start, end - start + 1);
        }
        if (this.resolveBindings) {
            recordNodes(wildcardType, typeReference);
        }
        if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
            annotateType(wildcardType, annotations);
        }
        return wildcardType;
    }
    Type type = null;
    int sourceStart = typeReference.sourceStart;
    int length = 0;
    int dimensions = typeReference.dimensions();
    if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) {
        annotations = typeReference.annotations != null ? typeReference.annotations[0] : null;
        int annotationsEnd = annotations != null ? annotations[annotations.length - 1].declarationSourceEnd + 1 : -1;
        char[] name = ((org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) typeReference).getTypeName()[0];
        length = typeReference.sourceEnd - typeReference.sourceStart + 1;
        if (isPrimitiveType(name)) {
            int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart < annotationsEnd ? annotationsEnd : sourceStart, sourceStart + length);
            int end = positions[1];
            if (end == -1) {
                end = sourceStart + length - 1;
            }
            final PrimitiveType primitiveType = new PrimitiveType(this.ast);
            primitiveType.setPrimitiveTypeCode(getPrimitiveTypeCode(name));
            primitiveType.setSourceRange(sourceStart, end - sourceStart + 1);
            type = primitiveType;
            if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
                annotateType(primitiveType, annotations);
            }
        } else if (typeReference instanceof ParameterizedSingleTypeReference) {
            ParameterizedSingleTypeReference parameterizedSingleTypeReference = (ParameterizedSingleTypeReference) typeReference;
            final SimpleName simpleName = new SimpleName(this.ast);
            simpleName.internalSetIdentifier(new String(name));
            int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart < annotationsEnd ? annotationsEnd : sourceStart, sourceStart + length);
            int end = positions[1];
            if (end == -1) {
                end = sourceStart + length - 1;
            }
            if (positions[0] != -1) {
                simpleName.setSourceRange(positions[0], end - positions[0] + 1);
            } else {
                simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
            }
            switch(this.ast.apiLevel) {
                case AST.JLS2_INTERNAL:
                    SimpleType simpleType = new SimpleType(this.ast);
                    simpleType.setName(simpleName);
                    simpleType.setFlags(simpleType.getFlags() | ASTNode.MALFORMED);
                    simpleType.setSourceRange(sourceStart, end - sourceStart + 1);
                    type = simpleType;
                    if (this.resolveBindings) {
                        this.recordNodes(simpleName, typeReference);
                    }
                    break;
                default:
                    simpleType = new SimpleType(this.ast);
                    simpleType.setName(simpleName);
                    simpleType.setSourceRange(simpleName.getStartPosition(), simpleName.getLength());
                    if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
                        annotateType(simpleType, annotations);
                    }
                    int newSourceStart = simpleType.getStartPosition();
                    if (newSourceStart > 0 && newSourceStart < sourceStart)
                        sourceStart = newSourceStart;
                    final ParameterizedType parameterizedType = new ParameterizedType(this.ast);
                    parameterizedType.setType(simpleType);
                    type = parameterizedType;
                    TypeReference[] typeArguments = parameterizedSingleTypeReference.typeArguments;
                    if (typeArguments != null) {
                        Type type2 = null;
                        for (int i = 0, max = typeArguments.length; i < max; i++) {
                            type2 = convertType(typeArguments[i]);
                            ((ParameterizedType) type).typeArguments().add(type2);
                            end = type2.getStartPosition() + type2.getLength() - 1;
                        }
                        end = retrieveClosingAngleBracketPosition(sourceStart + simpleName.getLength());
                        type.setSourceRange(sourceStart, end - sourceStart + 1);
                    } else {
                        type.setSourceRange(sourceStart, end - sourceStart + 1);
                    }
                    if (this.resolveBindings) {
                        this.recordNodes(simpleName, typeReference);
                        this.recordNodes(simpleType, typeReference);
                    }
            }
        } else {
            final SimpleName simpleName = new SimpleName(this.ast);
            simpleName.internalSetIdentifier(new String(name));
            int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart < annotationsEnd ? annotationsEnd : sourceStart, sourceStart + length);
            int end = positions[1];
            if (end == -1) {
                end = sourceStart + length - 1;
            }
            if (positions[0] != -1) {
                simpleName.setSourceRange(positions[0], end - positions[0] + 1);
            } else {
                simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
            }
            final SimpleType simpleType = new SimpleType(this.ast);
            simpleType.setName(simpleName);
            type = simpleType;
            type.setSourceRange(sourceStart, end - sourceStart + 1);
            type = simpleType;
            if (this.resolveBindings) {
                this.recordNodes(simpleName, typeReference);
            }
            if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
                annotateType(simpleType, annotations);
            }
        }
        if (dimensions != 0) {
            type = convertToArray(type, sourceStart, length, dimensions, typeReference.getAnnotationsOnDimensions(true));
            if (this.resolveBindings) {
                completeRecord((ArrayType) type, typeReference);
            }
        }
    } else {
        if (typeReference instanceof ParameterizedQualifiedTypeReference) {
            ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = (ParameterizedQualifiedTypeReference) typeReference;
            char[][] tokens = parameterizedQualifiedTypeReference.tokens;
            TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments;
            org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations = parameterizedQualifiedTypeReference.annotations;
            TypeReference[] arguments = null;
            int lenth = tokens.length;
            int firstTypeIndex = lenth - 1;
            long[] positions = parameterizedQualifiedTypeReference.sourcePositions;
            switch(this.ast.apiLevel) {
                case AST.JLS2_INTERNAL:
                    {
                        char[][] name = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).getTypeName();
                        int nameLength = name.length;
                        sourceStart = (int) (positions[0] >>> 32);
                        length = (int) (positions[nameLength - 1] & 0xFFFFFFFF) - sourceStart + 1;
                        Name qualifiedName = this.setQualifiedNameNameAndSourceRanges(name, positions, typeReference);
                        final SimpleType simpleType = new SimpleType(this.ast);
                        simpleType.setName(qualifiedName);
                        simpleType.setSourceRange(sourceStart, length);
                        simpleType.setFlags(simpleType.getFlags() | ASTNode.MALFORMED);
                        type = simpleType;
                    }
                    break;
                default:
                    boolean isTypeArgumentBased = false;
                    for (int i = 0; i < lenth; ++i) {
                        if (typeArguments != null && typeArguments[i] != null) {
                            firstTypeIndex = i;
                            isTypeArgumentBased = true;
                            break;
                        }
                        if (typeAnnotations != null && typeAnnotations[i] != null) {
                            firstTypeIndex = i;
                            isTypeArgumentBased = false;
                            break;
                        }
                    }
                    int start = (int) (positions[0] >>> 32);
                    int end = (int) positions[firstTypeIndex];
                    Type currentType = createBaseType(typeReference, positions, typeAnnotations, tokens, lenth, firstTypeIndex, isTypeArgumentBased);
                    int indexOfEnclosingType = 1;
                    if (typeArguments != null && (arguments = typeArguments[firstTypeIndex]) != null) {
                        int arglen = arguments.length;
                        ParameterizedType parameterizedType = new ParameterizedType(this.ast);
                        parameterizedType.index = indexOfEnclosingType;
                        parameterizedType.setType(currentType);
                        if (this.resolveBindings) {
                            recordNodes(parameterizedType, typeReference);
                        }
                        Type type2 = null;
                        for (int i = 0; i < arglen; ++i) {
                            type2 = convertType(arguments[i]);
                            parameterizedType.typeArguments().add(type2);
                        }
                        if (type2 != null) {
                            if (type2.getLength() > 0) {
                                end = type2.getStartPosition() + type2.getLength() - 1;
                            } else if (type2.isSimpleType()) {
                                Name name = ((SimpleType) type2).getName();
                                end += name.toString().length() + 1;
                                System.err.println("String_Node_Str");
                            } else {
                                System.err.println("String_Node_Str");
                            }
                        }
                        end = retrieveClosingAngleBracketPosition(end + 1);
                        int baseStart = currentType.getStartPosition();
                        start = start <= baseStart ? start : baseStart;
                        parameterizedType.setSourceRange(start, end - start + 1);
                        currentType = parameterizedType;
                    }
                    for (int i = firstTypeIndex + 1; i < lenth; ++i) {
                        SimpleName simpleName = new SimpleName(this.ast);
                        simpleName.setIdentifier(new String(tokens[i]));
                        simpleName.index = i + 1;
                        start = (int) (positions[i] >>> 32);
                        end = (int) positions[i];
                        simpleName.setSourceRange(start, end - start + 1);
                        recordPendingNameScopeResolution(simpleName);
                        QualifiedType qualifiedType = new QualifiedType(this.ast);
                        qualifiedType.setQualifier(currentType);
                        qualifiedType.setName(simpleName);
                        start = currentType.getStartPosition();
                        end = simpleName.getStartPosition() + simpleName.getLength() - 1;
                        qualifiedType.setSourceRange(start, end - start + 1);
                        if (typeAnnotations != null && (annotations = typeAnnotations[i]) != null) {
                            int nextPosition = annotateType(qualifiedType, annotations);
                            if (simpleName.getStartPosition() < nextPosition && nextPosition <= end) {
                                simpleName.setSourceRange(nextPosition, end - nextPosition + 1);
                                trimWhiteSpacesAndComments(simpleName);
                            }
                        }
                        if (this.resolveBindings) {
                            recordNodes(simpleName, typeReference);
                            recordNodes(qualifiedType, typeReference);
                        }
                        currentType = qualifiedType;
                        indexOfEnclosingType++;
                        if (typeArguments != null && (arguments = typeArguments[i]) != null) {
                            int arglen = arguments.length;
                            qualifiedType.index = indexOfEnclosingType;
                            ParameterizedType parameterizedType = new ParameterizedType(this.ast);
                            parameterizedType.index = indexOfEnclosingType;
                            parameterizedType.setType(currentType);
                            if (this.resolveBindings) {
                                recordNodes(parameterizedType, typeReference);
                            }
                            Type type2 = null;
                            for (int j = 0; j < arglen; ++j) {
                                type2 = convertType(arguments[j]);
                                parameterizedType.typeArguments().add(type2);
                            }
                            end = type2 != null ? type2.getStartPosition() + type2.getLength() - 1 : end;
                            end = retrieveClosingAngleBracketPosition(end + 1);
                            parameterizedType.setSourceRange(start, end - start + 1);
                            currentType = parameterizedType;
                        } else {
                            qualifiedType.index = indexOfEnclosingType;
                        }
                    }
                    type = currentType;
            }
        } else if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) {
            QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference;
            long[] positions = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).sourcePositions;
            org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations = typeReference.annotations;
            char[][] tokens = qualifiedTypeReference.tokens;
            int lenth = tokens.length;
            int firstTypeIndex = lenth;
            if (typeAnnotations != null) {
                for (int i = 0; i < lenth; ++i) {
                    if (typeAnnotations[i] != null) {
                        firstTypeIndex = i;
                        break;
                    }
                }
            }
            Type currentType = createBaseType(typeReference, positions, typeAnnotations, tokens, lenth, firstTypeIndex, false);
            for (int i = firstTypeIndex + 1; i < lenth; ++i) {
                currentType = createQualifiedType(typeReference, positions, typeAnnotations, tokens, i, currentType);
            }
            type = currentType;
        } else if (typeReference instanceof UnionTypeReference) {
            TypeReference[] typeReferences = ((org.eclipse.jdt.internal.compiler.ast.UnionTypeReference) typeReference).typeReferences;
            switch(this.ast.apiLevel) {
                case AST.JLS2_INTERNAL:
                case AST.JLS3_INTERNAL:
                    type = this.convertType(typeReferences[0]);
                    int start = typeReference.sourceStart;
                    int endPosition = typeReference.sourceEnd;
                    length = endPosition - start + 1;
                    type.setSourceRange(start, length);
                    type.setFlags(type.getFlags() | ASTNode.MALFORMED);
                    break;
                default:
                    final UnionType unionType = new UnionType(this.ast);
                    for (int i = 0, max = typeReferences.length; i < max; i++) {
                        unionType.types().add(this.convertType(typeReferences[i]));
                    }
                    type = unionType;
                    List types = unionType.types();
                    int size = types.size();
                    start = ((Type) types.get(0)).getStartPosition();
                    Type lastType = (Type) types.get(size - 1);
                    endPosition = lastType.getStartPosition() + lastType.getLength();
                    length = endPosition - start;
                    type.setSourceRange(start, length);
            }
        } else if (typeReference instanceof IntersectionCastTypeReference) {
            TypeReference[] typeReferences = ((IntersectionCastTypeReference) typeReference).typeReferences;
            switch(this.ast.apiLevel) {
                case AST.JLS2_INTERNAL:
                case AST.JLS3_INTERNAL:
                case AST.JLS4_INTERNAL:
                    type = this.convertType(typeReferences[0]);
                    int start = typeReference.sourceStart;
                    int endPosition = typeReference.sourceEnd;
                    length = endPosition - start + 1;
                    type.setSourceRange(start, length);
                    type.setFlags(type.getFlags() | ASTNode.MALFORMED);
                    break;
                default:
                    final IntersectionType castType = new IntersectionType(this.ast);
                    for (int i = 0, max = typeReferences.length; i < max; i++) {
                        castType.types().add(this.convertType(typeReferences[i]));
                    }
                    type = castType;
                    List types = castType.types();
                    int size = types.size();
                    start = ((Type) types.get(0)).getStartPosition();
                    Type lastType = (Type) types.get(size - 1);
                    endPosition = lastType.getStartPosition() + lastType.getLength();
                    length = endPosition - start;
                    type.setSourceRange(start, length);
            }
        }
        length = typeReference.sourceEnd - sourceStart + 1;
        if (dimensions != 0) {
            type = convertToArray(type, sourceStart, length, dimensions, typeReference.getAnnotationsOnDimensions(true));
            if (this.resolveBindings) {
                completeRecord((ArrayType) type, typeReference);
            }
        }
    }
    if (this.resolveBindings) {
        this.recordNodes(type, typeReference);
    }
    boolean sawDiamond = false;
    if (typeReference instanceof ParameterizedSingleTypeReference) {
        ParameterizedSingleTypeReference pstr = (ParameterizedSingleTypeReference) typeReference;
        if (pstr.typeArguments == TypeReference.NO_TYPE_ARGUMENTS) {
            sawDiamond = true;
        }
    } else if (typeReference instanceof ParameterizedQualifiedTypeReference) {
        ParameterizedQualifiedTypeReference pqtr = (ParameterizedQualifiedTypeReference) typeReference;
        for (int i = 0, len = pqtr.typeArguments.length; i < len; i++) {
            if (pqtr.typeArguments[i] == TypeReference.NO_TYPE_ARGUMENTS) {
                sawDiamond = true;
                break;
            }
        }
    }
    if (sawDiamond) {
        switch(this.ast.apiLevel) {
            case AST.JLS2_INTERNAL:
            case AST.JLS3_INTERNAL:
                type.setFlags(type.getFlags() | ASTNode.MALFORMED);
        }
    }
    return type;
}

Output:
                             ((ParameterizedType) type).typeArguments().add(type2);
-                            end = type2.getStartPosition() + type2.getLength() - 1;
+                            if (type2.getStartPosition() > 0)
+                                end = type2.getStartPosition() + type2.getLength() - 1;
+                            else
+                                end += type2.toString().length();
                         }


Input:
public String getString(String name, String defaultValue) {
    return getAttribute(name, defaultValue);
}

Output:
 public String getString(String name, String defaultValue) {
-    return getAttribute(name, defaultValue);
+    XMLAttribute attr = this.findAttribute(name);
+    if (attr == null) {
+        return defaultValue;
+    } else {
+        return attr.getValue();
+    }
 }


Input:
public boolean handle(Object data) {
    boolean handled = super.handle(data);
    if (data == null) {
        return false;
    }
    this.getGenericSum(data).sumObject(data);
    return handled;
}

Output:
     boolean handled = super.handle(data);
-    if (data == null) {
-        return false;
+    if (!handled) {
+        return handled;
     }


Input:
private boolean addAllSubtypes(T type) {
    Navigator<T, C, F, M> nav = nav();
    NonElement<T, C> t = parent.builder.getClassInfo(nav.asDecl(type), this);
    if (!(t instanceof ClassInfo))
        return false;
    boolean result = false;
    ClassInfo<T, C> c = (ClassInfo<T, C>) t;
    if (c != null && c.isElement()) {
        types.add(c.asElement());
        result = true;
    }
    for (ClassInfo<T, C> ci : parent.owner.beans().values()) {
        if (ci.isElement() && nav.isSubClassOf(ci.getType(), type)) {
            types.add(ci.asElement());
            result = true;
        }
    }
    for (ElementInfo<T, C> ei : parent.owner.getElementMappings(null).values()) {
        if (nav.isSubClassOf(ei.getType(), type)) {
            types.add(ei);
            result = true;
        }
    }
    return result;
}

Output:
     ClassInfo<T, C> c = (ClassInfo<T, C>) t;
-    if (c != null && c.isElement()) {
+    if (c.isElement()) {
         types.add(c.asElement());


Input:
private void assertOpen() throws IOException {
    if (isClosed) {
        throw new IOException(Messages.getString(ResourceConstants.FILE_HAS_BEEN_CLOSED));
    }
}

Output:
     if (isClosed) {
-        throw new IOException(Messages.getString(ResourceConstants.FILE_HAS_BEEN_CLOSED));
+        throw new IOException(CoreMessages.getString(ResourceConstants.FILE_HAS_BEEN_CLOSED));
     }


Input:
public SearchResult[] getSearchResults(String searchString) throws IOException {
    System.out.println("String_Node_Str" + searchString);
    scrapedPosters = null;
    if (useSiteSearch) {
        ArrayList<SearchResult> linksList = new ArrayList<SearchResult>();
        Document doc = Jsoup.connect(searchString).userAgent("String_Node_Str").ignoreHttpErrors(true).timeout(SiteParsingProfile.CONNECTION_TIMEOUT_VALUE).get();
        Elements movieSearchResultElements = doc.select("String_Node_Str");
        if (movieSearchResultElements == null || movieSearchResultElements.size() == 0) {
            this.useSiteSearch = false;
            SearchResult[] googleResults = getData18LinksFromGoogle(fileName);
            return googleResults;
        } else {
            for (Element currentMovie : movieSearchResultElements) {
                String currentMovieURL = currentMovie.select("String_Node_Str").first().attr("String_Node_Str");
                String currentMovieTitle = currentMovie.select("String_Node_Str").last().text();
                String releaseDateText = currentMovie.ownText();
                if (releaseDateText != null && releaseDateText.length() > 0)
                    currentMovieTitle = currentMovieTitle + "String_Node_Str" + releaseDateText + "String_Node_Str";
                Thumb currentMovieThumb = new Thumb(currentMovie.select("String_Node_Str").attr("String_Node_Str"));
                linksList.add(new SearchResult(currentMovieURL, currentMovieTitle, currentMovieThumb));
            }
            return linksList.toArray(new SearchResult[linksList.size()]);
        }
    } else {
        this.useSiteSearch = false;
        SearchResult[] googleResults = getData18LinksFromGoogle(fileName);
        return googleResults;
    }
}

Output:
                 String currentMovieURL = currentMovie.select("String_Node_Str").first().attr("String_Node_Str");
-                String currentMovieTitle = currentMovie.select("String_Node_Str").last().text();
+                String currentMovieTitle = currentMovie.select("String_Node_Str").first().text();
                 String releaseDateText = currentMovie.ownText();


Input:
public void keyPressed(KeyEvent e) {
    int key = e.getKeyCode();
    if (key == KeyEvent.VK_0) {
        frame.add(new SamplePanel());
    }
}

Output:
     if (key == KeyEvent.VK_0) {
-        frame.add(new SamplePanel());
+        SamplePanel sp = new SamplePanel();
+        frame.getContentPane().add(sp);
+        sp.requestFocusInWindow();
+        frame.setVisible(true);
     }


Input:
public void actionPerformed(ActionEvent e) {
    GUILog gl = Application.getInstance().getGUILog();
    try {
        String response = null;
        Boolean recurse = Utils.getUserYesNoAnswer("String_Node_Str");
        if (recurse == null)
            return;
        DocumentValidator dv = new DocumentValidator(doc);
        dv.validateDocument();
        if (dv.isFatal()) {
            dv.printErrors();
            return;
        }
        DocumentGenerator dg = new DocumentGenerator(doc, dv, null);
        Document dge = dg.parseDocument(true, recurse);
        dv.printErrors();
        ViewCommentVisitor vcv = new ViewCommentVisitor();
        dge.accept(vcv);
        String json = vcv.getJSON();
        String url = ViewEditUtils.getUrl();
        if (url == null)
            return;
        url += "String_Node_Str" + doc.getID() + "String_Node_Str";
        if (recurse) {
            url += "String_Node_Str";
        }
        gl.log("String_Node_Str");
        PostMethod pm = new PostMethod(url);
        try {
            gl.log("String_Node_Str");
            pm.setRequestHeader("String_Node_Str", "String_Node_Str");
            pm.setRequestEntity(JsonRequestEntity.create(json));
            HttpClient client = new HttpClient();
            ViewEditUtils.setCredentials(client);
            client.executeMethod(pm);
            response = pm.getResponseBodyAsString();
            if (response.equals("String_Node_Str"))
                gl.log("String_Node_Str");
            else if (response.equals("String_Node_Str"))
                gl.log("String_Node_Str");
            else
                gl.log(response);
        } finally {
            pm.releaseConnection();
        }
    } catch (Exception ex) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        ex.printStackTrace(pw);
        gl.log(sw.toString());
        ex.printStackTrace();
    }
}

Output:
             return;
-        DocumentValidator dv = new DocumentValidator(doc);
+        dv = new DocumentValidator(doc);
         dv.validateDocument();


Input:
public float getFloat(String key) {
    if (properties != null)
        return (float) properties.get(key);
    else
        return root == null ? 0.0F : root.get(key).asFloat();
}

Output:
 public float getFloat(String key) {
-    if (properties != null)
-        return (float) properties.get(key);
-    else
-        return root == null ? 0.0F : root.get(key).asFloat();
+    if (properties != null) {
+        Object obj = properties.get(key);
+        if (obj != null && obj instanceof Number)
+            return ((Number) obj).floatValue();
+        else
+            return 0.0F;
+    } else {
+        if (root == null)
+            return 0.0F;
+        else {
+            FLValue flvalue = root.get(key);
+            if (flvalue.getType() == kFLNumber)
+                return flvalue.asFloat();
+            else
+                return 0.0F;
+        }
+    }
 }


Input:
public void addAppManager(final AppManagerAdd appManagerAdd) {
    if (appManagerAdd == null) {
        throw BddException.INVALID_PARAMETER("String_Node_Str", null);
    }
    if (CommonUtil.isBlank(appManagerAdd.getName())) {
        throw BddException.INVALID_PARAMETER("String_Node_Str", appManagerAdd.getName());
    }
    softwareManagerCollector.createSoftwareManager(appManagerAdd);
}

Output:
     }
-    if (CommonUtil.isBlank(appManagerAdd.getName())) {
+    if (CommonUtil.isBlank(appManagerAdd.getName()) || !CommonUtil.validateResourceName(appManagerAdd.getName())) {
         throw BddException.INVALID_PARAMETER("String_Node_Str", appManagerAdd.getName());


Input:
private Arg unpackStructInitArgs(Out<List<List<String>>> fieldPaths, Out<List<List<Arg>>> fieldPathsArgs, Out<List<Arg>> fieldVals) {
    if (fieldPaths != null) {
        fieldPaths.val = new ArrayList<List<String>>();
    }
    if (fieldPathsArgs != null) {
        fieldPathsArgs.val = new ArrayList<List<Arg>>();
    }
    if (fieldVals != null) {
        fieldVals.val = new ArrayList<Arg>();
    }
    int pos = 0;
    while (pos < inputs.size() - 1) {
        long pathLength = inputs.get(pos).getIntLit();
        assert (pathLength > 0 && pathLength <= Integer.MAX_VALUE);
        pos++;
        List<String> fieldPath = (fieldPaths == null) ? null : new ArrayList<String>((int) pathLength);
        List<Arg> fieldPathArgs = (fieldPathsArgs == null) ? null : new ArrayList<Arg>((int) pathLength);
        for (int i = 0; i < pathLength; i++) {
            if (fieldPath != null) {
                fieldPath.add(inputs.get(pos).getStringLit());
            }
            if (fieldPathArgs != null) {
                fieldPathArgs.add(inputs.get(pos));
            }
            pos++;
        }
        Arg fieldVal = inputs.get(pos);
        pos++;
        if (fieldPaths != null) {
            fieldPaths.val.add(fieldPath);
        }
        if (fieldPaths != null) {
            fieldPathsArgs.val.add(fieldPathArgs);
        }
        if (fieldVals != null) {
            fieldVals.val.add(fieldVal);
        }
    }
    Arg writeDecr = getInput(pos);
    return writeDecr;
}

Output:
         }
-        if (fieldPaths != null) {
+        if (fieldPathsArgs != null) {
             fieldPathsArgs.val.add(fieldPathArgs);


Input:
public IStatus doAction() {
    List<XSDComplexTypeDefinition> list = new ArrayList<XSDComplexTypeDefinition>();
    EList<XSDTypeDefinition> types = schema.getTypeDefinitions();
    for (XSDTypeDefinition type : types) {
        if (type instanceof XSDComplexTypeDefinition)
            list.add((XSDComplexTypeDefinition) type);
    }
    dialog = new ComplexTypeInputDialog(this, page.getSite().getShell(), schema, list, false);
    dialog.setBlockOnOpen(true);
    int ret = dialog.open();
    if (ret == Dialog.CANCEL) {
        return Status.CANCEL_STATUS;
    }
    XSDFactory factory = XSDSchemaBuildingTools.getXSDFactory();
    XSDModelGroup group = factory.createXSDModelGroup();
    XSDParticle subParticle = null;
    XSDElementDeclaration subElement = null;
    subElement = factory.createXSDElementDeclaration();
    subElement.setName("String_Node_Str");
    subElement.setTypeDefinition(schema.resolveSimpleTypeDefinition(schema.getSchemaForSchemaNamespace(), "String_Node_Str"));
    subParticle = factory.createXSDParticle();
    subParticle.setMinOccurs(1);
    subParticle.setMaxOccurs(1);
    subParticle.setContent(subElement);
    subParticle.updateElement();
    if (isChoice)
        group.setCompositor(XSDCompositor.CHOICE_LITERAL);
    else if (isAll)
        group.setCompositor(XSDCompositor.ALL_LITERAL);
    else
        group.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
    group.getContents().add(0, subParticle);
    group.updateElement();
    XSDComplexTypeDefinition complexType = factory.createXSDComplexTypeDefinition();
    complexType.setName(typeName);
    schema.getContents().add(complexType);
    complexType.updateElement();
    XSDParticle groupParticle = factory.createXSDParticle();
    groupParticle.setMinOccurs(1);
    groupParticle.setMaxOccurs(1);
    groupParticle.setContent(group);
    groupParticle.updateElement();
    complexType.setContent(groupParticle);
    complexType.updateElement();
    page.refresh();
    page.markDirty();
    return Status.OK_STATUS;
}

Output:
     }
-    dialog = new ComplexTypeInputDialog(this, page.getSite().getShell(), schema, list, false);
+    dialog = new ComplexTypeInputDialog(this, page.getSite().getShell(), schema, null, list, false);
     dialog.setBlockOnOpen(true);


Input:
public List<MatchResult> findMatches(SequenceSketch seqHashes, boolean toSelf) {
    long startTime = System.nanoTime();
    MinHashSketch minHash = seqHashes.getMinHashes();
    if (this.hashes.size() != minHash.numHashes())
        throw new MhapRuntimeException("String_Node_Str" + this.hashes.size() + "String_Node_Str" + minHash.numHashes() + "String_Node_Str");
    long numLookups = this.getNumberSequencesSearched();
    long numProcessed = this.numberElementsProcessed.get();
    int mapSize = Math.max(256, (int) (4.0 * (double) numLookups / (double) numProcessed));
    Map<SequenceId, HitCounter> bestSequenceHit = new Object2ObjectOpenHashMap<>(mapSize);
    int[] minHashes = minHash.getMinHashArray();
    int hashIndex = 0;
    for (Map<Integer, ArrayList<SequenceId>> currHash : this.hashes) {
        ArrayList<SequenceId> currentHashMatchList = currHash.get(minHashes[hashIndex]);
        if (currentHashMatchList != null) {
            this.numberElementsProcessed.getAndAdd(currentHashMatchList.size());
            for (SequenceId sequenceId : currentHashMatchList) {
                bestSequenceHit.compute(sequenceId, (k, v) -> (v == null) ? new HitCounter(1) : v.addHit());
            }
        }
        hashIndex++;
    }
    long minHashEndTime = System.nanoTime();
    this.minhashSearchTime.getAndAdd(minHashEndTime - startTime);
    this.numberSequencesHit.getAndAdd(bestSequenceHit.size());
    ArrayList<MatchResult> matches = new ArrayList<MatchResult>(32);
    for (Entry<SequenceId, HitCounter> match : bestSequenceHit.entrySet()) {
        SequenceId matchId = match.getKey();
        if (toSelf && matchId.getHeaderId() == seqHashes.getSequenceId().getHeaderId())
            continue;
        if (match.getValue().count >= this.numMinMatches) {
            SequenceSketch matchedHashes = this.sequenceVectorsHash.get(match.getKey());
            if (matchedHashes == null)
                throw new MhapRuntimeException("String_Node_Str");
            if (matchedHashes.getSequenceLength() < this.minStoreLength && seqHashes.getSequenceLength() < this.minStoreLength)
                continue;
            if (toSelf && matchId.getHeaderId() > seqHashes.getSequenceId().getHeaderId() && matchedHashes.getSequenceLength() >= this.minStoreLength && seqHashes.getSequenceLength() >= this.minStoreLength)
                continue;
            if (toSelf && matchedHashes.getSequenceLength() < this.minStoreLength && seqHashes.getSequenceLength() >= this.minStoreLength)
                continue;
            OverlapInfo result = seqHashes.getOrderedHashes().getOverlapInfo(matchedHashes.getOrderedHashes(), this.maxShift);
            boolean accept = result.score >= this.acceptScore;
            this.numberSequencesFullyCompared.getAndIncrement();
            if (accept) {
                MatchResult currResult = new MatchResult(seqHashes.getSequenceId(), matchId, result, seqHashes.getSequenceLength(), matchedHashes.getSequenceLength());
                matches.add(currResult);
            }
        }
    }
    long endTime = System.nanoTime();
    this.sortMergeSearchTime.getAndAdd(endTime - minHashEndTime);
    return matches;
}

Output:
     long numProcessed = this.numberElementsProcessed.get();
-    int mapSize = Math.max(256, (int) (4.0 * (double) numLookups / (double) numProcessed));
+    int mapSize = Math.max(256, (int) (4.0 * (double) numProcessed / (double) numLookups));
     Map<SequenceId, HitCounter> bestSequenceHit = new Object2ObjectOpenHashMap<>(mapSize);


Input:
public boolean deleteUser(String userIdWithoutDomain) throws IDMStoreException {
    Preconditions.checkNotNull(userIdWithoutDomain, "String_Node_Str");
    String userID = IDMStoreUtil.createUserid(userIdWithoutDomain, DOMAIN);
    return identityStore.deleteUser(userID) != null;
}

Output:
     Preconditions.checkNotNull(userIdWithoutDomain, "String_Node_Str");
-    String userID = IDMStoreUtil.createUserid(userIdWithoutDomain, DOMAIN);
-    return identityStore.deleteUser(userID) != null;
+    return storeBuilder.deleteUser(DOMAIN, userIdWithoutDomain);
 }


Input:
protected void commit() {
    try {
        WSDataModel wsObject = (WSDataModel) (getXObject().getWsObject());
        wsObject.setDescription(descriptionText.getText() == null ? "String_Node_Str" : descriptionText.getText());
        String schema = ((XSDTreeContentProvider) viewer.getContentProvider()).getXSDSchemaAsString();
        schema = schema.replaceAll("String_Node_Str", "String_Node_Str");
        schema = schema.replaceAll("String_Node_Str", "String_Node_Str");
        wsObject.setXsdSchema(schema);
        XSDImport xsdImport = XSDFactory.eINSTANCE.createXSDImport();
        xsdImport.setNamespace("String_Node_Str");
        if (xsdSchema == null) {
            xsdSchema = Util.createXsdSchema(schema, getXObject());
        }
        EList<XSDSchemaContent> elist = xsdSchema.getContents();
        for (XSDSchemaContent cnt : elist) {
            if (cnt instanceof XSDImport) {
                XSDImport imp = (XSDImport) cnt;
                if (imp.getNamespace().equals("String_Node_Str")) {
                    xsdImport = null;
                    break;
                }
            }
        }
        if (xsdImport != null) {
            xsdSchema.getContents().add(0, xsdImport);
            wsObject.setXsdSchema(Util.nodeToString(xsdSchema.getDocument()));
        }
        validateSchema();
        XMLEditor xmleditor = (getEditor()).getXmlEditor();
        xmleditor.refresh(getXObject());
    } catch (Exception e) {
        e.printStackTrace();
        ErrorExceptionDialog.openError(this.getSite().getShell(), "String_Node_Str", CommonUtil.getErrMsgFromException(e));
    }
}

Output:
 protected void commit() {
-    try {
-        WSDataModel wsObject = (WSDataModel) (getXObject().getWsObject());
-        wsObject.setDescription(descriptionText.getText() == null ? "String_Node_Str" : descriptionText.getText());
-        String schema = ((XSDTreeContentProvider) viewer.getContentProvider()).getXSDSchemaAsString();
-        schema = schema.replaceAll("String_Node_Str", "String_Node_Str");
-        schema = schema.replaceAll("String_Node_Str", "String_Node_Str");
-        wsObject.setXsdSchema(schema);
-        XSDImport xsdImport = XSDFactory.eINSTANCE.createXSDImport();
-        xsdImport.setNamespace("String_Node_Str");
-        if (xsdSchema == null) {
-            xsdSchema = Util.createXsdSchema(schema, getXObject());
-        }
-        EList<XSDSchemaContent> elist = xsdSchema.getContents();
-        for (XSDSchemaContent cnt : elist) {
-            if (cnt instanceof XSDImport) {
-                XSDImport imp = (XSDImport) cnt;
-                if (imp.getNamespace().equals("String_Node_Str")) {
-                    xsdImport = null;
-                    break;
-                }
-            }
-        }
-        if (xsdImport != null) {
-            xsdSchema.getContents().add(0, xsdImport);
-            wsObject.setXsdSchema(Util.nodeToString(xsdSchema.getDocument()));
-        }
-        validateSchema();
-        XMLEditor xmleditor = (getEditor()).getXmlEditor();
-        xmleditor.refresh(getXObject());
-    } catch (Exception e) {
-        e.printStackTrace();
-        ErrorExceptionDialog.openError(this.getSite().getShell(), "String_Node_Str", CommonUtil.getErrMsgFromException(e));
-    }
+    save(null);
 }


Input:
private void applyBrush(SnipeData v, Location<World> targetBlock) {
    double brushSize = v.getBrushSize();
    double brushSizeSquared = brushSize * brushSize;
    int minx = GenericMath.floor(targetBlock.getBlockX() - brushSize);
    int maxx = GenericMath.floor(targetBlock.getBlockX() + brushSize) + 1;
    int minz = GenericMath.floor(targetBlock.getBlockZ() - brushSize);
    int maxz = GenericMath.floor(targetBlock.getBlockZ() + brushSize) + 1;
    this.undo = new Undo(GenericMath.floor(Math.PI * (brushSize + 1) * (brushSize + 1)));
    for (int x = minx; x <= maxx; x++) {
        double xs = (minx - x) * (minx - x);
        for (int z = minz; z <= maxz; z++) {
            double zs = (minz - z) * (minz - z);
            if (xs + zs < brushSizeSquared) {
                final int sum = this.useWorldCoordinates ? x + z : x - minx + z - minz;
                if (sum % 2 != 0) {
                    perform(v, x, targetBlock.getBlockY(), z);
                }
            }
        }
    }
    v.owner().storeUndo(this.undo);
    this.undo = null;
}

Output:
     for (int x = minx; x <= maxx; x++) {
-        double xs = (minx - x) * (minx - x);
+        double xs = (tx - x) * (tx - x);
         for (int z = minz; z <= maxz; z++) {


Input:
private IExtractionResults extractByInstanceID(InstanceID instanceId) throws BirtException {
    InstanceID iid = instanceId;
    while (iid != null) {
        long id = iid.getComponentID();
        ReportItemDesign design = (ReportItemDesign) report.getReportItemByID(id);
        IDataQueryDefinition dataQuery = design.getQuery();
        if (dataQuery != null) {
            if (!(dataQuery instanceof IBaseQueryDefinition)) {
                return null;
            }
            IBaseQueryDefinition query = (IBaseQueryDefinition) dataQuery;
            String queryId = (String) query2QueryIdMapping.get(query);
            if (filterExpressions != null) {
                query = cloneQuery(query);
                for (int i = 0; i < filterExpressions.length; i++) {
                    query.getFilters().add(filterExpressions[i]);
                }
                filterExpressions = null;
            }
            if (sortExpressions != null) {
                query = cloneQuery(query);
                for (int i = 0; i < sortExpressions.length; i++) {
                    query.getSorts().add(sortExpressions[i]);
                }
                sortExpressions = null;
            }
            if (maxRows != -1) {
                query.setMaxRows(maxRows);
                maxRows = -1;
            }
            if (query instanceof IQueryDefinition) {
                while (iid != null) {
                    DataID dataId = iid.getDataID();
                    if (dataId != null) {
                        DataSetID dataSetId = dataId.getDataSetID();
                        long rowId = dataId.getRowID();
                        IResultIterator dataIter = executeQuery(dataSetId.toString(), rowId, queryId, (IQueryDefinition) query);
                        IResultMetaData metaData = getMetaDateByInstanceID(instanceId);
                        if (dataIter != null && metaData != null) {
                            return new ExtractionResults(dataIter, metaData, this.selectedColumns);
                        }
                        return null;
                    }
                    iid = iid.getParentID();
                }
                IResultIterator dataIter = executeQuery(null, -1, queryId, (QueryDefinition) query);
                IResultMetaData metaData = getMetaDateByInstanceID(instanceId);
                if (dataIter != null && metaData != null) {
                    return new ExtractionResults(dataIter, metaData, this.selectedColumns);
                }
                return null;
            } else {
                while (iid != null) {
                    DataID dataId = iid.getDataID();
                    if (dataId != null) {
                        DataSetID dataSetId = dataId.getDataSetID();
                        long rowId = dataId.getRowID();
                        IResultIterator dataIter = executeSubQuery(dataSetId, rowId, (ISubqueryDefinition) query);
                        IResultMetaData metaData = getMetaDateByInstanceID(instanceId);
                        if (dataIter != null && metaData != null) {
                            return new ExtractionResults(dataIter, metaData, this.selectedColumns);
                        }
                        return null;
                    }
                    iid = iid.getParentID();
                }
            }
        }
        iid = iid.getParentID();
    }
    return null;
}

Output:
                         if (dataIter != null && metaData != null) {
-                            return new ExtractionResults(dataIter, metaData, this.selectedColumns);
+                            return new ExtractionResults(dataIter, metaData, this.selectedColumns, startRow, maxRows);
                         }


Input:
public void testFlowLogs() throws Exception {
    testLogs("String_Node_Str", "String_Node_Str", "String_Node_Str", MockLogReader.TEST_NAMESPACE, null);
    try {
        testLogs("String_Node_Str", "String_Node_Str", "String_Node_Str", Constants.DEFAULT_NAMESPACE, null);
        Assert.fail();
    } catch (AssertionError e) {
    }
    testLogsFilter("String_Node_Str", "String_Node_Str", "String_Node_Str", MockLogReader.TEST_NAMESPACE, null);
    testLogsRunId("String_Node_Str", "String_Node_Str", "String_Node_Str", MockLogReader.TEST_NAMESPACE, null);
}

Output:
     }
-    testLogsFilter("String_Node_Str", "String_Node_Str", "String_Node_Str", MockLogReader.TEST_NAMESPACE, null);
-    testLogsRunId("String_Node_Str", "String_Node_Str", "String_Node_Str", MockLogReader.TEST_NAMESPACE, null);
+    Assert.fail();
 }


Input:
private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {
    Chart helperModel = currentChart.copyInstance();
    ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));
    if ((currentChart instanceof ChartWithAxes)) {
        Axis xAxis = ((ChartWithAxes) currentChart).getAxes().get(0);
        if (currentChart.getType().equals(TYPE_LITERAL)) {
            if (!currentChart.getSubType().equals(sNewSubType)) {
                currentChart.setSubType(sNewSubType);
                for (Axis yAxis : xAxis.getAssociatedAxes()) {
                    yAxis.setPercent(false);
                    for (SeriesDefinition ysd : yAxis.getSeriesDefinitions()) {
                        Series series = ysd.getDesignTimeSeries();
                        series.setStacked(false);
                        if (series instanceof StockSeries) {
                            ((StockSeries) series).setShowAsBarStick(BAR_STICK_SUBTYPE_LITERAL.equals(currentChart.getSubType()));
                        }
                    }
                }
            }
        } else {
            if (!currentChart.getType().equals(TYPE_LITERAL)) {
                currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData(), false));
            }
            currentChart.setType(TYPE_LITERAL);
            currentChart.getTitle().getLabel().getCaption().setValue(CHART_TITLE);
            xAxis.setCategoryAxis(true);
            currentChart.setSubType(sNewSubType);
            int seriesIndex = 0;
            for (Axis yAxis : xAxis.getAssociatedAxes()) {
                if (!ChartPreviewPainter.isLivePreviewActive()) {
                    yAxis.setType(AxisType.LINEAR_LITERAL);
                }
                yAxis.setPercent(false);
                for (SeriesDefinition ysd : yAxis.getSeriesDefinitions()) {
                    Series series = ysd.getDesignTimeSeries();
                    series = getConvertedSeries(series, seriesIndex);
                    series.setStacked(false);
                    ysd.getSeries().clear();
                    ysd.getSeries().add(series);
                    seriesIndex++;
                }
            }
        }
    } else {
        currentChart = ChartWithAxesImpl.create();
        currentChart.setType(TYPE_LITERAL);
        currentChart.setSubType(sNewSubType);
        ((ChartWithAxes) currentChart).setOrientation(newOrientation);
        currentChart.setDimension(getDimensionFor(sNewDimension));
        Axis xAxis = ((ChartWithAxes) currentChart).getAxes().get(0);
        xAxis.setOrientation(Orientation.HORIZONTAL_LITERAL);
        xAxis.setCategoryAxis(true);
        Axis yAxis = xAxis.getAssociatedAxes().get(0);
        yAxis.setOrientation(Orientation.VERTICAL_LITERAL);
        yAxis.setType(AxisType.LINEAR_LITERAL);
        currentChart.setBlock(helperModel.getBlock());
        currentChart.setDescription(helperModel.getDescription());
        currentChart.setGridColumnCount(helperModel.getGridColumnCount());
        currentChart.setSampleData(getConvertedSampleData(helperModel.getSampleData(), true));
        currentChart.setScript(helperModel.getScript());
        currentChart.setSeriesThickness(helperModel.getSeriesThickness());
        currentChart.setUnits(helperModel.getUnits());
        if (helperModel.getInteractivity() != null) {
            currentChart.getInteractivity().setEnable(helperModel.getInteractivity().isEnable());
            currentChart.getInteractivity().setLegendBehavior(helperModel.getInteractivity().getLegendBehavior());
        }
        if (helperModel.getType().equals(PieChart.TYPE_LITERAL) || helperModel.getType().equals(MeterChart.TYPE_LITERAL)) {
            xAxis.getSeriesDefinitions().clear();
            xAxis.getSeriesDefinitions().add(((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0));
            yAxis.getSeriesDefinitions().clear();
            yAxis.getSeriesDefinitions().addAll(xAxis.getSeriesDefinitions().get(0).getSeriesDefinitions());
            SeriesDefinition bsd = xAxis.getSeriesDefinitions().get(0);
            Series series = bsd.getDesignTimeSeries();
            bsd.getSeries().clear();
            bsd.getSeries().add(series);
            int j = 0;
            for (SeriesDefinition vsd : yAxis.getSeriesDefinitions()) {
                series = vsd.getDesignTimeSeries();
                series = getConvertedSeries(series, j++);
                series.getLabel().setVisible(false);
                series.setStacked(false);
                vsd.getSeries().clear();
                vsd.getSeries().add(series);
            }
        } else {
            return null;
        }
        currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
        currentChart.getTitle().getLabel().getCaption().setValue(CHART_TITLE);
    }
    if (currentChart instanceof ChartWithAxes && !((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) {
        ((ChartWithAxes) currentChart).setOrientation(newOrientation);
    }
    if (!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) {
        currentChart.setDimension(getDimensionFor(sNewDimension));
    }
    ChartUIUtil.restoreLabelPositionFromCache(currentChart);
    ChartUIUtil.updateDefaultAggregations(currentChart);
    return currentChart;
}

Output:
     ChartUIUtil.restoreLabelPositionFromCache(currentChart);
-    ChartUIUtil.updateDefaultAggregations(currentChart);
+    SeriesGrouping sg = ChartUtil.getBaseSeriesDefinitions(currentChart).get(0).getGrouping();
+    if (sg.getGroupType().getValue() == DataType.DATE_TIME) {
+        ChartUIUtil.updateDefaultAggregations(currentChart);
+    }
     return currentChart;


Input:
public static void checkForRequiredAnnotations(JointNlpEncoderPrm prm, AnnoSentenceCollection sents) {
    AnnoSentence sent = sents.get(0);
    if (prm.fePrm.srlFePrm.fePrm.useTemplates) {
        if (prm.fgPrm.includeSrl) {
            TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fePrm.srlFePrm.fePrm.soloTemplates);
            TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fePrm.srlFePrm.fePrm.pairTemplates);
        }
    }
    if (prm.fgPrm.includeDp) {
        TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fePrm.dpFePrm.firstOrderTpls);
        if (prm.fgPrm.dpPrm.grandparentFactors || prm.fgPrm.dpPrm.siblingFactors) {
            TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fePrm.dpFePrm.secondOrderTpls);
        }
    }
    if (prm.fgPrm.includeRel) {
        TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fgPrm.relPrm.templates);
    }
}

Output:
     }
-    if (prm.fgPrm.includeRel) {
+    if (prm.fgPrm.includeRel && prm.fgPrm.relPrm.templates != null) {
         TemplateLanguage.assertRequiredAnnotationTypes(sent, prm.fgPrm.relPrm.templates);


Input:
public void widgetSelected(SelectionEvent e) {
    if (ExecutionLanguage.JAVA == currentEngine) {
        try {
            DrillDownEditorInput input = new DrillDownEditorInput(analysis, currentDataEntity, itemEntity);
            if (input.computeColumnValueLength(input.filterAdaptDataList())) {
                CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, "String_Node_Str");
            } else {
                MessageDialog.openWarning(null, Messages.getString("String_Node_Str"), Messages.getString("String_Node_Str"));
            }
        } catch (PartInitException e1) {
            log.error(e1, e1);
        }
    } else {
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                Connection tdDataProvider = SwitchHelpers.CONNECTION_SWITCH.doSwitch(analysis.getContext().getConnection());
                String query = itemEntity.getQuery();
                String editorName = currentIndicator.getName();
                SqlExplorerUtils.getDefault().runInDQViewer(tdDataProvider, query, editorName);
            }
        });
    }
}

Output:
             DrillDownEditorInput input = new DrillDownEditorInput(analysis, currentDataEntity, itemEntity);
-            if (input.computeColumnValueLength(input.filterAdaptDataList())) {
+            if (SqlExplorerUtils.getDefault().getSqlexplorerService() != null) {
                 CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, "String_Node_Str");


Input:
public int getFilterType(IFilterDefinition filter, Set<DimLevel> dimLevelInCubeQuery) throws DataException {
    if (!(filter instanceof ICubeFilterDefinition)) {
        if (filter.getExpression() instanceof ICollectionConditionalExpression) {
            Collection<IScriptExpression> exprs = ((ICollectionConditionalExpression) (filter.getExpression())).getExpr();
            Set dimensionSet = new HashSet();
            Iterator<IScriptExpression> exprsIterator = exprs.iterator();
            while (exprsIterator.hasNext()) {
                Iterator dimLevels = OlapExpressionCompiler.getReferencedDimLevel(exprsIterator.next(), this.defn.getBindings()).iterator();
                while (dimLevels.hasNext()) dimensionSet.add(((DimLevel) dimLevels.next()).getDimensionName());
            }
            if (dimensionSet.size() == 1 && filter.updateAggregation())
                return CubeQueryExecutor.DIMENSION_FILTER;
            else
                return CubeQueryExecutor.FACTTABLE_FILTER;
        }
        return CubeQueryExecutor.DIMENSION_FILTER;
    }
    ICubeFilterDefinition cubeFilter = (ICubeFilterDefinition) filter;
    if (cubeFilter.getTargetLevel() != null) {
        return CubeQueryExecutor.DIMENSION_FILTER;
    } else {
        String measure = OlapExpressionCompiler.getReferencedScriptObject(filter.getExpression(), ScriptConstants.MEASURE_SCRIPTABLE);
        if (measure != null)
            return CubeQueryExecutor.FACTTABLE_FILTER;
        List bindingName = ExpressionCompilerUtil.extractColumnExpression(filter.getExpression(), ScriptConstants.DATA_BINDING_SCRIPTABLE);
        if (bindingName.size() > 0) {
            List bindingList = new ArrayList();
            bindingList.addAll(this.defn.getBindings());
            if (this.defn instanceof PreparedCubeQueryDefinition)
                bindingList.addAll(((PreparedCubeQueryDefinition) this.defn).getBindingsForNestAggregation());
            if (existAggregationBinding(bindingName, bindingList))
                return CubeQueryExecutor.AGGR_MEASURE_FILTER;
            Set targetDimLevel = OlapExpressionCompiler.getReferencedDimLevel(filter.getExpression(), this.defn.getBindings());
            if (!targetDimLevel.isEmpty() && targetDimLevel.size() == 1) {
                return CubeQueryExecutor.DIMENSION_FILTER;
            }
            if (!filter.updateAggregation()) {
                List derivedBindingNameList = new ArrayList();
                for (int i = 0; i < bindingName.size(); i++) {
                    IBinding binding = getBinding(bindingName.get(i).toString(), this.defn.getBindings());
                    if (binding != null) {
                        List temp = ExpressionCompilerUtil.extractColumnExpression(binding.getExpression(), ScriptConstants.DATA_BINDING_SCRIPTABLE);
                        if (temp != null && temp.size() > 0)
                            derivedBindingNameList.addAll(temp);
                    }
                }
                if (derivedBindingNameList.size() > 0) {
                    if (existAggregationBinding(derivedBindingNameList, this.defn.getBindings()))
                        return CubeQueryExecutor.AGGR_MEASURE_FILTER;
                }
            }
            List derivedBindingNameList = new ArrayList();
            for (int i = 0; i < bindingName.size(); i++) {
                IBinding binding = getBinding(bindingName.get(i).toString(), this.defn.getBindings());
                if (binding != null) {
                    List temp = ExpressionCompilerUtil.extractColumnExpression(binding.getExpression(), ScriptConstants.DATA_BINDING_SCRIPTABLE);
                    if (temp != null && temp.size() > 0)
                        derivedBindingNameList.addAll(temp);
                }
            }
            if (derivedBindingNameList.size() > 0) {
                if (existAggregationBinding(derivedBindingNameList, this.defn.getBindings()))
                    return CubeQueryExecutor.AGGR_MEASURE_FILTER;
            }
            return CubeQueryExecutor.FACTTABLE_FILTER;
        } else {
            List dimensionName = ExpressionCompilerUtil.extractColumnExpression(filter.getExpression(), ScriptConstants.DIMENSION_SCRIPTABLE);
            if (dimensionName.size() > 1) {
                return FACTTABLE_FILTER;
            }
            return DIMENSION_FILTER;
        }
    }
}

Output:
             bindingList.addAll(this.defn.getBindings());
-            if (this.defn instanceof PreparedCubeQueryDefinition)
-                bindingList.addAll(((PreparedCubeQueryDefinition) this.defn).getBindingsForNestAggregation());
+            List nestedCubeOperation = new ArrayList();
+            if (this.defn instanceof PreparedCubeQueryDefinition) {
+                nestedCubeOperation.addAll(((PreparedCubeQueryDefinition) this.defn).getBindingsForNestAggregation());
+            }
             if (existAggregationBinding(bindingName, bindingList))


Input:
void drawItemDataDurations(Item item, Rectangle rect, long time0, long time1, long endTime, long selectedTime, GC gc) {
    if (rect.isEmpty())
        return;
    if (time1 <= time0) {
        gc.setBackground(_colors.getBkColor(false, false, false));
        gc.fillRectangle(rect);
        return;
    }
    Utils.init(_rect1, rect);
    boolean selected = item._selected;
    double pixelsPerNanoSec = (rect.width <= RIGHT_MARGIN) ? 0 : (double) (rect.width - RIGHT_MARGIN) / (time1 - time0);
    boolean group = item instanceof GroupItem;
    if (group) {
    } else if (item instanceof TraceItem) {
        ITmfTimeAnalysisEntry trace = ((TraceItem) item)._trace;
        double x0 = rect.x;
        long maxDuration = (_timeProvider.getTimeSpace() == 0) ? Long.MAX_VALUE : 1 * (_timeProvider.getTime1() - _timeProvider.getTime0()) / _timeProvider.getTimeSpace();
        Iterator<ITimeEvent> iterator = trace.getTraceEventsIterator(_timeProvider.getTime0(), _timeProvider.getTime1(), maxDuration);
        _rect1.y += 3;
        _rect1.height -= 6;
        int xEnd = rect.x + rect.width;
        fillSpace(rect, gc, selected);
        if (iterator.hasNext()) {
            ITimeEvent currEvent = iterator.next();
            ITimeEvent nextEvent = null;
            long currEventTime = currEvent.getTime();
            long currEventDuration = currEvent.getDuration();
            long nextEventTime = currEventTime;
            double step = (double) ((currEventTime - time0) * pixelsPerNanoSec);
            x0 = rect.x + step;
            double x1 = -1;
            int idx = 1;
            double xNext = 0;
            while (null != currEvent) {
                boolean stopped = false;
                currEventDuration = currEvent.getDuration();
                if (iterator.hasNext()) {
                    nextEvent = iterator.next();
                    nextEventTime = nextEvent.getTime();
                    idx++;
                } else if (stopped) {
                    nextEvent = null;
                    nextEventTime = time1;
                } else {
                    nextEvent = null;
                    nextEventTime = endTime;
                }
                xNext = rect.x + (double) ((nextEventTime - time0) * pixelsPerNanoSec);
                if (currEventDuration < 0) {
                    x1 = rect.x + (double) ((nextEventTime - time0) * pixelsPerNanoSec);
                } else if (currEventDuration == 0) {
                    x1 = x0;
                } else {
                    x1 = x0 + (double) ((currEventDuration) * pixelsPerNanoSec);
                }
                if (currEventDuration != 0) {
                    x1 = x1 > xNext ? xNext : x1;
                }
                if (x1 >= rect.x && x0 <= xEnd) {
                    if (currEventDuration != 0) {
                        x0 = (double) (x0 >= rect.x ? x0 : rect.x);
                        _rect1.width = (int) Math.ceil(x1 <= xEnd ? x1 : xEnd) - (int) x0;
                    } else {
                        _rect1.width = 1;
                    }
                    _rect1.width = Math.max(_minimumItemWidth, _rect1.width);
                    _rect1.x = (int) x0;
                    boolean timeSelected = currEventTime <= selectedTime && selectedTime < nextEventTime;
                    utilImpl.drawState(_colors, currEvent, _rect1, gc, selected, false, timeSelected);
                    _rect1.x += _rect1.width;
                    x0 = _rect1.x;
                }
                currEvent = nextEvent;
                currEventTime = nextEventTime;
                x0 = rect.x + (double) ((nextEventTime - time0) * pixelsPerNanoSec);
            }
        }
    }
    int x = rect.x + (int) ((double) (selectedTime - time0) * pixelsPerNanoSec);
    if (x >= rect.x && x < rect.x + rect.width) {
        gc.setForeground(_colors.getColor(TraceColorScheme.SELECTED_TIME));
        if (group)
            gc.drawLine(x, rect.y + rect.height - 1, x, rect.y + rect.height);
        else
            gc.drawLine(x, rect.y, x, rect.y + rect.height);
    }
}

Output:
                         x0 = (double) (x0 >= rect.x ? x0 : rect.x);
-                        _rect1.width = (int) Math.ceil(x1 <= xEnd ? x1 : xEnd) - (int) x0;
+                        _rect1.width = (int) ((x1 <= xEnd ? x1 : xEnd) - x0);
                     } else {


Input:
public static Locale getLocaleFromString(String locale) {
    if (locale == null || locale.length() <= 0) {
        return null;
    }
    int index = locale.indexOf('_');
    if (index != -1) {
        String language = locale.substring(0, index);
        String country = locale.substring(index + 1);
        return new Locale(language, country);
    }
    return new Locale(locale);
}

Output:
     }
-    int index = locale.indexOf('_');
-    if (index != -1) {
-        String language = locale.substring(0, index);
-        String country = locale.substring(index + 1);
-        return new Locale(language, country);
+    String[] sp = locale.split("String_Node_Str");
+    if (sp.length == 1) {
+        return new Locale(locale);
+    } else if (sp.length == 2) {
+        return new Locale(sp[0], sp[1]);
+    } else {
+        return new Locale(sp[0], sp[1], sp[2]);
     }


Input:
private void elemAccount() {
    int elemNum = 0;
    for (int i = 0; i < playerNum; i++) {
        if (map.units[allPlayers[i].preLoc].status == 2) {
            allPlayers[i].hasElem = true;
            elementList[i] = 1;
            for (int j = 0; j < playerNum; j++) {
                if (elementList[j] == 1)
                    elemNum += 1;
            }
        }
    }
}

Output:
     int elemNum = 0;
-    for (int i = 0; i < playerNum; i++) {
-        if (map.units[allPlayers[i].preLoc].status == 2) {
-            allPlayers[i].hasElem = true;
-            elementList[i] = 1;
-            for (int j = 0; j < playerNum; j++) {
-                if (elementList[j] == 1)
-                    elemNum += 1;
+    if (accountNum == 0) {
+        for (int i = 0; i < playerNum; i++) {
+            if (map.units[allPlayers[i].preLoc].status == 2) {
+                allPlayers[i].hasElem = true;
+                elementList[i] = 1;
+                for (int j = 0; j < playerNum; j++) {
+                    if (elementList[j] == 1)
+                        elemNum += 1;
+                }
             }


Input:
public void onNeighborBlockChange() {
    wasPowered = isPowered;
    isPowered = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
    if (wasPowered != isPowered && sendRedstoneUpdates()) {
        GenericTEPacket.sendRSPowerUpdatePacketToClients(this, worldObj, xCoord, yCoord, zCoord);
        onRedstoneUpdate();
    }
}

Output:
     if (wasPowered != isPowered && sendRedstoneUpdates()) {
-        GenericTEPacket.sendRSPowerUpdatePacketToClients(this, worldObj, xCoord, yCoord, zCoord);
+        PacketTEBase.sendRSPowerUpdatePacketToClients(this, worldObj, xCoord, yCoord, zCoord);
         onRedstoneUpdate();


Input:
private void handleScalingDownBeyondMin(InstanceContext instanceContext, NetworkPartitionContext nwPartitionContext) {
    boolean allChildrenScaleDown = false;
    for (Monitor monitor : this.aliasToActiveMonitorsMap.values()) {
        if (instanceContext.getScalingDownBeyondMinEvent(monitor.getId()) == null) {
            allChildrenScaleDown = false;
            break;
        } else {
            allChildrenScaleDown = true;
        }
    }
    if (allChildrenScaleDown) {
        if (hasScalingDependents) {
            if (nwPartitionContext.getNonTerminatedInstancesCount() > ((GroupLevelNetworkPartitionContext) nwPartitionContext).getMinInstanceCount()) {
                float minInstances = ((GroupLevelNetworkPartitionContext) nwPartitionContext).getMinInstanceCount();
                float factor = (nwPartitionContext.getNonTerminatedInstancesCount() - 1) / minInstances;
                ScalingEvent scalingEvent = new ScalingEvent(this.id, nwPartitionContext.getId(), instanceContext.getId(), factor);
                this.parent.onChildScalingEvent(scalingEvent);
            } else {
                ScalingDownBeyondMinEvent newScalingDownBeyondMinEvent = new ScalingDownBeyondMinEvent(this.id, nwPartitionContext.getId(), instanceContext.getParentInstanceId());
                this.parent.onChildScalingDownBeyondMinEvent(newScalingDownBeyondMinEvent);
            }
        } else {
            if (groupScalingEnabled) {
                if (nwPartitionContext.getNonTerminatedInstancesCount() > ((GroupLevelNetworkPartitionContext) nwPartitionContext).getMinInstanceCount()) {
                    ApplicationBuilder.handleGroupTerminatingEvent(this.appId, this.id, instanceContext.getId());
                }
            } else {
                ScalingDownBeyondMinEvent newScalingDownBeyondMinEvent = new ScalingDownBeyondMinEvent(this.id, nwPartitionContext.getId(), instanceContext.getParentInstanceId());
                this.parent.onChildScalingDownBeyondMinEvent(newScalingDownBeyondMinEvent);
            }
        }
    }
    instanceContext.setIdToScalingDownBeyondMinEvent(new HashMap<String, ScalingDownBeyondMinEvent>());
}

Output:
     }
-    instanceContext.setIdToScalingDownBeyondMinEvent(new HashMap<String, ScalingDownBeyondMinEvent>());
+    instanceContext.setIdToScalingDownBeyondMinEvent(new ConcurrentHashMap<String, ScalingDownBeyondMinEvent>());
 }


Input:
protected Request documentExistsRequest(final String key, final DocumentExistsOptions options) {
    final Request request;
    request = new Request(db, RequestType.HEAD, executor.createPath(ArangoDBConstants.PATH_API_DOCUMENT, createDocumentHandle(key)));
    final DocumentExistsOptions params = (options != null ? options : new DocumentExistsOptions());
    request.putHeaderParam(ArangoDBConstants.IF_MATCH, params.getIfMatch());
    request.putHeaderParam(ArangoDBConstants.IF_NONE_MATCH, params.getIfNoneMatch());
    return request;
}

Output:
     final Request request;
-    request = new Request(db, RequestType.HEAD, executor.createPath(ArangoDBConstants.PATH_API_DOCUMENT, createDocumentHandle(key)));
+    request = new Request(db, RequestType.HEAD, executor.createPath(ArangoDBConstants.PATH_API_DOCUMENT, executor.createDocumentHandle(name, key)));
     final DocumentExistsOptions params = (options != null ? options : new DocumentExistsOptions());


Input:
protected SailRepository getRepository() {
    return environment.getRepository();
}

Output:
 protected SailRepository getRepository() {
-    return environment.getRepository();
+    return environment.getSailRepository();
 }


Input:
public Element serialize(User user) {
    Element userElement = DocumentHelper.createElement(USER);
    userElement.addElement(USER_NAME).addText(user.getLogin());
    userElement.addElement(USER_PASSWORD).addText(notNull(user.getPasswd()));
    userElement.addElement(USER_EMAIL).addText(notNull(user.getEmail()));
    userElement.addElement(USER_ROLES).addText(user.getRoles().toString());
    userElement.addElement(USER_STATUS).addText(notNull(user.getStatus()));
    userElement.addElement(USER_CTIME, getStringTimestamp(user.getCTime()));
    userElement.addElement(USER_MTIME, getStringTimestamp(user.getMTime()));
    userElement.addElement(USER_LAST_ACCESS, getStringTimestamp(user.getLastAccess()));
    userElement.addElement(USER_LAST_LOGIN, getStringTimestamp(user.getLastLogin()));
    userElement.addElement(USER_LAST_LOGOUT, getStringTimestamp(user.getLastLogout()));
    userElement.addElement(USER_APPLICATION, notNull(user.getApplication()));
    return userElement;
}

Output:
     userElement.addElement(USER_STATUS).addText(notNull(user.getStatus()));
-    userElement.addElement(USER_CTIME, getStringTimestamp(user.getCTime()));
-    userElement.addElement(USER_MTIME, getStringTimestamp(user.getMTime()));
-    userElement.addElement(USER_LAST_ACCESS, getStringTimestamp(user.getLastAccess()));
-    userElement.addElement(USER_LAST_LOGIN, getStringTimestamp(user.getLastLogin()));
-    userElement.addElement(USER_LAST_LOGOUT, getStringTimestamp(user.getLastLogout()));
-    userElement.addElement(USER_APPLICATION, notNull(user.getApplication()));
+    userElement.addElement(USER_CTIME).addText(getStringTimestamp(user.getCTime()));
+    userElement.addElement(USER_MTIME).addText(getStringTimestamp(user.getMTime()));
+    userElement.addElement(USER_LAST_ACCESS).addText(getStringTimestamp(user.getLastAccess()));
+    userElement.addElement(USER_LAST_LOGIN).addText(getStringTimestamp(user.getLastLogin()));
+    userElement.addElement(USER_LAST_LOGOUT).addText(getStringTimestamp(user.getLastLogout()));
+    userElement.addElement(USER_APPLICATION).addText(notNull(user.getApplication()));
     return userElement;


Input:
protected void fireInvitationReceived(ID roomID, ID fromID, ID toID, String subject, String body) {
    for (Iterator i = invitationListeners.iterator(); i.hasNext(); ) {
        IInvitationListener l = (IInvitationListener) i.next();
        l.handleInvitationReceived(roomID, fromID, toID, subject, body);
    }
}

Output:
         IInvitationListener l = (IInvitationListener) i.next();
-        l.handleInvitationReceived(roomID, fromID, toID, subject, body);
+        l.handleInvitationReceived(roomID, fromID, subject, body);
     }


Input:
public Map<String, Object> extraDataToReturnForTokenEndpoint(Map<String, String> parameters, CoreToken token) {
    final Map<String, Object> map = new HashMap<String, Object>();
    final Set<String> scope = token.getScope();
    if (scope != null && scope.contains("String_Node_Str")) {
        final Map.Entry<String, String> tokenEntry;
        try {
            tokenEntry = openIDTokenIssuer.issueToken(new AccessTokenToLegacyAdapter(token), requestFactory.create(Request.getCurrent()));
        } catch (ServerException e) {
            throw OAuthProblemException.OAuthError.SERVER_ERROR.handle(null, e.getMessage());
        } catch (InvalidClientException e) {
            throw OAuthProblemException.OAuthError.INVALID_CLIENT.handle(null, e.getMessage());
        } catch (InvalidGrantException e) {
            throw OAuthProblemException.OAuthError.INVALID_GRANT.handle(null, e.getMessage());
        }
        if (tokenEntry != null) {
            map.put(tokenEntry.getKey(), tokenEntry.getValue());
        }
    }
    return map;
}

Output:
     final Set<String> scope = token.getScope();
-    if (scope != null && scope.contains("String_Node_Str")) {
+    if (scope != null && scope.contains(OPENID_SCOPE)) {
         final Map.Entry<String, String> tokenEntry;