Input:
private IAttackable getEnemyInSearchArea(byte searchingPlayer, HexGridArea area, boolean isBowman) {
    for (ShortPoint2D curr : area) {
        short x = curr.x;
        short y = curr.y;
        if (0 <= x && x < width && 0 <= y && y < height) {
            IAttackable currAttackable = movableGrid.getMovableAt(x, y);
            if (currAttackable == null && !isBowman) {
                currAttackable = (IAttackable) objectsGrid.getMapObjectAt(x, y, EMapObjectType.ATTACKABLE_TOWER);
            }
            if (currAttackable != null && MovableGrid.isEnemy(searchingPlayer, currAttackable)) {
                return currAttackable;
            }
        }
    }
    return null;
}

Output:
             IAttackable currAttackable = movableGrid.getMovableAt(x, y);
-            if (currAttackable == null && !isBowman) {
+            if (includeTowers && !isBowman && currAttackable == null) {
                 currAttackable = (IAttackable) objectsGrid.getMapObjectAt(x, y, EMapObjectType.ATTACKABLE_TOWER);


Input:
public Object execute(ExecutionEvent event) {
    TestCaseBrowser tcb = MultipleTCBTracker.getInstance().getMainTCB();
    if (!(tcb.getSelection() instanceof IStructuredSelection)) {
        return null;
    }
    IStructuredSelection sel = (IStructuredSelection) tcb.getSelection();
    List<INodePO> selectionList = sel.toList();
    if (!closeRelatedEditors(selectionList)) {
        return null;
    }
    ProblemSet moveProblems = getMoveProblem(selectionList);
    if (moveProblems.getProblems().isEmpty()) {
        Set<IReusedProjectPO> reusedProjects = GeneralStorage.getInstance().getProject().getUsedProjects();
        List<String> projectNamesList = new ArrayList<String>();
        for (IReusedProjectPO project : reusedProjects) {
            projectNamesList.add(project.getName());
        }
        String[] projectNames = projectNamesList.toArray(new String[projectNamesList.size()]);
        ReusedProjectSelectionDialog dialog = new ReusedProjectSelectionDialog(Plugin.getShell(), projectNames, Messages.MoveTestCaseDialogShellTitle, Messages.MoveTestCaseDialogMessage, IconConstants.MOVE_TC_DIALOG_STRING, Messages.MoveTestCaseDialogShellTitle);
        dialog.setHelpAvailable(true);
        dialog.create();
        DialogUtils.setWidgetNameForModalDialog(dialog);
        Plugin.getHelpSystem().setHelp(dialog.getShell(), ContextHelpIds.TESTCASE_MOVE_EXTERNAL);
        dialog.open();
        if (dialog.getReturnCode() == Window.OK) {
            String selectedName = dialog.getSelectedName();
            IReusedProjectPO selectedProject = null;
            for (IReusedProjectPO project : reusedProjects) {
                if (selectedName.equals(project.getName())) {
                    selectedProject = project;
                    break;
                }
            }
            doMove(tcb, selectionList, selectedProject);
        }
    } else {
        showProblems(moveProblems);
    }
    return null;
}

Output:
     List<INodePO> selectionList = sel.toList();
-    if (!closeRelatedEditors(selectionList)) {
+    List<INodePO> nodesToMove = new ArrayList<INodePO>();
+    for (INodePO node : selectionList) {
+        MultipleNodePM.collectAffectedNodes(nodesToMove, node);
+    }
+    if (!closeRelatedEditors(nodesToMove)) {
         return null;


Input:
public boolean isExitBlock() {
    return original.isExitBlock();
}

Output:
 public boolean isExitBlock() {
-    return original.isExitBlock();
+    return instructionIndex == EXIT_INDEX;
 }


Input:
public AbstractProperties getProperties() {
    return new PropertiesImpl(this.properties.getAny());
}

Output:
 public AbstractProperties getProperties() {
-    return new PropertiesImpl(this.properties.getAny());
+    if (this.properties.getAny() != null) {
+        return new PropertiesImpl(this.properties.getAny());
+    } else {
+        return null;
+    }
 }


Input:
private static void refreshMasterSession(ITransaction op) throws PMRefreshFailedException {
    if (op.getToRefresh() == null || op.getToRefresh().isEmpty()) {
        return;
    }
    try {
        EntityManager master = GeneralStorage.getInstance().getMasterSession();
        for (IPersistentObject po : op.getToRefresh()) {
            po = master.find(po.getClass(), po.getId());
            if (po != null) {
                master.refresh(po);
            }
            if (po instanceof INodePO) {
                ((INodePO) po).getUnmodifiableNodeList();
            }
        }
    } catch (Exception e) {
        throw new PMRefreshFailedException(e);
    }
}

Output:
 private static void refreshMasterSession(ITransaction op) throws PMRefreshFailedException {
-    if (op.getToRefresh() == null || op.getToRefresh().isEmpty()) {
+    Collection<? extends IPersistentObject> toRefresh = op.getToRefresh();
+    if (toRefresh == null || toRefresh.isEmpty()) {
         return;


Input:
private void testFactTableSaveAndLoad2(IDocumentManager documentManager) throws IOException, BirtException {
    Dimension[] dimensions = new Dimension[3];
    ILevelDefn[] levelDefs = new ILevelDefn[1];
    String[] levelNames = new String[1];
    levelNames[0] = "String_Node_Str";
    DimensionForTest iterator = new DimensionForTest(levelNames);
    iterator.setLevelMember(0, distinct(LevelsAndFactTableDataset.dimension1Col));
    levelDefs[0] = new LevelDefinition("String_Node_Str", new String[] { "String_Node_Str" }, null);
    dimensions[0] = (Dimension) DimensionFactory.createDimension("String_Node_Str", documentManager, iterator, levelDefs, false);
    IHierarchy hierarchy = dimensions[0].getHierarchy();
    assertEquals(hierarchy.getName(), "String_Node_Str");
    levelNames = new String[1];
    levelNames[0] = "String_Node_Str";
    iterator = new DimensionForTest(levelNames);
    iterator.setLevelMember(0, distinct(LevelsAndFactTableDataset.dimension2Col));
    levelDefs[0] = new LevelDefinition("String_Node_Str", new String[] { "String_Node_Str" }, null);
    dimensions[1] = (Dimension) DimensionFactory.createDimension("String_Node_Str", documentManager, iterator, levelDefs, false);
    hierarchy = dimensions[1].getHierarchy();
    assertEquals(hierarchy.getName(), "String_Node_Str");
    levelNames = new String[1];
    levelNames[0] = "String_Node_Str";
    iterator = new DimensionForTest(levelNames);
    iterator.setLevelMember(0, distinct(LevelsAndFactTableDataset.dimension3Col));
    levelDefs[0] = new LevelDefinition("String_Node_Str", new String[] { "String_Node_Str" }, null);
    dimensions[2] = (Dimension) DimensionFactory.createDimension("String_Node_Str", documentManager, iterator, levelDefs, false);
    hierarchy = dimensions[2].getHierarchy();
    assertEquals(hierarchy.getName(), "String_Node_Str");
    IDatasetIterator factTableIterator = new LevelsAndFactTableDataset();
    String[] measureColumnName = new String[2];
    measureColumnName[0] = "String_Node_Str";
    measureColumnName[1] = "String_Node_Str";
    FactTableAccessor factTableConstructor = new FactTableAccessor(documentManager);
    FactTable factTable = factTableConstructor.saveFactTable(NamingUtil.getFactTableName("String_Node_Str"), CubeUtility.getKeyColNames(dimensions), factTableIterator, dimensions, measureColumnName, new StopSign());
    assertEquals(factTable.getSegmentCount(), 1);
    factTable = factTableConstructor.load(NamingUtil.getFactTableName("String_Node_Str"), new StopSign());
    assertEquals(factTable.getSegmentCount(), 1);
    assertEquals(factTable.getDimensionInfo()[0].dimensionName, "String_Node_Str");
    assertEquals(factTable.getDimensionInfo()[0].dimensionLength, 3);
    assertEquals(factTable.getDimensionInfo()[1].dimensionName, "String_Node_Str");
    assertEquals(factTable.getDimensionInfo()[1].dimensionLength, 7);
    assertEquals(factTable.getDimensionInfo()[2].dimensionName, "String_Node_Str");
    assertEquals(factTable.getDimensionInfo()[2].dimensionLength, 14);
    assertEquals(factTable.getMeasureInfo()[0].measureName, "String_Node_Str");
    assertEquals(factTable.getMeasureInfo()[0].dataType, DataType.INTEGER_TYPE);
    assertEquals(factTable.getMeasureInfo()[1].measureName, "String_Node_Str");
    assertEquals(factTable.getMeasureInfo()[1].dataType, DataType.DOUBLE_TYPE);
    String[] dimensionNames = new String[3];
    dimensionNames[0] = "String_Node_Str";
    dimensionNames[1] = "String_Node_Str";
    dimensionNames[2] = "String_Node_Str";
    IDiskArray[] dimensionPosition = new IDiskArray[3];
    dimensionPosition[0] = new BufferedPrimitiveDiskArray();
    dimensionPosition[0].add(new Integer(1));
    dimensionPosition[0].add(new Integer(2));
    dimensionPosition[1] = new BufferedPrimitiveDiskArray();
    dimensionPosition[1].add(new Integer(1));
    dimensionPosition[1].add(new Integer(2));
    dimensionPosition[2] = new BufferedPrimitiveDiskArray();
    dimensionPosition[2].add(new Integer(1));
    dimensionPosition[2].add(new Integer(2));
    dimensionPosition[2].add(new Integer(3));
    dimensionPosition[2].add(new Integer(4));
    dimensionPosition[2].add(new Integer(5));
    dimensionPosition[2].add(new Integer(6));
    FactTableRowIterator facttableRowIterator = new FactTableRowIterator(factTable, dimensionNames, dimensionPosition, new StopSign());
    assertTrue(facttableRowIterator != null);
    assertTrue(facttableRowIterator.next());
    assertEquals(1, facttableRowIterator.getDimensionPosition(0));
    assertEquals(2, facttableRowIterator.getDimensionPosition(1));
    assertEquals(5, facttableRowIterator.getDimensionPosition(2));
    assertEquals(new Integer(211), facttableRowIterator.getMeasure(0));
    assertEquals(new Double(211), facttableRowIterator.getMeasure(1));
    assertTrue(facttableRowIterator.next());
    assertEquals(1, facttableRowIterator.getDimensionPosition(0));
    assertEquals(2, facttableRowIterator.getDimensionPosition(1));
    assertEquals(6, facttableRowIterator.getDimensionPosition(2));
    assertEquals(new Integer(212), facttableRowIterator.getMeasure(0));
    assertEquals(new Double(212), facttableRowIterator.getMeasure(1));
    assertFalse(facttableRowIterator.next());
}

Output:
     FactTableAccessor factTableConstructor = new FactTableAccessor(documentManager);
-    FactTable factTable = factTableConstructor.saveFactTable(NamingUtil.getFactTableName("String_Node_Str"), CubeUtility.getKeyColNames(dimensions), factTableIterator, dimensions, measureColumnName, new StopSign());
+    FactTable factTable = factTableConstructor.saveFactTable(NamingUtil.getFactTableName("String_Node_Str"), CubeUtility.getKeyColNames(dimensions), CubeUtility.getKeyColNames(dimensions), factTableIterator, dimensions, measureColumnName, new StopSign());
     assertEquals(factTable.getSegmentCount(), 1);


Input:
public static void main(String[] args) {
    Map<String, CliOption> options = null;
    try {
        options = utils.getDefaultAdminToolOptions(true);
        List<String> arguments = new ArrayList<String>(1);
        CliOption oDir = new CliOption(CliOption.OPTIONTYPE.URL, "String_Node_Str", "String_Node_Str");
        oDir.urlDefaultPort = PORTS.DIR_PBRPC_PORT_DEFAULT.getNumber();
        oDir.urlDefaultProtocol = Schemes.SCHEME_PBRPC;
        options.put("String_Node_Str", oDir);
        options.put("String_Node_Str", new CliOption(CliOption.OPTIONTYPE.SWITCH, "String_Node_Str", "String_Node_Str"));
        options.put("String_Node_Str", new CliOption(CliOption.OPTIONTYPE.SWITCH, "String_Node_Str", "String_Node_Str"));
        CLIParser.parseCLI(args, options, arguments);
        if (options.get("String_Node_Str").switchValue) {
            Logging.start(Logging.LEVEL_DEBUG);
        } else {
            Logging.start(Logging.LEVEL_ERROR);
        }
        if (options.get(utils.OPTION_HELP).switchValue || options.get(utils.OPTION_HELP_LONG).switchValue) {
            usage(options);
            return;
        }
        if (arguments.size() != 1) {
            error("String_Node_Str", options);
        }
        ONCRPCServiceURL dirURL = options.get("String_Node_Str").urlValue;
        boolean shutdown = options.get("String_Node_Str").switchValue;
        String password = (options.get(utils.OPTION_ADMIN_PASS).stringValue != null) ? options.get(utils.OPTION_ADMIN_PASS).stringValue : "String_Node_Str";
        boolean useSSL = false;
        boolean gridSSL = false;
        String serviceCredsFile = null;
        String serviceCredsPass = null;
        String trustedCAsFile = null;
        String trustedCAsPass = null;
        InetSocketAddress dirAddr = null;
        String osdUUID = null;
        if (arguments.get(0).startsWith("String_Node_Str")) {
            osdUUID = arguments.get(0).substring("String_Node_Str".length());
        } else {
            error("String_Node_Str", options);
        }
        if (dirURL != null && (Schemes.SCHEME_PBRPCS.equals(dirURL.getProtocol()) || Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol()))) {
            useSSL = true;
            serviceCredsFile = options.get(utils.OPTION_USER_CREDS_FILE).stringValue;
            serviceCredsPass = options.get(utils.OPTION_USER_CREDS_PASS).stringValue;
            trustedCAsFile = options.get(utils.OPTION_TRUSTSTORE_FILE).stringValue;
            trustedCAsPass = options.get(utils.OPTION_TRUSTSTORE_PASS).stringValue;
            if (Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol())) {
                gridSSL = true;
            }
            if (serviceCredsFile == null) {
                System.out.println("String_Node_Str" + utils.OPTION_USER_CREDS_FILE + "String_Node_Str");
                usage(options);
                System.exit(1);
            } else if (trustedCAsFile == null) {
                System.out.println("String_Node_Str" + utils.OPTION_TRUSTSTORE_FILE + "String_Node_Str");
                usage(options);
                System.exit(1);
            }
        }
        if (dirURL == null) {
            try {
                DefaultDirConfig cfg = new DefaultDirConfig(DEFAULT_DIR_CONFIG);
                cfg.read();
                dirAddr = cfg.getDirectoryService();
                useSSL = cfg.isSslEnabled();
                serviceCredsFile = cfg.getServiceCredsFile();
                serviceCredsPass = cfg.getServiceCredsPassphrase();
                trustedCAsFile = cfg.getTrustedCertsFile();
                trustedCAsPass = cfg.getTrustedCertsPassphrase();
            } catch (IOException e) {
                error("String_Node_Str", options);
            }
        } else {
            dirAddr = new InetSocketAddress(dirURL.getHost(), dirURL.getPort());
        }
        SSLOptions sslOptions = useSSL ? new SSLOptions(new FileInputStream(serviceCredsFile), serviceCredsPass, SSLOptions.PKCS12_CONTAINER, new FileInputStream(trustedCAsFile), trustedCAsPass, SSLOptions.JKS_CONTAINER, false, gridSSL, null) : null;
        xtfs_remove_osd removeOsd = new xtfs_remove_osd(dirAddr, osdUUID, sslOptions, password);
        removeOsd.initialize();
        removeOsd.drainOSD(shutdown);
        removeOsd.shutdown();
        System.exit(0);
    } catch (Exception e) {
        error(e.getMessage(), options);
    }
}

Output:
         if (arguments.size() != 1) {
-            error("String_Node_Str", options);
+            error("String_Node_Str", options, false);
         }


Input:
private void regenList(NBTTagCompound data) {
    byId.clear();
    diList.clear();
    IActionHost host = getActionHost();
    if (host != null) {
        IGridNode agn = host.getActionableNode();
        if (agn.isActive()) {
            for (IGridNode gn : g.getMachines(TileInterface.class)) {
                IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
                DualityInterface dual = ih.getInterfaceDuality();
                diList.put(ih, new InvTracker(dual, dual.getPatterns(), dual.getTermName()));
            }
            for (IGridNode gn : g.getMachines(PartInterface.class)) {
                IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
                DualityInterface dual = ih.getInterfaceDuality();
                diList.put(ih, new InvTracker(dual, dual.getPatterns(), dual.getTermName()));
            }
        }
    }
    data.setBoolean("String_Node_Str", true);
    for (Entry<IInterfaceHost, InvTracker> en : diList.entrySet()) {
        InvTracker inv = en.getValue();
        byId.put(inv.which, inv);
        addItems(data, inv, 0, inv.server.getSizeInventory());
    }
}

Output:
                 DualityInterface dual = ih.getInterfaceDuality();
-                diList.put(ih, new InvTracker(dual, dual.getPatterns(), dual.getTermName()));
+                if (gn.isActive())
+                    diList.put(ih, new InvTracker(dual, dual.getPatterns(), dual.getTermName()));
             }


Input:
public Vector<Actor> estimateSequencedSchedule(List<SequenceAttribute> independentList) throws NotSchedulableException {
    if (_actorGraph.isAcyclic()) {
        return _estimator.estimateSequencedSchedule(independentList);
    } else {
        throw new NotSchedulableException("String_Node_Str");
    }
}

Output:
 public Vector<Actor> estimateSequencedSchedule(List<SequenceAttribute> independentList) throws NotSchedulableException {
-    if (_actorGraph.isAcyclic()) {
+    if (_actorGraph == null) {
+        return _estimator.estimateSequencedSchedule(independentList);
+    } else if (_actorGraph.isAcyclic()) {
         return _estimator.estimateSequencedSchedule(independentList);


Input:
public DataSet[] populate(Object oResultSetDef) throws ChartException {
    DataSet[] ds = new DataSet[0];
    if (oResultSetDef instanceof IResultSetDataSet) {
        final IResultSetDataSet rsds = (IResultSetDataSet) oResultSetDef;
        final long lRowCount = rsds.getSize();
        if (lRowCount <= 0) {
            throw new ChartException(ChartEnginePlugin.ID, ChartException.ZERO_DATASET, "String_Node_Str", Messages.getResourceBundle());
        }
        final int columnCount = rsds.getColumnCount();
        ds = new DataSet[columnCount];
        final String[][] saDataSet = new String[columnCount][(int) lRowCount];
        int i = 0;
        while (rsds.hasNext()) {
            Object[] nextRow = rsds.next();
            for (int k = 0; k < columnCount; k++) {
                saDataSet[k][i] = ChartUtil.stringValue(nextRow[k]);
            }
            i++;
        }
        for (int k = 0; k < columnCount; k++) {
            ds[k] = TextDataSetImpl.create(saDataSet[k]);
        }
    } else {
        throw new ChartException(ChartEnginePlugin.ID, ChartException.DATA_SET, "String_Node_Str", Messages.getResourceBundle());
    }
    return ds;
}

Output:
         ds = new DataSet[columnCount];
-        final String[][] saDataSet = new String[columnCount][(int) lRowCount];
+        for (int k = 0; k < columnCount; k++) {
+            switch(rsds.getDataType(k)) {
+                case IConstants.TEXT:
+                    final String[] saDataSet = new String[(int) lRowCount];
+                    ds[k] = TextDataSetImpl.create(saDataSet);
+                    break;
+                case IConstants.DATE_TIME:
+                    final Calendar[] caDataSet = new Calendar[(int) lRowCount];
+                    ds[k] = DateTimeDataSetImpl.create(caDataSet);
+                    break;
+                case IConstants.NUMERICAL:
+                    final Double[] doaDataSet = new Double[(int) lRowCount];
+                    ds[k] = NumberDataSetImpl.create(doaDataSet);
+                    break;
+                default:
+                    throw new ChartException(ChartEnginePlugin.ID, ChartException.DATA_SET, "String_Node_Str");
+            }
+        }
         int i = 0;


Input:
public Double getDoubleValue() {
    if (getType() == null || !"String_Node_Str".equals(getType())) {
        throw new IllegalArgumentException("String_Node_Str");
    }
    return (Double) value;
}

Output:
     }
-    return (Double) value;
+    Double res;
+    if (values == null && values.isEmpty()) {
+        res = null;
+    } else {
+        res = (Double) values.iterator().next();
+    }
+    return res;
 }


Input:
public String procedure(String[] parameters, String inFolder, String outFilePath) throws ProcessException {
    File[] inFiles = initiateProcedure(parameters, inFolder, outFilePath);
    System.out.println(Arrays.toString(parameters));
    if (fileDir.exists()) {
        if (checker.shouldRunBowTie()) {
            ErrorLogger.log("String_Node_Str", "String_Node_Str");
            logString = runBowTie(rawFile1, rawFile_1_Name);
            checkBowTieFile("String_Node_Str" + dir + rawFile_1_Name + "String_Node_Str", rawFile_1_Name);
            ErrorLogger.log("String_Node_Str", "String_Node_Str");
            if (inFiles.length == 2) {
                logString = logString + "String_Node_Str" + runBowTie(rawFile2, rawFile_2_Name);
                checkBowTieFile(remoteExecution + "String_Node_Str" + dir + rawFile_2_Name + "String_Node_Str", rawFile_2_Name);
                sortSamFile(rawFile_2_Name);
            }
            toBeRemoved.push(remoteExecution + "String_Node_Str" + dir);
            filesToBeMoved = sortedDirForFile;
            toBeRemoved.push(filesToBeMoved);
        }
        if (checker.shouldRunSortSam()) {
            try {
                Picard.runSortSam(dir + rawFile_1_Name + "String_Node_Str", dir + rawFile_1_Name + "String_Node_Str");
            } catch (ValidateException e) {
                e.printStackTrace();
            } catch (InterruptedException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        if (checker.shouldRunRemoveDuplicates()) {
            try {
                Picard.runRemoveDuplicates(dir + rawFile_1_Name + "String_Node_Str", dir + rawFile_1_Name + "String_Node_Str");
            } catch (ValidateException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        if (checker.shouldRunConvert()) {
            try {
                System.out.println("String_Node_Str" + dir);
                Pyicos.runConvert(dir + rawFile_1_Name + "String_Node_Str");
                filesToBeMoved = sortedDirForFile;
                toBeRemoved.push(filesToBeMoved);
            } catch (ValidateException e) {
                e.printStackTrace();
            } catch (InterruptedException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        if (checker.shouldRunSamToGff()) {
            runSamToGff();
        }
        if (checker.shouldRunGffToAllnusgr()) {
            runGffToAllnusgr();
        }
        if (checker.shouldRunSmoothing()) {
            ErrorLogger.log("String_Node_Str", "String_Node_Str");
            runSmoothing(parameters, false);
            filesToBeMoved = sortedDirForFile + "String_Node_Str";
            toBeRemoved.push(filesToBeMoved);
        }
        if (checker.shouldRunRatioCalc()) {
            ErrorLogger.log("String_Node_Str", "String_Node_Str");
            doRatioCalculation(sortedDirForCommands + "String_Node_Str", parameters);
            runSmoothing(parameters, true);
            toBeRemoved.push(sortedDirForFile + "String_Node_Str");
            filesToBeMoved = sortedDirForFile + "String_Node_Str";
            toBeRemoved.push(filesToBeMoved);
        }
        try {
            moveEndFiles(filesToBeMoved, outFilePath);
        } catch (ProcessException e) {
            cleanUp(toBeRemoved);
            throw e;
        }
        cleanUp(toBeRemoved);
    } else {
        logString = logString + "String_Node_Str" + "String_Node_Str" + fileDir.toString();
    }
    return logString;
}

Output:
     File[] inFiles = initiateProcedure(parameters, inFolder, outFilePath);
-    System.out.println(Arrays.toString(parameters));
+    ErrorLogger.log("String_Node_Str", Arrays.toString(parameters));
     if (fileDir.exists()) {


Input:
private void createTisProjectArea(Composite parent) {
    createBasicTisProjectArea(parent);
    FormData data;
    svnBranchLabel.setText("String_Node_Str");
    data = new FormData();
    data.top = new FormAttachment(fillProjectsBtn, HORIZONTAL_SPACE, SWT.BOTTOM);
    data.left = new FormAttachment(0, HORIZONTAL_TWO_SPACE);
    data.right = new FormAttachment(0, LEFTSPACE);
    svnBranchLabel.setLayoutData(data);
    data = new FormData();
    data.top = new FormAttachment(svnBranchLabel, 0, SWT.CENTER);
    data.left = new FormAttachment(svnBranchLabel, HORIZONTAL_SPACE);
    data.right = new FormAttachment(50, 0);
    branchesViewer.getControl().setLayoutData(data);
}

Output:
     data.left = new FormAttachment(svnBranchLabel, HORIZONTAL_SPACE);
-    data.right = new FormAttachment(50, 0);
+    data.right = new FormAttachment(openProjectBtn, -40, SWT.LEFT);
     branchesViewer.getControl().setLayoutData(data);


Input:
protected Texture getLoadingScreenTexture() {
    int index = Collections.binarySearch(AVAILABLE_WIDTHS, Main.getUserSettings().getAppSettings().getWidth());
    if (index < 0) {
        index = Math.min(AVAILABLE_WIDTHS.size() - 1, ~index + 1);
    }
    String screen = SCREENS.get(AVAILABLE_WIDTHS.get(index));
    TextureKey texKey = new TextureKey("String_Node_Str" + screen);
    return assetManager.loadTexture(texKey);
}

Output:
     String screen = SCREENS.get(AVAILABLE_WIDTHS.get(index));
-    TextureKey texKey = new TextureKey("String_Node_Str" + screen);
+    TextureKey texKey = new TextureKey(getLocalizedLoadingScreenTextureFolder() + screen);
     return assetManager.loadTexture(texKey);


Input:
private static void testConnection(TestConsumer testConsumer) throws Exception {
    try (final Connection connection = new Connection(IRIS_PORT, CLUSTER_NAME)) {
        final Semaphore semaphore = new Semaphore(1);
        semaphore.acquire();
        testConsumer.accept(connection, semaphore);
        Assert.assertTrue("String_Node_Str", semaphore.tryAcquire(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
    } catch (IOException e) {
        Assert.fail(e.getMessage());
    }
}

Output:
 private static void testConnection(TestConsumer testConsumer) throws Exception {
-    try (final Connection connection = new Connection(IRIS_PORT, CLUSTER_NAME)) {
+    try (final Connection connection = new Connection(IRIS_PORT)) {
         final Semaphore semaphore = new Semaphore(1);


Input:
public boolean evaluate(JSONObject jsonObject) {
    if (type == null) {
        return false;
    }
    if (isDocLibRecord(jsonObject) == true) {
        return false;
    }
    try {
        JSONObject rmNode = getRMNode(jsonObject);
        if (rmNode == null) {
            return false;
        } else {
            String uiType = (String) rmNode.get("String_Node_Str");
            if (uiType.equalsIgnoreCase(type)) {
                return true;
            }
        }
    } catch (Exception err) {
        throw new AlfrescoRuntimeException("String_Node_Str" + err);
    }
    return false;
}

Output:
     }
-    if (isDocLibRecord(jsonObject) == true) {
+    if (isDocLibRecord(jsonObject)) {
         return false;


Input:
private List<R> get(Object key, int index) {
    if (distinct && !(key instanceof Range)) {
        index = classes.indexOf(key.getClass());
    }
    Class sup = key.getClass().getSuperclass();
    while (index == -1 && sup != null) {
        index = classes.indexOf(sup);
        sup = sup.getSuperclass();
    }
    if (key instanceof Range && index == -1) {
        throw new IllegalArgumentException("String_Node_Str");
    }
    if (index < 0 || mapping.get(index) == null) {
        return Collections.emptyList();
    }
    if (mapping.get(index).get(key) == null && !(key instanceof Range)) {
        return Collections.emptyList();
    }
    if (key instanceof Range) {
        Range range = (Range) key;
        ArrayList ret = new ArrayList();
        for (Object number : mapping.get(index).keySet()) {
            if (number instanceof Number) {
                if (range.contains((Number) number)) {
                    ret.addAll(mapping.get(index).get(number));
                }
            }
        }
        return ret;
    } else {
        return new ArrayList(mapping.get(index).get(key));
    }
}

Output:
         Range range = (Range) key;
-        ArrayList ret = new ArrayList();
+        List ret = Collections.synchronizedList(new ArrayList());
         for (Object number : mapping.get(index).keySet()) {


Input:
public void testAggrFilter() throws Exception {
    ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);
    IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);
    IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
    IDimensionDefinition dim1 = columnEdge.createDimension("String_Node_Str");
    IHierarchyDefinition hier1 = dim1.createHierarchy("String_Node_Str");
    ILevelDefinition level11 = hier1.createLevel("String_Node_Str");
    ILevelDefinition level12 = hier1.createLevel("String_Node_Str");
    ILevelDefinition level13 = hier1.createLevel("String_Node_Str");
    IDimensionDefinition dim2 = rowEdge.createDimension("String_Node_Str");
    IHierarchyDefinition hier2 = dim2.createHierarchy("String_Node_Str");
    ILevelDefinition level21 = hier2.createLevel("String_Node_Str");
    createSortTestBindings(cqd);
    CubeFilterDefinition filter1 = new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
    filter1.setAxisQualifierLevels(null);
    filter1.setAxisQualifierValues(null);
    filter1.setTargetLevel(level21);
    CubeFilterDefinition filter2 = new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
    filter2.setAxisQualifierLevels(new ILevelDefinition[] { level21 });
    filter2.setAxisQualifierValues(new Object[] { "String_Node_Str" });
    filter2.setTargetLevel(level12);
    CubeFilterDefinition filter3 = new CubeFilterDefinition(new ScriptExpression("String_Node_Str"));
    filter3.setAxisQualifierLevels(new ILevelDefinition[] { level21 });
    filter3.setAxisQualifierValues(new Object[] { "String_Node_Str" });
    filter3.setTargetLevel(level11);
    CubeSortDefinition sorter4 = new CubeSortDefinition();
    sorter4.setExpression("String_Node_Str");
    sorter4.setAxisQualifierLevels(null);
    sorter4.setAxisQualifierValues(null);
    sorter4.setTargetLevel(level13);
    sorter4.setSortDirection(ISortDefinition.SORT_DESC);
    CubeSortDefinition sorter5 = new CubeSortDefinition();
    sorter5.setExpression("String_Node_Str");
    sorter5.setAxisQualifierLevels(null);
    sorter5.setAxisQualifierValues(null);
    sorter5.setTargetLevel(level11);
    sorter5.setSortDirection(ISortDefinition.SORT_DESC);
    cqd.addFilter(filter1);
    cqd.addFilter(filter2);
    cqd.addFilter(filter3);
    cqd.addSort(sorter4);
    cqd.addSort(sorter5);
    DataEngine engine = DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));
    this.createCube(engine);
    IPreparedCubeQuery pcq = engine.prepare(cqd, null);
    ICubeQueryResults queryResults = pcq.execute(null);
    CubeCursor cursor = queryResults.getCubeCursor();
    List columnEdgeBindingNames = new ArrayList();
    columnEdgeBindingNames.add("String_Node_Str");
    columnEdgeBindingNames.add("String_Node_Str");
    columnEdgeBindingNames.add("String_Node_Str");
    printCube(cursor, "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", new String[] { "String_Node_Str", "String_Node_Str", "String_Node_Str" }, "String_Node_Str", "String_Node_Str");
}

Output:
     cqd.addSort(sorter5);
-    DataEngine engine = DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));
+    DataEngineImpl engine = (DataEngineImpl) DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));
     this.createCube(engine);


Input:
protected void checkFlotation(PublicCompanyI company) {
    if (!company.hasStarted() || company.hasFloated())
        return;
    int unsoldPercentage = company.getUnsoldPercentage();
    if (unsoldPercentage <= 100 - company.getFloatPercentage()) {
        floatCompany(company);
    }
}

Output:
         return;
-    int unsoldPercentage = company.getUnsoldPercentage();
-    if (unsoldPercentage <= 100 - company.getFloatPercentage()) {
+    if (getSoldPercentage(company) >= company.getFloatPercentage()) {
         floatCompany(company);


Input:
public Image crop(Image original, int x1, int x2, int y1, int y2, int maxX, int maxY) throws ServiceException {
    try {
        BufferedImage bufOriginal = ImageIO.read(new File(original.getImagepath()));
        int width = bufOriginal.getWidth();
        int height = bufOriginal.getHeight();
        double ratioX = width / (double) maxX;
        double ratioY = height / (double) maxY;
        int newX1 = (int) (x1 * ratioX);
        int newX2 = (int) (x2 * ratioX);
        int newY1 = (int) (y1 * ratioY);
        int newY2 = (int) (y2 * ratioY);
        BufferedImage bufCropped = bufOriginal.getSubimage(newX1, newY1, newX2 - newX1, newY2 - newY1);
        Image img = new Image(-1, original.getImagepath().substring(0, original.getImagepath().length() - 4) + "String_Node_Str", original.getShootingid(), original.getDate());
        return imageDAO.createAndSave(img, bufCropped);
    } catch (IOException e) {
        LOGGER.debug("String_Node_Str" + e);
        throw new ServiceException(e.getMessage());
    } catch (PersistenceException e) {
        LOGGER.debug("String_Node_Str" + e);
        throw new ServiceException(e.getMessage());
    }
}

Output:
         return imageDAO.createAndSave(img, bufCropped);
-    } catch (IOException e) {
-        LOGGER.debug("String_Node_Str" + e);
-        throw new ServiceException(e.getMessage());
-    } catch (PersistenceException e) {
-        LOGGER.debug("String_Node_Str" + e);
+    } catch (IOException | PersistenceException e) {
+        LOGGER.debug("String_Node_Str", e);
         throw new ServiceException(e.getMessage());


Input:
static FunctionType join(FunctionType f1, FunctionType f2) {
    if (f1 == null) {
        return f2;
    } else if (f2 == null || f1.equals(f2)) {
        return f1;
    } else if (f1.isTopFunction() || f2.isTopFunction()) {
        return TOP_FUNCTION;
    }
    if (f1.isLoose() || f2.isLoose()) {
        return FunctionType.looseJoin(f1, f2);
    }
    if (f1.isGeneric() && f2.isSubtypeOf(f1)) {
        return f1;
    } else if (f2.isGeneric() && f1.isSubtypeOf(f2)) {
        return f2;
    }
    if (f1.isGeneric()) {
        f1 = instantiateGenericsWithUnknown(f1);
    }
    if (f2.isGeneric()) {
        f2 = instantiateGenericsWithUnknown(f2);
    }
    FunctionTypeBuilder builder = new FunctionTypeBuilder();
    int maxRequiredArity = Math.max(f1.requiredFormals.size(), f2.requiredFormals.size());
    for (int i = 0; i < maxRequiredArity; i++) {
        JSType reqFormal = nullAcceptingMeet(f1.getFormalType(i), f2.getFormalType(i));
        builder.addReqFormal(reqFormal);
    }
    int maxTotalArity = Math.max(f1.requiredFormals.size() + f1.optionalFormals.size(), f2.requiredFormals.size() + f2.optionalFormals.size());
    for (int i = maxRequiredArity; i < maxTotalArity; i++) {
        JSType optFormal = nullAcceptingMeet(f1.getFormalType(i), f2.getFormalType(i));
        builder.addOptFormal(optFormal);
    }
    if (f1.restFormals != null && f2.restFormals != null) {
        builder.addRestFormals(nullAcceptingMeet(f1.restFormals, f2.restFormals));
    }
    builder.addRetType(JSType.join(f1.returnType, f2.returnType));
    builder.addNominalType(NominalType.pickSuperclass(f1.nominalType, f2.nominalType));
    builder.addReceiverType(NominalType.pickSuperclass(f1.receiverType, f2.receiverType));
    return builder.buildFunction();
}

Output:
     if (f1.isLoose() || f2.isLoose()) {
-        return FunctionType.looseJoin(f1, f2);
+        return looseJoin(f1, f2);
     }


Input:
public List<String> getUserAuthorities() {
    Scan s = new Scan();
    s.addColumn(Bytes.toBytes(USER_AUTHORITY_FAMILY), Bytes.toBytes(USER_AUTHORITY_COLUMN));
    List<String> authorities = new ArrayList<String>();
    HTableInterface htable = null;
    ResultScanner scanner = null;
    try {
        htable = HBaseConnection.get(hbaseUrl).getTable(userTableName);
        scanner = htable.getScanner(s);
        for (Result result = scanner.next(); result != null; result = scanner.next()) {
            Collection<? extends GrantedAuthority> authCollection = deserialize(result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY), Bytes.toBytes(USER_AUTHORITY_COLUMN)));
            for (GrantedAuthority auth : authCollection) {
                if (!authorities.contains(auth.getAuthority())) {
                    authorities.add(auth.getAuthority());
                }
            }
        }
    } catch (IOException e) {
        logger.error(e.getLocalizedMessage(), e);
    } finally {
        IOUtils.closeQuietly(scanner);
        IOUtils.closeQuietly(htable);
    }
    return authorities;
}

Output:
         for (Result result = scanner.next(); result != null; result = scanner.next()) {
-            Collection<? extends GrantedAuthority> authCollection = deserialize(result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY), Bytes.toBytes(USER_AUTHORITY_COLUMN)));
+            byte[] uaBytes = result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY), Bytes.toBytes(USER_AUTHORITY_COLUMN));
+            Collection<? extends GrantedAuthority> authCollection = Arrays.asList(ugaSerializer.deserialize(uaBytes));
             for (GrantedAuthority auth : authCollection) {


Input:
public void testExecuteCallsService() throws Exception {
    Whitebox.setInternalState(jobResultsTasklet, "String_Node_Str", 2);
    Whitebox.setInternalState(jobResultsTasklet, "String_Node_Str", 2015);
    Whitebox.setInternalState(jobResultsTasklet, "String_Node_Str", 12345l);
    jobResultsTasklet.execute(stepContributionMock, chunkContextMock);
    verify(monthlyTaxReportServiceMock).generateReport(2015, 2, 12345l);
}

Output:
     jobResultsTasklet.execute(stepContributionMock, chunkContextMock);
-    verify(monthlyTaxReportServiceMock).generateReport(2015, 2, 12345l);
+    verify(monthlyTaxReportServiceMock).generateReport(2015, 2, JOB_EXECUTION_ID);
 }


Input:
public static boolean matchOrError(HtmlTagEntry openTag, HtmlTagEntry closeTag, ErrorReporter errorReporter) {
    if (openTag == null && closeTag == null) {
        return true;
    }
    if (openTag == null && closeTag != null) {
        errorReporter.report(closeTag.getSourceLocation(), UNEXPECTED_CLOSE_TAG);
        return false;
    }
    if (openTag != null && closeTag == null) {
        errorReporter.report(openTag.getSourceLocation(), OPEN_TAG_NOT_CLOSED);
        return false;
    }
    if (openTag.hasTagName() != closeTag.hasTagName()) {
        boolean matchCommonPrefix = false;
        if (openTag.hasTagName()) {
            TagName openTagName = openTag.getTagName();
            if (closeTag.getBranches().hasCommonPrefix(openTagName)) {
                closeTag.getBranches().popAllBranches();
                matchCommonPrefix = true;
                if (!closeTag.getBranches().isEmpty()) {
                    matchCommonPrefix = false;
                    errorReporter.report(closeTag.getSourceLocation(), UNEXPECTED_CLOSE_TAG_WITH_EXPECTATION, openTagName.getStaticTagNameAsLowerCase().get());
                }
            } else {
                errorReporter.report(openTagName.getTagLocation(), OPEN_TAG_NOT_CLOSED);
            }
        } else {
            TagName closeTagName = closeTag.getTagName();
            if (openTag.getBranches().hasCommonPrefix(closeTagName)) {
                openTag.getBranches().popAllBranches();
                matchCommonPrefix = true;
                if (!openTag.getBranches().isEmpty()) {
                    matchCommonPrefix = false;
                    errorReporter.report(openTag.getSourceLocation(), OPEN_TAG_NOT_CLOSED);
                }
            } else {
                errorReporter.report(closeTagName.getTagLocation(), UNEXPECTED_CLOSE_TAG);
            }
        }
        return matchCommonPrefix;
    }
    if (openTag.hasTagName()) {
        return matchOrError(openTag.getTagName(), closeTag.getTagName(), errorReporter);
    } else {
        List<ConditionalBranches.ConditionalBranch> openBranches = openTag.getBranches().getBranches();
        List<ConditionalBranches.ConditionalBranch> closeBranches = closeTag.getBranches().getBranches();
        SourceLocation location = closeTag.getSourceLocation();
        if (openBranches.size() != closeBranches.size()) {
            errorReporter.report(location, MISMATCH_TAG);
            return false;
        }
        for (int i = 0; i < openBranches.size(); ++i) {
            ConditionalBranches.ConditionalBranch openBranch = openBranches.get(i);
            ConditionalBranches.ConditionalBranch closeBranch = closeBranches.get(i);
            if (!openBranch.condition().equals(closeBranch.condition())) {
                errorReporter.report(location, MISMATCH_TAG);
                return false;
            }
            ArrayDeque<HtmlTagEntry> openStack = openBranch.deque();
            ArrayDeque<HtmlTagEntry> closeQueue = closeBranch.deque();
            while (!openStack.isEmpty() && !closeQueue.isEmpty()) {
                if (!closeQueue.peekFirst().isDefinitelyOptional() && openStack.peekFirst().isDefinitelyOptional()) {
                    openStack.pollFirst();
                    continue;
                }
                if (!matchOrError(openStack.pollFirst(), closeQueue.pollFirst(), errorReporter)) {
                    return false;
                }
            }
            if (openStack.isEmpty() && closeQueue.isEmpty()) {
                continue;
            } else if (openStack.isEmpty()) {
                errorReporter.report(closeQueue.pollFirst().getSourceLocation(), UNEXPECTED_CLOSE_TAG);
                return false;
            } else {
                errorReporter.report(openStack.pollFirst().getSourceLocation(), OPEN_TAG_NOT_CLOSED);
                return false;
            }
        }
        return true;
    }
}

Output:
             ArrayDeque<HtmlTagEntry> closeQueue = closeBranch.deque();
-            while (!openStack.isEmpty() && !closeQueue.isEmpty()) {
-                if (!closeQueue.peekFirst().isDefinitelyOptional() && openStack.peekFirst().isDefinitelyOptional()) {
-                    openStack.pollFirst();
-                    continue;
-                }
-                if (!matchOrError(openStack.pollFirst(), closeQueue.pollFirst(), errorReporter)) {
-                    return false;
-                }
-            }
-            if (openStack.isEmpty() && closeQueue.isEmpty()) {
-                continue;
-            } else if (openStack.isEmpty()) {
-                errorReporter.report(closeQueue.pollFirst().getSourceLocation(), UNEXPECTED_CLOSE_TAG);
-                return false;
-            } else {
-                errorReporter.report(openStack.pollFirst().getSourceLocation(), OPEN_TAG_NOT_CLOSED);
+            if (!matchOrError(openStack, closeQueue, errorReporter)) {
                 return false;


Input:
private void advance() throws OLAPException {
    switch(currentState) {
        case STATE_INIT:
        case STATE_ROW_EDGE:
            if (rowGroups.size() > 0) {
                for (int i = groupIndex; i < rowGroups.size(); i++) {
                    EdgeGroup group = (EdgeGroup) rowGroups.get(i);
                    groupIndex++;
                    dimensionIndex = group.dimensionIndex;
                    levelIndex = group.levelIndex;
                    currentState = STATE_ROW_EDGE;
                    return;
                }
            }
            if (mCount > 0 && isVerticalMeasure && !isHideMeasureHeader) {
                for (int i = 0; i < mCount; i++) {
                    MeasureViewHandle mv = crosstabItem.getMeasure(i);
                    if (mv.getHeader() != null) {
                        currentState = STATE_MEASURE_HEADER;
                        return;
                    }
                }
            }
        case STATE_MEASURE_HEADER:
            inProcessingGrandTotalBefore = columnGroups.size() > 0 && columnEdgeCursor != null && crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE) != null && GRAND_TOTAL_LOCATION_BEFORE.equals(crosstabItem.getCrosstabView(COLUMN_AXIS_TYPE).getGrandTotalLocation());
        case STATE_PENDING_CHECK_COLUMN_EDGE:
            if (!inProcessingGrandTotalBefore && columnGroups.size() > 0 && columnEdgeCursor != null) {
                columnDimensionCursors = columnEdgeCursor.getDimensionCursor();
                columnEdgeCursor.beforeFirst();
                hasNext = columnEdgeCursor.next();
                columnProcessed = false;
                groupIndex = 0;
                measureIndex = -1;
                tmpStartGroupIndex = 0;
                tmpEndGroupIndex = lastColumnGroupIndex;
            }
        case STATE_COLUMN_TOTAL_BEFORE:
        case STATE_COLUMN_TOTAL_AFTER:
        case STATE_COLUMN_EDGE:
            if (!inProcessingGrandTotalBefore && columnGroups.size() > 0 && columnEdgeCursor != null) {
                while (hasNext) {
                    if (mCount > 0 || !IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
                        for (int i = tmpStartGroupIndex; i < columnGroups.size(); i++) {
                            EdgeGroup group = (EdgeGroup) columnGroups.get(i);
                            if (!GroupUtil.isLeafGroup(columnDimensionCursors, i)) {
                                DimensionCursor dc = (DimensionCursor) columnDimensionCursors.get(i);
                                if (dc.getEdgeStart() == columnEdgeCursor.getPosition()) {
                                    LevelViewHandle lv = crosstabItem.getDimension(COLUMN_AXIS_TYPE, group.dimensionIndex).getLevel(group.levelIndex);
                                    if (lv.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_BEFORE.equals(lv.getAggregationHeaderLocation())) {
                                        if (mCount > 0 && !isVerticalMeasure) {
                                            for (int m = measureIndex + 1; m < mCount; m++) {
                                                if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, group.dimensionIndex, group.levelIndex, m)) {
                                                    tmpStartGroupIndex = i;
                                                    dimensionIndex = group.dimensionIndex;
                                                    levelIndex = group.levelIndex;
                                                    measureIndex = m;
                                                    currentState = STATE_COLUMN_TOTAL_BEFORE;
                                                    return;
                                                }
                                            }
                                            measureIndex = -1;
                                        } else if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, group.dimensionIndex, group.levelIndex, -1)) {
                                            tmpStartGroupIndex = i + 1;
                                            dimensionIndex = group.dimensionIndex;
                                            levelIndex = group.levelIndex;
                                            currentState = STATE_COLUMN_TOTAL_BEFORE;
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                        tmpStartGroupIndex = columnGroups.size();
                    }
                    if (currentState != STATE_COLUMN_EDGE && currentState != STATE_COLUMN_TOTAL_AFTER) {
                        measureIndex = -1;
                    }
                    if (!columnProcessed) {
                        if (mCount > 0 && !isVerticalMeasure) {
                            for (int m = measureIndex + 1; m < mCount; m++) {
                                measureIndex = m;
                                currentState = STATE_COLUMN_EDGE;
                                return;
                            }
                        } else if (measureIndex == -1) {
                            measureIndex--;
                            currentState = STATE_COLUMN_EDGE;
                            return;
                        }
                        columnProcessed = true;
                    }
                    if (mCount > 0 || !IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
                        if (currentState != STATE_COLUMN_TOTAL_AFTER) {
                            measureIndex = -1;
                        }
                        for (int i = tmpEndGroupIndex; i >= 0; i--) {
                            EdgeGroup group = (EdgeGroup) columnGroups.get(i);
                            if (!GroupUtil.isLeafGroup(columnDimensionCursors, i)) {
                                DimensionCursor dc = (DimensionCursor) columnDimensionCursors.get(i);
                                if (dc.getEdgeEnd() == columnEdgeCursor.getPosition()) {
                                    LevelViewHandle lv = crosstabItem.getDimension(COLUMN_AXIS_TYPE, group.dimensionIndex).getLevel(group.levelIndex);
                                    if (lv.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_AFTER.equals(lv.getAggregationHeaderLocation())) {
                                        if (mCount > 0 && !isVerticalMeasure) {
                                            for (int m = measureIndex + 1; m < mCount; m++) {
                                                if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, group.dimensionIndex, group.levelIndex, m)) {
                                                    tmpEndGroupIndex = i;
                                                    dimensionIndex = group.dimensionIndex;
                                                    levelIndex = group.levelIndex;
                                                    measureIndex = m;
                                                    currentState = STATE_COLUMN_TOTAL_AFTER;
                                                    return;
                                                }
                                            }
                                            measureIndex = -1;
                                        } else if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, group.dimensionIndex, group.levelIndex, -1)) {
                                            tmpEndGroupIndex = i - 1;
                                            dimensionIndex = group.dimensionIndex;
                                            levelIndex = group.levelIndex;
                                            currentState = STATE_COLUMN_TOTAL_AFTER;
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    hasNext = columnEdgeCursor.next();
                    columnProcessed = false;
                    tmpStartGroupIndex = 0;
                    tmpEndGroupIndex = lastColumnGroupIndex;
                    measureIndex = -1;
                }
                if (crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE) != null && GRAND_TOTAL_LOCATION_BEFORE.equals(crosstabItem.getCrosstabView(COLUMN_AXIS_TYPE).getGrandTotalLocation())) {
                    currentState = STATE_END;
                    return;
                }
            }
            measureIndex = -1;
        case STATE_GRAND_TOTAL:
            if (columnGroups.size() > 0 && columnEdgeCursor != null) {
                if (crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE) != null) {
                    if (mCount > 0 || !IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
                        if (mCount > 0 && !isVerticalMeasure) {
                            for (int i = measureIndex + 1; i < mCount; i++) {
                                if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, -1, -1, i)) {
                                    measureIndex = i;
                                    currentState = STATE_GRAND_TOTAL;
                                    return;
                                }
                            }
                        } else if (currentState != STATE_GRAND_TOTAL) {
                            if (GroupUtil.hasTotalContent(crosstabItem, COLUMN_AXIS_TYPE, -1, -1, -1)) {
                                currentState = STATE_GRAND_TOTAL;
                                return;
                            }
                        }
                    }
                    if (inProcessingGrandTotalBefore) {
                        inProcessingGrandTotalBefore = false;
                        currentState = STATE_PENDING_CHECK_COLUMN_EDGE;
                        return;
                    }
                }
                currentState = STATE_END;
                return;
            }
        case STATE_MEASURE:
            if (!isVerticalMeasure) {
                for (int i = measureIndex + 1; i < mCount; i++) {
                    measureIndex = i;
                    currentState = STATE_MEASURE;
                    return;
                }
            } else if (measureIndex == -1) {
                measureIndex--;
                currentState = STATE_MEASURE;
                return;
            }
            currentState = STATE_END;
            return;
    }
}

Output:
                 }
-            } else if (measureIndex == -1) {
+            } else if (measureIndex == -1 && mCount > 0) {
                 measureIndex--;


Input:
public void onDisable() {
    log.info("String_Node_Str");
}

Output:
 public void onDisable() {
-    log.info("String_Node_Str");
+    log.info("String_Node_Str" + getDescription().getName() + "String_Node_Str");
 }


Input:
private void init() {
    this.accountLabel = new JLabel(GuiActivator.getResources().getI18NString("String_Node_Str") + "String_Node_Str");
    this.accountCombo = new JComboBox();
    this.groupLabel = new JLabel(GuiActivator.getResources().getI18NString("String_Node_Str") + "String_Node_Str");
    this.contactAddressLabel = new JLabel(GuiActivator.getResources().getI18NString("String_Node_Str") + "String_Node_Str");
    this.displayNameLabel = new JLabel(GuiActivator.getResources().getI18NString("String_Node_Str") + "String_Node_Str");
    this.contactAddressField = new JTextField();
    this.displayNameField = new JTextField();
    this.addButton = new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
    this.cancelButton = new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
    this.imageLabel = new JLabel();
    this.groupCombo = createGroupCombo(this);
    if (metaContact != null) {
        groupCombo.setEnabled(false);
        this.setSelectedGroup(metaContact.getParentMetaContactGroup());
    }
    TransparentPanel labelsPanel = new TransparentPanel(new GridLayout(0, 1, 5, 5));
    TransparentPanel fieldsPanel = new TransparentPanel(new GridLayout(0, 1, 5, 5));
    initAccountCombo();
    accountCombo.setRenderer(new AccountComboRenderer());
    if (accountCombo.getItemCount() > 2 || (accountCombo.getItemCount() == 2 && !ConfigurationUtils.isHideAccountSelectionWhenPossibleEnabled())) {
        labelsPanel.add(accountLabel);
        fieldsPanel.add(accountCombo);
    }
    labelsPanel.add(groupLabel);
    fieldsPanel.add(groupCombo);
    labelsPanel.add(contactAddressLabel);
    fieldsPanel.add(contactAddressField);
    labelsPanel.add(displayNameLabel);
    fieldsPanel.add(displayNameField);
    contactAddressField.getDocument().addDocumentListener(new DocumentListener() {
        public void changedUpdate(DocumentEvent e) {
        }
        public void insertUpdate(DocumentEvent e) {
            updateAddButtonState();
        }
        public void removeUpdate(DocumentEvent e) {
            updateAddButtonState();
        }
    });
    TransparentPanel dataPanel = new TransparentPanel(new BorderLayout());
    dataPanel.add(labelsPanel, BorderLayout.WEST);
    dataPanel.add(fieldsPanel);
    TransparentPanel mainPanel = new TransparentPanel(new BorderLayout(20, 10));
    mainPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
    mainPanel.add(imageLabel, BorderLayout.WEST);
    mainPanel.add(dataPanel, BorderLayout.CENTER);
    mainPanel.add(createButtonsPanel(), BorderLayout.SOUTH);
    this.getContentPane().add(mainPanel, BorderLayout.CENTER);
    if (ConfigurationUtils.isHideAccountSelectionWhenPossibleEnabled())
        this.setPreferredSize(new Dimension(450, 205));
    else
        this.setPreferredSize(new Dimension(450, 250));
    this.setResizable(false);
    this.addWindowFocusListener(this);
    loadSkin();
    this.initialized = true;
}

Output:
         groupCombo.setEnabled(false);
-        this.setSelectedGroup(metaContact.getParentMetaContactGroup());
+        groupCombo.setSelectedItem(metaContact.getParentMetaContactGroup());
     }


Input:
public void run(IProgressMonitor monitor) throws InvocationTargetException {
    CreateProjectOperation op = new CreateProjectOperation(description, DefaultMessagesImpl.getString("String_Node_Str"));
    try {
        PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(currentShell));
    } catch (ExecutionException e) {
        throw new InvocationTargetException(e);
    }
}

Output:
     try {
-        PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(currentShell));
+        PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(null));
     } catch (ExecutionException e) {


Input:
public void testVersionUpdateWithNullValue() {
    EntityManager em = createEntityManager();
    Employee employee;
    try {
        beginTransaction(em);
        employee = ModelExamples.employeeExample1();
        em.persist(employee);
        commitTransaction(em);
        beginTransaction(em);
        Employee employee2 = em.find(Employee.class, employee.getId());
        employee2.setVersion(null);
        commitTransaction(em);
        fail("String_Node_Str");
    } catch (PersistenceException pe) {
    } catch (Exception e) {
        fail("String_Node_Str" + e.getMessage());
    } finally {
        if (isTransactionActive(em)) {
            rollbackTransaction(em);
        }
        closeEntityManager(em);
    }
}

Output:
     } catch (PersistenceException pe) {
-    } catch (Exception e) {
-        fail("String_Node_Str" + e.getMessage());
+    } catch (Exception exception) {
+        Throwable persistenceException = exception;
+        while (persistenceException != null && !(persistenceException instanceof OptimisticLockException)) {
+            persistenceException = persistenceException.getCause();
+        }
+        if (persistenceException instanceof OptimisticLockException) {
+            OptimisticLockException oe = (OptimisticLockException) persistenceException;
+            return;
+        } else {
+            fail("String_Node_Str" + exception.getMessage());
+        }
     } finally {


Input:
public void setMaster(InetAddress address) {
    this.masterClient.set(this.stateTable.get(address).client);
    this.reset();
}

Output:
 public void setMaster(InetAddress address) {
-    this.masterClient.set(this.stateTable.get(address).client);
+    if (address != null)
+        this.masterClient.set(this.stateTable.get(address).client);
+    else
+        this.masterClient.set(null);
     this.reset();


Input:
public static void decodeIncommingData(IoBuffer in, IoSession session) {
    log.trace("String_Node_Str", in);
    DecoderState decoderState = (DecoderState) session.getAttribute(DECODER_STATE_KEY);
    if (decoderState.fin == Byte.MIN_VALUE) {
        byte frameInfo = in.get();
        decoderState.fin = (byte) ((frameInfo >>> 7) & 1);
        log.trace("String_Node_Str", decoderState.fin);
        decoderState.opCode = (byte) (frameInfo & 0x0f);
        log.trace("String_Node_Str", decoderState.opCode);
    }
    if (decoderState.mask == Byte.MIN_VALUE) {
        byte frameInfo2 = in.get();
        decoderState.mask = (byte) ((frameInfo2 >>> 7) & 1);
        log.trace("String_Node_Str", decoderState.mask);
        decoderState.frameLen = (frameInfo2 & (byte) 0x7F);
        log.trace("String_Node_Str", decoderState.frameLen);
        if (decoderState.frameLen == 126) {
            decoderState.frameLen = in.getShort();
            log.trace("String_Node_Str", decoderState.frameLen);
        } else if (decoderState.frameLen == 127) {
            long extendedLen = in.getLong();
            if (extendedLen >= Integer.MAX_VALUE) {
                log.error("String_Node_Str", extendedLen);
            } else {
                decoderState.frameLen = (int) extendedLen;
            }
            log.trace("String_Node_Str", decoderState.frameLen);
        }
    }
    if (decoderState.frameLen + (decoderState.mask == 1 ? 4 : 0) > in.remaining()) {
        log.info("String_Node_Str");
    } else {
        if (decoderState.mask == 1) {
            byte[] maskKey = new byte[4];
            for (int i = 0; i < 4; i++) {
                maskKey[i] = in.get();
            }
            decoderState.payload = new byte[decoderState.frameLen];
            for (int i = 0; i < decoderState.frameLen; i++) {
                byte maskedByte = in.get();
                decoderState.payload[i] = (byte) (maskedByte ^ maskKey[i % 4]);
            }
        } else {
            decoderState.payload = new byte[decoderState.frameLen];
            in.get(decoderState.payload);
        }
        if (decoderState.fin == 0) {
            IoBuffer fragments = (IoBuffer) session.getAttribute(DECODED_MESSAGE_FRAGMENTS_KEY);
            if (fragments == null) {
                fragments = IoBuffer.allocate(decoderState.frameLen);
                fragments.setAutoExpand(true);
                session.setAttribute(DECODED_MESSAGE_FRAGMENTS_KEY, fragments);
                MessageType messageType = MessageType.CLOSE;
                switch(decoderState.opCode) {
                    case 0:
                        messageType = MessageType.CONTINUATION;
                        break;
                    case 1:
                        messageType = MessageType.TEXT;
                        break;
                    case 2:
                        messageType = MessageType.BINARY;
                        break;
                    case 9:
                        messageType = MessageType.PING;
                        break;
                    case 0xa:
                        messageType = MessageType.PONG;
                        break;
                }
                session.setAttribute(DECODED_MESSAGE_TYPE_KEY, messageType);
            }
            fragments.put(decoderState.payload);
            session.removeAttribute(DECODER_STATE_KEY);
        } else {
            WSMessage message = new WSMessage();
            MessageType messageType = (MessageType) session.getAttribute(DECODED_MESSAGE_TYPE_KEY);
            if (messageType == null) {
                switch(decoderState.opCode) {
                    case 0:
                        messageType = MessageType.CONTINUATION;
                        break;
                    case 1:
                        messageType = MessageType.TEXT;
                        break;
                    case 2:
                        messageType = MessageType.BINARY;
                        break;
                    case 9:
                        messageType = MessageType.PING;
                        break;
                    case 0xa:
                        messageType = MessageType.PONG;
                        break;
                    case 8:
                        messageType = MessageType.CLOSE;
                        break;
                    default:
                        log.info("String_Node_Str", decoderState.opCode);
                }
            }
            message.setMessageType(messageType);
            IoBuffer fragments = (IoBuffer) session.removeAttribute(DECODED_MESSAGE_FRAGMENTS_KEY);
            if (fragments != null) {
                fragments.put(decoderState.payload);
                fragments.flip();
                message.setPayload(fragments);
            } else {
                message.addPayload(decoderState.payload);
            }
            session.setAttribute(DECODED_MESSAGE_KEY, message);
            session.removeAttribute(DECODER_STATE_KEY);
            session.removeAttribute(DECODED_MESSAGE_TYPE_KEY);
        }
    }
}

Output:
         if (decoderState.frameLen == 126) {
-            decoderState.frameLen = in.getShort();
+            decoderState.frameLen = in.getUnsignedShort();
             log.trace("String_Node_Str", decoderState.frameLen);


Input:
public Parameter getParameter(String name) {
    for (int key : parameters.keySet()) {
        if (parameters.get(key).name.equalsIgnoreCase(name))
            return parameters.get(key);
    }
    return null;
}

Output:
 public Parameter getParameter(String name) {
-    for (int key : parameters.keySet()) {
-        if (parameters.get(key).name.equalsIgnoreCase(name))
-            return parameters.get(key);
-    }
-    return null;
+    if (name == null || name.length() == 0)
+        return null;
+    return parameters.get(name.toLowerCase(Locale.US));
 }


Input:
private void handleAddressUpdate(AddressIQ iq) {
    synchronized (this) {
        User user = connection.getUser(StringUtils.parseBareAddress(iq.getFrom()));
        if (user != null) {
            FriendPresence presence = user.getFriendPresences().get(iq.getFrom());
            if (presence != null) {
                LOG.debugf("String_Node_Str", presence.getPresenceId(), iq.getAddress());
                presence.addFeature(new AddressFeature(iq.getAddress()));
            } else {
                LOG.debugf("String_Node_Str", iq.getAddress(), iq.getFrom());
                pendingAddresses.put(iq.getFrom(), address);
            }
        }
    }
}

Output:
                 LOG.debugf("String_Node_Str", iq.getAddress(), iq.getFrom());
-                pendingAddresses.put(iq.getFrom(), address);
+                pendingAddresses.put(iq.getFrom(), iq.getAddress());
             }


Input:
private void saveLocal(Subject subject) {
    context.setSubject(subject);
}

Output:
 private void saveLocal(Subject subject) {
-    context.setSubject(subject);
+    try {
+        getContext().setSubject(subject);
+    } catch (Exception e) {
+        log.error("String_Node_Str", e.getClass().getName(), e.getMessage());
+    }
 }


Input:
public void expire_whenAccessed() {
    MutableConfiguration<Integer, Integer> config = new MutableConfiguration<Integer, Integer>();
    config.setExpiryPolicy(new ParameterizedExpiryPolicy<Integer, Integer>(Duration.ETERNAL, Duration.ZERO, null));
    Cache<Integer, Integer> cache = getCacheManager().configureCache(getTestCacheName(), config);
    cache.put(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.get(1));
    cache.put(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.getAndReplace(1, 2));
    cache.put(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.getAndRemove(1));
    cache.put(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.remove(1));
    cache.put(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.remove(1, 1));
    cache.getAndPut(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.get(1));
    cache.getAndPut(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.getAndPut(1, 1));
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.get(1));
    cache.putIfAbsent(1, 1);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.get(1));
    HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
    map.put(1, 1);
    cache.putAll(map);
    assertTrue(cache.containsKey(1));
    assertNotNull(cache.get(1));
    assertFalse(cache.containsKey(1));
    assertNull(cache.get(1));
    cache.put(1, 1);
    Iterator<Entry<Integer, Integer>> iterator = cache.iterator();
    assertTrue(iterator.hasNext());
    assertEquals((Integer) 1, iterator.next().getValue());
    assertFalse(cache.iterator().hasNext());
}

Output:
     MutableConfiguration<Integer, Integer> config = new MutableConfiguration<Integer, Integer>();
-    config.setExpiryPolicy(new ParameterizedExpiryPolicy<Integer, Integer>(Duration.ETERNAL, Duration.ZERO, null));
+    config.setExpiryPolicyFactory(Factories.of(new ParameterizedExpiryPolicy<Integer, Integer>(Duration.ETERNAL, Duration.ZERO, null)));
     Cache<Integer, Integer> cache = getCacheManager().configureCache(getTestCacheName(), config);


Input:
public boolean remove(int index) {
    index = toInternal(index);
    while (true) {
        int prevSeq = seqArray.get().getAndSet(index, DatatableSequenceNumber.UNSTABLE);
        if (prevSeq == DatatableSequenceNumber.UNSTABLE) {
            return false;
        }
        try {
            T current = auxArray.get()[index];
            if (current == EMPTY) {
                return false;
            }
            auxArray.get()[index] = EMPTY;
            entries.decrementAndGet();
            return true;
        } finally {
            seqArray.get().set(index, DatatableSequenceNumber.get());
        }
    }
}

Output:
         if (prevSeq == DatatableSequenceNumber.UNSTABLE) {
-            return false;
+            continue;
         }


Input:
public final void initialize(InputQueue.DataBlockCache inputQueueDataBlockCache, Listener listener) {
    m_selectionKey.attach(this);
    if (listener == null)
        listener = new DummyListener();
    m_inputQueue = new InputQueue(m_collider, inputQueueDataBlockCache, this, m_socketChannel, m_selectionKey, listener);
    long state = m_state.get();
    long newState;
    for (; ; ) {
        assert ((state & STATE_MASK) == ST_STARTING);
        assert ((state & SOCK_RC_MASK) == (SOCK_RC + SOCK_RC));
        newState = state;
        if ((state & CLOSE) == 0) {
            newState &= ~STATE_MASK;
            newState |= ST_RUNNING;
            if (m_state.compareAndSet(state, newState)) {
                m_inputQueue.start();
                break;
            }
        } else {
            newState -= SOCK_RC;
            if ((state & WAIT_WRITE) == 0)
                newState -= SOCK_RC;
            if (m_state.compareAndSet(state, newState)) {
                listener.onConnectionClosed();
                if ((newState & SOCK_RC_MASK) == 0)
                    m_collider.executeInSelectorThread(new SelectorDeregistrator());
                break;
            }
        }
        state = m_state.get();
    }
    if (s_logger.isLoggable(Level.FINER)) {
        s_logger.finer(m_remoteSocketAddress.toString() + "String_Node_Str" + stateToString(state) + "String_Node_Str" + stateToString(newState));
    }
    if ((state & WAIT_WRITE) != 0)
        m_collider.executeInSelectorThread(m_selectorRegistrator);
}

Output:
             newState -= SOCK_RC;
-            if ((state & WAIT_WRITE) == 0)
+            if ((state & LENGTH_MASK) == 0)
                 newState -= SOCK_RC;


Input:
public <T> Method getSetMethod(final Object destinationObject, final String variableName, final Class<?> variableType) {
    Method method = setMethodsCache.get(destinationObject.getClass(), variableType, variableName);
    if (method == null) {
        if (variableType == null) {
            method = inspectClass(destinationObject, "String_Node_Str", variableName, 1);
        } else {
            method = inspectClassForSetMethods(destinationObject, variableType, variableName);
        }
        setMethodsCache.set(destinationObject.getClass(), variableType, variableName, method);
    }
    return method;
}

Output:
         if (variableType == null) {
-            method = inspectClass(destinationObject, "String_Node_Str", variableName, 1);
+            method = findSetMethodWithNonPrimitiveParameter(destinationObject, variableName);
         } else {


Input:
private void initializeNodeValue() {
    XMLMapping xmlMapping = this.nestedMapping;
    if (xmlMapping instanceof BinaryDataCollectionMapping) {
        choiceElementNodeValue = new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping) xmlMapping);
        choiceElementMarshalNodeValue = choiceElementNodeValue;
    } else if (xmlMapping instanceof DirectCollectionMapping) {
        choiceElementNodeValue = new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping) xmlMapping);
        choiceElementMarshalNodeValue = choiceElementNodeValue;
    } else if (xmlMapping instanceof CompositeCollectionMapping) {
        choiceElementNodeValue = new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping) xmlMapping);
        choiceElementMarshalNodeValue = choiceElementNodeValue;
    } else {
        choiceElementNodeValue = new XMLCollectionReferenceMappingNodeValue((CollectionReferenceMapping) xmlMapping, xmlField);
        choiceElementMarshalNodeValue = new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping) xmlMapping);
    }
}

