Input:
private Optional<ObjectId> call(Optional<ObjectId> resolved) {
    if (!resolved.isPresent()) {
        return Optional.absent();
    }
    ObjectId objectId = resolved.get();
    if (objectId.isNull()) {
        return Optional.of(RevTree.EMPTY_TREE_ID);
    }
    final TYPE objectType = command(ResolveObjectType.class).setObjectId(objectId).call();
    switch(objectType) {
        case TREE:
            break;
        case COMMIT:
            {
                Optional<RevCommit> commit = command(RevObjectParse.class).setObjectId(objectId).call(RevCommit.class);
                if (commit.isPresent()) {
                    objectId = commit.get().getTreeId();
                } else {
                    objectId = null;
                }
                break;
            }
        case TAG:
            {
                Optional<RevTag> tag = command(RevObjectParse.class).setObjectId(objectId).call(RevTag.class);
                if (tag.isPresent()) {
                    ObjectId commitId = tag.get().getCommitId();
                    return call(Optional.of(commitId));
                }
            }
        default:
            throw new IllegalArgumentException(String.format("String_Node_Str", treeishRefSpec, String.valueOf(objectType)));
    }
    return Optional.fromNullable(objectId);
}

Output:
     }
-    final TYPE objectType = command(ResolveObjectType.class).setObjectId(objectId).call();
+    ObjectStore source = this.source == null ? objectDatabase() : this.source;
+    final TYPE objectType = command(ResolveObjectType.class).setSource(source).setObjectId(objectId).call();
     switch(objectType) {


Input:
public String getCanonicalRoot() {
    return FolderConfig.getCanonicalRoot();
}

Output:
 public String getCanonicalRoot() {
-    return FolderConfig.getCanonicalRoot();
+    if (rootFolder == null) {
+        rootFolder = new File(FolderConfig.getCanonicalRoot());
+    }
+    return rootFolder.getAbsolutePath();
 }


Input:
public int compare(Description concept1, Description concept2) {
    if (concept1 instanceof Nothing) {
        if (concept2 instanceof Nothing)
            return 0;
        else
            return -1;
    } else if (concept1 instanceof NamedClass) {
        if (concept2 instanceof Nothing)
            return 1;
        else if (concept2 instanceof NamedClass)
            return ((NamedClass) concept1).getName().compareTo(((NamedClass) concept2).getName());
        else
            return -1;
    } else if (concept1 instanceof BooleanValueRestriction) {
        if (concept2 instanceof Nothing || concept2 instanceof NamedClass) {
            return 1;
        } else if (concept2 instanceof BooleanValueRestriction) {
            int cmp = rc.compare(((BooleanValueRestriction) concept1).getRestrictedPropertyExpresssion(), ((BooleanValueRestriction) concept2).getRestrictedPropertyExpresssion());
            if (cmp == 0) {
                boolean val1 = ((BooleanValueRestriction) concept1).getBooleanValue();
                boolean val2 = ((BooleanValueRestriction) concept2).getBooleanValue();
                if (val1) {
                    if (val2)
                        return 0;
                    else
                        return 1;
                } else {
                    if (val2)
                        return -1;
                    else
                        return 0;
                }
            } else
                return cmp;
        } else
            return -1;
    } else if (concept1 instanceof DatatypeSomeRestriction) {
        if (concept2 instanceof Nothing || concept2 instanceof NamedClass || concept2 instanceof BooleanValueRestriction) {
            return 1;
        } else if (concept2 instanceof DatatypeSomeRestriction) {
            DatatypeSomeRestriction dsr = (DatatypeSomeRestriction) concept1;
            DatatypeProperty dp = (DatatypeProperty) dsr.getRestrictedPropertyExpression();
            DatatypeSomeRestriction dsr2 = (DatatypeSomeRestriction) concept2;
            DatatypeProperty dp2 = (DatatypeProperty) dsr2.getRestrictedPropertyExpression();
            int cmp = rc.compare(dp, dp2);
            if (cmp == 0) {
                SimpleDoubleDataRange dr = (SimpleDoubleDataRange) dsr.getDataRange();
                SimpleDoubleDataRange dr2 = (SimpleDoubleDataRange) dsr2.getDataRange();
                if ((dr instanceof DoubleMaxValue && dr2 instanceof DoubleMaxValue) || (dr instanceof DoubleMinValue && dr2 instanceof DoubleMinValue)) {
                    double val1 = dr.getValue();
                    double val2 = dr2.getValue();
                    if (val1 > val2)
                        return 1;
                    else if (val1 == val2)
                        return 0;
                    else
                        return -1;
                } else if (dr instanceof DoubleMaxValue)
                    return 1;
                else
                    return -1;
            } else
                return cmp;
        } else
            return -1;
    } else if (concept1 instanceof ObjectValueRestriction) {
        if (concept2 instanceof Nothing || concept2 instanceof NamedClass || concept2 instanceof BooleanValueRestriction || concept2 instanceof DatatypeSomeRestriction) {
            return 1;
        } else if (concept2 instanceof ObjectValueRestriction) {
            int roleCompare = rc.compare(((ObjectValueRestriction) concept1).getRestrictedPropertyExpression(), ((ObjectValueRestriction) concept2).getRestrictedPropertyExpression());
            if (roleCompare == 0) {
                Individual value1 = ((ObjectValueRestriction) concept1).getIndividual();
                Individual value2 = ((ObjectValueRestriction) concept2).getIndividual();
                return value1.compareTo(value2);
            } else {
                return roleCompare;
            }
        } else
            return -1;
    } else if (concept1 instanceof Thing) {
        if (concept2 instanceof Nothing || concept2 instanceof NamedClass || concept2 instanceof BooleanValueRestriction || concept2 instanceof DatatypeSomeRestriction || concept2 instanceof ObjectValueRestriction)
            return 1;
        else if (concept2 instanceof Thing)
            return 0;
        else
            return -1;
    } else if (concept1 instanceof Negation) {
        if (concept2.getChildren().size() < 1)
            return 1;
        else if (concept2 instanceof Negation)
            return compare(concept1.getChild(0), concept2.getChild(0));
        else
            return -1;
    } else if (concept1 instanceof ObjectSomeRestriction) {
        if (concept2.getChildren().size() < 1 || concept2 instanceof Negation)
            return 1;
        else if (concept2 instanceof ObjectSomeRestriction) {
            int roleCompare = rc.compare(((ObjectQuantorRestriction) concept1).getRole(), ((ObjectQuantorRestriction) concept2).getRole());
            if (roleCompare == 0)
                return compare(concept1.getChild(0), concept2.getChild(0));
            else
                return roleCompare;
        } else
            return -1;
    } else if (concept1 instanceof ObjectAllRestriction) {
        if (concept2.getChildren().size() < 1 || concept2 instanceof Negation || concept2 instanceof ObjectSomeRestriction)
            return 1;
        else if (concept2 instanceof ObjectAllRestriction) {
            int roleCompare = rc.compare(((ObjectQuantorRestriction) concept1).getRole(), ((ObjectQuantorRestriction) concept2).getRole());
            if (roleCompare == 0)
                return compare(concept1.getChild(0), concept2.getChild(0));
            else
                return roleCompare;
        } else
            return -1;
    } else if (concept1 instanceof ObjectMinCardinalityRestriction) {
        if (concept2.getChildren().size() < 1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction)
            return 1;
        else if (concept2 instanceof ObjectMinCardinalityRestriction) {
            int roleCompare = rc.compare(((ObjectCardinalityRestriction) concept1).getRole(), ((ObjectCardinalityRestriction) concept2).getRole());
            if (roleCompare == 0) {
                Integer number1 = ((ObjectCardinalityRestriction) concept1).getNumber();
                Integer number2 = ((ObjectCardinalityRestriction) concept2).getNumber();
                int numberCompare = number1.compareTo(number2);
                if (numberCompare == 0)
                    return compare(concept1.getChild(0), concept2.getChild(0));
                else
                    return numberCompare;
            } else
                return roleCompare;
        } else
            return -1;
    } else if (concept1 instanceof ObjectMaxCardinalityRestriction) {
        if (concept2.getChildren().size() < 1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction || concept2 instanceof ObjectMinCardinalityRestriction)
            return 1;
        else if (concept2 instanceof ObjectMaxCardinalityRestriction) {
            int roleCompare = rc.compare(((ObjectCardinalityRestriction) concept1).getRole(), ((ObjectCardinalityRestriction) concept2).getRole());
            if (roleCompare == 0) {
                Integer number1 = ((ObjectCardinalityRestriction) concept1).getNumber();
                Integer number2 = ((ObjectCardinalityRestriction) concept2).getNumber();
                int numberCompare = number1.compareTo(number2);
                if (numberCompare == 0)
                    return compare(concept1.getChild(0), concept2.getChild(0));
                else
                    return numberCompare;
            } else
                return roleCompare;
        } else
            return -1;
    } else if (concept1 instanceof Intersection) {
        if (concept2.getChildren().size() < 2)
            return 1;
        else if (concept2 instanceof Intersection) {
            int nrOfChildrenConcept1 = concept1.getChildren().size();
            int nrOfChildrenConcept2 = concept2.getChildren().size();
            if (nrOfChildrenConcept1 > nrOfChildrenConcept2)
                return 1;
            else if (nrOfChildrenConcept1 == nrOfChildrenConcept2) {
                for (int i = 0; i < nrOfChildrenConcept1; i++) {
                    int compareValue = compare(concept1.getChild(i), concept2.getChild(i));
                    if (compareValue > 0)
                        return 1;
                    else if (compareValue < 0)
                        return -1;
                }
                return 0;
            } else
                return -1;
        } else
            return -1;
    } else if (concept1 instanceof Union) {
        if (concept2.getChildren().size() < 2 || concept2 instanceof Intersection)
            return 1;
        else if (concept2 instanceof Union) {
            int nrOfChildrenConcept1 = concept1.getChildren().size();
            int nrOfChildrenConcept2 = concept2.getChildren().size();
            if (nrOfChildrenConcept1 > nrOfChildrenConcept2)
                return 1;
            else if (nrOfChildrenConcept1 == nrOfChildrenConcept2) {
                for (int i = 0; i < nrOfChildrenConcept1; i++) {
                    int compareValue = compare(concept1.getChild(i), concept2.getChild(i));
                    if (compareValue > 0)
                        return 1;
                    else if (compareValue < 0)
                        return -1;
                }
                return 0;
            } else
                return -1;
        } else
            return -1;
    } else
        throw new RuntimeException(concept1.toString());
}

Output:
     } else if (concept1 instanceof Thing) {
-        if (concept2 instanceof Nothing || concept2 instanceof NamedClass || concept2 instanceof BooleanValueRestriction || concept2 instanceof DatatypeSomeRestriction || concept2 instanceof ObjectValueRestriction)
+        if (concept2 instanceof Nothing || concept2 instanceof NamedClass || concept2 instanceof BooleanValueRestriction || concept2 instanceof DatatypeSomeRestriction || concept2 instanceof ObjectValueRestriction || concept2 instanceof DatatypeValueRestriction)
             return 1;


Input:
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
    if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == false) {
        if (logger.isDebugEnabled()) {
            logger.debug("String_Node_Str" + actionedUponNodeRef.toString() + "String_Node_Str");
        }
    } else {
        recordService.hideRecord(actionedUponNodeRef);
    }
}

Output:
 protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
