Input:
public CartridgeBean[] getAvailableSingleTenantCartridges() throws RestAPIException {
    int tenantId = getTenantId();
    if (!availableSingleTenantCartridges.containsKey(tenantId) && !availableSingleTenantCartridges.containsKey(PUBLIC_DEFINITION)) {
        return new HashMap<String, CartridgeBean>().values().toArray(new CartridgeBean[0]);
    }
    List<CartridgeBean> p = new ArrayList<CartridgeBean>();
    if (availableSingleTenantCartridges.get(tenantId) != null)
        p.addAll(availableSingleTenantCartridges.get(tenantId).values());
    if (availableSingleTenantCartridges.get(PUBLIC_DEFINITION) != null)
        p.addAll(availableSingleTenantCartridges.get(PUBLIC_DEFINITION).values());
    return p.toArray(new CartridgeBean[0]);
}

Output:
     if (!availableSingleTenantCartridges.containsKey(tenantId) && !availableSingleTenantCartridges.containsKey(PUBLIC_DEFINITION)) {
-        return new HashMap<String, CartridgeBean>().values().toArray(new CartridgeBean[0]);
+        Collection<CartridgeBean> cartridges = new HashMap<String, CartridgeBean>().values();
+        return cartridges.toArray(new CartridgeBean[cartridges.size()]);
     }


Input:
final void sendPendingThumbnail(HistoryRecord r, IBinder token, Bitmap thumbnail, CharSequence description, boolean always) {
    TaskRecord task = null;
    ArrayList receivers = null;
    synchronized (this) {
        if (r == null) {
            int index = indexOfTokenLocked(token, false);
            if (index < 0) {
                return;
            }
            r = (HistoryRecord) mHistory.get(index);
        }
        if (thumbnail == null) {
            thumbnail = r.thumbnail;
            description = r.description;
        }
        if (thumbnail == null && !always) {
            return;
        }
        task = r.task;
        int N = mPendingThumbnails.size();
        int i = 0;
        while (i < N) {
            PendingThumbnailsRecord pr = (PendingThumbnailsRecord) mPendingThumbnails.get(i);
            if (pr.pendingRecords.remove(r)) {
                if (receivers == null) {
                    receivers = new ArrayList();
                }
                receivers.add(pr);
                if (pr.pendingRecords.size() == 0) {
                    pr.finished = true;
                    mPendingThumbnails.remove(i);
                    N--;
                    continue;
                }
            }
            i++;
        }
    }
    if (receivers != null) {
        final int N = receivers.size();
        for (int i = 0; i < N; i++) {
            try {
                PendingThumbnailsRecord pr = (PendingThumbnailsRecord) receivers.get(i);
                pr.receiver.newThumbnail(task != null ? task.taskId : -1, thumbnail, description);
                if (pr.finished) {
                    pr.receiver.finished();
                }
            } catch (Exception e) {
                Log.w(TAG, "String_Node_Str", e);
            }
        }
    }
}