Output:
 private void initializeNodeValue() {
-    XMLMapping xmlMapping = this.nestedMapping;
+    Mapping xmlMapping = this.nestedMapping;
     if (xmlMapping instanceof BinaryDataCollectionMapping) {


Input:
public void buildContextMenu(IMenuManager menu) {
    List selectedEditParts = getGraphicalViewer().getSelectedEditParts();
    if (selectedEditParts != null && !selectedEditParts.isEmpty()) {
        Object object = selectedEditParts.get(selectedEditParts.size() - 1);
        if (object instanceof OutputTreeNodeEditPart) {
            OutputTreeNode model = (OutputTreeNode) ((OutputTreeNodeEditPart) object).getModel();
            if (XmlMapUtil.DOCUMENT.equals(model.getType()) || XmlMapUtil.getXPathLength(model.getXpath()) > 2) {
                ImportTreeFromXml importAction = (ImportTreeFromXml) getActionRegistry().getAction(ImportTreeFromXml.ID);
                importAction.update(object);
                importAction.setInput(false);
                if (importAction.isEnabled()) {
                    menu.add(importAction);
                }
                CreateElementAction createElement = (CreateElementAction) getActionRegistry().getAction(CreateElementAction.ID);
                createElement.update(object);
                createElement.setInput(false);
                if (createElement.isEnabled()) {
                    menu.add(createElement);
                }
                CreateAttributeAction createAttribute = (CreateAttributeAction) getActionRegistry().getAction(CreateAttributeAction.ID);
                createAttribute.update(object);
                createAttribute.setInput(false);
                if (createAttribute.isEnabled()) {
                    menu.add(createAttribute);
                }
                CreateNameSpaceAction createNameSpace = (CreateNameSpaceAction) getActionRegistry().getAction(CreateNameSpaceAction.ID);
                createNameSpace.update(object);
                createNameSpace.setInput(false);
                if (createNameSpace.isEnabled()) {
                    menu.add(createNameSpace);
                }
                FixValueAction fixValueAction = (FixValueAction) getActionRegistry().getAction(FixValueAction.ID);
                fixValueAction.update(object);
                if (fixValueAction.isEnabled()) {
                    menu.add(fixValueAction);
                }
                AddChoiceAction addChoice = (AddChoiceAction) getActionRegistry().getAction(AddChoiceAction.ID);
                addChoice.update(object);
                addChoice.setInput(false);
                if (addChoice.isEnabled()) {
                    menu.add(addChoice);
                }
                SetSubstitutionAction setSubs = (SetSubstitutionAction) getActionRegistry().getAction(SetSubstitutionAction.ID);
                setSubs.update(object);
                setSubs.setInput(false);
                if (setSubs.isEnabled()) {
                    menu.add(setSubs);
                }
                SetLoopAction loopAction = (SetLoopAction) getActionRegistry().getAction(SetLoopAction.ID);
                loopAction.update(object);
                loopAction.setInput(false);
                if (loopAction.isEnabled()) {
                    menu.add(loopAction);
                }
                SetLoopOptional loopOptinalAction = (SetLoopOptional) getActionRegistry().getAction(SetLoopOptional.ID);
                loopOptinalAction.update(object);
                if (loopOptinalAction.isEnabled()) {
                    menu.add(loopOptinalAction);
                }
                SetGroupAction grouptAction = (SetGroupAction) getActionRegistry().getAction(SetGroupAction.ID);
                grouptAction.update(object);
                if (grouptAction.isEnabled()) {
                    menu.add(grouptAction);
                }
                ImportTreeFromRepository importFromRepository = (ImportTreeFromRepository) getActionRegistry().getAction(ImportTreeFromRepository.ID);
                importFromRepository.update(object);
                importFromRepository.setInput(false);
                if (importFromRepository.isEnabled()) {
                    menu.add(importFromRepository);
                }
                SetAggregateAction aggreateAction = (SetAggregateAction) getActionRegistry().getAction(SetAggregateAction.ID);
                aggreateAction.update(object);
                if (aggreateAction.isEnabled()) {
                    menu.add(aggreateAction);
                }
                RenameTreeNodeAction renameTreeNodeAction = (RenameTreeNodeAction) getActionRegistry().getAction(RenameTreeNodeAction.ID);
                renameTreeNodeAction.update(object);
                if (renameTreeNodeAction.isEnabled()) {
                    menu.add(renameTreeNodeAction);
                }
                DeleteTreeNodeAction action = (DeleteTreeNodeAction) getActionRegistry().getAction(DeleteTreeNodeAction.ID);
                action.update(object);
                action.setInput(false);
                if (action.isEnabled()) {
                    menu.add(action);
                }
            }
        } else if (object instanceof TreeNodeEditPart) {
            TreeNode model = (TreeNode) ((TreeNodeEditPart) object).getModel();
            if (XmlMapUtil.DOCUMENT.equals(model.getType()) || XmlMapUtil.getXPathLength(model.getXpath()) > 2) {
                ImportTreeFromXml importAction = (ImportTreeFromXml) getActionRegistry().getAction(ImportTreeFromXml.ID);
                importAction.setInput(true);
                importAction.update(object);
                if (importAction.isEnabled()) {
                    menu.add(importAction);
                }
                CreateElementAction createElement = (CreateElementAction) getActionRegistry().getAction(CreateElementAction.ID);
                createElement.setInput(true);
                createElement.update(object);
                if (createElement.isEnabled()) {
                    menu.add(createElement);
                }
                CreateAttributeAction createAttribute = (CreateAttributeAction) getActionRegistry().getAction(CreateAttributeAction.ID);
                createAttribute.setInput(true);
                createAttribute.update(object);
                if (createAttribute.isEnabled()) {
                    menu.add(createAttribute);
                }
                CreateNameSpaceAction createNameSpace = (CreateNameSpaceAction) getActionRegistry().getAction(CreateNameSpaceAction.ID);
                createNameSpace.setInput(true);
                createNameSpace.update(object);
                if (createNameSpace.isEnabled()) {
                    menu.add(createNameSpace);
                }
                FixValueAction fixValueAction = (FixValueAction) getActionRegistry().getAction(FixValueAction.ID);
                fixValueAction.update(object);
                if (fixValueAction.isEnabled()) {
                    menu.add(fixValueAction);
                }
                AddChoiceAction addChoice = (AddChoiceAction) getActionRegistry().getAction(AddChoiceAction.ID);
                addChoice.update(object);
                addChoice.setInput(true);
                if (addChoice.isEnabled()) {
                    menu.add(addChoice);
                }
                SetSubstitutionAction setSubs = (SetSubstitutionAction) getActionRegistry().getAction(SetSubstitutionAction.ID);
                setSubs.update(object);
                setSubs.setInput(true);
                if (setSubs.isEnabled()) {
                    menu.add(setSubs);
                }
                SetLoopAction loopAction = (SetLoopAction) getActionRegistry().getAction(SetLoopAction.ID);
                loopAction.update(object);
                loopAction.setInput(true);
                if (loopAction.isEnabled()) {
                    menu.add(loopAction);
                }
                SetLoopOptional loopOptinalAction = (SetLoopOptional) getActionRegistry().getAction(SetLoopOptional.ID);
                loopOptinalAction.update(object);
                if (loopOptinalAction.isEnabled()) {
                    menu.add(loopOptinalAction);
                }
                ImportTreeFromRepository importFromRepository = (ImportTreeFromRepository) getActionRegistry().getAction(ImportTreeFromRepository.ID);
                importFromRepository.setInput(true);
                importFromRepository.update(object);
                if (importFromRepository.isEnabled()) {
                    menu.add(importFromRepository);
                }
                RenameTreeNodeAction renameTreeNodeAction = (RenameTreeNodeAction) getActionRegistry().getAction(RenameTreeNodeAction.ID);
                renameTreeNodeAction.update(object);
                if (renameTreeNodeAction.isEnabled()) {
                    menu.add(renameTreeNodeAction);
                }
                DeleteTreeNodeAction deleteAction = (DeleteTreeNodeAction) getActionRegistry().getAction(DeleteTreeNodeAction.ID);
                deleteAction.setInput(true);
                deleteAction.update(object);
                if (deleteAction.isEnabled()) {
                    menu.add(deleteAction);
                }
            }
        }
    }
}

Output:
     if (selectedEditParts != null && !selectedEditParts.isEmpty()) {
-        Object object = selectedEditParts.get(selectedEditParts.size() - 1);
-        if (object instanceof OutputTreeNodeEditPart) {
-            OutputTreeNode model = (OutputTreeNode) ((OutputTreeNodeEditPart) object).getModel();
-            if (XmlMapUtil.DOCUMENT.equals(model.getType()) || XmlMapUtil.getXPathLength(model.getXpath()) > 2) {
-                ImportTreeFromXml importAction = (ImportTreeFromXml) getActionRegistry().getAction(ImportTreeFromXml.ID);
-                importAction.update(object);
-                importAction.setInput(false);
-                if (importAction.isEnabled()) {
-                    menu.add(importAction);
-                }
-                CreateElementAction createElement = (CreateElementAction) getActionRegistry().getAction(CreateElementAction.ID);
-                createElement.update(object);
-                createElement.setInput(false);
-                if (createElement.isEnabled()) {
-                    menu.add(createElement);
-                }
-                CreateAttributeAction createAttribute = (CreateAttributeAction) getActionRegistry().getAction(CreateAttributeAction.ID);
-                createAttribute.update(object);
-                createAttribute.setInput(false);
-                if (createAttribute.isEnabled()) {
-                    menu.add(createAttribute);
-                }
-                CreateNameSpaceAction createNameSpace = (CreateNameSpaceAction) getActionRegistry().getAction(CreateNameSpaceAction.ID);
-                createNameSpace.update(object);
-                createNameSpace.setInput(false);
-                if (createNameSpace.isEnabled()) {
-                    menu.add(createNameSpace);
-                }
-                FixValueAction fixValueAction = (FixValueAction) getActionRegistry().getAction(FixValueAction.ID);
-                fixValueAction.update(object);
-                if (fixValueAction.isEnabled()) {
-                    menu.add(fixValueAction);
-                }
-                AddChoiceAction addChoice = (AddChoiceAction) getActionRegistry().getAction(AddChoiceAction.ID);
-                addChoice.update(object);
-                addChoice.setInput(false);
-                if (addChoice.isEnabled()) {
-                    menu.add(addChoice);
-                }
-                SetSubstitutionAction setSubs = (SetSubstitutionAction) getActionRegistry().getAction(SetSubstitutionAction.ID);
-                setSubs.update(object);
-                setSubs.setInput(false);
-                if (setSubs.isEnabled()) {
-                    menu.add(setSubs);
-                }
-                SetLoopAction loopAction = (SetLoopAction) getActionRegistry().getAction(SetLoopAction.ID);
-                loopAction.update(object);
-                loopAction.setInput(false);
-                if (loopAction.isEnabled()) {
-                    menu.add(loopAction);
-                }
-                SetLoopOptional loopOptinalAction = (SetLoopOptional) getActionRegistry().getAction(SetLoopOptional.ID);
-                loopOptinalAction.update(object);
-                if (loopOptinalAction.isEnabled()) {
-                    menu.add(loopOptinalAction);
-                }
-                SetGroupAction grouptAction = (SetGroupAction) getActionRegistry().getAction(SetGroupAction.ID);
-                grouptAction.update(object);
-                if (grouptAction.isEnabled()) {
-                    menu.add(grouptAction);
-                }
-                ImportTreeFromRepository importFromRepository = (ImportTreeFromRepository) getActionRegistry().getAction(ImportTreeFromRepository.ID);
-                importFromRepository.update(object);
-                importFromRepository.setInput(false);
-                if (importFromRepository.isEnabled()) {
-                    menu.add(importFromRepository);
-                }
-                SetAggregateAction aggreateAction = (SetAggregateAction) getActionRegistry().getAction(SetAggregateAction.ID);
-                aggreateAction.update(object);
-                if (aggreateAction.isEnabled()) {
-                    menu.add(aggreateAction);
-                }
-                RenameTreeNodeAction renameTreeNodeAction = (RenameTreeNodeAction) getActionRegistry().getAction(RenameTreeNodeAction.ID);
-                renameTreeNodeAction.update(object);
-                if (renameTreeNodeAction.isEnabled()) {
-                    menu.add(renameTreeNodeAction);
-                }
-                DeleteTreeNodeAction action = (DeleteTreeNodeAction) getActionRegistry().getAction(DeleteTreeNodeAction.ID);
-                action.update(object);
-                action.setInput(false);
-                if (action.isEnabled()) {
-                    menu.add(action);
-                }
-            }
-        } else if (object instanceof TreeNodeEditPart) {
-            TreeNode model = (TreeNode) ((TreeNodeEditPart) object).getModel();
-            if (XmlMapUtil.DOCUMENT.equals(model.getType()) || XmlMapUtil.getXPathLength(model.getXpath()) > 2) {
-                ImportTreeFromXml importAction = (ImportTreeFromXml) getActionRegistry().getAction(ImportTreeFromXml.ID);
-                importAction.setInput(true);
-                importAction.update(object);
-                if (importAction.isEnabled()) {
-                    menu.add(importAction);
-                }
-                CreateElementAction createElement = (CreateElementAction) getActionRegistry().getAction(CreateElementAction.ID);
-                createElement.setInput(true);
-                createElement.update(object);
-                if (createElement.isEnabled()) {
-                    menu.add(createElement);
-                }
-                CreateAttributeAction createAttribute = (CreateAttributeAction) getActionRegistry().getAction(CreateAttributeAction.ID);
-                createAttribute.setInput(true);
-                createAttribute.update(object);
-                if (createAttribute.isEnabled()) {
-                    menu.add(createAttribute);
-                }
-                CreateNameSpaceAction createNameSpace = (CreateNameSpaceAction) getActionRegistry().getAction(CreateNameSpaceAction.ID);
-                createNameSpace.setInput(true);
-                createNameSpace.update(object);
-                if (createNameSpace.isEnabled()) {
-                    menu.add(createNameSpace);
-                }
-                FixValueAction fixValueAction = (FixValueAction) getActionRegistry().getAction(FixValueAction.ID);
-                fixValueAction.update(object);
-                if (fixValueAction.isEnabled()) {
-                    menu.add(fixValueAction);
-                }
-                AddChoiceAction addChoice = (AddChoiceAction) getActionRegistry().getAction(AddChoiceAction.ID);
-                addChoice.update(object);
-                addChoice.setInput(true);
-                if (addChoice.isEnabled()) {
-                    menu.add(addChoice);
-                }
-                SetSubstitutionAction setSubs = (SetSubstitutionAction) getActionRegistry().getAction(SetSubstitutionAction.ID);
-                setSubs.update(object);
-                setSubs.setInput(true);
-                if (setSubs.isEnabled()) {
-                    menu.add(setSubs);
-                }
-                SetLoopAction loopAction = (SetLoopAction) getActionRegistry().getAction(SetLoopAction.ID);
-                loopAction.update(object);
-                loopAction.setInput(true);
-                if (loopAction.isEnabled()) {
-                    menu.add(loopAction);
-                }
-                SetLoopOptional loopOptinalAction = (SetLoopOptional) getActionRegistry().getAction(SetLoopOptional.ID);
-                loopOptinalAction.update(object);
-                if (loopOptinalAction.isEnabled()) {
-                    menu.add(loopOptinalAction);
-                }
-                ImportTreeFromRepository importFromRepository = (ImportTreeFromRepository) getActionRegistry().getAction(ImportTreeFromRepository.ID);
-                importFromRepository.setInput(true);
-                importFromRepository.update(object);
-                if (importFromRepository.isEnabled()) {
-                    menu.add(importFromRepository);
-                }
-                RenameTreeNodeAction renameTreeNodeAction = (RenameTreeNodeAction) getActionRegistry().getAction(RenameTreeNodeAction.ID);
-                renameTreeNodeAction.update(object);
-                if (renameTreeNodeAction.isEnabled()) {
-                    menu.add(renameTreeNodeAction);
-                }
-                DeleteTreeNodeAction deleteAction = (DeleteTreeNodeAction) getActionRegistry().getAction(DeleteTreeNodeAction.ID);
-                deleteAction.setInput(true);
-                deleteAction.update(object);
-                if (deleteAction.isEnabled()) {
-                    menu.add(deleteAction);
-                }
+        List output = new ArrayList();
+        List input = new ArrayList();
+        for (Object selected : selectedEditParts) {
+            if (selected instanceof OutputTreeNodeEditPart) {
+                output.add(selected);
+            } else if (selected instanceof TreeNodeEditPart) {
+                input.add(selected);
             }


Input:
private void doPreview(String pattern) {
    String type = getSelectedDataType();
    String formatStr = "String_Node_Str";
    if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
        formatStr = new StringFormatter(pattern, ULocale.getDefault()).format(DEFAULT_PREVIEW_STRING);
    } else if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
        formatStr = new DateFormatter(pattern).format(new Date());
    } else if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
        formatStr = new NumberFormatter(pattern).format(DEFAULT_PREVIEW_NUMBER);
    }
    previewLable.setText(formatStr);
}

Output:
         formatStr = new DateFormatter(pattern).format(new Date());
-    } else if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
+    } else if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type) || DesignChoiceConstants.PARAM_TYPE_INTEGER.equals(type)) {
         formatStr = new NumberFormatter(pattern).format(DEFAULT_PREVIEW_NUMBER);


Input:
protected void onAttachedToWindow() {
    super.onAttachedToWindow();
    if (!isInEditMode()) {
        activity = (Activity) getContext();
        if (presenter == null)
            presenter = PresenterManager.getInstance().provide(this, null);
        presenter.takeView(this);
    }
}

Output:
         activity = (Activity) getContext();
-        if (presenter == null)
-            presenter = PresenterManager.getInstance().provide(this, null);
-        presenter.takeView(this);
+        takeView();
     }