-    if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == false) {
+    if (!nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD)) {
         if (logger.isDebugEnabled()) {


Input:
private void createContentSelection(ESelectionType selectionType, int contentID) {
    if (elementSelectionManager.checkStatus(selectionType, contentID))
        return;
    if (selectionType == ESelectionType.MOUSE_OVER && elementSelectionManager.checkStatus(ESelectionType.SELECTION, contentID) && elementSelectionManager.getElements(ESelectionType.MOUSE_OVER).size() == 0)
        return;
    connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
    if (elementSelectionManager.checkStatus(ESelectionType.SELECTION, contentID) && selectionType == ESelectionType.SELECTION)
        elementSelectionManager.removeFromType(selectionType, contentID);
    int test = elementSelectionManager.getNumberOfElements();
    elementSelectionManager.add(contentID);
    elementSelectionManager.addToType(selectionType, contentID);
    test = elementSelectionManager.getNumberOfElements();
    setDisplayListDirty();
}

Output:
         return;
-    if (selectionType == ESelectionType.MOUSE_OVER && elementSelectionManager.checkStatus(ESelectionType.SELECTION, contentID) && elementSelectionManager.getElements(ESelectionType.MOUSE_OVER).size() == 0)
+    if (elementSelectionManager.checkStatus(ESelectionType.SELECTION, contentID) && selectionType == ESelectionType.DESELECTED) {
+        elementSelectionManager.removeFromType(ESelectionType.SELECTION, contentID);
+        setDisplayListDirty();
         return;


Input:
protected int getScore(MatchState state, Node node) throws IOException {
    int score = 0;
    int nodeIndex = node.getCharacters().length - 1, targetIndex = node.position + node.getLength();
    if (targetIndex >= state.getTargetUserAgentArray().length) {
        score = targetIndex - state.getTargetUserAgentArray().length;
        nodeIndex -= score;
        targetIndex = state.getTargetUserAgentArray().length - 1;
    }
    while (nodeIndex >= 0 && score < state.getLowestScore()) {
        int difference = Math.abs(state.getTargetUserAgentArray()[targetIndex] - node.getCharacters()[nodeIndex]);
        if (difference != 0) {
            int numericDifference = 0;
            int newNodeIndex = nodeIndex + 1;
            int newTargetIndex = targetIndex + 1;
            while (newNodeIndex < node.getLength() && newTargetIndex < state.getTargetUserAgentArray().length && getIsNumeric(state.getTargetUserAgentArray()[newTargetIndex]) && getIsNumeric(node.getCharacters()[newNodeIndex])) {
                newNodeIndex++;
                newTargetIndex++;
            }
            nodeIndex = newNodeIndex - 1;
            targetIndex = newTargetIndex - 1;
            int characters = 0;
            while (nodeIndex >= 0 && getIsNumeric(state.getTargetUserAgentArray()[targetIndex]) && getIsNumeric(node.getCharacters()[nodeIndex])) {
                nodeIndex--;
                targetIndex--;
                characters++;
            }
            if (characters > 1) {
                numericDifference = Math.abs(getNumber(state.getTargetUserAgentArray(), targetIndex + 1, characters) - getNumber(node.getCharacters(), nodeIndex + 1, characters));
            }
            if (numericDifference != 0) {
                score += numericDifference;
            } else {
                score += (difference * 10);
            }
        }
        nodeIndex--;
        targetIndex--;
    }
    return score;
}

Output:
             int newTargetIndex = targetIndex + 1;
-            while (newNodeIndex < node.getLength() && newTargetIndex < state.getTargetUserAgentArray().length && getIsNumeric(state.getTargetUserAgentArray()[newTargetIndex]) && getIsNumeric(node.getCharacters()[newNodeIndex])) {
+            while (newNodeIndex < node.getLength() && newTargetIndex < state.getTargetUserAgentArray().length && BaseEntity.getIsNumeric(state.getTargetUserAgentArray()[newTargetIndex]) && BaseEntity.getIsNumeric(node.getCharacters()[newNodeIndex])) {
                 newNodeIndex++;


Input:
private void cleanTempTables(boolean closeSession) {
    if (localTempTables != null && localTempTables.size() > 0) {
        synchronized (database) {
            Iterator<Table> it = localTempTables.values().iterator();
            while (it.hasNext()) {
                Table table = it.next();
                if (closeSession || table.getOnCommitDrop()) {
                    modificationId++;
                    table.setModified();
                    it.remove();
                    table.removeChildrenAndResources(this);
                    if (closeSession) {
                        database.commit(this);
                    }
                } else if (table.getOnCommitTruncate()) {
                    table.truncate(this);
                }
            }
            if (closeSession) {
                database.unlockMeta(this);
            }
        }
    }
}

Output:
         synchronized (database) {
-            Iterator<Table> it = localTempTables.values().iterator();
-            while (it.hasNext()) {
-                Table table = it.next();
+            HashMap<String, Table> tempTables = localTempTables;
+            localTempTables = null;
+            for (Table table : tempTables.values()) {
                 if (closeSession || table.getOnCommitDrop()) {


Input:
public static Collection<IAtsVersion> createVersions(XResultData resultData, SkynetTransaction transaction, IAtsTeamDefinition teamDefHoldingVersions, Collection<String> newVersionNames) {
    List<IAtsVersion> verArts = new ArrayList<IAtsVersion>();
    for (String newVer : newVersionNames) {
        if (!Strings.isValid(newVer)) {
            resultData.logError("String_Node_Str");
        }
        for (IAtsVersion verArt : teamDefHoldingVersions.getVersions()) {
            if (verArt.getName().equals(newVer)) {
                resultData.logError(String.format("String_Node_Str", newVer));
            }
        }
    }
    if (!resultData.isErrors()) {
        try {
            for (String newVer : newVersionNames) {
                IAtsVersion version = AtsConfigCache.instance.getVersionFactory().createVersion(newVer);
                AtsVersionService.get().setTeamDefinition(version, teamDefHoldingVersions);
                new VersionArtifactStore(version).saveToArtifact(transaction);
            }
        } catch (Exception ex) {
            OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
        }
    }
    return verArts;
}

Output:
 public static Collection<IAtsVersion> createVersions(XResultData resultData, SkynetTransaction transaction, IAtsTeamDefinition teamDefHoldingVersions, Collection<String> newVersionNames) {
-    List<IAtsVersion> verArts = new ArrayList<IAtsVersion>();
+    List<IAtsVersion> versions = new ArrayList<IAtsVersion>();
     for (String newVer : newVersionNames) {


Input:
protected String getRepositoryItemFromRepositoryName(IElementParameter param, String repositoryName) {
    String value = (String) param.getValue();
    Object[] valuesList = param.getListItemsValue();
    String[] originalList = param.getListItemsDisplayCodeName();
    for (int i = 0; i < valuesList.length; i++) {
        if (valuesList[i].equals(value)) {
            if ("String_Node_Str".equals(repositoryName)) {
                return valuesList[i].toString();
            }
            return originalList[i];
        }
    }
    return "String_Node_Str";
}

Output:
         if (valuesList[i].equals(value)) {
-            if ("String_Node_Str".equals(repositoryName)) {
+            if ("String_Node_Str".equals(repositoryName) || HiveConstant.DISTRIBUTION_PARAMETER.equals(repositoryName) || HiveConstant.VERSION_PARAMETER.equals(repositoryName)) {
                 return valuesList[i].toString();


Input:
public boolean recalculate(AnalysisManager analyses, StacksizeAnalysis stacksize) {
    deltaLocals = invokee.getCode().getMaxLocals();
    if (!checkStackAndLocals(stacksize)) {
        return false;
    }
    deltaCodesize = calcDeltaCodesize(analyses);
    isLastLocalInvoke = checkIsLastLocalInvoke();
    isLastInvoke = isLastLocalInvoke && checkIsLastInvoker();
    localGain = calcLocalGain(analyses);
    deltaCacheMiss = -analyses.getMethodCacheAnalysis().getInvokeReturnMissCosts(invokeSite, invokee);
    return true;
}

Output:
     localGain = calcLocalGain(analyses);
-    deltaCacheMiss = -analyses.getMethodCacheAnalysis().getInvokeReturnMissCosts(invokeSite, invokee);
+    deltaCacheMiss = calcDeltaCacheMissCosts(analyses);
     return true;


Input:
public static <A extends AbstractAssert> A hasPksNames(A assertion, WritableAssertionInfo info, Change change, String... names) {
    if (names == null) {
        throw new NullPointerException("String_Node_Str");
    }
    List<String> pksNameList = change.getPksNameList();
    List<String> pksList = new ArrayList(pksNameList);
    Collections.sort(pksList);
    List<String> namesList = new ArrayList();
    for (String name : names) {
        if (name == null) {
            throw new NullPointerException("String_Node_Str");
        }
        namesList.add(name.toUpperCase());
    }
    Collections.sort(namesList);
    if (!namesList.equals(pksList)) {
        String[] pksNames = pksNameList.toArray(new String[pksNameList.size()]);
        throw failures.failure(info, shouldHavePksNames(pksNames, names));
    }
    return assertion;
}

Output:
     List<String> pksNameList = change.getPksNameList();
-    List<String> pksList = new ArrayList(pksNameList);
+    List<String> pksList = new ArrayList<String>(pksNameList);
     Collections.sort(pksList);


Input:
public void open() {
    if (this.getParent() instanceof Menubar)
        response("String_Node_Str", new AuInvoke(this, "String_Node_Str", null));
}

Output:
     if (this.getParent() instanceof Menubar)
-        response("String_Node_Str", new AuInvoke(this, "String_Node_Str", null));
+        response("String_Node_Str", new AuInvoke(this, "String_Node_Str", (Object) null));
 }


Input:
public void next(Container parent) {
    synchronized (parent.getTreeLock()) {
        checkLayout(parent);
        show(parent, (currentCard + 1) % vector.size(), true);
    }
}

Output:
         checkLayout(parent);
-        show(parent, (currentCard + 1) % vector.size(), true);
+        show(parent, (currentCard + 1) % componentList.size(), true);
     }


Input:
public boolean fling(int velocityX, int velocityY, ChartComputator computator) {
    computator.computeScrollSurfaceSize(surfaceSizeBuffer);
    scrollerStartViewport.set(computator.getCurrentViewport());
    int startX = (int) (surfaceSizeBuffer.x * (scrollerStartViewport.left - computator.getMaximumViewport().left) / computator.getMaximumViewport().width());
    int startY = (int) (surfaceSizeBuffer.y * (computator.getMaximumViewport().top - scrollerStartViewport.top) / computator.getMaximumViewport().height());
    scroller.abortAnimation();
    scroller.fling(startX, startY, velocityX, velocityY, 0, surfaceSizeBuffer.x - computator.getContentRectMinusAllMargins().width(), 0, surfaceSizeBuffer.y - computator.getContentRectMinusAllMargins().height());
    return true;
}

Output:
     scroller.abortAnimation();
-    scroller.fling(startX, startY, velocityX, velocityY, 0, surfaceSizeBuffer.x - computator.getContentRectMinusAllMargins().width(), 0, surfaceSizeBuffer.y - computator.getContentRectMinusAllMargins().height());
+    final int width = computator.getContentRectMinusAllMargins().width();
+    final int height = computator.getContentRectMinusAllMargins().height();
+    scroller.fling(startX, startY, velocityX, velocityY, 0, surfaceSizeBuffer.x - width + 1, 0, surfaceSizeBuffer.y - height + 1);
     return true;


Input:
public void sendDirectCommunicationMessage(NetworkMessage message, int targetPlayerId) {
    if (playerId != -1) {
        if (message instanceof NetworkMessageLarge) {
            ((NetworkMessageLarge) message).integers.add(targetPlayerId);
            ((NetworkMessageLarge) message).integers.add(playerId);
        } else if (message instanceof NetworkMessageMedium) {
            ((NetworkMessageMedium) message).integers.add(targetPlayerId);
            ((NetworkMessageLarge) message).integers.add(playerId);
        } else {
            NetworkMessageMedium msg = new NetworkMessageMedium();
            msg.setMessage(message.getMessage());
            msg.integers.add(targetPlayerId);
            msg.integers.add(playerId);
            message = msg;
        }
        message.setMessageType(NetworkMessage.MessageType.DIRECT_COMMUNICATION_MESSAGE);
        writeOut(message);
    } else {
        throw new NotYetRegisteredException("String_Node_Str");
    }
}

Output:
             ((NetworkMessageMedium) message).integers.add(targetPlayerId);
-            ((NetworkMessageLarge) message).integers.add(playerId);
+            ((NetworkMessageMedium) message).integers.add(playerId);
         } else {


Input:
public Account getAccount() {
    if (account != null) {
        if (sp.getLong(PREF_SELECTED_ACCOUNT, 0) == account.getId()) {
            return account;
        }
    }
    AccountDataSource data = new AccountDataSource(this);
    data.open();
    Account acc = data.getAccount(sp.getLong(PREF_SELECTED_ACCOUNT, 0));
    data.close();
    return acc;
}

Output:
     data.open();
-    Account acc = data.getAccount(sp.getLong(PREF_SELECTED_ACCOUNT, 0));
+    account = data.getAccount(sp.getLong(PREF_SELECTED_ACCOUNT, 0));
     data.close();


Input:
public void onItemClick(AdapterView<?> listView, View view, int position, long id) {
    if (id == EntityListAdapter.SPECIAL_ACTION) {
        triggerDetailAction(position - adapter.getCount());
        return;
    }
    TreeReference selection = adapter.getItem(position);
    if (CommCarePreferences.isEntityDetailLoggingEnabled()) {
        Logger.log(EntityDetailActivity.class.getSimpleName(), selectDatum.getLongDetail());
    }
    if (inAwesomeMode) {
        displayReferenceAwesome(selection, position);
        updateSelectedItem(selection, false);
    } else {
        Intent i = EntityDetailUtils.getDetailIntent(getApplicationContext(), selection, null, selectDatum, asw);
        i.putExtra("String_Node_Str", position);
        if (mNoDetailMode) {
            returnWithResult(i);
        } else {
            startActivityForResult(i, CONFIRM_SELECT);
        }
    }
}

Output:
     if (id == EntityListAdapter.SPECIAL_ACTION) {
-        triggerDetailAction(position - adapter.getCount());
+        triggerDetailAction(position - (adapter.getCount() - 1));
         return;


Input:
protected void createFieldAreas(Composite parent) {
    JavaTextControl nameControl = new JavaTextControl(ControlTypes.NAME, getOffsetLabelLocation(), suggestionName);
    nameControl.createControlArea(parent);
    nameControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.NAME, suggestionName) {
        protected void handleValidatedValue(ControlSelectionEvent event) {
            Object selection = event.getSelectionData();
            if (selection instanceof String) {
                suggestionName = (String) selection;
            }
        }
    });
    JavaTypeBrowsingControl declaringTypeControl = new JavaTypeBrowsingControl(ControlTypes.DECLARING_TYPE, getOffsetLabelLocation(), declaringTypeName, getJavaProject()) {
        protected IValueCheckingRule getCachedValidationRule() {
            return new JavaValidTypeRule(getJavaProject());
        }
    };
    declaringTypeControl.createControlArea(parent);
    declaringTypeControl.setEnabled(true);
    declaringTypeControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.DECLARING_TYPE, declaringTypeName) {
        protected void handleValidatedValue(ControlSelectionEvent event) {
            Object selection = event.getSelectionData();
            if (selection instanceof String) {
                declaringTypeName = (String) selection;
            }
        }
    });
    JavaTypeBrowsingControl suggestionTypeControl = new JavaTypeBrowsingControl(ControlTypes.TYPE, getOffsetLabelLocation(), suggestionType, getJavaProject());
    suggestionTypeControl.createControlArea(parent);
    suggestionTypeControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.TYPE, suggestionType) {
        protected void handleValidatedValue(ControlSelectionEvent event) {
            Object selection = event.getSelectionData();
            if (selection instanceof String) {
                suggestionType = (String) selection;
            }
        }
    });
    ButtonDialogueControl isStaticButton = new ButtonDialogueControl(ControlTypes.IS_STATIC, SWT.CHECK, isStatic);
    isStaticButton.createControlArea(parent);
    isStaticButton.addSelectionListener(new ControlSelectionListener() {
        public void handleSelection(ControlSelectionEvent event) {
            Object selection = event.getSelectionData();
            if (selection instanceof Boolean) {
                isStatic = ((Boolean) selection).booleanValue();
            }
        }
    });
    ControlTypes defaultSuggestionTypeButton = isMethod ? ControlTypes.METHOD : ControlTypes.PROPERTY;
    RadioSelectionDialogueControl radioSelection = new RadioSelectionDialogueControl(new IDialogueControlDescriptor[] { ControlTypes.PROPERTY, ControlTypes.METHOD }, defaultSuggestionTypeButton);
    radioSelection.createControlArea(parent);
    table = new MethodArgumentTable(getJavaProject(), initialParameters, useNamedArguments);
    table.createControlArea(parent);
    if (!isMethod) {
        table.setEnabled(false);
    }
    table.addSelectionListener(new ControlSelectionListener() {
        public void handleSelection(ControlSelectionEvent event) {
            Object selection = event.getSelectionData();
            if (event.getControlDescriptor() == ControlTypes.USE_NAMED_ARGUMENTS && selection instanceof Boolean) {
                useNamedArguments = ((Boolean) selection).booleanValue();
            }
        }
    });
    radioSelection.addSelectionListener(new ControlSelectionListener() {
        public void handleSelection(ControlSelectionEvent event) {
            IDialogueControlDescriptor descriptor = event.getControlDescriptor();
            if (descriptor == ControlTypes.PROPERTY) {
                table.setEnabled(false);
                isMethod = false;
            } else if (descriptor == ControlTypes.METHOD) {
                table.setEnabled(true);
                isMethod = true;
            }
        }
    });
}

Output:
     });
-    JavaTypeBrowsingControl suggestionTypeControl = new JavaTypeBrowsingControl(ControlTypes.TYPE, getOffsetLabelLocation(), suggestionType, getJavaProject());
+    JavaTypeBrowsingControl suggestionTypeControl = new JavaTypeBrowsingControl(ControlTypes.TYPE, getOffsetLabelLocation(), suggestionType, getJavaProject()) {
+        protected ValueStatus isControlValueValid(String value) {
+            if (value == null || value.length() == 0) {
+                return ValueStatus.getValidStatus(value);
+            }
+            return super.isControlValueValid(value);
+        }
+    };
     suggestionTypeControl.createControlArea(parent);


Input:
public void draw() {
    super.draw();
    if (!updated.isEmpty()) {
        updateVertices();
        quads.limit(bufferLength * 16);
        if (buffer == null)
            buffer = new Vertexbuffer(quads);
        else {
            if (fullUpdate) {
                buffer.updateVertices(quads);
                fullUpdate = false;
            } else {
                buffer.updateVertices(quads, topLeftUpdating * 16, bottomRightUpdating * 16);
            }
        }
        topLeftUpdating = 0;
        updating.setEmpty();
    }
    Camera c = Camera.main;
    if (camX == null || camX != (int) c.scroll.x / 16 || camY != (int) c.scroll.y / 16 || camW != (int) Math.ceil(c.width / cellW) || camH != (int) Math.ceil(c.height / cellH)) {
        camX = (int) c.scroll.x / 16;
        camY = (int) c.scroll.y / 16;
        camW = (int) Math.ceil(c.width / cellW);
        camH = (int) Math.ceil(c.height / cellH);
        if (camX > mapWidth || camY > mapHeight || camW + camW < 0 || camH + camH < 0)
            return;
        topLeft = Math.max(camX, 0) + Math.max(camY * mapWidth, 0);
        while (bufferPositions[topLeft] == -1) topLeft++;
        bottomRight = Math.min(camX + camW, mapWidth - 1) + Math.min((camY + camH) * mapWidth, (mapHeight - 1) * mapWidth);
        while (bufferPositions[bottomRight] == -1) bottomRight--;
        length = bufferPositions[bottomRight] - bufferPositions[topLeft] + 1;
    }
    if (camX > mapWidth || camY > mapHeight || camW + camW < 0 || camH + camH < 0)
        return;
    NoosaScript script = NoosaScriptNoLighting.get();
    texture.bind();
    script.uModel.valueM4(matrix);
    script.camera(camera);
    script.drawQuadSet(buffer, length, bufferPositions[topLeft]);
}

Output:
         camH = (int) Math.ceil(c.height / cellH);
-        if (camX > mapWidth || camY > mapHeight || camW + camW < 0 || camH + camH < 0)
+        if (camX >= mapWidth || camY >= mapHeight || camW + camW <= 0 || camH + camH <= 0)
             return;


Input:
private BufferedImage decodeStrippedTiff(IFD ifd) throws Exception {
    TiffField<?> field = ifd.getField(TiffTag.COMPRESSION.getValue());
    short[] data = (short[]) field.getData();
    TiffFieldEnum.Compression compression = TiffFieldEnum.Compression.fromValue(data[0] & 0xffff);
    System.out.println("String_Node_Str" + compression.getDescription());
    TiffField<?> f_stripOffsets = ifd.getField(TiffTag.STRIP_OFFSETS.getValue());
    TiffField<?> f_stripByteCounts = ifd.getField(TiffTag.STRIP_BYTE_COUNTS.getValue());
    int[] stripOffsets = f_stripOffsets.getDataAsLong();
    int[] stripByteCounts = f_stripByteCounts.getDataAsLong();
    int imageWidth = ifd.getField(TiffTag.IMAGE_WIDTH.getValue()).getDataAsLong()[0];
    int imageHeight = ifd.getField(TiffTag.IMAGE_LENGTH.getValue()).getDataAsLong()[0];
    System.out.println("String_Node_Str" + imageWidth);
    System.out.println("String_Node_Str" + imageHeight);
    TiffField<?> f_rowsPerStrip = ifd.getField(TiffTag.ROWS_PER_STRIP.getValue());
    int rowsPerStrip = imageHeight;
    if (f_rowsPerStrip != null)
        rowsPerStrip = f_rowsPerStrip.getDataAsLong()[0];
    System.out.println("String_Node_Str" + rowsPerStrip);
    TiffField<?> f_photoMetric = ifd.getField(TiffTag.PHOTOMETRIC_INTERPRETATION.getValue());
    int photoMetric = f_photoMetric.getDataAsLong()[0];
    TiffFieldEnum.PhotoMetric e_photoMetric = TiffFieldEnum.PhotoMetric.fromValue(photoMetric);
    System.out.println("String_Node_Str" + e_photoMetric);
    TiffField<?> f_bitsPerSample = ifd.getField(TiffTag.BITS_PER_SAMPLE.getValue());
    int bitsPerSample = f_bitsPerSample.getDataAsLong()[0];
    System.out.println("String_Node_Str" + bitsPerSample);
    TiffField<?> f_samplesPerPixel = ifd.getField(TiffTag.SAMPLES_PER_PIXEL.getValue());
    int samplesPerPixel = f_samplesPerPixel.getDataAsLong()[0];
    System.out.println("String_Node_Str" + samplesPerPixel);
    TiffField<?> f_predictor = ifd.getField(TiffTag.PREDICTOR.getValue());
    int predictor = 0;
    if (f_predictor != null) {
        predictor = f_predictor.getDataAsLong()[0];
        System.out.println("String_Node_Str" + predictor);
    }
    TiffField<?> f_planaryConfiguration = ifd.getField(TiffTag.PLANAR_CONFIGURATTION.getValue());
    int planaryConfiguration = 1;
    if (f_planaryConfiguration != null)
        planaryConfiguration = f_planaryConfiguration.getDataAsLong()[0];
    TiffFieldEnum.PlanarConfiguration e_planaryConfiguration = TiffFieldEnum.PlanarConfiguration.fromValue(planaryConfiguration);
    System.out.println("String_Node_Str" + e_planaryConfiguration);
    boolean transparent = false;
    boolean isAssociatedAlpha = false;
    int numOfBands = samplesPerPixel;
    int trans = Transparency.OPAQUE;
    TiffField<?> f_extraSamples = ifd.getField(TiffTag.EXTRA_SAMPLES.getValue());
    if (f_extraSamples != null)
        isAssociatedAlpha = (f_extraSamples.getDataAsLong()[0] == 1) ? true : false;
    int offset = 0;
    ImageDecoder decoder = null;
    byte[] pixels = null;
    int[] stripBytes = TIFFTweaker.getUncompressedStripByteCounts(ifd, stripOffsets.length);
    int[] count = new int[samplesPerPixel];
    if (planaryConfiguration == 2) {
        int inc = stripBytes.length / samplesPerPixel;
        int startOff = 0;
        int endOff = inc;
        for (int k = 0; k < samplesPerPixel; k++) {
            for (int j = startOff; j < endOff; j++) count[k] += stripBytes[j];
            startOff += inc;
            endOff += inc;
        }
    }
    switch(e_photoMetric) {
        case PALETTE_COLOR:
            short[] colorMap = (short[]) ifd.getField(TiffTag.COLORMAP.getValue()).getData();
            rgbColorPalette = new int[colorMap.length / 3];
            int numOfColors = (1 << bitsPerSample);
            int numOfColors2 = (numOfColors << 1);
            for (int i = 0, index = 0; i < colorMap.length / 3; i++) {
                rgbColorPalette[index++] = 0xff000000 | ((colorMap[i] & 0xff00) << 8) | ((colorMap[i + numOfColors] & 0xff00)) | ((colorMap[i + numOfColors2] & 0xff00) >> 8);
            }
            int bytesPerScanLine = (imageWidth * bitsPerSample + 7) / 8;
            pixels = new byte[bytesPerScanLine * imageHeight];
            switch(compression) {
                case NONE:
                    for (int i = 0; i < stripByteCounts.length; i++) {
                        int bytes2Read = stripBytes[i];
                        randIS.seek(stripOffsets[i]);
                        randIS.readFully(pixels, offset, bytes2Read);
                        offset += bytes2Read;
                    }
                    break;
                case LZW:
                    decoder = new LZWTreeDecoder(8, true);
                    break;
                case DEFLATE:
                case DEFLATE_ADOBE:
                    decoder = new DeflateDecoder();
                    break;
                default:
            }
            if (decoder != null) {
                for (int i = 0; i < stripByteCounts.length; i++) {
                    byte[] temp = new byte[stripByteCounts[i]];
                    randIS.seek(stripOffsets[i]);
                    randIS.readFully(temp);
                    decoder.setInput(temp);
                    int numOfBytes = decoder.decode(pixels, offset, stripBytes[i]);
                    offset += numOfBytes;
                }
            }
            DataBuffer db = new DataBufferByte(pixels, pixels.length);
            WritableRaster raster = null;
            if (bitsPerSample != 8) {
                raster = Raster.createPackedRaster(db, imageWidth, imageHeight, bitsPerSample, null);
            } else {
                int[] off = { 0 };
                raster = Raster.createInterleavedRaster(db, imageWidth, imageHeight, imageWidth, 1, off, null);
            }
            ColorModel cm = new IndexColorModel(bitsPerSample, rgbColorPalette.length, rgbColorPalette, 0, false, -1, DataBuffer.TYPE_BYTE);
            return new BufferedImage(cm, raster, false, null);
        case SEPARATED:
            bytesPerScanLine = samplesPerPixel * ((imageWidth * bitsPerSample + 7) / 8);
            if (planaryConfiguration == 2)
                bytesPerScanLine = (imageWidth * bitsPerSample + 7) / 8;
            pixels = new byte[imageHeight * bytesPerScanLine];
            switch(compression) {
                case NONE:
                    bytesPerScanLine = imageWidth * samplesPerPixel * bitsPerSample / 8;
                    pixels = new byte[imageWidth * bytesPerScanLine];
                    for (int i = 0; i < stripByteCounts.length; i++) {
                        int bytes2Read = stripBytes[i];
                        randIS.seek(stripOffsets[i]);
                        randIS.readFully(pixels, offset, bytes2Read);
                        offset += bytes2Read;
                    }
                    break;
                case LZW:
                    decoder = new LZWTreeDecoder(8, true);
                    break;
                case DEFLATE:
                case DEFLATE_ADOBE:
                    decoder = new DeflateDecoder();
                    break;
                default:
                    break;
            }
            if (decoder != null) {
                for (int i = 0; i < stripByteCounts.length; i++) {
                    int bytes2Read = stripBytes[i];
                    byte[] temp = new byte[stripByteCounts[i]];
                    randIS.seek(stripOffsets[i]);
                    randIS.readFully(temp);
                    decoder.setInput(temp);
                    int numOfBytes = decoder.decode(pixels, offset, bytes2Read);
                    offset += numOfBytes;
                }
            }
            if (predictor == 2 && planaryConfiguration == 1)
                pixels = applyDePredictor(samplesPerPixel, pixels, imageWidth, imageHeight);
            db = new DataBufferByte(pixels, pixels.length);
            TiffField<?> f_colorProfile = ifd.getField(TiffTag.ICC_PROFILE.getValue());
            ICC_Profile profile = null;
            if (f_colorProfile != null)
                profile = ICC_Profile.getInstance((byte[]) f_colorProfile.getData());
            ColorSpace colorSpace = CMYKColorSpace.getInstance();
            if (profile != null)
                colorSpace = new ICC_ColorSpace(profile);
            int[] bandoff = { 0, 1, 2, 3 };
            int[] nBits = { 8, 8, 8, 8 };
            if (samplesPerPixel >= 5) {
                bandoff = new int[] { 0, 1, 2, 3, 4 };
                nBits = new int[] { 8, 8, 8, 8, 8 };
                trans = Transparency.TRANSLUCENT;
                transparent = true;
            }
            if (bitsPerSample == 16) {
                short[] spixels = ArrayUtils.byteArrayToShortArray(pixels, true);
                db = new DataBufferUShort(spixels, spixels.length);
                int[] off = { 0, 1, 2, 3 };
                nBits = new int[] { 16, 16, 16, 16 };
                trans = Transparency.OPAQUE;
                numOfBands = samplesPerPixel;
                if (samplesPerPixel >= 5) {
                    off = new int[] { 0, 1, 2, 3, 4 };
                    nBits = new int[] { 16, 16, 16, 16, 16 };
                    trans = Transparency.TRANSLUCENT;
                }
                raster = Raster.createInterleavedRaster(db, imageWidth, imageHeight, imageWidth * numOfBands, numOfBands, off, null);
                cm = new ComponentColorModel(CMYKColorSpace.getInstance(), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_USHORT);
            } else {
                cm = new ComponentColorModel(colorSpace, nBits, transparent, false, trans, DataBuffer.TYPE_BYTE);
                if (planaryConfiguration == 2) {
                    bandoff = new int[] { 0, count[0], count[0] + count[1], count[0] + count[1] + count[2] };
                    int[] bandIndices = new int[] { 0, 0, 0, 0 };
                    if (samplesPerPixel >= 5) {
                        bandoff = new int[] { 0, count[0], count[0] + count[1], count[0] + count[1] + count[2], count[0] + count[1] + count[2] + count[3] };
                        bandIndices = new int[] { 0, 0, 0, 0, 0 };
                    }
                    raster = Raster.createBandedRaster(db, imageWidth, imageHeight, bytesPerScanLine, bandIndices, bandoff, null);
                    if (profile != null) {
                        raster = IMGUtils.CMYK2RGB(raster, cm);
                        cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_BYTE);
                    }
                } else {
                    raster = Raster.createInterleavedRaster(db, imageWidth, imageHeight, imageWidth * numOfBands, numOfBands, bandoff, null);
                    if (profile != null) {
                        raster = IMGUtils.CMYK2RGB(raster, cm);
                        cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_BYTE);
                    }
                }
            }
            return new BufferedImage(cm, raster, false, null);
        case YCbCr:
            int[] samplingFactor = { 2, 2 };
            TiffField<?> f_YCbCrSubSampling = ifd.getField(TiffTag.YCbCr_SUB_SAMPLING.getValue());
            if (f_YCbCrSubSampling != null)
                samplingFactor = f_YCbCrSubSampling.getDataAsLong();
            int expandedImageWidth = ((imageWidth + samplingFactor[0] - 1) / samplingFactor[0]) * samplingFactor[0];
            int expandedImageHeight = ((imageHeight + samplingFactor[1] - 1) / samplingFactor[1]) * samplingFactor[1];
            float referenceBlackY = 0.0f;
            float referenceWhiteY = 255.0f;
            float referenceBlackCb = 128.0f;
            float referenceWhiteCb = 255.0f;
            float referenceBlackCr = 128.0f;
            float referenceWhiteCr = 255.0f;
            float codingRangeY = 255.0f;
            float codingRangeCbCr = 127.0f;
            TiffField<?> f_referenceBlackWhite = ifd.getField(TiffTag.REFERENCE_BLACK_WHITE.getValue());
            if (f_referenceBlackWhite != null) {
                int[] referenceBlackWhite = f_referenceBlackWhite.getDataAsLong();
                referenceBlackY = 1.0f * referenceBlackWhite[0] / referenceBlackWhite[1];
                referenceWhiteY = 1.0f * referenceBlackWhite[2] / referenceBlackWhite[3];
                referenceBlackCb = 1.0f * referenceBlackWhite[4] / referenceBlackWhite[5];
                referenceWhiteCb = 1.0f * referenceBlackWhite[6] / referenceBlackWhite[7];
                referenceBlackCr = 1.0f * referenceBlackWhite[8] / referenceBlackWhite[9];
                referenceWhiteCr = 1.0f * referenceBlackWhite[10] / referenceBlackWhite[11];
            }
            float lumaRed = 0.299f;
            float lumaGreen = 0.587f;
            float lumaBlue = 0.114f;
            TiffField<?> f_YCbCrCoefficients = ifd.getField(TiffTag.YCbCr_COEFFICIENTS.getValue());
            if (f_YCbCrCoefficients != null) {
                int[] lumas = f_YCbCrCoefficients.getDataAsLong();
                lumaRed = 1.0f * lumas[0] / lumas[1];
                lumaGreen = 1.0f * lumas[2] / lumas[3];
                lumaBlue = 1.0f * lumas[4] / lumas[5];
            }
            int bytesPerUnitY = samplingFactor[0] * samplingFactor[1];
            int bytesPerUnitCb = 1;
            int bytesPerUnitCr = 1;
            int bytesPerDataUnit = bytesPerUnitY + bytesPerUnitCb + bytesPerUnitCr;
            int dataUnitsPerWidth = expandedImageWidth / samplingFactor[0];
            int offsetX = 0;
            int offsetY = 0;
            int bytesY = expandedImageWidth * expandedImageHeight;
            pixels = new byte[bytesY * 3 + rowsPerStrip * expandedImageWidth * samplesPerPixel];
            switch(compression) {
                case NONE:
                    if (planaryConfiguration == 1) {
                        byte[] temp = null;
                        for (int i = 0; i < stripByteCounts.length; i++) {
                            randIS.seek(stripOffsets[i]);
                            int len = stripByteCounts[i];
                            temp = new byte[len];
                            randIS.readFully(temp);
                            offset = 0;
                            offsetX = 0;
                            int numOfDataUnit = len / bytesPerDataUnit;
                            for (int j = 1; j <= numOfDataUnit; j++) {
                                int offsetCb = offset + bytesPerUnitY;
                                int Cb = temp[offsetCb] & 0xff;
                                int Cr = temp[offsetCb + 1] & 0xff;
                                for (int k = 0; k < samplingFactor[1]; k++) {
                                    for (int l = 0; l < samplingFactor[0]; l++, offsetX++) {
                                        int Y = temp[offset++] & 0xff;
                                        float fY = (Y - referenceBlackY) * codingRangeY / (referenceWhiteY - referenceBlackY);
                                        float fCb = (Cb - referenceBlackCb) * codingRangeCbCr / (referenceWhiteCb - referenceBlackCb);
                                        float fCr = (Cr - referenceBlackCr) * codingRangeCbCr / (referenceWhiteCr - referenceBlackCr);
                                        float R = (fCr * (2 - 2 * lumaRed) + fY);
                                        float B = (fCb * (2 - 2 * lumaBlue) + fY);
                                        float G = ((fY - lumaBlue * B - lumaRed * R) / lumaGreen);
                                        if (R < 0)
                                            R = 0;
                                        if (R > 255)
                                            R = 255;
                                        if (G < 0)
                                            G = 0;
                                        if (G > 255)
                                            G = 255;
                                        if (B < 0)
                                            B = 0;
                                        if (B > 255)
                                            B = 255;
                                        int yPos = offsetX + offsetY * expandedImageWidth;
                                        int redPos = 3 * yPos;
                                        pixels[redPos] = (byte) R;
                                        pixels[redPos + 1] = (byte) G;
                                        pixels[redPos + 2] = (byte) B;
                                    }
                                    offsetX -= samplingFactor[0];
                                    offsetY += 1;
                                }
                                offsetY -= samplingFactor[1];
                                offset += 2;
                                offsetX += samplingFactor[0];
                                if (j % dataUnitsPerWidth == 0) {
                                    offsetY += samplingFactor[1];
                                    offsetX = 0;
                                }
                            }
                        }
                    } else {
                    }
                    break;
                case LZW:
                    if (planaryConfiguration == 1) {
                        byte[] temp = null;
                        byte[] temp2 = null;
                        for (int i = 0; i < stripByteCounts.length; i++) {
                            randIS.seek(stripOffsets[i]);
                            int len = stripByteCounts[i];
                            temp = new byte[len];
                            randIS.readFully(temp);
                            temp2 = new byte[stripBytes[i]];
                            decoder = new LZWTreeDecoder(8, true);
                            decoder.setInput(temp);
                            int numOfBytes = decoder.decode(temp2, 0, temp2.length);
                            offset = 0;
                            offsetX = 0;
                            int numOfDataUnit = numOfBytes / bytesPerDataUnit;
                            for (int j = 1; j <= numOfDataUnit; j++) {
                                int offsetCb = offset + bytesPerUnitY;
                                int Cb = temp2[offsetCb] & 0xff;
                                int Cr = temp2[offsetCb + 1] & 0xff;
                                for (int k = 0; k < samplingFactor[1]; k++) {
                                    for (int l = 0; l < samplingFactor[0]; l++, offsetX++) {
                                        int Y = temp2[offset++] & 0xff;
                                        float fY = (Y - referenceBlackY) * codingRangeY / (referenceWhiteY - referenceBlackY);
                                        float fCb = (Cb - referenceBlackCb) * codingRangeCbCr / (referenceWhiteCb - referenceBlackCb);
                                        float fCr = (Cr - referenceBlackCr) * codingRangeCbCr / (referenceWhiteCr - referenceBlackCr);
                                        float R = (fCr * (2 - 2 * lumaRed) + fY);
                                        float B = (fCb * (2 - 2 * lumaBlue) + fY);
                                        float G = ((fY - lumaBlue * B - lumaRed * R) / lumaGreen);
                                        if (R < 0)
                                            R = 0;
                                        if (R > 255)
                                            R = 255;
                                        if (G < 0)
                                            G = 0;
                                        if (G > 255)
                                            G = 255;
                                        if (B < 0)
                                            B = 0;
                                        if (B > 255)
                                            B = 255;
                                        int yPos = offsetX + offsetY * expandedImageWidth;
                                        int redPos = 3 * yPos;
                                        pixels[redPos] = (byte) R;
                                        pixels[redPos + 1] = (byte) G;
                                        pixels[redPos + 2] = (byte) B;
                                    }
                                    offsetX -= samplingFactor[0];
                                    offsetY += 1;
                                }
                                offsetY -= samplingFactor[1];
                                offset += 2;
                                offsetX += samplingFactor[0];
                                if (j % dataUnitsPerWidth == 0) {
                                    offsetY += samplingFactor[1];
                                    offsetX = 0;
                                }
                            }
                        }
                    } else {
                    }
                    break;
                default:
            }
            db = new DataBufferByte(pixels, pixels.length);
            bandoff = new int[] { 0, 1, 2 };
            transparent = false;
            numOfBands = samplesPerPixel;
            trans = Transparency.OPAQUE;
            nBits = new int[] { 8, 8, 8 };
            raster = Raster.createInterleavedRaster(db, expandedImageWidth, expandedImageHeight, expandedImageWidth * numOfBands, numOfBands, bandoff, null);
            cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_BYTE);
            return new BufferedImage(cm, raster, false, null).getSubimage(0, 0, imageWidth, imageHeight);
        case RGB:
            bytesPerScanLine = samplesPerPixel * ((imageWidth * bitsPerSample + 7) / 8);
            int totalBytes2Read = imageHeight * bytesPerScanLine;
            if (planaryConfiguration == 2)
                bytesPerScanLine = (imageWidth * bitsPerSample + 7) / 8;
            pixels = new byte[totalBytes2Read];
            switch(compression) {
                case NONE:
                    for (int i = 0; i < stripByteCounts.length; i++) {
                        int bytes2Read = stripBytes[i];
                        randIS.seek(stripOffsets[i]);
                        randIS.readFully(pixels, offset, bytes2Read);
                        offset += bytes2Read;
                    }
                    break;
                case PACKBITS:
                    for (int i = 0; i < stripByteCounts.length; i++) {
                        int bytes2Read = stripBytes[i];
                        byte[] temp = new byte[stripByteCounts[i]];
                        randIS.seek(stripOffsets[i]);
                        randIS.readFully(temp);
                        byte[] temp2 = new byte[bytes2Read];
                        Packbits.unpackbits(temp, temp2);
                        System.arraycopy(temp2, 0, pixels, offset, bytes2Read);
                        offset += bytes2Read;
                    }
                    break;
                case LZW:
                    decoder = new LZWTreeDecoder(8, true);
                    break;
                case DEFLATE:
                case DEFLATE_ADOBE:
                    decoder = new DeflateDecoder();
                    break;
                default:
            }
            if (decoder != null) {
                pixels = new byte[stripOffsets.length * stripBytes[0]];
                for (int i = 0; i < stripByteCounts.length; i++) {
                    byte[] temp = new byte[stripByteCounts[i]];
                    randIS.seek(stripOffsets[i]);
                    randIS.readFully(temp);
                    decoder.setInput(temp);
                    int numOfBytes = decoder.decode(pixels, offset, stripBytes[i]);
                    offset += numOfBytes;
                }
            }
            if (predictor == 2) {
                if (planaryConfiguration == 1)
                    pixels = applyDePredictor(samplesPerPixel, pixels, imageWidth, imageHeight);
                else {
                    int dataOffset = 0;
                    for (int k = 0; k < samplesPerPixel; k++) {
                        applyDePredictor2(pixels, dataOffset, imageWidth, imageHeight);
                        dataOffset += count[k];
                    }
                }
            }
            bandoff = new int[] { 0, 1, 2 };
            transparent = false;
            numOfBands = samplesPerPixel;
            trans = Transparency.OPAQUE;
            if (bitsPerSample == 16) {
                short[] spixels = ArrayUtils.byteArrayToShortArray(pixels, endian == IOUtils.BIG_ENDIAN);
                db = new DataBufferUShort(spixels, spixels.length);
                nBits = new int[] { 16, 16, 16 };
                if (samplesPerPixel == 4) {
                    bandoff = new int[] { 0, 1, 2, 3 };
                    nBits = new int[] { 16, 16, 16, 16 };
                    trans = Transparency.TRANSLUCENT;
                    transparent = true;
                }
            } else {
                db = new DataBufferByte(pixels, pixels.length);
                nBits = new int[] { 8, 8, 8 };
                if (samplesPerPixel == 4) {
                    bandoff = new int[] { 0, 1, 2, 3 };
                    nBits = new int[] { 8, 8, 8, 8 };
                    trans = Transparency.TRANSLUCENT;
                    transparent = true;
                }
            }
            if (planaryConfiguration == 2) {
                bandoff = new int[] { 0, count[0] * 8 / bitsPerSample, (count[0] + count[1]) * 8 / bitsPerSample };
                int[] bandIndices = new int[] { 0, 0, 0 };
                if (samplesPerPixel == 4) {
                    bandoff = new int[] { 0, count[0] * 8 / bitsPerSample, (count[0] + count[1]) * 8 / bitsPerSample, (count[0] + count[1] + count[2]) * 8 / bitsPerSample };
                    bandIndices = new int[] { 0, 0, 0, 0 };
                }
                raster = Raster.createBandedRaster(db, imageWidth, imageHeight, bytesPerScanLine * 8 / bitsPerSample, bandIndices, bandoff, null);
            } else
                raster = Raster.createInterleavedRaster(db, imageWidth, imageHeight, imageWidth * numOfBands, numOfBands, bandoff, null);
            if (bitsPerSample == 16)
                cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_USHORT);
            else
                cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), nBits, transparent, isAssociatedAlpha, trans, DataBuffer.TYPE_BYTE);
            return new BufferedImage(cm, raster, false, null);
        default:
            break;
    }
    return null;
}