Output:
         if (r == null) {
-            int index = indexOfTokenLocked(token, false);
+            int index = indexOfTokenLocked(token);
             if (index < 0) {


Input:
private List<Field> extractFields() {
    this.fields.clear();
    for (java.lang.reflect.Field f : this.clazz.getDeclaredFields()) {
        if (!Modifier.isTransient(f.getModifiers())) {
            fields.add(new Field(f.getType(), f.getName()));
        }
    }
    return this.fields;
}

Output:
         if (!Modifier.isTransient(f.getModifiers())) {
-            fields.add(new Field(f.getType(), f.getName()));
+            Field newF = new Field(f.getType(), f.getName());
+            if (f.isAnnotationPresent(Index.class)) {
+                Index ann = f.getAnnotation(Index.class);
+                newF.setIndex(new FieldIndexHolder(ann.name(), ann.unique()));
+            }
+            fields.add(newF);
         }


Input:
public void save(Link link) {
    try {
        Connection conn = bds.getConnection();
        DSLContext context = DSL.using(conn, SQLDialect.H2);
        context.insertInto(Tables.LINK, Tables.LINK.ARTICLE_ID, Tables.LINK.TEXT).values(link.getId(), link.getText());
        conn.close();
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Output:
     try {
-        Connection conn = bds.getConnection();
+        Connection conn = ds.getConnection();
         DSLContext context = DSL.using(conn, SQLDialect.H2);


Input:
public Point getPosition() {
    return ((SingleWindow) handle).getPosition();
}

Output:
 public Point getPosition() {
-    return ((SingleWindow) handle).getPosition();
+    return ((BrowserWindow) handle).getPosition();
 }


Input:
private boolean doScan() {
    this.missileAlert = false;
    this.detectedMissiles.clear();
    this.detectedRadarStations.clear();
    List<EDaoDan> missilesNearby = DaoDanGuanLi.getMissileInArea(new Region2(new Vector2(this.xCoord - MAX_BIAN_JING, this.zCoord - MAX_BIAN_JING), new Vector2(this.xCoord + MAX_BIAN_JING, this.zCoord + MAX_BIAN_JING)));
    for (EDaoDan missile : missilesNearby) {
        if (missile.ticksInAir > -1) {
            if (!this.detectedMissiles.contains(missile)) {
                this.detectedMissiles.add(missile);
            }
            if (Vector2.distance(missile.muBiao.toVector2(), new Vector2(this.xCoord, this.zCoord)) < this.safetyBanJing) {
                this.missileAlert = true;
            }
        }
    }
    for (TLeiDaTai radarStation : LeiDaGuanLi.getRadarStationsInArea(new Vector2(this.xCoord - this.MAX_BIAN_JING, this.zCoord - this.MAX_BIAN_JING), new Vector2(this.xCoord + this.MAX_BIAN_JING, this.zCoord + this.MAX_BIAN_JING))) {
        if (!radarStation.isDisabled() && radarStation.prevDian > 0) {
            this.detectedRadarStations.add(radarStation);
        }
    }
    return this.missileAlert;
}

Output:
     this.detectedRadarStations.clear();
-    List<EDaoDan> missilesNearby = DaoDanGuanLi.getMissileInArea(new Region2(new Vector2(this.xCoord - MAX_BIAN_JING, this.zCoord - MAX_BIAN_JING), new Vector2(this.xCoord + MAX_BIAN_JING, this.zCoord + MAX_BIAN_JING)));
+    List<EDaoDan> missilesNearby = DaoDanGuanLi.getMissileInArea(Vector3.get(this).toVector2(), this.alarmBanJing);
     for (EDaoDan missile : missilesNearby) {


Input:
public void write(ClassWriter writer) {
    String internalName = this.getInternalName();
    String signature = this.getSignature();
    String superClass = null;
    String[] interfaces = this.getInterfaceArray();
    if (this.superType != null) {
        superClass = this.superType.getInternalName();
    }
    writer.visit(DyvilCompiler.classVersion, this.modifiers & 0xFFFF, internalName, signature, superClass, interfaces);
    if (this.outerClass != null) {
        writer.visitOuterClass(this.outerClass.getInternalName(), null, null);
    }
    if ((this.modifiers & Modifiers.OBJECT_CLASS) != 0) {
        writer.visitAnnotation("String_Node_Str", true);
    }
    if ((this.modifiers & Modifiers.SEALED) != 0) {
        writer.visitAnnotation("String_Node_Str", false);
    }
    if ((this.modifiers & Modifiers.DEPRECATED) != 0) {
        writer.visitAnnotation("String_Node_Str", true);
    }
    if ((this.modifiers & Modifiers.FUNCTIONAL) != 0) {
        writer.visitAnnotation("String_Node_Str", true);
    }
    for (int i = 0; i < this.annotationCount; i++) {
        this.annotations[i].write(writer);
    }
    if (this.outerClass != null) {
        this.writeInnerClassInfo(writer);
    }
    if (this.superType != null) {
        IClass iclass = this.superType.getTheClass();
        if (iclass != null) {
            iclass.writeInnerClassInfo(writer);
        }
    }
    for (int i = 0; i < this.interfaceCount; i++) {
        IType type = this.interfaces[i];
        IClass iclass = type.getTheClass();
        if (iclass != null) {
            iclass.writeInnerClassInfo(writer);
        }
    }
    int fields = 0;
    int constructors = 0;
    int methods = 0;
    int properties = 0;
    if (this.body != null) {
        fields = this.body.fieldCount();
        methods = this.body.methodCount();
        constructors = this.body.constructorCount();
        properties = this.body.propertyCount();
        int classes = this.body.classCount();
        for (int i = 0; i < classes; i++) {
            this.body.getClass(i).writeInnerClassInfo(writer);
        }
    }
    ThisValue thisValue = new ThisValue(this.type);
    StatementList instanceFields = new StatementList();
    StatementList staticFields = new StatementList();
    for (int i = 0; i < fields; i++) {
        IField f = this.body.getField(i);
        f.write(writer);
        if (f.hasModifier(Modifiers.LAZY)) {
            continue;
        }
        if (f.hasModifier(Modifiers.STATIC)) {
            FieldAssign assign = new FieldAssign(null);
            assign.name = f.getName();
            assign.value = f.getValue();
            assign.field = f;
            staticFields.addValue(assign);
        } else {
            FieldAssign assign = new FieldAssign(null);
            assign.name = f.getName();
            assign.instance = thisValue;
            assign.value = f.getValue();
            assign.field = f;
            instanceFields.addValue(assign);
        }
    }
    this.metadata.write(writer, instanceFields);
    for (int i = 0; i < this.parameterCount; i++) {
        this.parameters[i].write(writer);
    }
    for (int i = 0; i < constructors; i++) {
        this.body.getConstructor(i).write(writer, instanceFields);
    }
    for (int i = 0; i < properties; i++) {
        this.body.getProperty(i).write(writer);
    }
    for (int i = 0; i < methods; i++) {
        this.body.getMethod(i).write(writer);
    }
    for (int i = 0; i < this.compilableCount; i++) {
        this.compilables[i].write(writer);
    }
    IField instanceField = this.metadata.getInstanceField();
    if (instanceField != null) {
        FieldAssign assign = new FieldAssign(null);
        assign.name = Name.instance;
        assign.field = instanceField;
        ConstructorCall call = new ConstructorCall(null);
        call.type = this.type;
        call.constructor = this.metadata.getConstructor();
        assign.value = call;
        staticFields.addValue(assign);
    } else if (staticFields.isEmpty()) {
        return;
    }
    MethodWriter mw = new MethodWriterImpl(writer, writer.visitMethod(Modifiers.STATIC, "String_Node_Str", "String_Node_Str", null, null));
    mw.begin();
    staticFields.writeStatement(mw);
    mw.end(Types.VOID);
}

Output:
     }
-    writer.visit(DyvilCompiler.classVersion, this.modifiers & 0xFFFF, internalName, signature, superClass, interfaces);
+    writer.visit(DyvilCompiler.classVersion, this.modifiers & 0xFFFF | Opcodes.ACC_SUPER, internalName, signature, superClass, interfaces);
     if (this.outerClass != null) {


Input:
public static ICubeAggrDefn[] getAggrDefns(List bindings) throws DataException {
    if (bindings == null || bindings.size() == 0)
        return new ICubeAggrDefn[0];
    List cubeAggrDefns = new ArrayList();
    for (Iterator it = bindings.iterator(); it.hasNext(); ) {
        IBinding binding = ((IBinding) it.next());
        if (binding.getExpression() instanceof IScriptExpression) {
            if (binding.getAggrFunction() != null)
                cubeAggrDefns.add(new CubeAggrDefn(binding.getBindingName(), getMeasure(((IScriptExpression) binding.getExpression()).getText()), convertToDimLevel(binding.getAggregatOns()), binding.getAggrFunction(), convertToDimLevelAttribute(binding.getArguments(), bindings), binding.getFilter()));
        }
    }
    ICubeAggrDefn[] result = new ICubeAggrDefn[cubeAggrDefns.size()];
    for (int i = 0; i < result.length; i++) {
        result[i] = (ICubeAggrDefn) cubeAggrDefns.get(i);
    }
    return result;
}

Output:
         if (binding.getExpression() instanceof IScriptExpression) {
-            if (binding.getAggrFunction() != null)
+            if (binding.getAggrFunction() != null || binding.getAggregatOns().size() != 0)
                 cubeAggrDefns.add(new CubeAggrDefn(binding.getBindingName(), getMeasure(((IScriptExpression) binding.getExpression()).getText()), convertToDimLevel(binding.getAggregatOns()), binding.getAggrFunction(), convertToDimLevelAttribute(binding.getArguments(), bindings), binding.getFilter()));


Input:
public synchronized void create(final NamespaceMeta metadata) throws Exception {
    Preconditions.checkArgument(metadata != null, "String_Node_Str");
    NamespaceId namespace = new NamespaceId(metadata.getName());
    if (exists(namespace.toId())) {
        throw new NamespaceAlreadyExistsException(namespace.toId());
    }
    if (hasCustomMapping(metadata)) {
        validateCustomMapping(metadata);
    }
    Principal principal = authenticationContext.getPrincipal();
    authorizationEnforcer.enforce(instanceId, principal, Action.ADMIN);
    privilegesManager.grant(namespace, principal, EnumSet.allOf(Action.class));
    String executionUserName;
    if (SecurityUtil.isKerberosEnabled(cConf)) {
        ImpersonationInfo impersonationInfo = new ImpersonationInfo(metadata, cConf);
        String namespacePrincipal = impersonationInfo.getPrincipal();
        executionUserName = new KerberosName(namespacePrincipal).getShortName();
    } else {
        executionUserName = UserGroupInformation.getCurrentUser().getShortUserName();
    }
    Principal executionUser = new Principal(executionUserName, Principal.PrincipalType.USER);
    privilegesManager.grant(namespace, executionUser, EnumSet.allOf(Action.class));
    nsStore.create(metadata);
    try {
        impersonator.doAs(metadata, new Callable<Void>() {
            public Void call() throws Exception {
                storageProviderNamespaceAdmin.get().create(metadata);
                return null;
            }
        });
    } catch (IOException | ExploreException | SQLException e) {
        deleteNamespaceMeta(metadata.getNamespaceId());
        privilegesManager.revoke(namespace);
        throw new NamespaceCannotBeCreatedException(namespace.toId(), e);
    }
}

Output:
         });
-    } catch (IOException | ExploreException | SQLException e) {
+    } catch (Throwable t) {
         deleteNamespaceMeta(metadata.getNamespaceId());


Input:
public void hideProgress() {
    if (progress != null) {
        progress.dismissAllowingStateLoss();
    }
}

Output:
 public void hideProgress() {
-    if (progress != null) {
-        progress.dismissAllowingStateLoss();
+    try {
+        if (progress != null && !progress.isDetached()) {
+            progress.dismissAllowingStateLoss();
+        }
+    } catch (NullPointerException npe) {
+        ErrorUtils.logError(npe);
     }


Input:
private SourceSet sourceSet(final Project project) {
    SourceSet sourceSet = getJavaConvention(project).getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    return sourceSet;
}

Output:
 private SourceSet sourceSet(final Project project) {
-    SourceSet sourceSet = getJavaConvention(project).getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
-    return sourceSet;
+    return getJavaConvention(project).getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
 }


Input:
private void flattenReferencesTo(Name n, String alias) {
    String originalName = n.fullName();
    for (Ref r : n.getRefs()) {
        if (r == n.getDeclaration()) {
            continue;
        }
        Node rParent = r.node.getParent();
        if (!NodeUtil.isObjectLitKey(r.node, rParent) && (r.getTwin() == null || r.isSet())) {
            flattenNameRef(alias, r.node, rParent, originalName);
        }
    }
    if (n.props != null) {
        for (Name p : n.props) {
            flattenPrefixes(alias, p, 1);
        }
    }
}

Output:
 private void flattenReferencesTo(Name n, String alias) {
-    String originalName = n.fullName();
+    String originalName = n.getFullName();
     for (Ref r : n.getRefs()) {


Input:
private void writeEmbedded(EObject eObject) throws SerializerException, IOException {
    EClass class1 = eObject.eClass();
    print(upperCases.get(class1));
    print(OPEN_PAREN);
    EStructuralFeature structuralFeature = class1.getEStructuralFeature(WRAPPED_VALUE);
    if (structuralFeature != null) {
        Object realVal = eObject.eGet(structuralFeature);
        if (structuralFeature.getEType() == ECORE_PACKAGE_INSTANCE.getEDouble()) {
            Object stringVal = eObject.eGet(class1.getEStructuralFeature(structuralFeature.getName() + "String_Node_Str"));
            if (stringVal != null && model.isUseDoubleStrings()) {
                print((String) stringVal);
            } else {
                if (((Double) realVal).isInfinite() || (((Double) realVal).isNaN())) {
                    LOGGER.info("String_Node_Str");
                    print("String_Node_Str");
                } else {
                    print((String) realVal);
                }
            }
        } else {
            writePrimitive(realVal);
        }
    }
    print(CLOSE_PAREN);
}

Output:
                 } else {
-                    print((String) realVal);
+                    print(((Double) realVal).toString());
                 }


Input:
private static void loadCalculatedMeasures(DataInputStream dis, ICubeQueryDefinition qd, int version) throws DataException, IOException {
    if (version < VersionManager.getLatestVersion())
        return;
    int size = IOUtil.readInt(dis);
    for (int i = 0; i < size; i++) {
        IDerivedMeasureDefinition md = loadCaculatedMeasure(dis);
        IMeasureDefinition md1 = qd.createDerivedMeasure(md.getName(), md.getDataType(), md.getExpression());
        md1.setAggrFunction(md.getAggrFunction());
    }
}

Output:
 private static void loadCalculatedMeasures(DataInputStream dis, ICubeQueryDefinition qd, int version) throws DataException, IOException {
-    if (version < VersionManager.getLatestVersion())
+    if (version < VersionManager.VERSION_2_6_3_1)
         return;


Input:
private void flatView(final List<Object> elements) {
    final List<VarDescriptor> set = new TreeList<VarDescriptor>();
    for (final DOMDescriptor dom : doms) for (final VarDescriptor child : (VarDescriptor[]) getChildren(dom)) set.add(child);
    elements.addAll(set);
    elements.addAll(includes);
    for (final BundleDescriptor bundle : bundles) for (final Object child : getChildren(bundle)) elements.add(child);
}

Output:
     elements.addAll(includes);
-    for (final BundleDescriptor bundle : bundles) for (final Object child : getChildren(bundle)) elements.add(child);
+    final Set<Object> exportedPackages = SetUtil.treeSet();
+    for (final BundleDescriptor bundle : bundles) for (final Object child : getChildren(bundle)) exportedPackages.add(child);
+    elements.addAll(exportedPackages);
 }


Input:
public DataSet get(String key) {
    DataSet dataSet = null;
    if (memoryCache.contains(key)) {
        dataSet = memoryCache.get(key);
        if (!fileCache.contains(key)) {
            fileCache.put(key, dataSet);
        }
    } else if (fileCache.contains(key)) {
        dataSet = fileCache.get(key);
        if (!memoryCache.contains(key)) {
            memoryCache.put(key, dataSet);
        }
    }
    return dataSet;
}

Output:
         dataSet = fileCache.get(key);
-        if (!memoryCache.contains(key)) {
+        if (dataSet != null && !memoryCache.contains(key)) {
             memoryCache.put(key, dataSet);


Input:
public void testAssertThrowsNpe() {
    final SimpleEventBus eventBus = new SimpleEventBus();
    try {
        assertThrowsNpe(new ScheduledCommand() {
            public void execute() {
                eventBus.addHandler(MouseDownEvent.getType(), mouse1);
            }
        });
        fail("String_Node_Str");
    } catch (AssertionFailedError e) {
    }
}

Output:
         });
-        fail("String_Node_Str");
+        throw new Error("String_Node_Str");
     } catch (AssertionFailedError e) {


Input:
public void onPreviewFrame(byte[] data, Camera camera) {
    new Thread(new ProcessStillTask(data, camera, mCameraInfo, new ProcessStillTask.OnStillProcessedListener() {

        public void onStillProcessed(final YuvImage yuv) {
            mCameraListener.onPictureTaken(yuv);
        }
    })).start();
}

Output:
 public void onPreviewFrame(byte[] data, Camera camera) {
-    new Thread(new ProcessStillTask(data, camera, mCameraInfo, new ProcessStillTask.OnStillProcessedListener() {
+    new Thread(new ProcessStillTask(data, camera, calculateCaptureRotation(), new ProcessStillTask.OnStillProcessedListener() {


Input:
private static Set<String> createBaseResources() throws IOException {
    ClassLoader classLoader = ProgramResources.class.getClassLoader();
    Set<ClassPath.ClassInfo> apiResources = getResources(getClassPath(classLoader, Application.class), CDAP_API_PACKAGES, Sets.<ClassPath.ClassInfo>newHashSet());
    Set<String> result = findClassDependencies(classLoader, Iterables.transform(apiResources, CLASS_INFO_TO_CLASS_NAME), Sets.<String>newHashSet());
    getResources(getClassPath(classLoader, Path.class), JAVAX_WS_RS_PACKAGES, CLASS_INFO_TO_RESOURCE_NAME, result);
    return ImmutableSet.copyOf(getResources(ClassPath.from(classLoader, JAR_ONLY_URI), HADOOP_PACKAGES, CLASS_INFO_TO_RESOURCE_NAME, result));
}

Output:
     getResources(getClassPath(classLoader, Path.class), JAVAX_WS_RS_PACKAGES, CLASS_INFO_TO_RESOURCE_NAME, result);
-    return ImmutableSet.copyOf(getResources(ClassPath.from(classLoader, JAR_ONLY_URI), HADOOP_PACKAGES, CLASS_INFO_TO_RESOURCE_NAME, result));
+    getResources(ClassPath.from(classLoader, JAR_ONLY_URI), HADOOP_PACKAGES, CLASS_INFO_TO_RESOURCE_NAME, result);
+    return ImmutableSet.copyOf(Sets.filter(result, new Predicate<String>() {
+        public boolean apply(String input) {
+            return !input.startsWith(HBASE_PACKAGE_PREFIX);
+        }
+    }));
 }


Input:
private boolean isCommittedProcessed(KeyValue stateColumn, long readPointer, long[] excludes) {
    long writePointer = Bytes.toLong(stateColumn.getBuffer(), stateColumn.getValueOffset(), Longs.BYTES);
    if (writePointer > readPointer || Arrays.binarySearch(excludes, writePointer) >= 0) {
        return false;
    }
    byte state = stateColumn.getBuffer()[stateColumn.getValueOffset() + Longs.BYTES + Ints.BYTES];
    return state == ConsumerEntryState.PROCESSED.getState();
}

Output:
 private boolean isCommittedProcessed(KeyValue stateColumn, long readPointer, long[] excludes) {
-    long writePointer = Bytes.toLong(stateColumn.getBuffer(), stateColumn.getValueOffset(), Longs.BYTES);
+    long writePointer = Bytes.toLong(stateColumn.getBuffer(), stateColumn.getValueOffset(), LONG_SIZE);
     if (writePointer > readPointer || Arrays.binarySearch(excludes, writePointer) >= 0) {


Input:
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) {
    try {
        XMLDescriptor xmlDescriptor = (XMLDescriptor) xmlCompositeCollectionMapping.getReferenceDescriptor();
        if (xmlDescriptor == null) {
            xmlDescriptor = findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, xmlCompositeCollectionMapping, xmlCompositeCollectionMapping.getKeepAsElementPolicy());
            if (xmlDescriptor == null) {
                if (xmlCompositeCollectionMapping.getField() != null) {
                    QName leafType = ((XMLField) xmlCompositeCollectionMapping.getField()).getLastXPathFragment().getLeafElementType();
                    if (leafType != null) {
                        XPathFragment frag = new XPathFragment();
                        String xpath = leafType.getLocalPart();
                        String uri = leafType.getNamespaceURI();
                        if (uri != null && uri.length() > 0) {
                            frag.setNamespaceURI(uri);
                            String prefix = ((XMLDescriptor) xmlCompositeCollectionMapping.getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri);
                            if (prefix != null && prefix.length() > 0) {
                                xpath = prefix + XMLConstants.COLON + xpath;
                            }
                        }
                        frag.setXPath(xpath);
                        XMLContext xmlContext = unmarshalRecord.getUnmarshaller().getXMLContext();
                        xmlDescriptor = xmlContext.getDescriptorByGlobalType(frag);
                    }
                }
            }
            UnmarshalKeepAsElementPolicy policy = xmlCompositeCollectionMapping.getKeepAsElementPolicy();
            if (((xmlDescriptor == null) && (policy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT)) || (policy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) {
                if (unmarshalRecord.getTypeQName() != null) {
                    Class theClass = (Class) ((XMLConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager()).getDefaultXMLTypes().get(unmarshalRecord.getTypeQName());
                    if (theClass == null) {
                        setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);
                        return true;
                    }
                } else {
                    setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);
                    return true;
                }
            }
        }
        if (xmlCompositeCollectionMapping.getNullPolicy().valueIsNull(atts)) {
            getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession());
        } else {
            XMLField xmlFld = (XMLField) this.xmlCompositeCollectionMapping.getField();
            if (xmlFld.hasLastXPathFragment()) {
                unmarshalRecord.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());
            }
            processChild(xPathFragment, unmarshalRecord, atts, xmlDescriptor, xmlCompositeCollectionMapping);
        }
    } catch (SAXException e) {
        throw XMLMarshalException.unmarshalException(e);
    }
    return true;
}

Output:
         }
-        if (xmlCompositeCollectionMapping.getNullPolicy().valueIsNull(atts)) {
+        if (xmlCompositeCollectionMapping.getNullPolicy().isNullRepresentedByEmptyNode() || xmlCompositeCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil()) {
+            String qnameString = xPathFragment.getLocalName();
+            if (xPathFragment.getPrefix() != null) {
+                qnameString = xPathFragment.getPrefix() + XMLConstants.COLON + qnameString;
+            }
+            if (null != xmlDescriptor) {
+                CompositeCollectionMappingContentHandler aHandler = new CompositeCollectionMappingContentHandler(unmarshalRecord, this, xmlCompositeCollectionMapping, atts, xPathFragment, xmlDescriptor);
+                aHandler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts);
+                XMLReader xmlReader = unmarshalRecord.getXMLReader();
+                xmlReader.setContentHandler(aHandler);
+                xmlReader.setLexicalHandler(aHandler);
+            }
+        } else if (xmlCompositeCollectionMapping.getNullPolicy().valueIsNull(atts)) {
             getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession());


Input:
public void doDownload() throws IOException {
    _fos = new RandomAccessFile(_incompleteFile, "String_Node_Str");
    _fos.seek(_initialReadingPoint);
    int c = -1;
    byte[] buf = new byte[1024];
    while (true) {
        if (_amountRead >= _amountToRead)
            break;
        c = _byteReader.read(buf);
        if (c == -1)
            break;
        _fos.write(buf, 0, c);
        _amountRead += c;
    }
    _byteReader.close();
    _fos.close();
    if (_amountRead != _amountToRead) {
        throw new FileIncompleteException();
    }
}

Output:
     int c = -1;
-    byte[] buf = new byte[1024];
+    byte[] buf = new byte[BUF_LENGTH];
     while (true) {


Input:
protected IocValue convert(String value) {
    IocValue iocValue = new IocValue();
    iocValue.setType(value.substring(0, value.indexOf("String_Node_Str")));
    iocValue.setValue(value.substring(value.indexOf("String_Node_Str") + 1));
    return iocValue;
}

Output:
     IocValue iocValue = new IocValue();
-    iocValue.setType(value.substring(0, value.indexOf("String_Node_Str")));
-    iocValue.setValue(value.substring(value.indexOf("String_Node_Str") + 1));
+    if (value.indexOf(':') > -1) {
+        iocValue.setType(value.substring(0, value.indexOf("String_Node_Str")));
+        iocValue.setValue(value.substring(value.indexOf("String_Node_Str") + 1));
+    } else
+        iocValue.setValue(value);
     return iocValue;


Input:
public List<OPMLink> getLinks() {
    recreateNodesAndLinks();
    return new ArrayList(links);
}

Output:
     recreateNodesAndLinks();
-    return new ArrayList(links);
+    return new ArrayList<>(links);
 }


Input:
void fixGroupIndex(int j, int to, boolean infront) {
    final int beginning = j;
    for (Iterator it = _items.listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
        Object o = it.next();
        ((Listitem) o).setIndexDirectly(j);
        if (beginning != j && o instanceof Listgroup) {
            int[] g = getGroupsInfoAt(j + (infront ? -1 : 1), true);
            if (g != null) {
                g[0] = j;
                if (g[2] != -1)
                    g[2] += (infront ? 1 : -1);
            }
        }
    }
}

Output:
         if (beginning != j && o instanceof Listgroup) {
-            int[] g = getGroupsInfoAt(j + (infront ? -1 : 1), true);
+            int[] g = getLastGroupsInfoAt(j + (infront ? -1 : 1));
             if (g != null) {


Input:
public boolean isValid() {
    ValidationFindings findings = TLModelCompileValidator.validateModelElement(tlObj);
    return findings.isEmpty();
}

Output:
 public boolean isValid() {
-    ValidationFindings findings = TLModelCompileValidator.validateModelElement(tlObj);
-    return findings.isEmpty();
+    return TLModelCompileValidator.validateModelElement(tlObj).isEmpty();
 }


Input:
private void collectInstanceNumInvalidateMsg(NodeGroupCreate nodeGroup, List<String> failedMsgList) {
    failedMsgList.add(new StringBuilder().append(nodeGroup.getName()).append("String_Node_Str").append("String_Node_Str").append(nodeGroup.getInstanceNum()).toString());
}

Output:
 private void collectInstanceNumInvalidateMsg(NodeGroupCreate nodeGroup, List<String> failedMsgList) {
-    failedMsgList.add(new StringBuilder().append(nodeGroup.getName()).append("String_Node_Str").append("String_Node_Str").append(nodeGroup.getInstanceNum()).toString());
+    failedMsgList.add(new StringBuilder().append(nodeGroup.getName()).append("String_Node_Str").append("String_Node_Str").append(nodeGroup.getInstanceNum()).append("String_Node_Str").toString());
 }


Input:
public void run() {
    try {
        TreeNode docRoot = null;
        Object s = getSelectedObjects().get(0);
        if (s instanceof List && !((List) s).isEmpty()) {
            List selectedarts = new ArrayList((List) s);
            Iterator iter = selectedarts.iterator();
            while (iter.hasNext()) {
                Object obj = iter.next();
                if (obj instanceof TreeNodeEditPart) {
                    TreeNodeEditPart nodePart = (TreeNodeEditPart) obj;
                    TreeNode treeNode = (TreeNode) nodePart.getModel();
                    if (treeNode.eContainer() instanceof TreeNode) {
                        TreeNode parent = (TreeNode) treeNode.eContainer();
                        if (docRoot == null) {
                            docRoot = XmlMapUtil.getTreeNodeRoot(parent);
                        }
                        XmlMapUtil.detachNodeConnections(treeNode, mapperManager.getCopyOfMapData(), true);
                        if (treeNode.isLoop()) {
                            if (treeNode instanceof OutputTreeNode && XmlMapUtil.findUpGroupNode((OutputTreeNode) treeNode) != null) {
                                XmlMapUtil.cleanSubGroup(docRoot);
                            }
                            XmlMapUtil.clearMainNode(docRoot);
                        }
                        parent.getChildren().remove(treeNode);
                        List<TreeNode> loopNodes = new ArrayList<TreeNode>();
                        if (docRoot != null && docRoot.eContainer() instanceof AbstractInOutTree) {
                            AbstractInOutTree tree = (AbstractInOutTree) docRoot.eContainer();
                            if (tree.isMultiLoops()) {
                                List<TreeNode> nodesToCheck = new ArrayList<TreeNode>();
                                nodesToCheck.add(docRoot);
                                XmlMapUtil.getChildLoops(loopNodes, nodesToCheck, false);
                                if (loopNodes.size() < 2) {
                                    tree.setMultiLoops(false);
                                }
                            }
                        }
                        if (input) {
                            List<TreeNode> subNodes = new ArrayList<TreeNode>();
                            checkSubElementIsLoop(treeNode, subNodes);
                            removeloopInOutputTree(subNodes);
                        }
                    }
                }
            }
        }
        if (mapperManager != null) {
            if (input) {
                if (docRoot != null && docRoot.eContainer() instanceof InputXmlTree) {
                    mapperManager.refreshInputTreeSchemaEditor((InputXmlTree) docRoot.eContainer());
                }
            } else {
                if (docRoot != null && docRoot.eContainer() instanceof OutputXmlTree) {
                    mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree) docRoot.eContainer());
                }
            }
            if (docRoot != null && docRoot.eContainer() instanceof AbstractInOutTree) {
                mapperManager.getProblemsAnalyser().checkProblems((AbstractInOutTree) docRoot.eContainer());
                mapperManager.getMapperUI().updateStatusBar();
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Output:
                             checkSubElementIsLoop(treeNode, subNodes);
-                            removeloopInOutputTree(subNodes);
+                            XmlMapUtil.removeloopInOutputTree(mapperManager, subNodes);
                         }


Input:
public void attach(Job attached, JobInfo jobInfo, AdminCommandContext context, String jobName) {
    ActionReport ar = context.getActionReport();
    String attachedUser = SubjectUtil.getUsernamesFromSubject(context.getSubject()).get(0);
    if ((attached == null && jobInfo == null) || (attached != null && attached.getName().startsWith("String_Node_Str")) || (attached != null && AttachCommand.COMMAND_NAME.equals(attached.getName()))) {
        ar.setActionExitCode(ActionReport.ExitCode.FAILURE);
        ar.setMessage(strings.getLocalString("String_Node_Str", "String_Node_Str", jobID));
        return;
    }
    if (attached != null) {
        AdminCommandEventBroker attachedBroker = attached.getEventBroker();
        synchronized (attachedBroker) {
            onAdminCommandEvent(AdminCommandStateImpl.EVENT_STATE_CHANGED, attached);
            if (attached.getCommandProgress() != null) {
                onAdminCommandEvent(CommandProgress.EVENT_PROGRESSSTATUS_STATE, attached.getCommandProgress());
            }
            attachedBroker.registerListener("String_Node_Str", this);
        }
        synchronized (attached) {
            while (attached.getState().equals(PREPARED) || attached.getState().equals(RUNNING)) {
                try {
                    attached.wait(1000 * 60 * 5);
                } catch (InterruptedException ex) {
                }
            }
            if (attached.getState().equals(COMPLETED)) {
                String commandUser = SubjectUtil.getUsernamesFromSubject(attached.getSubject()).get(0);
                if (commandUser != null && commandUser.equals(attachedUser)) {
                    purgeJob(attached.getId());
                }
                ar.setActionExitCode(attached.getActionReport().getActionExitCode());
                ar.appendMessage(strings.getLocalString("String_Node_Str", "String_Node_Str", attached.getName(), attached.getActionReport().getActionExitCode()));
            }
        }
    } else {
        if (jobInfo != null && jobInfo.exitCode.equals(COMPLETED.toString())) {
            if (attachedUser != null && attachedUser.equals(jobInfo.user)) {
                purgeJob(jobInfo.jobId);
            }
            ar.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            ar.appendMessage(strings.getLocalString("String_Node_Str", "String_Node_Str", jobName, ActionReport.ExitCode.SUCCESS));
        }
    }
}

Output:
     } else {
-        if (jobInfo != null && jobInfo.exitCode.equals(COMPLETED.toString())) {
+        if (jobInfo != null && jobInfo.state.equals(COMPLETED.toString())) {
             if (attachedUser != null && attachedUser.equals(jobInfo.user)) {


Input:
public View stormpathJacksonView() {
    JacksonView view = new JacksonView();
    view.setObjectMapper(stormpathObjectMapper());
    return view;
}

Output:
     JacksonView view = new JacksonView();
-    view.setObjectMapper(stormpathObjectMapper());
+    view.setObjectMapper(objectMapper);
     return view;


Input:
public CarriagePackage GeneratePackage(TileEntity carriage, Directions CarriageDirection, Directions MotionDirection) throws CarriageMotionException {
    if (!DirtyHacks.allowRotation) {
        throw new CarriageMotionException(Lang.translate(ModRiM.Handle + "String_Node_Str"));
    }
    CarriagePackage Package = new CarriagePackage(this, carriage, Directions.Null);
    Package.axis = axisOfRotationIndex;
    Package.blacklistByRotation = true;
    Package.AddBlock(Package.driveRecord);
    MultiTypeCarriageUtil.fillPackage(Package, carriage);
    Directions axis = Directions.values()[axisOfRotationIndex];
    BlockRecordSet dests = new BlockRecordSet();
    for (BlockRecord record : Package.Body) {
        if ((record.X == xCoord || record.Y == yCoord || record.Z == zCoord)) {
            continue;
        }
        BlockRecord dest = RemIMRotator.simulateRotateOrthogonal(new BlockRecord(xCoord, yCoord, zCoord), axis, record);
        Package.AddPotentialObstruction(dest);
    }
    Package.Finalize();
    return (Package);
}

Output:
     CarriagePackage Package = new CarriagePackage(this, carriage, Directions.Null);
-    Package.axis = axisOfRotationIndex;
+    Package.axis = pointedDir.ordinal();
     Package.blacklistByRotation = true;


Input:
public static ThriftClientConfig parse(String filePath) {
    try {
        ThriftClientConfig thriftClientIConfig = new ThriftClientConfig();
        ThriftClientInfo thriftClientInfo = new ThriftClientInfo();
        thriftClientIConfig.setThriftClientInfo(thriftClientInfo);
        OMElement document = AxiomXpathParserUtil.parse(new File(filePath));
        Iterator thriftClientIterator = document.getChildElements();
        String userNameValuesStr = null;
        String passwordValueStr = null;
        String ipValuesStr = null;
        String portValueStr = null;
        while (thriftClientIterator.hasNext()) {
            OMElement thriftClientElement = (OMElement) thriftClientIterator.next();
            if (USERNAME_ELEMENT.equals(thriftClientElement.getQName().getLocalPart())) {
                userNameValuesStr = thriftClientElement.getText();
                thriftClientInfo.setUsername(userNameValuesStr);
            }
            if (PASSWORD_ELEMENT.equals(thriftClientElement.getQName().getLocalPart())) {
                passwordValueStr = thriftClientElement.getText();
                thriftClientInfo.setPassword(passwordValueStr);
            }
            if (IP_ELEMENT.equals(thriftClientElement.getQName().getLocalPart())) {
                ipValuesStr = thriftClientElement.getText();
                thriftClientInfo.setIp(ipValuesStr);
            }
            if (PORT_ELEMENT.equals(thriftClientElement.getQName().getLocalPart())) {
                portValueStr = thriftClientElement.getText();
                thriftClientInfo.setPort(portValueStr);
            }
        }
        if (userNameValuesStr == null) {
            throw new RuntimeException("String_Node_Str");
        }
        if (passwordValueStr == null) {
            throw new RuntimeException("String_Node_Str");
        }
        if (ipValuesStr == null) {
            throw new RuntimeException("String_Node_Str");
        }
        if (portValueStr == null) {
            throw new RuntimeException("String_Node_Str");
        }
        return thriftClientIConfig;
    } catch (Exception e) {
        throw new RuntimeException("String_Node_Str", e);
    }
}

Output:
         thriftClientIConfig.setThriftClientInfo(thriftClientInfo);
-        OMElement document = AxiomXpathParserUtil.parse(new File(filePath));
+        File configFile = new File(filePath);
+        if (!configFile.exists()) {
+            throw new RuntimeException(String.format("String_Node_Str", filePath));
+        }
+        OMElement document = AxiomXpathParserUtil.parse(configFile);
         Iterator thriftClientIterator = document.getChildElements();


Input:
protected void beforeActivityLaunched() {
    SettingsUtils.markTosAccepted(InstrumentationRegistry.getTargetContext(), true);
    SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(), true);
    AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(), ACCOUNT_NAME);
}

Output:
     SettingsUtils.setAttendeeAtVenue(InstrumentationRegistry.getTargetContext(), true);
-    AccountUtils.setActiveAccount(InstrumentationRegistry.getTargetContext(), ACCOUNT_NAME);
+    mAccountName = LoginUtils.setFirstAvailableAccountAsActive(InstrumentationRegistry.getTargetContext());
 }


Input:
public Map<Set<ServerIdentity>, ModelNode> getServerOperations(OperationContext context, ModelNode originalOperation, PathAddress address) {
    if (HOST_CONTROLLER_LOGGER.isTraceEnabled()) {
        HOST_CONTROLLER_LOGGER.tracef("String_Node_Str", originalOperation);
    }
    ModelNode operation = context.getAttachment(OperationAttachments.SLAVE_SERVER_OPERATION);
    if (operation == null) {
        operation = originalOperation;
    }
    Set<ModelNode> dontPropagate = context.getAttachment(DONT_PROPAGATE_TO_SERVERS_ATTACHMENT);
    if (dontPropagate != null && dontPropagate.contains(operation)) {
        return Collections.emptyMap();
    }
    final ModelNode domain = Resource.Tools.readModel(context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS, true));
    final ModelNode host = domain.get(HOST, localHostName);
    if (address.size() == 0) {
        return resolveDomainRootOperation(operation, domain, host);
    } else {
        DomainKey domainKey = DomainKey.forName(address.getElement(0).getKey());
        switch(domainKey) {
            case EXTENSION:
                {
                    Set<ServerIdentity> allServers = getAllRunningServers(host, localHostName, serverProxies);
                    return Collections.singletonMap(allServers, operation);
                }
            case DEPLOYMENT:
                {
                    return Collections.emptyMap();
                }
            case PATH:
                {
                    return getServerPathOperations(operation, address, host, true);
                }
            case SYSTEM_PROPERTY:
                {
                    return getServerSystemPropertyOperations(operation, address, Level.DOMAIN, domain, null, host);
                }
            case PROFILE:
                {
                    return getServerProfileOperations(operation, address, domain, host);
                }
            case INTERFACE:
                {
                    return getServerInterfaceOperations(operation, address, host, true);
                }
            case SOCKET_BINDING_GROUP:
                {
                    return getServerSocketBindingGroupOperations(operation, address, domain, host);
                }
            case SERVER_GROUP:
                {
                    return getServerGroupOperations(operation, address, domain, host);
                }
            case MANAGMENT_CLIENT_CONTENT:
                {
                    return Collections.emptyMap();
                }
            case HOST:
                {
                    return getServerHostOperations(operation, address, domain, host);
                }
            case DEPLOYMENT_OVERLAY:
                {
                    return getDeploymentOverlayOperations(operation, host);
                }
            default:
                throw MESSAGES.unexpectedInitialPathKey(address.getElement(0).getKey());
        }
    }
}

Output:
     }
-    ModelNode operation = context.getAttachment(OperationAttachments.SLAVE_SERVER_OPERATION);
-    if (operation == null) {
-        operation = originalOperation;
+    List<DomainOperationTransformer> transformers = context.getAttachment(OperationAttachments.SLAVE_SERVER_OPERATION_TRANSFORMERS);
+    ModelNode operation = originalOperation;
+    if (transformers != null) {
+        for (DomainOperationTransformer transformer : transformers) {
+            operation = transformer.transform(context, operation);
+        }
     }


Input:
public void testAttachWith() throws Exception {
    Service service = connect();
    String indexName = temporaryName();
    final Index index = service.getIndexes().create(indexName);
    try {
        final int nEvents = index.getTotalEventCount();
        index.attachWith(new ReceiverBehavior() {
            public void run(OutputStream stream) throws IOException {
                String s = createTimestamp() + "String_Node_Str";
                stream.write(s.getBytes("String_Node_Str"));
            }
        });
        int nTries = 10;
        while (nTries > 0) {
            index.refresh();
            if (index.getTotalEventCount() == nEvents + 1) {
                return;
            } else {
                nTries -= 1;
                Thread.sleep(1000);
            }
        }
        if (nTries == 0) {
            SplunkTestCase.fail("String_Node_Str");
        }
    } finally {
        if (index != null && service.versionCompare("String_Node_Str") >= 0) {
            index.remove();
        }
    }
}

Output:
     Service service = connect();
-    String indexName = temporaryName();
+    String indexName = createTemporaryName();
     final Index index = service.getIndexes().create(indexName);


Input:
public View getView(int position, View convertView, ViewGroup parent) {
    ImageView imageView = null;
    TextView editText = null;
    View view = null;
    try {
        if (convertView == null) {
            LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View rowView = inflater.inflate(R.layout.device_cell, parent, false);
            view = rowView;
            imageView = (ImageView) view.findViewById(R.id.deviceCell_icon);
            imageView.setPadding(8, 8, 8, 8);
            editText = (TextView) view.findViewById(R.id.deviceCell_name);
        } else {
            view = (View) convertView;
            imageView = (ImageView) view.findViewById(R.id.deviceCell_icon);
            editText = (TextView) view.findViewById(R.id.deviceCell_name);
        }
        Entity ent = ReceivedData.get().Groups.get(position);
        if (ent == null) {
            imageView.setVisibility(View.INVISIBLE);
            editText.setVisibility(View.INVISIBLE);
            return view;
        }
        imageView.setVisibility(View.VISIBLE);
        imageView.setImageBitmap(ent.getImage(ctx));
        editText.setText(ent.getName());
        if (mEntityManager.isInEntitySelection(Type.GROUP, mEntitySelection, ent.getId())) {
            imageView.setBackgroundColor(SelectionColor);
        } else {
            imageView.setBackgroundColor(Color.TRANSPARENT);
        }
    } catch (Exception e) {
        e.toString();
    }
    return view;
}

Output:
         imageView.setVisibility(View.VISIBLE);
-        imageView.setImageBitmap(ent.getImage(ctx));
+        if (!images.contains(ent.getImageName())) {
+            images.add(new ImageWithKey(ent.getImage(ctx), ent.getImageName()));
+        }
+        imageView.setImageBitmap(images.get(ent.getImageName()).getBitmap());
         editText.setText(ent.getName());


Input:
public static void main(String[] args) {
    String directory = "String_Node_Str";
    BufferedImage orig = UtilImageIO.loadImage(directory + "String_Node_Str");
    ImageFloat32 input = ConvertBufferedImage.convertFrom(orig, (ImageFloat32) null);
    PlanarCalibrationDetector detector;
    detector = FactoryPlanarCalibrationTarget.detectorChessboard(new ConfigChessboard(5, 7, 30));
    if (!detector.process(input))
        throw new RuntimeException("String_Node_Str");
    List<Point2D_F64> points = detector.getDetectedPoints();
    Graphics2D g2 = orig.createGraphics();
    for (Point2D_F64 p : points) VisualizeFeatures.drawPoint(g2, (int) p.x, (int) p.y, 3, Color.RED);
    ShowImages.showWindow(orig, "String_Node_Str");
}

Output:
     for (Point2D_F64 p : points) VisualizeFeatures.drawPoint(g2, (int) p.x, (int) p.y, 3, Color.RED);
-    ShowImages.showWindow(orig, "String_Node_Str");
+    ShowImages.showWindow(orig, "String_Node_Str", true);
 }


Input:
protected void doHiveServerSelected() {
    if (!isContextMode()) {
        modifyFieldValue();
        getConnection().getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION, HiveServerVersionUtils.extractKey(hiveServerVersionCombo.getSelectionIndex()));
    }
    int distributionIndex = distributionCombo.getSelectionIndex();
    int currSelectedIndex = hiveVersionCombo.getSelectionIndex();
    updateHiveServerAndMakeSelection(distributionIndex, currSelectedIndex);
}

Output:
         modifyFieldValue();
-        getConnection().getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION, HiveServerVersionUtils.extractKey(hiveServerVersionCombo.getSelectionIndex()));
+        getConnection().getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION, HiveServerVersionUtils.extractKey(getRealHiveServerIndex(distributionIndex, currSelectedIndex, hiveServerVersionCombo.getSelectionIndex())));
     }


Input:
private void collectReadData(final SAMRecord record, final ReferenceSequence ref) {
    metrics.TOTAL_READS++;
    readLengthHistogram.increment(record.getReadBases().length);
    if (!record.getReadFailsVendorQualityCheckFlag()) {
        metrics.PF_READS++;
        if (isNoiseRead(record)) {
            metrics.PF_NOISE_READS++;
        } else if (record.getReadUnmappedFlag()) {
            final byte[] readBases = record.getReadBases();
            if (!(record instanceof BAMRecord))
                StringUtil.toUpperCase(readBases);
            if (isAdapterSequence(readBases)) {
                this.adapterReads++;
            }
        } else {
            if (doRefMetrics) {
                metrics.PF_READS_ALIGNED++;
                if (!record.getReadNegativeStrandFlag()) {
                    numPositiveStrand++;
                }
                if (record.getReadPairedFlag() && !record.getMateUnmappedFlag()) {
                    metrics.READS_ALIGNED_IN_PAIRS++;
                    final Integer mateMq = record.getIntegerAttribute("String_Node_Str");
                    if (mateMq == null || mateMq >= MAPPING_QUALITY_THRESHOLD && record.getMappingQuality() >= MAPPING_QUALITY_THRESHOLD) {
                        ++this.chimerasDenominator;
                        if (Math.abs(record.getInferredInsertSize()) > MAX_INSERT_SIZE || !record.getReferenceIndex().equals(record.getMateReferenceIndex())) {
                            ++this.chimeras;
                        }
                    }
                }
            }
        }
    }
}

Output:
         metrics.PF_READS++;
-        if (isNoiseRead(record)) {
+        if (isNoiseRead(record))
             metrics.PF_NOISE_READS++;


Input:
public HSSFWorkbook transformMultipleSheetsList(InputStream is, List objects, List newSheetNames, String beanName, Map beanParams, int startSheetNum) throws ParsePropertyException {
    HSSFWorkbook hssfWorkbook = null;
    try {
        if (beanParams != null && beanParams.containsKey(beanName)) {
            throw new IllegalArgumentException("String_Node_Str" + beanName + "String_Node_Str");
        }
        if (beanName == null) {
            throw new IllegalArgumentException(("String_Node_Str"));
        }
        if (beanParams == null) {
            beanParams = new HashMap();
        }
        POIFSFileSystem fs = new POIFSFileSystem(is);
        hssfWorkbook = new HSSFWorkbook(fs);
        preprocess(hssfWorkbook);
        Workbook workbook = createWorkbook(hssfWorkbook);
        workbookTransformationController = new WorkbookTransformationControllerImpl(workbook);
        SheetTransformer sheetTransformer = new SheetTransformer(fixedSizeCollections, groupedCollections, rowProcessors, cellProcessors, configuration);
        final String templateSheetName = "String_Node_Str";
        for (int sheetNo = 0; sheetNo < hssfWorkbook.getNumberOfSheets(); sheetNo++) {
            final String spreadsheetName = hssfWorkbook.getSheetName(sheetNo);
            if (!isSpreadsheetToHide(spreadsheetName)) {
                if (isSpreadsheetToRename(spreadsheetName)) {
                    hssfWorkbook.setSheetName(sheetNo, getSpreadsheetToReName(spreadsheetName));
                }
                HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(sheetNo);
                if (startSheetNum == sheetNo && objects != null && !objects.isEmpty()) {
                    Object firstBean = objects.get(0);
                    beanParams.put(beanName, firstBean);
                    hssfWorkbook.setSheetName(sheetNo, (String) newSheetNames.get(0), HSSFWorkbook.ENCODING_UTF_16);
                    HSSFSheet templateSheet = hssfWorkbook.createSheet(templateSheetName);
                    Util.copySheets(templateSheet, hssfSheet);
                    Sheet sheet = workbook.getSheetAt(sheetNo);
                    sheetTransformer.transformSheet(workbookTransformationController, sheet, beanParams);
                    for (int i = 1; i < objects.size(); i++) {
                        Object bean = objects.get(i);
                        beanParams.put(beanName, bean);
                        HSSFSheet newSheet = hssfWorkbook.createSheet((String) newSheetNames.get(i));
                        Util.copySheets(newSheet, templateSheet);
                        Util.copyPageSetup(newSheet, hssfSheet);
                        Util.copyPrintSetup(newSheet, hssfSheet);
                        sheet = new Sheet(hssfWorkbook, newSheet, configuration);
                        workbook.addSheet(sheet);
                        workbook.initSheetNames();
                        sheetTransformer.transformSheet(workbookTransformationController, sheet, beanParams);
                    }
                    hssfWorkbook.removeSheetAt(hssfWorkbook.getSheetIndex(templateSheetName));
                    beanParams.remove(beanName);
                } else {
                    Sheet sheet = workbook.getSheetAt(sheetNo);
                    sheetTransformer.transformSheet(workbookTransformationController, sheet, beanParams);
                }
            } else {
                hssfWorkbook.removeSheetAt(sheetNo);
                workbook.getSheets().remove(sheetNo);
                sheetNo--;
            }
        }
        updateFormulas();
    } catch (IOException e) {
        e.printStackTrace();
    }
    if (hssfWorkbook != null) {
        for (int i = 0; i < hssfWorkbook.getNumberOfSheets(); i++) {
            Util.setPrintArea(hssfWorkbook, i);
        }
    }
    return hssfWorkbook;
}

Output:
             } else {
-                hssfWorkbook.removeSheetAt(sheetNo);
-                workbook.getSheets().remove(sheetNo);
+                workbook.removeSheetAt(sheetNo);
                 sheetNo--;


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

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


Input:
private void runShadowProcess(final Property property, final Node inputNode, final IContext selectContext, final IElementParameter switchParam) {
    DatabaseConnection connt = TracesConnectionUtils.createConnection(connParameters);
    String dbmsId = connt.getDbmsId();
    if (dbmsId == null) {
        Shell shell = Display.getCurrent().getActiveShell();
        MessageDialog.openError(shell, "String_Node_Str", "String_Node_Str");
        MappingFileSelectDialog dialog = new MappingFileSelectDialog(shell);
        dialog.open();
        dbmsId = dialog.getSelectId();
    }
    GuessSchemaProcess gsp = new GuessSchemaProcess(property, inputNode, selectContext, memoSQL, info, part.getProcess());
    try {
        List<Integer> indexsForSameNamedColumn = new ArrayList<Integer>();
        CsvArray array = gsp.run();
        List<String[]> schemaContent = array.getRows();
        List<String> columnLabels = new ArrayList<String>();
        if (columns != null) {
            columns.clear();
        }
        if (!schemaContent.isEmpty()) {
            int numbOfColumn = schemaContent.get(0).length;
            for (int i = 1; i <= numbOfColumn; i++) {
                indexsForSameNamedColumn.clear();
                Boolean b = false;
                IMetadataColumn oneColum = new MetadataColumn();
                String labelName = (schemaContent.get(0))[i - 1];
                String name = labelName;
                String sub = "String_Node_Str";
                String sub2 = "String_Node_Str";
                if (labelName != null && labelName.length() > 0 && labelName.startsWith("String_Node_Str")) {
                    sub = labelName.substring(1);
                    if (sub != null && sub.length() > 0) {
                        sub2 = sub.substring(1);
                    }
                }
                if (KeywordsValidator.isKeyword(labelName) || KeywordsValidator.isKeyword(sub) || KeywordsValidator.isKeyword(sub2)) {
                    labelName = "String_Node_Str" + labelName;
                    b = true;
                }
                oneColum.setLabel(MetadataToolHelper.validateColumnName(labelName, i, columnLabels));
                oneColum.setOriginalDbColumnName(name);
                if (schemaContent.size() > 5) {
                    oneColum.setPrecision(Integer.parseInt(schemaContent.get(2)[i - 1]));
                    oneColum.setLength(Integer.parseInt(schemaContent.get(3)[i - 1]));
                }
                try {
                    String talendType = null;
                    if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
                        if (schemaContent.size() >= 5) {
                            talendType = MetadataTalendType.getMappingTypeRetriever(dbmsId).getDefaultSelectedTalendType(schemaContent.get(4)[i - 1]);
                        } else {
                            talendType = JavaTypesManager.STRING.getId();
                        }
                    } else {
                        if (schemaContent.size() >= 5) {
                            talendType = PerlDataTypeHelper.getNewTalendTypeOfValue(schemaContent.get(4)[i - 1]);
                        } else {
                            talendType = PerlTypesManager.STRING;
                        }
                    }
                    oneColum.setTalendType(talendType);
                } catch (Exception e) {
                    ExceptionHandler.process(e);
                }
                oneColum.setNullable((schemaContent.get(1))[i - 1].equals(Boolean.TRUE.toString()) ? true : false);
                columns.add(oneColum);
                columnLabels.add(oneColum.getLabel());
            }
            if (columns.size() > 0) {
                IElementParameter dqRule = elem.getElementParameter("String_Node_Str");
                if (dqRule != null) {
                    ITDQRuleService ruleService = null;
                    try {
                        ruleService = (ITDQRuleService) GlobalServiceRegister.getDefault().getService(ITDQRuleService.class);
                    } catch (RuntimeException e) {
                    }
                    IElementParameter queryParam = elem.getElementParameter("String_Node_Str");
                    if (ruleService != null && queryParam != null) {
                        ruleService.updateOriginalColumnNames(columns, queryParam);
                    }
                }
            }
            IMetadataTable tempMetatable = new MetadataTable();
            if (tempMetatable.getTableName() == null) {
                tempMetatable.setTableName(inputNode.getUniqueName());
            }
            IMetadataTable outputMetaCopy, originaleOutputTable;
            String propertyName = (String) btn.getData(PARAMETER_NAME);
            IElementParameter param = inputNode.getElementParameter(propertyName);
            for (IElementParameter eParam : elem.getElementParameters()) {
                if (eParam.getContext() != null) {
                    param = eParam;
                }
            }
            originaleOutputTable = inputNode.getMetadataFromConnector(param.getContext());
            if (originaleOutputTable != null) {
                outputMetaCopy = originaleOutputTable.clone();
            }
            tempMetatable.setListColumns(columns);
            MetadataDialog metaDialog = new MetadataDialog(composite.getShell(), tempMetatable, inputNode, getCommandStack());
            if (metaDialog != null) {
                metaDialog.setText(Messages.getString("String_Node_Str") + inputNode.getLabel());
            }
            if (metaDialog.open() == MetadataDialog.OK) {
                outputMetaCopy = metaDialog.getOutputMetaData();
                boolean modified = false;
                if (!outputMetaCopy.sameMetadataAs(originaleOutputTable, IMetadataColumn.OPTIONS_NONE)) {
                    modified = true;
                }
                if (modified) {
                    if (switchParam != null) {
                        switchParam.setValue(Boolean.FALSE);
                    }
                    changeMetadataCommand = new ChangeMetadataCommand(inputNode, param, originaleOutputTable, outputMetaCopy);
                }
            }
        }
    } catch (ProcessorException e) {
        ExtractMetaDataUtils.getInstance().closeConnection();
        final String strExcepton = e.getMessage();
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                MessageDialog.openWarning(composite.getShell(), Messages.getString("String_Node_Str"), strExcepton);
            }
        });
        ExceptionHandler.process(e);
    }
}

Output:
             IMetadataTable outputMetaCopy, originaleOutputTable;
-            String propertyName = (String) btn.getData(PARAMETER_NAME);
+            String propertyName = "String_Node_Str";
+            if (!btn.isDisposed()) {
+                propertyName = (String) btn.getData(PARAMETER_NAME);
+            }
             IElementParameter param = inputNode.getElementParameter(propertyName);


Input:
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
    Permanent planeswalker = game.getPermanent(sourceId);
    return planeswalker.getCounters().getCount(CounterType.LOYALTY) + amount >= 0 && planeswalker.canLoyaltyBeUsed(game);
}

Output:
     Permanent planeswalker = game.getPermanent(sourceId);
-    return planeswalker.getCounters().getCount(CounterType.LOYALTY) + amount >= 0 && planeswalker.canLoyaltyBeUsed(game);
+    return planeswalker != null && planeswalker.getCounters().getCount(CounterType.LOYALTY) + amount >= 0 && planeswalker.canLoyaltyBeUsed(game);
 }


Input:
public void init(com.google.gwt.xml.client.Element srcEle, XulDomContainer container) {
    if (srcEle.hasAttribute("String_Node_Str")) {
        button = null;
        managedObject = imageButton = new ImageButton();
    } else {
        managedObject = button = new RoundedButton();
    }
    super.init(srcEle, container);
    setLabel(srcEle.getAttribute("String_Node_Str"));
    setOnclick(srcEle.getAttribute("String_Node_Str"));
    setImage(srcEle.getAttribute("String_Node_Str"));
    setTooltiptext(srcEle.getAttribute("String_Node_Str"));
    setDisabled("String_Node_Str".equals(srcEle.getAttribute("String_Node_Str")));
}

Output:
 public void init(com.google.gwt.xml.client.Element srcEle, XulDomContainer container) {
-    if (srcEle.hasAttribute("String_Node_Str")) {
+    if (!StringUtils.isEmpty(srcEle.getAttribute("String_Node_Str"))) {
         button = null;


Input:
public void inviteContacts(ChatTransport inviteChatTransport, Collection<String> chatContacts, String reason) {
    ChatSession conferenceChatSession = null;
    if (chatSession instanceof MetaContactChatSession) {
        chatContacts.add(inviteChatTransport.getName());
        ConferenceChatManager conferenceChatManager = GuiActivator.getUIService().getConferenceChatManager();
        if (inviteChatTransport.getProtocolProvider().getOperationSet(OperationSetMultiUserChat.class) != null) {
            ChatRoomWrapper chatRoomWrapper = conferenceChatManager.createChatRoom(inviteChatTransport.getProtocolProvider(), chatContacts);
            conferenceChatSession = new ConferenceChatSession(this, chatRoomWrapper);
        } else if (inviteChatTransport.getProtocolProvider().getOperationSet(OperationSetAdHocMultiUserChat.class) != null) {
            AdHocChatRoomWrapper chatRoomWrapper = conferenceChatManager.createAdHocChatRoom(inviteChatTransport.getProtocolProvider(), chatContacts, reason);
            conferenceChatSession = new AdHocConferenceChatSession(this, chatRoomWrapper);
        }
        if (conferenceChatSession != null)
            this.setChatSession(conferenceChatSession);
    } else {
        conferenceChatSession = chatSession;
        for (String contactAddress : chatContacts) {
            conferenceChatSession.getCurrentChatTransport().inviteChatContact(contactAddress, reason);
        }
    }
}

Output:
         if (inviteChatTransport.getProtocolProvider().getOperationSet(OperationSetMultiUserChat.class) != null) {
-            ChatRoomWrapper chatRoomWrapper = conferenceChatManager.createChatRoom(inviteChatTransport.getProtocolProvider(), chatContacts);
+            ChatRoomWrapper chatRoomWrapper = conferenceChatManager.createChatRoom(inviteChatTransport.getProtocolProvider(), chatContacts, reason);
             conferenceChatSession = new ConferenceChatSession(this, chatRoomWrapper);


Input:
private void setupDestinationFile(State state, InnerState innerState) throws StopRequest {
    if (state.mFilename != null) {
        if (!Helpers.isFilenameValid(state.mFilename)) {
            throw new StopRequest(Downloads.Impl.STATUS_FILE_ERROR, "String_Node_Str");
        }
        File f = new File(state.mFilename);
        if (f.exists()) {
            long fileLength = f.length();
            if (fileLength == 0) {
                f.delete();
                state.mFilename = null;
            } else if (mInfo.mETag == null && !mInfo.mNoIntegrity) {
                f.delete();
                throw new StopRequest(Downloads.Impl.STATUS_CANNOT_RESUME, "String_Node_Str");
            } else {
                try {
                    state.mStream = new FileOutputStream(state.mFilename, true);
                } catch (FileNotFoundException exc) {
                    throw new StopRequest(Downloads.Impl.STATUS_FILE_ERROR, "String_Node_Str" + exc.toString(), exc);
                }
                innerState.mBytesSoFar = (int) fileLength;
                if (mInfo.mTotalBytes != -1) {
                    innerState.mHeaderContentLength = Long.toString(mInfo.mTotalBytes);
                }
                innerState.mHeaderETag = mInfo.mETag;
                innerState.mContinuingDownload = true;
            }
        }
    }
    if (state.mStream != null && mInfo.mDestination == Downloads.Impl.DESTINATION_EXTERNAL && !isDrmFile(state)) {
        closeDestination(state);
    }
}

Output:
 private void setupDestinationFile(State state, InnerState innerState) throws StopRequest {
-    if (state.mFilename != null) {
+    if (TextUtils.isEmpty(state.mFilename)) {
         if (!Helpers.isFilenameValid(state.mFilename)) {


Input:
public static void notePlayer(OfflinePlayer player) {
    if (!playerNames.contains(player.getName().toLowerCase())) {
        playerNames.add(player.getName().toLowerCase());
    }
}

Output:
 public static void notePlayer(OfflinePlayer player) {
-    if (!playerNames.contains(player.getName().toLowerCase())) {
-        playerNames.add(player.getName().toLowerCase());
+    if (!playerNames.containsKey(player.getName().toLowerCase())) {
+        playerNames.put(player.getName().toLowerCase(), player.getUniqueId());
     }


Input:
private void changeTraderBuySell(HumanNPC npc, Player player, String item, String price, boolean selling) {
    if (item.contains("String_Node_Str")) {
        Material mat = StringUtils.parseMaterial(price);
        if (mat == null) {
            player.sendMessage(ChatColor.RED + "String_Node_Str");
            return;
        }
        if (selling) {
            if (npc.getTraderNPC().getStockable(mat.getId(), true) == null) {
                player.sendMessage(ChatColor.RED + "String_Node_Str");
                return;
            } else {
                npc.traderNPC.removeStockable(mat.getId(), true);
                player.sendMessage(ChatColor.GREEN + "String_Node_Str" + StringUtils.yellowify(mat.name(), ChatColor.GREEN) + "String_Node_Str");
            }
        } else {
            if (npc.getTraderNPC().getStockable(mat.getId(), false) == null) {
                player.sendMessage(ChatColor.RED + "String_Node_Str");
                return;
            } else {
                npc.traderNPC.removeStockable(mat.getId(), false);
                player.sendMessage(ChatColor.GREEN + "String_Node_Str" + StringUtils.yellowify(mat.name(), ChatColor.GREEN) + "String_Node_Str");
            }
        }
        return;
    }
    String[] split = item.split("String_Node_Str");
    ItemStack stack = createItemStack(split);
    if (stack == null) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        return;
    }
    split = price.split("String_Node_Str");
    ItemStack cost = null;
    if (split.length != 1) {
        cost = createItemStack(split);
        if (cost == null) {
            player.sendMessage(ChatColor.RED + "String_Node_Str");
            return;
        }
    }
    int data = Citizens.MAGIC_DATA_VALUE;
    if (stack.getData() != null)
        data = stack.getData().getData();
    ItemPrice itemPrice = new ItemPrice(stack.getAmount(), stack.getTypeId(), data);
    itemPrice.setiConomy(cost == null);
    Stockable s = new Stockable(stack, itemPrice, false);
    if (selling) {
        s.setSelling(true);
        npc.getTraderNPC().addStockable(s);
        player.sendMessage(ChatColor.GREEN + "String_Node_Str" + MessageUtils.getStockableMessage(s, ChatColor.GREEN) + "String_Node_Str");
    } else {
        npc.getTraderNPC().addStockable(s);
        player.sendMessage(ChatColor.GREEN + "String_Node_Str" + MessageUtils.getStockableMessage(s, ChatColor.GREEN) + "String_Node_Str");
    }
}

Output:
                 npc.traderNPC.removeStockable(mat.getId(), true);
-                player.sendMessage(ChatColor.GREEN + "String_Node_Str" + StringUtils.yellowify(mat.name(), ChatColor.GREEN) + "String_Node_Str");
+                player.sendMessage(ChatColor.GREEN + "String_Node_Str" + StringUtils.yellowify(mat.name()) + "String_Node_Str");
             }


Input:
public void write(OutputStream os) throws IOException {
    os.write("String_Node_Str".getBytes());
    IOUtils.writeShortMM(os, id);
    if (name.trim().length() == 0)
        IOUtils.writeShortMM(os, 0);
    else
        os.write(name.trim().getBytes());
    if (name.trim().length() % 2 != 0)
        os.write(0);
    IOUtils.writeIntMM(os, size);
    os.write(data);
    if (size % 2 != 0)
        os.write(0);
}

Output:
     IOUtils.writeShortMM(os, id);
-    if (name.trim().length() == 0)
-        IOUtils.writeShortMM(os, 0);
-    else
-        os.write(name.trim().getBytes());
-    if (name.trim().length() % 2 != 0)
+    byte[] temp = name.trim().getBytes();
+    os.write(temp.length);
+    os.write(temp);
+    if (temp.length % 2 == 0)
         os.write(0);


Input:
public void checkDevice(long userId, long deviceId) throws SecurityException {
    if (getNotNull(userId).contains(deviceId)) {
        throw new SecurityException("String_Node_Str");
    }
}

Output:
 public void checkDevice(long userId, long deviceId) throws SecurityException {
-    if (getNotNull(userId).contains(deviceId)) {
+    if (!getNotNull(userId).contains(deviceId)) {
         throw new SecurityException("String_Node_Str");


Input:
public void addNodes(ConfigurationNode... nodes) {
    for (ConfigurationNode node : nodes) {
        node.setConfiguration(this);
    }
}

Output:
     for (ConfigurationNode node : nodes) {
-        node.setConfiguration(this);
+        return addNode(node);
     }


Input:
protected void addScanIteratorSettings(final ScannerBase scanner) {
    addFieldSubsettingToIterator(scanner);
    if ((distributableFilters != null) && !distributableFilters.isEmpty() && queryFiltersEnabled) {
        final IteratorSetting iteratorSettings;
        if (isAggregation()) {
            iteratorSettings = new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY, QueryFilterIterator.QUERY_ITERATOR_NAME, AggregationIterator.class);
            iteratorSettings.addOption(AggregationIterator.ADAPTER_OPTION_NAME, ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(aggregation.getLeft())));
            final Aggregation aggr = aggregation.getRight();
            iteratorSettings.addOption(AggregationIterator.AGGREGATION_OPTION_NAME, aggr.getClass().getName());
            if (aggr.getParameters() != null) {
                iteratorSettings.addOption(AggregationIterator.CONSTRAINTS_OPTION_NAME, ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary(aggr.getParameters()))));
            }
            iteratorSettings.addOption(AggregationIterator.INDEX_STRATEGY_OPTION_NAME, ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexStrategy())));
        } else {
            iteratorSettings = new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY, QueryFilterIterator.QUERY_ITERATOR_NAME, QueryFilterIterator.class);
        }
        final DistributableQueryFilter filterList = new DistributableFilterList(distributableFilters);
        iteratorSettings.addOption(QueryFilterIterator.FILTER, ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(filterList)));
        iteratorSettings.addOption(QueryFilterIterator.MODEL, ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexModel())));
        scanner.addScanIterator(iteratorSettings);
    } else {
        final IteratorSetting iteratorSettings = new IteratorSetting(QueryFilterIterator.WHOLE_ROW_ITERATOR_PRIORITY, QueryFilterIterator.WHOLE_ROW_ITERATOR_NAME, WholeRowIterator.class);
        scanner.addScanIterator(iteratorSettings);
    }
}

Output:
             if (aggr.getParameters() != null) {
-                iteratorSettings.addOption(AggregationIterator.CONSTRAINTS_OPTION_NAME, ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary(aggr.getParameters()))));
+                iteratorSettings.addOption(AggregationIterator.PARAMETER_OPTION_NAME, ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary(aggr.getParameters()))));
             }