Input:
public void render(ScreenTileEntity tileEntity, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
    float xRotation = 0.0F, yRotation = 0.0F;
    EnumFacing facing = EnumFacing.SOUTH, horizontalFacing = EnumFacing.SOUTH;
    if (tileEntity != null) {
        IBlockState state = Minecraft.getMinecraft().world.getBlockState(tileEntity.getPos());
        if (state.getBlock() instanceof ScreenBlock) {
            facing = state.getValue(BaseBlock.FACING);
            horizontalFacing = state.getValue(ScreenBlock.HORIZONTAL_FACING);
        } else {
            return;
        }
    }
    GlStateManager.pushMatrix();
    switch(horizontalFacing) {
        case NORTH:
            yRotation = -180.0F;
            break;
        case WEST:
            yRotation = -90.0F;
            break;
        case EAST:
            yRotation = 90.0F;
    }
    switch(facing) {
        case DOWN:
            xRotation = 90.0F;
            break;
        case UP:
            xRotation = -90.0F;
    }
    GlStateManager.translate((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
    GlStateManager.rotate(yRotation, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(xRotation, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, -0.4375F);
    if (tileEntity == null) {
        GlStateManager.disableLighting();
        renderScreenBoard(0, 0);
    } else if (!tileEntity.isTransparent()) {
        GlStateManager.disableLighting();
        renderScreenBoard(tileEntity.getSize(), tileEntity.getColor());
    }
    if (tileEntity != null && tileEntity.isRenderable()) {
        FontRenderer fontrenderer = this.getFontRenderer();
        IClientScreenModule.TransformMode mode = IClientScreenModule.TransformMode.NONE;
        GlStateManager.depthMask(false);
        GlStateManager.disableLighting();
        Map<Integer, IModuleData> screenData = updateScreenData(tileEntity);
        List<IClientScreenModule> modules = tileEntity.getClientScreenModules();
        if (tileEntity.isShowHelp()) {
            modules = ScreenTileEntity.getHelpingScreenModules();
        }
        renderModules(fontrenderer, tileEntity, mode, modules, screenData, tileEntity.getSize());
    }
    GlStateManager.enableLighting();
    GlStateManager.depthMask(true);
    GlStateManager.popMatrix();
}

Output:
         Map<Integer, IModuleData> screenData = updateScreenData(tileEntity);
-        List<IClientScreenModule> modules = tileEntity.getClientScreenModules();
+        List<IClientScreenModule<?>> modules = tileEntity.getClientScreenModules();
         if (tileEntity.isShowHelp()) {