Output:
             int bytesY = expandedImageWidth * expandedImageHeight;
-            pixels = new byte[bytesY * 3 + rowsPerStrip * expandedImageWidth * samplesPerPixel];
-            switch(compression) {
-                case NONE:
-                    if (planaryConfiguration == 1) {
-                        byte[] temp = null;
+            pixels = new byte[bytesY * 3];
+            byte[] temp = null, temp2 = null;
+            if (planaryConfiguration == 1) {
+                int bytesPerUnitY = samplingFactor[0] * samplingFactor[1];
+                int bytesPerUnitCb = 1;
+                int bytesPerUnitCr = 1;
+                int bytesPerDataUnit = bytesPerUnitY + bytesPerUnitCb + bytesPerUnitCr;
+                int dataUnitsPerWidth = expandedImageWidth / samplingFactor[0];
+                switch(compression) {
+                    case NONE:
                         for (int i = 0; i < stripByteCounts.length; i++) {


Input:
private OTEServer createOTEServer(NodeInfo nodeInfo, EnvironmentCreationParameter environmentCreationParameter, PropertyParamter propertyParameter, String uuid) throws NumberFormatException, UnknownHostException {
    OTEServer server = new OTEServer();
    server.setName(environmentCreationParameter.getServerTitle().toString());
    server.setStation(propertyParameter.getStation());
    server.setVersion(propertyParameter.getVersion());
    server.setType(propertyParameter.getType());
    server.setComment(propertyParameter.getComment());
    server.setStartTime(new Date().toString());
    server.setOwner(System.getProperty("String_Node_Str"));
    server.setUUID(uuid);
    server.setOteRestServer(String.format("String_Node_Str", InetAddress.getLocalHost().getHostAddress(), Integer.parseInt(System.getProperty("String_Node_Str"))));
    server.setOteActivemqServer(nodeInfo.getUri().toString());
    return server;
}

Output:
     server.setUUID(uuid);
-    server.setOteRestServer(String.format("String_Node_Str", InetAddress.getLocalHost().getHostAddress(), Integer.parseInt(System.getProperty("String_Node_Str"))));
+    if (System.getProperty("String_Node_Str") == null) {
+        server.setOteRestServer(String.format("String_Node_Str", InetAddress.getLocalHost().getHostAddress(), 80));
+    } else {
+        server.setOteRestServer(String.format("String_Node_Str", InetAddress.getLocalHost().getHostAddress(), Integer.parseInt(System.getProperty("String_Node_Str"))));
+    }
     server.setOteActivemqServer(nodeInfo.getUri().toString());


Input:
public static void hit(int pos, float angle) {
    Group parent = Dungeon.hero.sprite.parent;
    Wound w = (Wound) parent.recycle(Wound.class);
    parent.bringToFront(w);
    w.reset(pos);
    w.angle = angle;
}

Output:
     Group parent = Dungeon.hero.sprite.parent;
-    Wound w = (Wound) parent.recycle(Wound.class);
-    parent.bringToFront(w);
-    w.reset(pos);
-    w.angle = angle;
+    Surprise s = (Surprise) parent.recycle(Surprise.class);
+    parent.bringToFront(s);
+    s.reset(pos);
+    s.angle = angle;
 }


Input:
public static LibraryFile readFromByteBuf(ByteBuf buf) {
    String fileName = ByteBufUtils.readUTF8String(buf);
    String filePath = ByteBufUtils.readUTF8String(buf);
    boolean directory = buf.readBoolean();
    ISkinType skinType = null;
    if (!directory) {
        String regName = ByteBufUtils.readUTF8String(buf);
        skinType = SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(regName);
    }
    return new LibraryFile(fileName, filePath, skinType, directory);
}

Output:
     ISkinType skinType = null;
-    if (!directory) {
+    if (buf.readBoolean()) {
         String regName = ByteBufUtils.readUTF8String(buf);


Input:
public boolean getSecureCommunicationStatus() {
    return usingSRTP;
}

Output:
 public boolean getSecureCommunicationStatus() {
-    return usingSRTP;
+    return usingZRTP;
 }


Input:
static void compile(Context cx, ObjectValue global, InputStream in, String filename, String file_encoding, ObjectList<IncludeInfo> includes, String swf_options, String avmplus_exe, ObjectList<CompilerPlug> plugs, boolean emit_doc_info, boolean show_parsetrees, boolean show_bytes, boolean show_flow, boolean lint_mode, boolean emit_metadata, boolean save_comment_nodes, boolean emit_debug_info, ObjectList<String> import_filespecs) {
    ProgramNode second = null;
    ObjectList<ImportNode> imports = new ObjectList<ImportNode>();
    for (String filespec : import_filespecs) {
        Context cx2 = new Context(cx.statics);
        BufferedInputStream import_in = null;
        try {
            if (filespec.endsWith("String_Node_Str")) {
                second = (new AbcParser(cx2, filespec)).parseAbc();
                if (second == null) {
                    cx.error(-1, kError_InvalidAbcFile, filespec);
                }
            } else {
                import_in = new BufferedInputStream(new FileInputStream(filespec));
                cx2.setPath(new File(filespec).getAbsoluteFile().getParent());
                second = (new Parser(cx2, import_in, filespec, null, emit_doc_info, save_comment_nodes)).parseProgram();
            }
        } catch (IOException ex) {
            cx.error(-1, kError_UnableToOpenFile, filespec);
        } finally {
            if (import_in != null) {
                try {
                    import_in.close();
                } catch (IOException ex) {
                }
            }
        }
        NodeFactory nodeFactory = cx2.getNodeFactory();
        imports.push_back(nodeFactory.Import(cx2, nodeFactory.literalString(filespec, 0), second));
        cx2.getNodeFactory().pkg_defs.clear();
    }
    cx.setPath(new File(filename).getAbsoluteFile().getParent());
    ProgramNode node = (new Parser(cx, in, filename, file_encoding, emit_doc_info, save_comment_nodes)).parseProgram();
    node.imports = imports;
    ObjectList<ProgramNode> nodes = new ObjectList<ProgramNode>();
    {
        ProgramNode node2;
        {
            if (includes != null) {
                Iterator<IncludeInfo> in_it = includes.iterator();
                for (; in_it.hasNext(); ) {
                    IncludeInfo iinfo = in_it.next();
                    Context cx2 = new Context(cx.statics);
                    node2 = (new Parser(cx2, iinfo.script, iinfo.name, iinfo.encoding, emit_doc_info, save_comment_nodes)).parseProgram();
                    nodes.add(node2);
                }
            }
        }
    }
    cx.pushScope(global);
    if (includes != null && includes.size() > 0) {
        ObjectList<Node> stmts = node.statements.items;
        for (int i = nodes.size() - 1; i >= 0; --i) {
            Context cx2 = nodes.get(i).cx;
            NodeFactory nodeFactory = cx2.getNodeFactory();
            String name = includes.get(i).name;
            LiteralStringNode first = nodeFactory.literalString(name, 0);
            IncludeDirectiveNode idn = nodeFactory.includeDirective(cx2, first, nodes.get(i));
            StatementListNode istmts = nodeFactory.statementList(null, idn);
            ObjectList<Node> items = istmts.items;
            stmts.addAll(0, items);
        }
    }
    node.pkgdefs.clear();
    node.pkgdefs.addAll(cx.getNodeFactory().pkg_defs);
    if (show_parsetrees && cx.errorCount() == 0) {
        printParseTrees(cx.scriptName(), node, cx, "String_Node_Str");
        return;
    }
    if (cx.errorCount() == 0) {
        ConfigurationEvaluator ce = new ConfigurationEvaluator();
        node.evaluate(cx, ce);
    }
    if (cx.errorCount() == 0) {
        FlowGraphEmitter flowem = new FlowGraphEmitter(cx, filename, show_flow);
        FlowAnalyzer flower = new FlowAnalyzer(flowem);
        node.evaluate(cx, flower);
        node.evaluate(cx, flower);
    }
    if (cx.errorCount() == 0) {
        if (emit_metadata) {
            MetaDataEvaluator printer = new MetaDataEvaluator(emit_debug_info);
            node.evaluate(cx, printer);
        }
    }
    if (cx.errorCount() == 0) {
        ConstantEvaluator analyzer = new ConstantEvaluator(cx);
        node.evaluate(cx, analyzer);
    }
    if (cx.errorCount() == 0 && emit_doc_info) {
        MetaDataEvaluator printer = new MetaDataEvaluator();
        node.evaluate(cx, printer);
        StringBuilder out = new StringBuilder();
        out.append("String_Node_Str").append(newline);
        ObjectList<DocCommentNode> comments = printer.doccomments;
        int numComments = comments.size();
        for (int x = 0; x < numComments; x++) {
            comments.get(x).emit(cx, out);
        }
        out.append(newline).append("String_Node_Str").append(newline);
        BufferedOutputStream warningOut = null;
        try {
            String outName = cx.scriptName() + "String_Node_Str";
            warningOut = new BufferedOutputStream(new FileOutputStream(new File(cx.path(), outName)));
            warningOut.write(out.toString().getBytes());
            warningOut.flush();
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            if (warningOut != null) {
                try {
                    warningOut.close();
                    System.err.println("String_Node_Str" + cx.path() + "String_Node_Str" + cx.scriptName() + "String_Node_Str");
                } catch (IOException ex) {
                }
            }
        }
        return;
    }
    if (lint_mode && cx.errorCount() == 0) {
        LintEvaluator evaluator = new LintEvaluator(cx, filename, (String) null);
        node.evaluate(cx, evaluator);
        evaluator.logWarnings(cx);
        evaluator.clear();
    }
    if (cx.errorCount() == 0) {
        Emitter emitter = cx.getEmitter();
        CodeGenerator generator = new CodeGenerator(emitter);
        node.evaluate(cx, generator);
    }
    cx.popScope();
}

Output:
         for (int x = 0; x < numComments; x++) {
-            comments.get(x).emit(cx, out);
+            DocCommentNode d = comments.get(x);
+            if (d.def == prev && d.values == null && d.id == null)
+                continue;
+            d.emit(cx, out);
+            prev = d.def;
         }


Input:
private void scanForAssets() {
    int colorCount = 0;
    int assetCount = 0;
    if (this.selectedFile != null && this.selectedFile.getCanonicalPath() != null) {
        File assetRoot = new File(this.selectedFile.getCanonicalPath());
        final FilenameFilter systemFileNameFiler = new FilenameFilter() {
            public boolean accept(File file, String s) {
                return !s.startsWith("String_Node_Str");
            }
        };
        File[] colorDirs = assetRoot.listFiles(systemFileNameFiler);
        if (colorDirs != null) {
            for (File file : colorDirs) {
                if (file.isDirectory()) {
                    colorCount++;
                }
            }
            if (colorDirs.length >= 1) {
                File exColorDir = colorDirs[0];
                File[] densities = exColorDir.listFiles(systemFileNameFiler);
                if (densities != null && densities.length >= 1) {
                    File exDensity = densities[0];
                    File[] assets = exDensity.listFiles(systemFileNameFiler);
                    for (File asset : assets) {
                        if (!asset.isDirectory()) {
                            String extension = asset.getName().substring(asset.getName().lastIndexOf("String_Node_Str") + 1);
                            if (extension.equalsIgnoreCase("String_Node_Str")) {
                                assetCount++;
                            }
                        }
                    }
                }
            }
        }
    }
    foundColorsText.setText(colorCount + "String_Node_Str");
    foundAssetsText.setText(assetCount + "String_Node_Str");
}

Output:
                     File[] assets = exDensity.listFiles(systemFileNameFiler);
-                    for (File asset : assets) {
-                        if (!asset.isDirectory()) {
-                            String extension = asset.getName().substring(asset.getName().lastIndexOf("String_Node_Str") + 1);
-                            if (extension.equalsIgnoreCase("String_Node_Str")) {
-                                assetCount++;
+                    if (assets != null) {
+                        for (File asset : assets) {
+                            if (!asset.isDirectory()) {
+                                String extension = asset.getName().substring(asset.getName().lastIndexOf("String_Node_Str") + 1);
+                                if (extension.equalsIgnoreCase("String_Node_Str")) {
+                                    assetCount++;
+                                }
                             }


Input:
public void attemptRead() {
    final ReadDataShare readData = new ReadDataShare(this);
    final Action1<Long> systemTimeListener = new Action1<Long>() {
        public void call(Long s) {
            if (s != null) {
                Log.d(TAG, "String_Node_Str" + s + "String_Node_Str");
                final long addativeSystemTimeOffset = new Date().getTime() - s;
                final Action1<EGVRecord[]> evgRecordListener = new Action1<EGVRecord[]>() {
                    public void call(EGVRecord[] egvRecords) {
                        if (egvRecords != null) {
                            Log.d(TAG, "String_Node_Str" + egvRecords.length + "String_Node_Str");
                            BgReading.create(egvRecords, addativeSystemTimeOffset, getApplicationContext());
                            setRetryTimer();
                        }
                    }
                };
                final Action1<SensorRecord[]> sensorRecordListener = new Action1<SensorRecord[]>() {
                    public void call(SensorRecord[] sensorRecords) {
                        if (sensorRecords != null) {
                            Log.d(TAG, "String_Node_Str" + sensorRecords.length + "String_Node_Str");
                            BgReading.create(sensorRecords, addativeSystemTimeOffset, getApplicationContext());
                            readData.getRecentEGVs(evgRecordListener);
                        }
                    }
                };
                final Action1<CalRecord[]> calRecordListener = new Action1<CalRecord[]>() {
                    public void call(CalRecord[] calRecords) {
                        if (calRecords != null) {
                            Log.d(TAG, "String_Node_Str" + calRecords.length + "String_Node_Str");
                            Calibration.create(calRecords, addativeSystemTimeOffset, getApplicationContext());
                            readData.getRecentSensorRecords(sensorRecordListener);
                        }
                    }
                };
                readData.getRecentCalRecords(calRecordListener);
            }
        }
    };
    readData.readSystemTime(systemTimeListener);
}

Output:
 public void attemptRead() {
-    final ReadDataShare readData = new ReadDataShare(this);
+    Log.d(TAG, "String_Node_Str");
     final Action1<Long> systemTimeListener = new Action1<Long>() {


Input:
private void checkout() throws NoWorkTreeException, IOException {
    for (Map.Entry<String, DirCacheEntry> entry : toBeCheckedOut.entrySet()) {
        File f = new File(db.getWorkTree(), entry.getKey());
        if (entry.getValue() != null) {
            createDir(f.getParentFile());
            DirCacheCheckout.checkoutEntry(db, f, entry.getValue());
        } else {
            if (!f.delete())
                failingPathes.put(entry.getKey(), MergeFailureReason.COULD_NOT_DELETE);
        }
        modifiedFiles.add(entry.getKey());
    }
}

Output:
             if (!f.delete())
-                failingPathes.put(entry.getKey(), MergeFailureReason.COULD_NOT_DELETE);
+                failingPaths.put(entry.getKey(), MergeFailureReason.COULD_NOT_DELETE);
         }


Input:
public void deleteExpectedState(UUID slotId) {
    Preconditions.checkNotNull(slotId, "String_Node_Str");
    if (!isDomainCreate()) {
        List<Attribute> attributes = newArrayList();
        attributes.add(new Attribute("String_Node_Str", null));
        attributes.add(new Attribute("String_Node_Str", null));
        attributes.add(new Attribute("String_Node_Str", null));
        try {
            simpleDb.deleteAttributes(new DeleteAttributesRequest().withDomainName(domainName).withItemName(slotId.toString()).withAttributes(attributes));
            expectedStateStoreUp();
        } catch (Exception e) {
            expectedStateStoreDown(e);
        }
    }
}

Output:
     Preconditions.checkNotNull(slotId, "String_Node_Str");
-    if (!isDomainCreate()) {
+    if (isDomainCreated()) {
         List<Attribute> attributes = newArrayList();


Input:
private final void unboxComment() throws org.eclipse.jface.text.BadLocationException {
    if ((offset > 2) && (text.charAt(offset) == ')')) {
        offset--;
    }
    if ((offset > 1) && (text.charAt(offset) == '*')) {
        offset--;
    }
    String errorMsg = "String_Node_Str";
    int startOffset = text.lastIndexOf("String_Node_Str", offset);
    int endOffset = text.indexOf("String_Node_Str", offset) + 3;
    if ((startOffset < 0) || (endOffset < 0)) {
        displayNotInBoxedCommentError(errorMsg);
        return;
    }
    int startIndent = startOffset - doc.getLineOffset(doc.getLineOfOffset(startOffset));
    int asteriskLength = RightMargin - startIndent - 1;
    String asterisks = StringHelper.copyString("String_Node_Str", asteriskLength);
    int beginLine = doc.getLineOfOffset(startOffset);
    int endLine = doc.getLineOfOffset(endOffset);
    if (beginLine == endLine) {
        if (text.substring(startOffset + 1, endOffset - 1).equals(StringHelper.copyString("String_Node_Str", endOffset - startOffset - 2))) {
            displayNotInBoxedCommentError("String_Node_Str" + "String_Node_Str");
        } else {
            displayNotInBoxedCommentError(errorMsg);
        }
        return;
    }
    StringBuffer buffer = new StringBuffer(endOffset - startOffset - 6 * (endLine - beginLine));
    buffer.append(asterisks);
    buffer.append(StringHelper.newline);
    for (int i = beginLine + 1; i < endLine; i++) {
        IRegion lineInfo = doc.getLineInformation(i);
        String currentLine = doc.get(lineInfo.getOffset(), lineInfo.getLength());
        int beginTokenIndex = currentLine.indexOf("String_Node_Str");
        int endTokenIndex = currentLine.indexOf("String_Node_Str");
        if ((!(beginTokenIndex < 0)) && (!(beginTokenIndex > endTokenIndex))) {
            buffer.append(StringHelper.trimEnd(currentLine.substring(beginTokenIndex + 3, endTokenIndex)));
            buffer.append(StringHelper.newline);
        } else {
            buffer.append(currentLine);
            buffer.append(StringHelper.newline);
        }
    }
    buffer.append(StringHelper.copyString("String_Node_Str", startIndent));
    buffer.append(asterisks);
    doc.replace(startOffset + 1, endOffset - 2 - startOffset, buffer.toString());
    return;
}

Output:
     }
-    StringBuffer buffer = new StringBuffer(endOffset - startOffset - 6 * (endLine - beginLine));
+    StringBuffer buffer = null;
+    int bufferSize = endOffset - startOffset - 6 * (endLine - beginLine);
+    if (bufferSize > 0) {
+        buffer = new StringBuffer(bufferSize);
+    } else {
+        buffer = new StringBuffer();
+    }
     buffer.append(asterisks);


Input:
public synchronized static ArrayList<JDFeedMeFeed> loadXML(String location) {
    Thread.currentThread().setContextClassLoader(JDUtilities.getJDClassLoader());
    File xmlFile = JDUtilities.getResourceFile(location);
    Object loaded;
    if (xmlFile.exists()) {
        loaded = JDIO.loadObject(JDUtilities.getResourceFile(location), true);
        if (loaded != null)
            return (ArrayList<JDFeedMeFeed>) loaded;
    }
    return new ArrayList<JDFeedMeFeed>();
}

Output:
     if (xmlFile.exists()) {
-        loaded = JDIO.loadObject(JDUtilities.getResourceFile(location), true);
+        Object loaded = JDIO.loadObject(xmlFile, true);
         if (loaded != null)


Input:
public void addData(int col, SheetData data) {
    if ((getStartRowId(col) > height) || (col >= getColumnCount())) {
        emitter.outputSheet();
        clearCachedSheetData();
    }
    List<SheetData> column = columns.get(col);
    int size = column.size();
    if (size > 0) {
        column.get(size - 1).clearContainer();
    }
    column.add(data);
    BookmarkDef bookmark = data.getBookmark();
    if (bookmark == null) {
        return;
    }
    int rowNo = columnId2StartRowId.get(new Integer(col)).intValue() + getStartRowId(col);
    bookmark.setColumnNo(col + 1);
    bookmark.setRowNo(rowNo);
    bookmarks.add(bookmark);
}

Output:
 public void addData(int col, SheetData data) {
-    if ((getStartRowId(col) > height) || (col >= getColumnCount())) {
-        emitter.outputSheet();
-        clearCachedSheetData();
-    }
-    List<SheetData> column = columns.get(col);
-    int size = column.size();
-    if (size > 0) {
-        column.get(size - 1).clearContainer();
-    }
-    column.add(data);
+    int rowIndex = data.getRowIndex();
+    columns.get(col).add(data);
+    maxRowIndex = maxRowIndex > rowIndex ? maxRowIndex : rowIndex;
     BookmarkDef bookmark = data.getBookmark();


Input:
private void caleRowMergeMinHeight(List figures, List adjust, List hasAdjust) {
    if (adjust.isEmpty()) {
        return;
    }
    int size = figures.size();
    Map map = getOwner().getViewer().getVisualPartMap();
    int adjustMax = 0;
    int trueAdjustMax = 0;
    int adjustMaxNumber = 0;
    for (int i = 0; i < size; i++) {
        IFigure figure = (IFigure) figures.get(i);
        ITableLayoutCell cellPart = (ITableLayoutCell) map.get(figure);
        int rowNumber = cellPart.getRowNumber();
        int rowSpan = cellPart.getRowSpan();
        Dimension minSize = figure.getMinimumSize(data.findColumnData(cellPart.getColumnNumber()).width, -1);
        int samMin = 0;
        int trueSamMin = 0;
        int[] adjustNumber = new int[0];
        for (int j = rowNumber; j < rowNumber + rowSpan; j++) {
            TableLayoutData.RowData rowData = data.findRowData(j);
            if (!hasAdjust.contains(new Integer(j))) {
                int len = adjustNumber.length;
                int[] temp = new int[len + 1];
                System.arraycopy(adjustNumber, 0, temp, 0, len);
                temp[len] = j;
                adjustNumber = temp;
            } else {
                samMin = samMin + rowData.trueMinRowHeight;
                trueSamMin = trueSamMin + rowData.trueMinRowHeight;
            }
        }
        int adjustCount = adjustNumber.length;
        if (adjustCount == 0) {
            continue;
        }
        int value = minSize.height - samMin;
        int trueValue = minSize.height - trueSamMin;
        for (int j = 0; j < adjustCount; j++) {
            int temp = 0;
            int trueTemp = 0;
            if (j == adjustCount - 1) {
                temp = value / adjustCount + value % adjustCount;
                trueTemp = trueValue / adjustCount + trueValue % adjustCount;
            } else {
                temp = value / adjustCount;
                trueTemp = trueValue / adjustCount;
            }
            TableLayoutData.RowData rowData = data.findRowData(adjustNumber[j]);
            temp = Math.max(temp, rowData.minRowHeight);
            trueTemp = Math.max(trueTemp, rowData.trueMinRowHeight);
            if (trueTemp > trueAdjustMax) {
                adjustMax = temp;
                trueAdjustMax = trueTemp;
                adjustMaxNumber = adjustNumber[j];
            }
        }
    }
    if (adjustMaxNumber > 0) {
        TableLayoutData.RowData rowData = data.findRowData(adjustMaxNumber);
        rowData.minRowHeight = adjustMax;
        rowData.trueMinRowHeight = trueAdjustMax;
        adjust.remove(new Integer(adjustMaxNumber));
        hasAdjust.add(new Integer(adjustMaxNumber));
        caleMergeMinHeight(figures, adjust, hasAdjust);
    }
}

Output:
             TableLayoutData.RowData rowData = data.findRowData(j);
-            if (!hasAdjust.contains(new Integer(j))) {
+            if (!hasAdjust.contains(Integer.valueOf(j))) {
                 int len = adjustNumber.length;


Input:
public void doMain(String[] args) {
    OptionsParser.init(this, args, System.out);
    try {
        CConfiguration conf = CConfiguration.create();
        if (zookeeper != null) {
            conf.set(Constants.CFG_ZOOKEEPER_ENSEMBLE, zookeeper);
        } else {
            conf.set(Constants.CFG_ZOOKEEPER_ENSEMBLE, Constants.DEFAULT_ZOOKEEPER_ENSEMBLE);
        }
        Injector injector = Guice.createInjector(new MetricsModules().getSingleNodeModules());
        MetricsServer service = injector.getInstance(MetricsServer.class);
        service.start(args, conf);
    } catch (Exception e) {
        Log.error("String_Node_Str", e.getMessage());
    }
}

Output:
 public void doMain(String[] args) {
-    OptionsParser.init(this, args, System.out);
+    OptionsParser.init(this, args, "String_Node_Str", "String_Node_Str", System.out);
     try {


Input:
public void testSimple() throws Exception {
    project.setProperty("String_Node_Str", "String_Node_Str");
    IvyResolve res = new IvyResolve();
    res.setProject(project);
    res.execute();
    publish.setPubrevision("String_Node_Str");
    publish.setResolver("String_Node_Str");
    File art = new File("String_Node_Str");
    FileUtil.copy(new File("String_Node_Str"), art, null);
    publish.execute();
    assertTrue(new File("String_Node_Str").exists());
    assertTrue(new File("String_Node_Str").exists());
    assertTrue(new File("String_Node_Str").exists());
    ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), new File("String_Node_Str").toURL(), false);
    assertEquals("String_Node_Str", md.getModuleRevisionId().getRevision());
}

Output:
     assertTrue(new File("String_Node_Str").exists());
-    ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), new File("String_Node_Str").toURL(), false);
+    ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), new File("String_Node_Str").toURI().toURL(), false);
     assertEquals("String_Node_Str", md.getModuleRevisionId().getRevision());


Input:
private Point2D[] _getHeadTailPoints(Connector c, List<Point2D> bendPoints) {
    TransformContext currentContext = c.getTransformContext();
    Point2D headPt, tailPt;
    Site headSite = c.getHeadSite();
    Site tailSite = c.getTailSite();
    if (currentContext != null) {
        headPt = _getCenterPoint(headSite);
        tailPt = _getCenterPoint(tailSite);
        Point2D headBend, tailBend;
        if (!bendPoints.isEmpty()) {
            headBend = bendPoints.get(0);
            tailBend = bendPoints.get(bendPoints.size() - 1);
        } else {
            headBend = tailPt;
            tailBend = headPt;
        }
        headSite.setNormal(_getNormal(headPt, headBend));
        tailSite.setNormal(_getNormal(tailPt, tailBend));
        headPt = headSite.getPoint(currentContext);
        tailPt = tailSite.getPoint(currentContext);
    } else {
        tailPt = tailSite.getPoint();
        headPt = headSite.getPoint();
    }
    Point2D[] result = { headPt, tailPt };
    return result;
}

Output:
     Point2D headPt, tailPt;
-    Site headSite = c.getHeadSite();
-    Site tailSite = c.getTailSite();
+    Site headSite = getHeadSite();
+    Site tailSite = getTailSite();
     if (currentContext != null) {


Input:
protected Object getValueFromSubject() {
    SessionAdapter adapter = (SessionAdapter) subject;
    if (adapter.hasNoClusteringService())
        return TriStateBoolean.UNDEFINED;
    return TriStateBoolean.valueOf(adapter.hasRemoteCommandManager());
}

Output:
     SessionAdapter adapter = (SessionAdapter) subject;
-    if (adapter.hasNoClusteringService())
-        return TriStateBoolean.UNDEFINED;
-    return TriStateBoolean.valueOf(adapter.hasRemoteCommandManager());
+    if (adapter.hasNoClusteringService()) {
+        return Boolean.FALSE;
+    }
+    return Boolean.valueOf(adapter.hasRemoteCommandManager());
 }


Input:
private static boolean downloadChemCompRecord(String recordName) {
    String localName = getLocalFileName(recordName);
    String u = SERVER_LOCATION + recordName + "String_Node_Str";
    logger.debug("String_Node_Str" + u);
    URL url = null;
    try {
        url = new URL(u);
        HttpURLConnection uconn = HTTPConnectionTools.openHttpURLConnection(url);
        try (PrintWriter pw = new PrintWriter(new GZIPOutputStream(new FileOutputStream(localName)));
            BufferedReader fileBuffer = new BufferedReader(new InputStreamReader(uconn.getInputStream()))) {
            String line;
            while ((line = fileBuffer.readLine()) != null) {
                pw.println(line);
            }
            pw.flush();
            return true;
        }
    } catch (FileNotFoundException e) {
        logger.warn(recordName + "String_Node_Str" + SERVER_LOCATION + "String_Node_Str");
    } catch (IOException e) {
        logger.error("String_Node_Str" + url.toString() + "String_Node_Str" + localName, e);
    }
    return false;
}

Output:
         HttpURLConnection uconn = HTTPConnectionTools.openHttpURLConnection(url);
-        try (PrintWriter pw = new PrintWriter(new GZIPOutputStream(new FileOutputStream(localName)));
+        try (PrintWriter pw = new PrintWriter(new GZIPOutputStream(new FileOutputStream(newFile)));
             BufferedReader fileBuffer = new BufferedReader(new InputStreamReader(uconn.getInputStream()))) {


Input:
protected String[] walkTokens() throws IOException {
    List<String> wordList = new ArrayList<>();
    while (input.incrementToken()) {
        CharTermAttribute textAtt = input.getAttribute(CharTermAttribute.class);
        OffsetAttribute offsetAtt = input.getAttribute(OffsetAttribute.class);
        char[] buffer = textAtt.buffer();
        String word = null;
        try {
            word = new String(buffer, 0, offsetAtt.endOffset() - offsetAtt.startOffset());
        } catch (StringIndexOutOfBoundsException ioe) {
            LOG.error(ioe.toString());
            word = ((PackedTokenAttributeImpl) offsetAtt).toString();
        }
        wordList.add(word);
        AttributeSource attrs = input.cloneAttributes();
        tokenAttrs.add(attrs);
    }
    String[] words = new String[wordList.size()];
    for (int i = 0; i < words.length; i++) {
        words[i] = wordList.get(i);
    }
    return words;
}

Output:
             LOG.error(ioe.toString());
-            word = ((PackedTokenAttributeImpl) offsetAtt).toString();
+            word = offsetAtt.toString();
         }


Input:
private Set<PlainVariable> getDeclaredVariables(Set<PDGNode> nodes) {
    Set<PlainVariable> declaredVariables = new LinkedHashSet<PlainVariable>();
    for (PDGNode node : nodes) {
        Iterator<AbstractVariable> iterator = node.getDeclaredVariableIterator();
        if (iterator.hasNext()) {
            AbstractVariable declaredVariable = iterator.next();
            if (declaredVariable instanceof PlainVariable) {
                declaredVariables.add((PlainVariable) declaredVariable);
            }
        }
    }
    return declaredVariables;
}

Output:
         Iterator<AbstractVariable> iterator = node.getDeclaredVariableIterator();
-        if (iterator.hasNext()) {
+        while (iterator.hasNext()) {
             AbstractVariable declaredVariable = iterator.next();


Input:
public static String getNotBlankTestMethodSource(MethodInfo testMethod, ClassInfo testClassinfo, String testTargetClassname) {
    PreferenceLoader pref = new PreferenceLoader();
    StringBuilder sb = new StringBuilder();
    String CRLF = STR.CARRIAGE_RETURN + STR.LINE_FEED;
    if (pref.isTestMethodGenEnabledSupportJMock2) {
        if (pref.isUsingJUnitHelperRuntime) {
            sb.append("String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(CRLF);
        } else {
            sb.append("String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(CRLF);
            sb.append("String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(CRLF);
            sb.append("String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(CRLF);
        }
    }
    if (pref.isTestMethodGenEnabledSupportEasyMock) {
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append(CRLF);
    }
    sb.append("String_Node_Str");
    String returnTypeName = testMethod.returnType.name;
    Object returnDefaultValue = null;
    if (!returnTypeName.equals("String_Node_Str")) {
        returnTypeName = returnTypeName.replaceAll(RXP_GENERICS_PART, STR.EMPTY);
        returnTypeName = getClassInSourceCode(returnTypeName, testTargetClassname, testClassinfo.importList);
        List<String> generics = testMethod.returnType.generics;
        int genericsLen = generics.size();
        if (genericsLen > 0) {
            returnTypeName += "String_Node_Str" + generics.get(0);
            for (int i = 1; i < genericsLen; i++) returnTypeName += "String_Node_Str" + generics.get(i);
            returnTypeName += "String_Node_Str";
        }
        if (PrimitiveTypeUtil.isPrimitive(returnTypeName)) {
            returnDefaultValue = PrimitiveTypeUtil.getTypeDefaultValue(returnTypeName);
        }
    }
    if (!testMethod.isStatic) {
        sb.append(testTargetClassname);
        sb.append("String_Node_Str");
        sb.append(testTargetClassname);
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
    }
    if (!returnTypeName.equals("String_Node_Str")) {
        sb.append(returnTypeName);
        sb.append("String_Node_Str");
        sb.append(returnDefaultValue);
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
    }
    List<ArgType> argTypes = testMethod.argTypes;
    List<String> args = new ArrayList<String>();
    int argTypesLen = argTypes.size();
    if (argTypesLen > 0 && argTypes.get(0).name != null && !argTypes.get(0).name.equals(STR.EMPTY)) {
        for (int i = 0; i < argTypesLen; i++) {
            ArgType argType = argTypes.get(i);
            if (argType.name.matches("String_Node_Str"))
                argType.name = argType.name.replaceAll("String_Node_Str", "String_Node_Str");
            String argTypeName = getClassInSourceCode(argType.name, testTargetClassname, testClassinfo.importList);
            boolean isJMock2 = pref.isTestMethodGenEnabledSupportJMock2 && MockGenUtil.isMockableClassName(argTypeName, testClassinfo.importList);
            boolean isEasyMock = pref.isTestMethodGenEnabledSupportEasyMock && MockGenUtil.isMockableClassName(argTypeName, testClassinfo.importList);
            if (isJMock2) {
                sb.append("String_Node_Str");
            }
            sb.append(argTypeName);
            if (argType.generics.size() > 0) {
                sb.append("String_Node_Str");
                sb.append(argType.generics.get(0));
                if (argType.generics.size() > 1) {
                    for (int j = 1; j < argType.generics.size(); j++) {
                        sb.append("String_Node_Str");
                        sb.append(argType.generics.get(j));
                    }
                }
                sb.append("String_Node_Str");
            }
            sb.append("String_Node_Str");
            sb.append(i);
            sb.append("String_Node_Str");
            if (PrimitiveTypeUtil.isPrimitive(argType.name)) {
                String primitiveDefault = PrimitiveTypeUtil.getTypeDefaultValue(argType.name);
                sb.append(primitiveDefault);
            } else {
                if (isJMock2) {
                    sb.append(pref.isUsingJUnitHelperRuntime ? "String_Node_Str" : "String_Node_Str");
                    sb.append("String_Node_Str");
                    sb.append(argTypeName);
                    sb.append("String_Node_Str");
                } else if (isEasyMock) {
                    sb.append("String_Node_Str");
                    sb.append(argTypeName);
                    sb.append("String_Node_Str");
                } else {
                    sb.append("String_Node_Str");
                }
            }
            sb.append("String_Node_Str");
            sb.append(CRLF);
            sb.append("String_Node_Str");
            args.add("String_Node_Str" + i);
        }
    }
    if (pref.isTestMethodGenEnabledSupportJMock2) {
        sb.append(pref.isUsingJUnitHelperRuntime ? "String_Node_Str" : "String_Node_Str");
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
    }
    if (pref.isTestMethodGenEnabledSupportEasyMock) {
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
        sb.append(CRLF);
        sb.append("String_Node_Str");
    }
    if (!returnTypeName.equals("String_Node_Str")) {
        sb.append(returnTypeName);
        sb.append("String_Node_Str");
    }
    if (testMethod.isStatic) {
        sb.append(testTargetClassname);
    } else {
        sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    sb.append(testMethod.methodName);
    sb.append("String_Node_Str");
    if (args.size() > 0 && argTypesLen > 0 && argTypes.get(0).name != null && !argTypes.get(0).name.equals(STR.EMPTY))
        sb.append(args.get(0));
    for (int i = 1; i < argTypes.size(); i++) {
        sb.append("String_Node_Str");
        sb.append(args.get(i));
    }
    sb.append("String_Node_Str");
    sb.append(CRLF);
    if (pref.isTestMethodGenEnabledSupportEasyMock) {
        sb.append("String_Node_Str");
        sb.append(CRLF);
    }
    if (!returnTypeName.equals("String_Node_Str")) {
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append(CRLF);
    }
    return sb.toString();
}

Output:
         if (pref.isUsingJUnitHelperRuntime) {
-            sb.append("String_Node_Str");
-            sb.append("String_Node_Str");
-            sb.append(CRLF);
+            if (pref.isJUnitVersion4) {
+                sb.append("String_Node_Str");
+                sb.append("String_Node_Str");
+                sb.append(CRLF);
+            }
         } else {