Input:
private void genAnswers(PrintWriter pw) {
    for (Iterator iter = propertyValuesSetByStrongName.entrySet().iterator(); iter.hasNext(); ) {
        Map.Entry entry = (Entry) iter.next();
        String strongName = (String) entry.getKey();
        Set propValuesSet = (Set) entry.getValue();
        for (Iterator iterator = propValuesSet.iterator(); iterator.hasNext(); ) {
            String[] propValues = (String[]) iterator.next();
            pw.print("String_Node_Str");
            for (int i = 0; i < orderedProps.length; i++) {
                if (i > 0) {
                    pw.print("String_Node_Str");
                }
                pw.print(literal(propValues[i]));
            }
            pw.print("String_Node_Str");
            pw.print("String_Node_Str");
            pw.print(literal(strongName));
            pw.println("String_Node_Str");
        }
    }
}

Output:
             for (int i = 0; i < orderedProps.length; i++) {
-                if (i > 0) {
-                    pw.print("String_Node_Str");
+                Property prop = orderedProps[i];
+                String activeValue = prop.getActiveValue();
+                if (activeValue == null) {
+                    if (!firstPrint) {
+                        pw.print("String_Node_Str");
+                    }
+                    firstPrint = false;
+                    pw.print(literal(propValues[i]));
+                } else {
                 }


Input:
public boolean isEmpty() {
    return edges.isEmpty();
}

Output:
 public boolean isEmpty() {
-    return edges.isEmpty();
+    return wrappedEdges.isEmpty();
 }


Input:
public void startContent(IContent content) throws BirtException {
    boolean isInline = PropertyUtil.isInlineElement(content);
    if (isInline) {
        if (current.isInlineStacking()) {
        } else {
            setContainer(af.createLineArea(current, context));
        }
    } else {
        if (current.isInlineStacking()) {
            while (current.isInlineStacking()) {
                closeContainer();
            }
        }
    }
    ILayout layout = af.createLayout(current, context, content);
    layout.layout();
}

Output:
     ILayout layout = af.createLayout(current, context, content);
-    layout.layout();
+    if (layout != null) {
+        layout.layout();
+    }
 }


Input:
public boolean remove(CommandSender player, String[] s) {
    if ((!BSutils.hasPermission(player, "String_Node_Str", true))) {
        return true;
    }
    if (s.length != 1) {
        return false;
    } else {
        try {
            PriceList.remove(s[0]);
            BSutils.sendMessage(player, String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str", "String_Node_Str"), s[0]));
        } catch (Exception e) {
            BSutils.sendMessage(player, String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str", "String_Node_Str"), s[0]));
        }
        return true;
    }
}

Output:
         try {
-            PriceList.remove(s[0]);
-            BSutils.sendMessage(player, String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str", "String_Node_Str"), s[0]));
+            String itemName = itemDb.getName(itemDb.get(s[0]));
+            PriceList.remove(itemName);
+            BSutils.sendMessage(player, String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str", "String_Node_Str"), itemName));
         } catch (Exception e) {


Input:
private List<IProjectPO> checkAllAvailableProjects() {
    List<IProjectPO> projList = null;
    try {
        projList = ProjectPM.findAllProjects();
        if (projList.isEmpty()) {
            Display.getDefault().asyncExec(new Runnable() {
                public void run() {
                    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_NO_PROJECT_IN_DB);
                }
            });
            Plugin.stopLongRunning();
        } else {
            SortedMap<String, List<String>> projNameToVersionMap = new TreeMap<String, List<String>>();
            for (IProjectPO proj : projList) {
                String projName = proj.getName();
                String projVersion = proj.getVersionString();
                if (!projNameToVersionMap.containsKey(projName)) {
                    projNameToVersionMap.put(projName, new ArrayList<String>());
                }
                projNameToVersionMap.get(projName).add(projVersion);
            }
        }
    } catch (final JBException e) {
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                ErrorHandlingUtil.createMessageDialog(e, null, null);
            }
        });
    }
    return projList;
}

Output:
                 String projVersion = proj.getVersionString();
-                if (!projNameToVersionMap.containsKey(projName)) {
+                if (!StringUtils.isBlank(projName) && !projNameToVersionMap.containsKey(projName)) {
                     projNameToVersionMap.put(projName, new ArrayList<String>());


Input:
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) {
    State state = (State) super.initialise(g2, dataArea, plot, data, info);
    state.setProcessVisibleItemsOnly(false);
    this.points = new Vector();
    setDrawSeriesLineAsPath(true);
    return state;
}

Output:
     state.setProcessVisibleItemsOnly(false);
-    this.points = new Vector();
+    this.points = new ArrayList<ControlPoint>();
     setDrawSeriesLineAsPath(true);


Input:
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    int color = adapter.getColorArr().get(position % songData.size());
    int nextColor = adapter.getColorArr().get((position + 1) % songData.size());
    int evaluateColor = (int) argbEvaluator.evaluate(positionOffset, color, nextColor);
    mClPlay.setBackgroundColor(evaluateColor);
}

Output:
 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-    int color = adapter.getColorArr().get(position % songData.size());
-    int nextColor = adapter.getColorArr().get((position + 1) % songData.size());
+    int color = mPagerAdapter.getColorArr().get(position % songData.size());
+    int nextColor = mPagerAdapter.getColorArr().get((position + 1) % songData.size());
     int evaluateColor = (int) argbEvaluator.evaluate(positionOffset, color, nextColor);


Input:
private void saveToExtractList() {
    if (!useToextractlist) {
        Utilities.saveObject(this.toExtractlist, toExtract, false);
    }
}

Output:
 private void saveToExtractList() {
-    if (!useToextractlist) {
+    if (useToextractlist) {
         Utilities.saveObject(this.toExtractlist, toExtract, false);


Input:
public void close(String reason) {
    if (!isClosed.get()) {
        closeSocket();
        isClosed.set(true);
        this.closeTime = TimeUtil.currentTimeMillis();
        if (reason != null)
            this.closeReason = reason;
        this.cleanup();
        NetSystem.getInstance().removeConnection(this);
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("String_Node_Str" + reason + "String_Node_Str" + this.toString());
        }
        if (handler != null) {
            handler.onClosed(this, reason);
        }
        this.attachement = null;
    } else {
        this.cleanup();
    }
}

Output:
         this.cleanup();
-        NetSystem.getInstance().removeConnection(this);
+        if (isNested) {
+            NetSystem.getInstance().removeConnection(parent);
+            if (handler != null)
+                handler.onClosed(parent, reason);
+        } else {
+            NetSystem.getInstance().removeConnection(this);
+            if (handler != null)
+                handler.onClosed(this, reason);
+        }
         if (LOGGER.isDebugEnabled()) {


Input:
public List<Problem> getProblems(INode node, IElement element) {
    List<Problem> toReturn = new ArrayList<Problem>();
    List<ModuleNeeded> list = node.getComponent().getModulesNeeded();
    List<ModuleNeeded> modulesNeeded = ModulesNeededProvider.getModulesNeeded();
    boolean flag = false;
    for (ModuleNeeded current : list) {
        if (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str")) {
            flag = true;
        }
    }
    if (flag) {
        for (ModuleNeeded module : modulesNeeded) {
            for (ModuleNeeded current : list) {
                if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
                    if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str"))) {
                        Problem problem = new Problem(element, "String_Node_Str" + current.getModuleName() + "String_Node_Str", ProblemStatus.ERROR);
                        problem.setKey("String_Node_Str" + current.getModuleName());
                        toReturn.add(problem);
                    }
                }
            }
        }
    } else {
        for (ModuleNeeded module : modulesNeeded) {
            for (ModuleNeeded current : list) {
                if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
                    if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired()) {
                        Problem problem = new Problem(element, "String_Node_Str" + current.getModuleName() + "String_Node_Str", ProblemStatus.ERROR);
                        problem.setKey("String_Node_Str" + current.getModuleName());
                        toReturn.add(problem);
                    }
                }
            }
        }
    }
    return toReturn;
}

Output:
     List<ModuleNeeded> modulesNeeded = ModulesNeededProvider.getModulesNeeded();
-    boolean flag = false;
-    for (ModuleNeeded current : list) {
-        if (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str")) {
-            flag = true;
-        }
-    }
-    if (flag) {
-        for (ModuleNeeded module : modulesNeeded) {
-            for (ModuleNeeded current : list) {
-                if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
-                    if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str"))) {
-                        Problem problem = new Problem(element, "String_Node_Str" + current.getModuleName() + "String_Node_Str", ProblemStatus.ERROR);
-                        problem.setKey("String_Node_Str" + current.getModuleName());
-                        toReturn.add(problem);
-                    }
-                }
-            }
-        }
-    } else {
-        for (ModuleNeeded module : modulesNeeded) {
-            for (ModuleNeeded current : list) {
-                if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
-                    if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired()) {
-                        Problem problem = new Problem(element, "String_Node_Str" + current.getModuleName() + "String_Node_Str", ProblemStatus.ERROR);
-                        problem.setKey("String_Node_Str" + current.getModuleName());
-                        toReturn.add(problem);
-                    }
+    for (ModuleNeeded module : modulesNeeded) {
+        for (ModuleNeeded current : list) {
+            if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
+                if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
+                    Problem problem = new Problem(element, "String_Node_Str" + current.getModuleName() + "String_Node_Str", ProblemStatus.ERROR);
+                    problem.setKey("String_Node_Str" + current.getModuleName());
+                    toReturn.add(problem);
                 }


Input:
public void run() {
    saveTmpModelToHDFS(context.getCurrentIteration(), context.getMasterResult().getParameters());
    Path out = new Path(context.getProps().getProperty(CommonConstants.GUAGUA_OUTPUT));
    writeModelWeightsToFileSystem(optimizedWeights, out);
}

Output:
     Path out = new Path(context.getProps().getProperty(CommonConstants.GUAGUA_OUTPUT));
-    writeModelWeightsToFileSystem(optimizedWeights, out);
+    if (!context.getMasterResult().isHalt() && context.getCurrentIteration() != context.getTotalIteration()) {
+        writeModelWeightsToFileSystem(optimizedWeights, out);
+    }
 }


Input:
private void processText(boolean ignorable) throws SAXException {
    if (context.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
        visitor.text(buffer);
    buffer.setLength(0);
}

Output:
 private void processText(boolean ignorable) throws SAXException {
-    if (context.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
-        visitor.text(buffer);
+    if (context.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) {
+        if (textReported) {
+            textReported = false;
+        } else {
+            visitor.text(buffer);
+        }
+    }
     buffer.setLength(0);


Input:
public boolean performFinish() {
    String targetFile = page.getTargetFile();
    Object[] elements = page.getSelectedPatternsTree().getCheckedElements();
    List<Pattern> seletedPatterns = new ArrayList<Pattern>();
    for (Object element : elements) {
        if (element instanceof IFile) {
            IFile file = (IFile) element;
            if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
                seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
            }
        }
    }
    File file = new File(targetFile);
    if (!file.exists()) {
        MessageDialog.openError(getShell(), "String_Node_Str", "String_Node_Str");
        return false;
    }
    boolean isContinue = true;
    if (file.exists() && !isForExchange) {
        isContinue = MessageDialogWithToggle.openConfirm(null, DefaultMessagesImpl.getString("String_Node_Str"), DefaultMessagesImpl.getString("String_Node_Str"));
    }
    if (isContinue) {
        ExportFactory.export(file, folder, seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
        if (isForExchange && file.isDirectory()) {
            for (File patternFile : file.listFiles()) {
                try {
                    FilesUtils.zip(patternFile, patternFile.getPath() + "String_Node_Str");
                    patternFile.delete();
                } catch (Exception e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
        return true;
    }
    return false;
}

Output:
         if (isForExchange && file.isDirectory()) {
-            for (File patternFile : file.listFiles()) {
-                try {
-                    FilesUtils.zip(patternFile, patternFile.getPath() + "String_Node_Str");
-                    patternFile.delete();
-                } catch (Exception e) {
-                    log.error(e.getMessage(), e);
+            for (Iterator iterator = seletedPatterns.iterator(); iterator.hasNext(); ) {
+                Pattern pattern = (Pattern) iterator.next();
+                File patternFile = new File(file, pattern.getName() + "String_Node_Str");
+                if (patternFile.isFile() && patternFile.exists()) {
+                    try {
+                        FilesUtils.zip(patternFile, patternFile.getPath() + "String_Node_Str");
+                        patternFile.delete();
+                    } catch (Exception e) {
+                        log.error(e.getMessage(), e);
+                    }
                 }


Input:
private void updateVersionPart() {
    IHadoopDistributionService hadoopDistributionService = getHadoopDistributionService();
    if (hadoopDistributionService != null) {
        final IHDistribution hDistribution = hadoopDistributionService.getHadoopDistribution(distribution, false);
        if (hDistribution != null) {
            boolean isSparkJob = isSparkJob();
            final IHDistributionVersion[] hdVersions = hDistribution.getHDVersions();
            List<String> versionsDisplay = new ArrayList<String>();
            for (IHDistributionVersion hdv : hdVersions) {
                final String displayVersion = hdv.getDisplayVersion();
                if (displayVersion == null) {
                    continue;
                }
                if (isSparkJob) {
                    if (hadoopDistributionService.doSupportService(hdv, IHDConstants.SERVICE_SPARK)) {
                        versionsDisplay.add(displayVersion);
                    }
                } else {
                    versionsDisplay.add(displayVersion);
                }
            }
            versionCombo.getCombo().setItems(versionsDisplay.toArray(new String[0]));
            IHDistributionVersion defaultVersion = hDistribution.getDefaultVersion();
            if (defaultVersion != null) {
                versionCombo.getCombo().setText(defaultVersion.getDisplayVersion());
            } else if (!versionsDisplay.isEmpty()) {
                versionCombo.getCombo().select(0);
            }
        }
    }
}

Output:
 private void updateVersionPart() {
-    IHadoopDistributionService hadoopDistributionService = getHadoopDistributionService();
-    if (hadoopDistributionService != null) {
-        final IHDistribution hDistribution = hadoopDistributionService.getHadoopDistribution(distribution, false);
-        if (hDistribution != null) {
-            boolean isSparkJob = isSparkJob();
-            final IHDistributionVersion[] hdVersions = hDistribution.getHDVersions();
-            List<String> versionsDisplay = new ArrayList<String>();
-            for (IHDistributionVersion hdv : hdVersions) {
-                final String displayVersion = hdv.getDisplayVersion();
-                if (displayVersion == null) {
-                    continue;
-                }
-                if (isSparkJob) {
-                    if (hadoopDistributionService.doSupportService(hdv, IHDConstants.SERVICE_SPARK)) {
-                        versionsDisplay.add(displayVersion);
-                    }
-                } else {
-                    versionsDisplay.add(displayVersion);
-                }
-            }
-            versionCombo.getCombo().setItems(versionsDisplay.toArray(new String[0]));
-            IHDistributionVersion defaultVersion = hDistribution.getDefaultVersion();
-            if (defaultVersion != null) {
-                versionCombo.getCombo().setText(defaultVersion.getDisplayVersion());
-            } else if (!versionsDisplay.isEmpty()) {
-                versionCombo.getCombo().select(0);
-            }
+    final IHDistribution hadoopDistribution = getHadoopDistribution();
+    if (hadoopDistribution != null) {
+        String[] versionsDisplay = hadoopDistribution.getVersionsDisplay();
+        IHDistributionVersion defaultVersion = hadoopDistribution.getDefaultVersion();
+        versionCombo.getCombo().setItems(versionsDisplay);
+        if (defaultVersion != null) {
+            versionCombo.getCombo().setText(defaultVersion.getDisplayVersion());
+        } else if (versionsDisplay.length > 0) {
+            versionCombo.getCombo().select(0);
         }


Input:
public int eatItem(IssuedCommand issuedCommand) {
    Item selectedItem = selectInventoryItem(issuedCommand);
    if (selectedItem != null) {
        if (selectedItem.isFood()) {
            FoodComponent food = selectedItem.getFoodComponent();
            double remainingBites = selectedItem.getCurIntegrity() / (double) food.getIntegrityDecrementOnEat();
            if (remainingBites >= 1.0) {
                addHealth(food.getNutrition());
            } else {
                addHealth((int) (food.getNutrition() * remainingBites));
            }
            selectedItem.decrementIntegrity(food.getIntegrityDecrementOnEat());
            if (selectedItem.isBroken() && !selectedItem.isRepairable()) {
                IO.writeString("String_Node_Str" + selectedItem.getName() + "String_Node_Str");
                getInventory().removeItem(selectedItem);
            } else {
                IO.writeString("String_Node_Str" + selectedItem.getName() + "String_Node_Str");
            }
            if (isCompletelyHealed()) {
                IO.writeString("String_Node_Str");
            }
        } else {
            IO.writeString("String_Node_Str");
        }
    }
    return SECONDS_TO_EAT_AN_ITEM;
}

Output:
     }
-    return SECONDS_TO_EAT_AN_ITEM;
+    return 0;
 }


Input:
public boolean readText(StringBuilder sb) {
    try {
        if (read(sb, (t, w) -> w.bytes().parseUtf8(sb, (int) w.bytes().readRemaining()), queue.timeoutMS))
            return true;
    } catch (TimeoutException e) {
    }
    sb.setLength(0);
    sb.append("String_Node_Str");
    return false;
}

Output:
 public boolean readText(StringBuilder sb) {
-    try {
-        if (read(sb, (t, w) -> w.bytes().parseUtf8(sb, (int) w.bytes().readRemaining()), queue.timeoutMS))
-            return true;
-    } catch (TimeoutException e) {
-    }
+    if (read(sb, (t, w) -> w.bytes().parseUtf8(sb, (int) w.bytes().readRemaining())))
+        return true;
     sb.setLength(0);


Input:
public ISelection getSelection() {
    List<Object> selectedObjects = action.getSelectedObject();
    if (!selectedObjects.isEmpty()) {
        Object object = selectedObjects.get(0);
        if (object instanceof IRepositoryViewObject) {
            IRepositoryViewObject viewObj = (IRepositoryViewObject) object;
            RepositoryNode node = RepositoryResourceUtil.convertToNode(viewObj);
            return new StructuredSelection(node);
        }
    }
    return new StructuredSelection();
}

Output:
     if (!selectedObjects.isEmpty()) {
-        Object object = selectedObjects.get(0);
-        if (object instanceof IRepositoryViewObject) {
-            IRepositoryViewObject viewObj = (IRepositoryViewObject) object;
-            RepositoryNode node = RepositoryResourceUtil.convertToNode(viewObj);
-            return new StructuredSelection(node);
+        List<RepositoryNode> selectedNodes = new ArrayList<RepositoryNode>();
+        for (Object object : selectedObjects) {
+            if (object instanceof IRepositoryViewObject) {
+                IRepositoryViewObject viewObj = (IRepositoryViewObject) object;
+                RepositoryNode node = RepositoryResourceUtil.convertToNode(viewObj);
+                if (node != null) {
+                    selectedNodes.add(node);
+                }
+            }
         }