auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void progress() { if (!this.bPlayer.canBendIgnoreBinds(this) || !this.bPlayer.hasElement(Element.CHI)) { this.remove(); return; } else if (duration != 0 && System.currentTimeMillis() > this.getStartTime() + duration) { remove(); return; } if (!this.player.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE)) { this.player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 60, this.resistance, true)); } if (!this.player.hasPotionEffect(PotionEffectType.INCREASE_DAMAGE)) { this.player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 60, this.strength, true)); } }

Target:
public void progress() { if (!this.bPlayer.canBendIgnoreBinds(this) || !this.bPlayer.hasElement(Element.CHI)) { this.remove(); return; } else if (this.duration != 0 && System.currentTimeMillis() > this.getStartTime() + this.duration) { remove(); return; } if (!this.player.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE)) { this.player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 60, this.resistance, true)); } if (!this.player.hasPotionEffect(PotionEffectType.INCREASE_DAMAGE)) { this.player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 60, this.strength, true)); } }
Source:
public void testContainerBuilder() throws JSONException { for (int i = 0; i < CONTAINER_COUNT; i++) { ContainerBuilder containerBuilder = new ContainerBuilder(refContainerIds.get(i), refContainerNames.get(i), refContainerStatuses.get(i), refContainerDescriptions.get(i), refContainerEncryptionValues.get(i), refContainerPreviousEncryptionValues.get(i), refContainerCachingValues.get(i), refContainerMediaScanDisabledValues.get(i), refAccountId); Container containerFromBuilder = containerBuilder.build(); assertContainer(containerFromBuilder, i, LATEST_CONTAINER_JSON_VERSION); containerBuilder = new ContainerBuilder(containerFromBuilder); containerFromBuilder = containerBuilder.build(); assertContainer(containerFromBuilder, i, LATEST_CONTAINER_JSON_VERSION); boolean previouslyEncrypted = containerFromBuilder.wasPreviouslyEncrypted(); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, previouslyEncrypted); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(true).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, previouslyEncrypted); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(true).build(); assertEncryptionSettings(containerFromBuilder, true, true); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, true); } }

Target:
public void testContainerBuilder() throws JSONException { for (int i = 0; i < CONTAINER_COUNT; i++) { ContainerBuilder containerBuilder = new ContainerBuilder(refContainerIds.get(i), refContainerNames.get(i), refContainerStatuses.get(i), refContainerDescriptions.get(i), refContainerEncryptionValues.get(i), refContainerPreviousEncryptionValues.get(i), refContainerCachingValues.get(i), refContainerMediaScanDisabledValues.get(i), refAccountId); Container containerFromBuilder = containerBuilder.build(); assertContainer(containerFromBuilder, i); containerBuilder = new ContainerBuilder(containerFromBuilder); containerFromBuilder = containerBuilder.build(); assertContainer(containerFromBuilder, i); boolean previouslyEncrypted = containerFromBuilder.wasPreviouslyEncrypted(); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, previouslyEncrypted); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(true).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, previouslyEncrypted); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(true).build(); assertEncryptionSettings(containerFromBuilder, true, true); containerFromBuilder = new ContainerBuilder(containerFromBuilder).setEncrypted(false).build(); assertEncryptionSettings(containerFromBuilder, false, true); } }
Source:
BundleBuilder(JUnitFramework ws) { checkNonNullArgument(ws, "'ws' cannot be null"); this.ws = ws; bundleSymbolicName("test-" + JUnitFrameworkBuilder.counter.incrementAndGet()); }

Target:
BundleBuilder(JUnitFramework ws) { requireNonNull(ws, "'ws' cannot be null"); this.ws = ws; bundleSymbolicName("test-" + JUnitFrameworkBuilder.counter.incrementAndGet()); }
Source:
public AVideo(URL url) { if (url == null) throw new IllegalArgumentException("null url"); _name = getName(url); _url = url; _isdata = DYNAMIC_STREAM; _data = null; _file = null; }

Target:
public AVideo(URL url) { if (url == null) throw new IllegalArgumentException("url cannot be null"); _name = getName(url); _url = url; _isdata = DYNAMIC_STREAM; _data = null; _file = null; }
Source:
public Target(String targetUriAsString) { super(); Assert.hasText(targetUriAsString, "The provided targetUriAsString must neither be null nor empty."); this.targetUri = URI.create(targetUriAsString); }

Target:
public Target(String targetUriAsString) { Assert.hasText(targetUriAsString, "The provided targetUriAsString must neither be null nor empty."); this.targetUri = URI.create(targetUriAsString); }
Source:
public RenameCommand() { Options o = CommandLineHelper.getCommonOptions(); o.addOption("i", "input", true, "load ontology from a file"); o.addOption("I", "input-iri", true, "load ontology from an IRI"); o.addOption("o", "output", true, "save ontology to a file"); o.addOption("m", "mappings", true, "table of mappings for renaming"); o.addOption("r", "prefix-mappings", true, "table of prefix mappings for renaming"); o.addOption("A", "add-prefix", true, "add a new prefix to ontology file header"); o.addOption("f", "allow-duplicates", true, "allow two or more terms to be renamed to the same full IRI"); options = o; }

Target:
public RenameCommand() { Options o = CommandLineHelper.getCommonOptions(); o.addOption("i", "input", true, "load ontology from a file"); o.addOption("I", "input-iri", true, "load ontology from an IRI"); o.addOption("o", "output", true, "save ontology to a file"); o.addOption("m", "mappings", true, "table of mappings for renaming"); o.addOption("r", "prefix-mappings", true, "table of prefix mappings for renaming"); o.addOption("A", "add-prefix", true, "add a new prefix to ontology file header"); o.addOption("d", "allow-duplicates", true, "allow two or more terms to be renamed to the same full IRI"); options = o; }
Source:
private void checkUserControllableLocationHeaderValue( HttpMessage msg, int id, Set<HtmlParameter> params, String responseLocation) { if (responseLocation.length() == 0) { return; } String requestDomain = null; try { requestDomain = msg.getRequestHeader().getURI().getAuthority(); } catch (URIException ex) { logger.error( "unable to get URI from Request. Ignoring and moving ahead with the scanning OpenRedirect", ex); } String protocol = null; String domain = null; String token = null; if (responseLocation.indexOf("://") > 0) { URL responseURL; try { responseURL = new URL(responseLocation); } catch (MalformedURLException e) { return; } protocol = responseURL.getProtocol(); domain = responseURL.getAuthority(); } else { if (responseLocation.indexOf("/") > 0) { token = responseLocation.substring(0, responseLocation.indexOf("/")); } else { token = responseLocation; } } for (HtmlParameter param : params) { String paramValue = param.getValue(); if (paramValue == null || paramValue.length() == 0) { continue; } if (paramValue.equalsIgnoreCase(protocol) || paramValue.equalsIgnoreCase(domain) || paramValue.equalsIgnoreCase(token) || (responseLocation.indexOf("://") > 0 && paramValue.indexOf(responseLocation) >= 0)) { if (token != null || requestDomain == null || !requestDomain.equalsIgnoreCase(domain)) { raiseAlert(msg, id, param.getName(), paramValue, responseLocation); } } } }

Target:
private void checkUserControllableLocationHeaderValue( HttpMessage msg, int id, Set<HtmlParameter> params, String responseLocation) { if (responseLocation.length() == 0) { return; } String requestDomain = null; try { requestDomain = msg.getRequestHeader().getURI().getAuthority(); } catch (URIException ex) { LOGGER.warn( "Unable to get authority from URI :" + msg.getRequestHeader().getURI() + ". Ignoring and moving ahead with the scanning OpenRedirect", ex); } String domain = null; if (responseLocation.indexOf("://") > 0) { URL responseURL; try { responseURL = new URL(responseLocation); } catch (MalformedURLException e) { return; } domain = responseURL.getAuthority(); } if (requestDomain != null && requestDomain.equalsIgnoreCase(domain)) { return; } for (HtmlParameter param : params) { String paramValue = param.getValue(); if (paramValue == null || paramValue.length() == 0) { continue; } if (paramValue.equalsIgnoreCase(domain) || (responseLocation.indexOf("://") > 0 && paramValue.indexOf(responseLocation) >= 0)) { raiseAlert(msg, id, param.getName(), paramValue, responseLocation); } } }
Source:
public static Block stEnvelopeAsPts(@SqlType(GEOMETRY_TYPE_NAME) Slice input) { Envelope envelope = deserializeEnvelope(input); BlockBuilder blockBuilder = VARCHAR.createBlockBuilder(null, 2); if (envelope == null) { VARCHAR.writeSlice(blockBuilder, EMPTY_MULTIPOINT); VARCHAR.writeSlice(blockBuilder, EMPTY_MULTIPOINT); } else { Point point1 = new Point(envelope.getXMin(), envelope.getYMin()); Point point2 = new Point(envelope.getXMax(), envelope.getYMax()); VARCHAR.writeSlice(blockBuilder, serialize(createFromEsriGeometry(point1, null, false))); VARCHAR.writeSlice(blockBuilder, serialize(createFromEsriGeometry(point2, null, false))); } return blockBuilder.build(); }

Target:
public static Block stEnvelopeAsPts(@SqlType(GEOMETRY_TYPE_NAME) Slice input) { Envelope envelope = deserializeEnvelope(input); if (envelope == null) { return null; } BlockBuilder blockBuilder = GEOMETRY.createBlockBuilder(null, 2); Point lowerLeftCorner = new Point(envelope.getXMin(), envelope.getYMin()); Point upperRightCorner = new Point(envelope.getXMax(), envelope.getYMax()); GEOMETRY.writeSlice(blockBuilder, serialize(createFromEsriGeometry(lowerLeftCorner, null, false))); GEOMETRY.writeSlice(blockBuilder, serialize(createFromEsriGeometry(upperRightCorner, null, false))); return blockBuilder.build(); }
Source:
public List<String> getResourcesTypes() { return Lists.newArrayList("brooklyn.nodes.Compute"); }

Target:
public List<String> getResourcesTypes() { return Collections.singletonList("brooklyn.nodes.Compute"); }
Source:
public void testModuleGroups() throws Exception { Map<String, String> results = new HashMap<>(); results.put(QuboleConstant.BIGDATALAUNCHER_MODULE_GROUP.getModuleName(), null); results.put(QuboleConstant.HIVE_MODULE_GROUP.getModuleName(), null); Set<DistributionModuleGroup> moduleGroups = QuboleHiveModuleGroup.getModuleGroups(); assertEquals(2, moduleGroups.size()); for (DistributionModuleGroup module : moduleGroups) { assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName())); if (results.get(module.getModuleName()) == null) { assertTrue("The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null); } else { assertTrue("The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", results.get(module.getModuleName()) != null); assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString()); } } }

Target:
public void testModuleGroups() throws Exception { Set<DistributionModuleGroup> moduleGroups = QuboleHiveModuleGroup.getModuleGroups(); assertEquals(2, moduleGroups.size()); moduleGroups.contains(QuboleConstant.BIGDATALAUNCHER_MODULE_GROUP); moduleGroups.contains(QuboleConstant.HIVE_MODULE_GROUP); for (DistributionModuleGroup group : moduleGroups) { assertNull(group.getRequiredIf()); } }
Source:
private ValueArray convertToKey(ValueArray r, Boolean minmax) { if (r == null) { return null; } Value[] values = r.getList().clone(); ValueArray row = ValueArray.get(values); if (minmax != null) { values[values.length - 1] = ValueLong.get(minmax ? Long.MAX_VALUE : Long.MIN_VALUE); } return row; }

Target:
private static ValueArray convertToKey(ValueArray r, Boolean minmax) { if (r == null) { return null; } Value[] values = r.getList().clone(); ValueArray row = ValueArray.get(values); if (minmax != null) { values[values.length - 1] = ValueLong.get(minmax ? Long.MAX_VALUE : Long.MIN_VALUE); } return row; }
Source:
static Method getPropertyGetter(Class<?> clazz, String propertyName) { final String upperPropertyName = Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); final Pattern pattern = Pattern.compile("(get|has|is)(" + upperPropertyName + ")"); for (Method method : clazz.getMethods()) { if ((pattern.matcher(method.getName()).matches() && Modifier.isPublic(method.getModifiers())) && method.getParameterTypes().length == 0) { return method; } } return null; }

Target:
static Method getPropertyGetter(Class<?> clazz, String propertyName) { final String upperPropertyName = Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); final Pattern pattern = Pattern.compile("(get|has|is)(" + Pattern.quote(upperPropertyName) + ")"); for (Method method : clazz.getMethods()) { if ((pattern.matcher(method.getName()).matches() && Modifier.isPublic(method.getModifiers())) && method.getParameterTypes().length == 0) { return method; } } return null; }
Source:
private TTransport getTransport(ThriftTransportKey cacheKey) throws TTransportException { cacheKey.precomputeHashCode(); CachedConnections ccl = getCache().get(cacheKey); if (ccl == null) { ccl = new CachedConnections(); getCache().put(cacheKey, ccl); } CachedConnection cachedConnection = ccl.reserveAny(); if (cachedConnection != null) { log.trace("Using existing connection to {}", cacheKey.getServer()); return cachedConnection.transport; } return createNewTransport(cacheKey); }

Target:
private TTransport getTransport(ThriftTransportKey cacheKey) throws TTransportException { cacheKey.precomputeHashCode(); synchronized (this) { CachedConnection cachedConnection = getCache().computeIfAbsent(cacheKey, ck -> new CachedConnections()).reserveAny(); if (cachedConnection != null) { log.trace("Using existing connection to {}", cacheKey.getServer()); return cachedConnection.transport; } } return createNewTransport(cacheKey); }
Source:
protected void validateCheckReconciliation(StaleCheckBatchRow staleCheckRow, CheckReconciliation checkReconciliation, List<String> validationErrors) { if (!StringUtils.equalsIgnoreCase(staleCheckRow.getBankCode(), checkReconciliation.getBankCode())) { validationErrors.add("The Bank Code in the file (" + staleCheckRow.getBankCode() + ") row does not match the bank on the Check (" + checkReconciliation.getBankCode() + ")."); } try { Double checkTotalAmountParsed = NumberFormat.getNumberInstance(java.util.Locale.US).parse(staleCheckRow.getCheckTotalAmount()).doubleValue(); KualiDecimal checkTotalAmount = new KualiDecimal(checkTotalAmountParsed); if (!checkTotalAmount.equals(checkReconciliation.getAmount())) { validationErrors.add("The Total Check Amount in the file row (" + checkTotalAmount.toString() + ") does not match the amount on the Check (" + checkReconciliation.getAmount().toString() + ")."); } } catch (java.text.ParseException ex) { validationErrors.add("Error converting total amount to decimal [" + staleCheckRow.getCheckTotalAmount() + "] " + ex.toString()); } if (StringUtils.equalsIgnoreCase(checkReconciliation.getStatus(), CRConstants.STALE)) { validationErrors.add("Check Status is already STALE."); } }

Target:
protected void validateCheckReconciliation(StaleCheckBatchRow staleCheckRow, CheckReconciliation checkReconciliation, List<String> validationErrors) { if (!StringUtils.equalsIgnoreCase(staleCheckRow.getBankCode(), checkReconciliation.getBankCode())) { validationErrors.add("The Bank Code in the file (" + staleCheckRow.getBankCode() + ") row does not match the bank on the Check (" + checkReconciliation.getBankCode() + ")."); } try { KualiDecimal checkTotalAmount = new KualiDecimal(staleCheckRow.getCheckTotalAmount()); if (!checkTotalAmount.equals(checkReconciliation.getAmount())) { validationErrors.add("The Total Check Amount in the file row (" + checkTotalAmount.toString() + ") does not match the amount on the Check (" + checkReconciliation.getAmount().toString() + ")."); } if (StringUtils.equalsIgnoreCase(checkReconciliation.getStatus(), CRConstants.STALE)) { validationErrors.add("Check Status is already STALE."); } } catch (NumberFormatException ex) { validationErrors.add("Error converting total amount to decimal [" + staleCheckRow.getCheckTotalAmount() + "] " + ex.toString()); } }
Source:
private static void build(StringBuilder result, String name, String typeText, boolean isGetter) { result.append("private function "); result.append(isGetter ? HaxePresentableUtil.getterName(name) : HaxePresentableUtil.setterName(name)); result.append("("); if (!isGetter) { result.append("value"); if (!typeText.isEmpty()) { result.append(":"); result.append(typeText); } } result.append(")"); if (isGetter && !typeText.isEmpty()) { result.append(":"); result.append(typeText); } result.append("{\n"); if (isGetter) { result.append("return "); result.append(name); result.append(";"); } else { result.append("return "); result.append("this."); result.append(name); result.append("=value;"); } result.append("\n}"); }

Target:
private static void build(StringBuilder result, String name, String typeText, boolean isGetter) { result.append("function "); result.append(isGetter ? HaxePresentableUtil.getterName(name) : HaxePresentableUtil.setterName(name)); result.append("("); if (!isGetter) { result.append("value"); if (!typeText.isEmpty()) { result.append(":"); result.append(typeText); } } result.append(")"); if (isGetter && !typeText.isEmpty()) { result.append(":"); result.append(typeText); } result.append("{\n"); if (isGetter) { result.append("return "); result.append(name); result.append(";"); } else { result.append("return "); result.append("this."); result.append(name); result.append("=value;"); } result.append("\n}"); }
Source:
protected boolean includeJavaEngineIndicator() { for (ModelElementIndicator modelElementIndicator : this.treeViewer.getModelElementIndicator()) { if (modelElementIndicator.containsAny(IndicatorEnum.getJavaIndicatorsEnum()) || modelElementIndicator.contains(IndicatorEnum.UserDefinedIndicatorEnum) && searchJUDI(modelElementIndicator, true)) { return true; } } return false; }

Target:
protected boolean includeJavaEngineIndicator() { for (ModelElementIndicator modelElementIndicator : this.treeViewer.getModelElementIndicator()) { if (modelElementIndicator.containsAny(IndicatorEnum.getJavaIndicatorsEnum()) || (modelElementIndicator.contains(IndicatorEnum.UserDefinedIndicatorEnum) && searchJUDI( modelElementIndicator, true))) { return true; } } return false; }
Source:
private void updateDeviceAddresses() { if (isEmulatedMachineChanged() || isChipsetChanged()) { log.info("Emulated machine or BIOS chipset type has changed for VM: ({}), clearing device addresses.", getVm().getName(), getVm().getId()); if (getParameters().isCompensationEnabled()) { List<VmDevice> allVmDevices = vmDeviceDao.getVmDeviceByVmId(getVmId()); for (VmDevice device: allVmDevices) { getCompensationContext().snapshotEntityUpdated(device); } } vmDeviceDao.clearAllDeviceAddressesByVmId(getVmId()); VmDevicesMonitoring.Change change = vmDevicesMonitoring.createChange(System.nanoTime()); change.updateVm(getVmId(), VmDevicesMonitoring.EMPTY_HASH); change.flush(); } }

Target:
private void updateDeviceAddresses() { if (isEmulatedMachineChanged() || isChipsetChanged()) { log.info("Emulated machine or BIOS chipset type has changed for VM: ({}), clearing device addresses.", getVm().getName(), getVm().getId()); if (getParameters().isCompensationEnabled()) { List<VmDevice> allVmDevices = vmDeviceDao.getVmDeviceByVmId(getVmId()); allVmDevices.forEach(device -> getCompensationContext().snapshotEntityUpdated(device)); } vmDeviceDao.clearAllDeviceAddressesByVmId(getVmId()); VmDevicesMonitoring.Change change = vmDevicesMonitoring.createChange(System.nanoTime()); change.updateVm(getVmId(), VmDevicesMonitoring.EMPTY_HASH); change.flush(); } }
Source:
public void run(RestxShell shell) throws Exception { File mdFile = mdFile(shell); if(!mdFile.exists()) { throw new IllegalStateException( "md.restx.json file not found in " + shell.currentLocation() + "." + " It is required to perform deps management"); } installDepsFromModuleDescriptor(shell, mdFile); File md5File = md5File(shell); Files.write(Files.hash(mdFile, Hashing.md5()).toString(), md5File, Charsets.UTF_8); shell.println("DONE"); }

Target:
public void run(RestxShell shell) throws Exception { Optional<ModuleDescriptorType> moduleDescriptorTypeWithExistingFileOpt = ModuleDescriptorType.firstModuleDescriptorTypeWithExistingFile(shell.currentLocation()); if(!moduleDescriptorTypeWithExistingFileOpt.isPresent()) { throw new IllegalStateException( "md.restx.json file not found in " + shell.currentLocation() + "." + " It is required to perform deps management"); } ModuleDescriptorType moduleDescriptorTypeWithExistingFile = moduleDescriptorTypeWithExistingFileOpt.get(); if(ModuleDescriptorType.RESTX.equals(moduleDescriptorTypeWithExistingFile)) { shell.println("installing deps using restx module descriptor..."); installDepsFromModuleDescriptor(shell, ModuleDescriptorType.RESTX.resolveDescriptorFile(shell.currentLocation())); } else if(ModuleDescriptorType.MAVEN.equals(moduleDescriptorTypeWithExistingFile)) { shell.println("installing deps using maven descriptor..."); installDepsFromMavenDescriptor(shell, ModuleDescriptorType.MAVEN.resolveDescriptorFile(shell.currentLocation())); } else if(ModuleDescriptorType.IVY.equals(moduleDescriptorTypeWithExistingFile)) { shell.println("installing deps using ivy descriptor..."); installDepsFromIvyDescriptor(shell, ModuleDescriptorType.IVY.resolveDescriptorFile(shell.currentLocation())); } else { throw new IllegalArgumentException("Unsupported deps install for module type "+moduleDescriptorTypeWithExistingFile); } storeModuleDescriptorMD5File(shell, moduleDescriptorTypeWithExistingFile); shell.println("DONE"); }
Source:
public boolean mergeIdenticalByEntityId(SubunitCluster other) { if (!isIdenticalByEntityIdTo(other)) return false; Subunit thisSub = this.subunits.get(this.representative); Subunit otherSub = other.subunits.get(other.representative); logger.info("SubunitClusters {}-{} belong to same entity. Assuming they are identical", thisSub.getName(), otherSub.getName()); List<Integer> thisAligned = new ArrayList<>(); List<Integer> otherAligned = new ArrayList<>(); Structure thisStruct = thisSub.getStructure(); Structure otherStruct = otherSub.getStructure(); String thisName = thisSub.getName(); String otherName = otherSub.getName(); Chain thisChain = thisStruct.getChain(thisName); Chain otherChain = otherStruct.getChain(otherName); EntityInfo entityInfo = thisChain.getEntityInfo(); for (int thisIndex=0; thisIndex < thisSub.size(); thisIndex++) { Group g = thisSub.getRepresentativeAtoms()[thisIndex].getGroup(); int seqresIndex = entityInfo.getAlignedResIndex(g, thisChain); Group otherG = otherChain.getSeqResGroups().get(seqresIndex - 1); if (!otherChain.getAtomGroups().contains(otherG)) { continue; } int otherIndex = otherChain.getAtomGroups().indexOf(otherG); if (this.subunitEQR.get(this.representative).contains(thisIndex) && other.subunitEQR.get(other.representative).contains(otherIndex)) { thisAligned.add(thisIndex); otherAligned.add(otherIndex); } } updateEquivResidues(other, thisAligned, otherAligned); return true; }

Target:
public boolean mergeIdenticalByEntityId(SubunitCluster other) { if (!isIdenticalByEntityIdTo(other)) return false; Subunit thisSub = this.subunits.get(this.representative); Subunit otherSub = other.subunits.get(other.representative); String thisName = thisSub.getName(); String otherName = otherSub.getName(); logger.info("SubunitClusters {}-{} belong to same entity. Assuming they are identical", thisName, otherName); List<Integer> thisAligned = new ArrayList<>(); List<Integer> otherAligned = new ArrayList<>(); Structure thisStruct = thisSub.getStructure(); Structure otherStruct = otherSub.getStructure(); Chain thisChain = thisStruct.getChain(thisName); Chain otherChain = otherStruct.getChain(otherName); EntityInfo entityInfo = thisChain.getEntityInfo(); for (int thisIndex=0; thisIndex < thisSub.size(); thisIndex++) { Group g = thisSub.getRepresentativeAtoms()[thisIndex].getGroup(); int seqresIndex = entityInfo.getAlignedResIndex(g, thisChain); if (seqresIndex == -1) { continue; } Group otherG = otherChain.getSeqResGroups().get(seqresIndex - 1); int otherIndex = otherChain.getAtomGroups().indexOf(otherG); if (otherIndex == -1) { continue; } if (this.subunitEQR.get(this.representative).contains(thisIndex) && other.subunitEQR.get(other.representative).contains(otherIndex)) { thisAligned.add(thisIndex); otherAligned.add(otherIndex); } } if (thisAligned.size() == 0 && otherAligned.size() == 0) { logger.warn("No equivalent aligned atoms found between SubunitClusters {}-{} via entity SEQRES alignment. Is FileParsingParameters.setAlignSeqRes() set?", thisName, otherName); } updateEquivResidues(other, thisAligned, otherAligned); return true; }
Source:
public PropertyEntry getShallowestProperty() { if ( !propertyEntries.isEmpty() ) { return first( propertyEntries ); } return null; }

Target:
public PropertyEntry getShallowestProperty() { if ( propertyEntries.isEmpty() ) { return null; } return first( propertyEntries ); }
Source:
public void kill(Container container) throws Exception { log.info("waiting for byteman to kill server"); String jbossHome = System.getenv().get("JBOSS_HOME"); if(jbossHome == null) { jbossHome = container.getContainerConfiguration().getContainerProperties().get("jbossHome"); } killSequence = killSequence.replace("[jbossHome]", jbossHome); shutdownSequence = shutdownSequence.replace("[jbossHome]", jbossHome); String suffix; String os = System.getProperty("os.name").toLowerCase(); if(os.indexOf("windows") > -1) { suffix = "bat"; } else { suffix = "sh"; } killSequence = killSequence.replace("[suffix]", suffix); shutdownSequence = shutdownSequence.replace("[suffix]", suffix); int checkn = 0; boolean killed = false; do { if(checkJBossAlive()) { Thread.sleep(checkDurableTime * 1000); log.info("jboss-as is alive"); } else { killed = true; break; } checkn ++; } while(checkn < numofCheck); if(killed) { log.info("jboss-as killed by byteman scirpt"); } else { log.info("jboss-as not killed and shutdown"); Process p = Runtime.getRuntime().exec(shutdownSequence); p.waitFor(); p.destroy(); Thread.sleep(5000); throw new RuntimeException("jboss-as not killed and shutdown"); } }

Target:
public void kill(Container container) throws Exception { log.info("waiting for byteman to kill server"); String jbossHome = System.getenv().get("JBOSS_HOME"); if(jbossHome == null) { jbossHome = container.getContainerConfiguration().getContainerProperties().get("jbossHome"); } killSequence = killSequence.replace("[jbossHome]", jbossHome); shutdownSequence = shutdownSequence.replace("[jbossHome]", jbossHome); String suffix; String os = System.getProperty("os.name").toLowerCase(); if(os.indexOf("windows") > -1) { suffix = "bat"; } else { suffix = "sh"; } killSequence = killSequence.replace("[suffix]", suffix); shutdownSequence = shutdownSequence.replace("[suffix]", suffix); int checkn = 0; boolean killed = false; do { if(checkJBossAlive()) { Thread.sleep(checkDurableTime * 1000); log.info("jboss-as is alive"); } else { killed = true; break; } checkn ++; } while(checkn < numofCheck); if(killed) { log.info("jboss-as killed by byteman scirpt"); } else { log.info("jboss-as not killed and shutdown"); Process p = Runtime.getRuntime().exec(shutdownSequence); p.waitFor(); p.destroy(); int checkn_s = 0; do { if(checkJBossAlive()) { Thread.sleep(5000); } else { log.info("jboss-as shutdown"); break; } checkn_s ++; } while (checkn_s < 60); throw new RuntimeException("jboss-as not killed and shutdown"); } }
Source:
public boolean exists(StoreKey key, FileSpan fileSpan) throws StoreException { final Timer.Context context = metrics.findTime.time(); ConcurrentNavigableMap<Long, IndexSegment> interestedSegmentMap = new ConcurrentSkipListMap<Long, IndexSegment>() ; try { ConcurrentNavigableMap<Long, IndexSegment> descendMap = indexes.descendingMap(); for (Map.Entry<Long, IndexSegment> entry : descendMap.entrySet()) { if( entry.getKey() >= fileSpan.getStartOffset() && entry.getKey() <= fileSpan.getEndOffset()) interestedSegmentMap.put(entry.getKey(), entry.getValue()); } for (Map.Entry<Long, IndexSegment> entry : interestedSegmentMap.entrySet()) { logger.trace("Index : searching index with start offset {}", dataDir, entry.getKey()); IndexValue value = entry.getValue().find(key); if (value != null) { logger.trace("Index : found value offset size ttl {}", dataDir, value.getOffset(), value.getSize(), value.getTimeToLiveInMs()); return true; } } }finally { context.stop(); } return false; }

Target:
public boolean exists(StoreKey key, FileSpan fileSpan) throws StoreException { final Timer.Context context = metrics.findTime.time(); logger.trace("Searching for " + key + " in index with filespan ranging from " + fileSpan.getStartOffset() + " to " + fileSpan.getEndOffset()); try { Long floorIndexSegment = indexes.floorKey(fileSpan.getStartOffset()); Long ceilIndexSegment = indexes.floorKey(fileSpan.getEndOffset()); ConcurrentNavigableMap<Long, IndexSegment> interestedSegmentsMap = indexes.subMap(floorIndexSegment, true, ceilIndexSegment, true); metrics.segmentSizeForExists.update(interestedSegmentsMap.size()); boolean foundValue = false; for (Map.Entry<Long, IndexSegment> entry : interestedSegmentsMap.entrySet()) { logger.trace("Index : searching index with start offset {}", dataDir, entry.getKey()); IndexValue value = entry.getValue().find(key); if (value != null) { logger.trace("Index : found value offset size ttl {}", dataDir, value.getOffset(), value.getSize(), value.getTimeToLiveInMs()); foundValue = true; break; } } return foundValue; } finally { context.stop(); } }
Source:
private void updateGroupMetrics() { grp.metrics().onRebalanceKeyReceived(); for (GridCacheContext cctx0 : grp.caches()) { if (cctx0.statisticsEnabled()) cctx0.cache().metrics0().onRebalanceKeyReceived(); } }

Target:
private void updateGroupMetrics() { for (GridCacheContext cctx0 : grp.caches()) { if (cctx0.statisticsEnabled()) cctx0.cache().metrics0().onRebalanceKeyReceived(); } }
Source:
public TileFilteredBuffer() { invFilter = addInventory("blueprint", 9, ItemHandlerManager.EnumAccess.NONE);; invMain = addInventory("materials", 9, ItemHandlerManager.EnumAccess.INSERT, EnumPipePart.VALUES); }

Target:
public TileFilteredBuffer() { invFilter = addInventory("filter", 9, ItemHandlerManager.EnumAccess.NONE); invMain = addInventory("main", new ItemHandlerSimple(9, this::onSlotChange) { @Override public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { if(invFilter.getStackInSlot(slot) != null && StackUtil.canMerge(invFilter.getStackInSlot(slot), stack)) { return super.insertItem(slot, stack, simulate); } return stack; } }, ItemHandlerManager.EnumAccess.INSERT, EnumPipePart.VALUES); }
Source:
public long getLong(String key) throws NumberFormatException { String setting = items.get(key); if (setting == null) { throw new NumberFormatException( "There is no setting associated with the key \"" + key + "\""); } return Long.valueOf(setting).longValue(); }

Target:
public long getLong(String key) throws NumberFormatException { String setting = items.get(key); if (setting == null) { throw new NumberFormatException( "There is no setting associated with the key \"" + key + "\""); } return Long.parseLong(setting); }
Source:
public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras SimpleRnn layer accepts only one input (received " + inputType.length + ")"); InputPreProcessor preprocessor = null; if (inputType[0] instanceof InputType.InputTypeFeedForward) { preprocessor = new FeedForwardToRnnPreProcessor(); } return preprocessor; }

Target:
public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras SimpleRnn layer accepts only one input (received " + inputType.length + ")"); return InputTypeUtil.getPreprocessorForInputTypeRnnLayers(inputType[0], layerName); }
Source:
public void deleteAsyncTaskPlaceHolder(String taskKey) { if (!taskKeyToTaskIdMap.containsKey(taskKey)) { return; } Guid taskId = taskKeyToTaskIdMap.remove(taskKey); AsyncTaskManager.removeTaskFromDbByTaskId(taskId); }

Target:
public void deleteAsyncTaskPlaceHolder(String taskKey) { Guid taskId = taskKeyToTaskIdMap.remove(taskKey); if (!Guid.isNullOrEmpty(taskId)) { AsyncTaskManager.removeTaskFromDbByTaskId(taskId); } }
Source:
private boolean canApplyH3Index(Predicate predicate, FunctionContext function) { if (function.getFunctionName().equalsIgnoreCase(StDistanceFunction.FUNCTION_NAME)) { Predicate.Type type = predicate.getType(); if (type != Predicate.Type.RANGE) { return false; } RangePredicate rangePredicate = (RangePredicate) predicate; if (rangePredicate.getUpperBound().equals(RangePredicate.UNBOUNDED) || !rangePredicate.getLowerBound() .equals(RangePredicate.UNBOUNDED)) { return false; } String columnName = function.getArguments().get(0).getIdentifier(); DataSource dataSource = _indexSegment.getDataSource(columnName); return dataSource.getH3Index() != null; } return false; }

Target:
private boolean canApplyH3Index(Predicate predicate, FunctionContext function) { if (function.getFunctionName().equalsIgnoreCase(StDistanceFunction.FUNCTION_NAME)) { Predicate.Type type = predicate.getType(); if (type != Predicate.Type.RANGE) { return false; } RangePredicate rangePredicate = (RangePredicate) predicate; if (rangePredicate.getUpperBound().equals(RangePredicate.UNBOUNDED) || !rangePredicate.getLowerBound() .equals(RangePredicate.UNBOUNDED)) { return false; } if (function.getArguments().get(0).getType() != ExpressionContext.Type.IDENTIFIER) { return false; } String columnName = function.getArguments().get(0).getIdentifier(); DataSource dataSource = _indexSegment.getDataSource(columnName); return dataSource.getH3Index() != null; } return false; }
Source:
public boolean matches(ExternalId otherId) { ArgChecker.notNull(otherId, "otherId"); switch (searchType) { case EXACT: return ImmutableSet.of(otherId).equals(externalIds); case ALL: return ImmutableSet.of(otherId).containsAll(externalIds); case ANY: return contains(otherId); case NONE: return contains(otherId) == false; } return false; }

Target:
public boolean matches(ExternalId otherId) { ArgChecker.notNull(otherId, "otherId"); switch (searchType) { case EXACT: return ImmutableSet.of(otherId).equals(externalIds); case ALL: return ImmutableSet.of(otherId).containsAll(externalIds); case ANY: return contains(otherId); case NONE: return contains(otherId) == false; default: return false; } }
Source:
public static WebArchive getDeployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "run-in-pod.war"); war.setWebXML(new StringAsset("<web-app/>")); war.addAsLibraries( Maven.resolver() .resolve("org.kie:kie-server-client:6.2.0.Final") .withTransitivity() .asFile()); return war; }

Target:
public static WebArchive getDeployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "run-in-pod.war"); war.setWebXML("web.xml"); war.addAsLibraries( Maven.resolver().loadPomFromFile("pom.xml") .resolve("org.kie.server:kie-server-client") .withTransitivity() .asFile()); return war; }
Source:
public void reset(MessageBufferInput in) throws IOException { MessageBufferInput newIn = checkNotNull(in, "MessageBufferInput is null"); this.in = newIn; this.buffer = EMPTY_BUFFER; this.position = 0; this.totalReadBytes = 0; this.secondaryBuffer = null; this.reachedEOF = false; }

Target:
public MessageBufferInput reset(MessageBufferInput in) throws IOException { MessageBufferInput newIn = checkNotNull(in, "MessageBufferInput is null"); MessageBufferInput old = this.in; this.in = newIn; this.buffer = EMPTY_BUFFER; this.position = 0; this.totalReadBytes = 0; this.secondaryBuffer = null; this.reachedEOF = false; return old; }
Source:
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; Cursor cursor = (Cursor) mListView.getItemAtPosition(info.position); if (cursor == null) { return; } getActivity().getMenuInflater().inflate(R.menu.message_list_item_context, menu); menu.findItem(R.id.debug_delete_locally).setVisible(K9.DEBUG); mContextMenuUniqueId = cursor.getLong(mUniqueIdColumn); Account account = getAccountFromCursor(cursor); String subject = cursor.getString(SUBJECT_COLUMN); boolean read = (cursor.getInt(READ_COLUMN) == 1); boolean flagged = (cursor.getInt(FLAGGED_COLUMN) == 1); menu.setHeaderTitle(subject); if( mSelected.contains(mContextMenuUniqueId)) { menu.findItem(R.id.select).setVisible(false); } else { menu.findItem(R.id.deselect).setVisible(false); } if (read) { menu.findItem(R.id.mark_as_read).setVisible(false); } else { menu.findItem(R.id.mark_as_unread).setVisible(false); } if (flagged) { menu.findItem(R.id.flag).setVisible(false); } else { menu.findItem(R.id.unflag).setVisible(false); } if (!mController.isCopyCapable(account)) { menu.findItem(R.id.copy).setVisible(false); } if (!mController.isMoveCapable(account)) { menu.findItem(R.id.move).setVisible(false); menu.findItem(R.id.archive).setVisible(false); menu.findItem(R.id.spam).setVisible(false); } if (!account.hasArchiveFolder()) { menu.findItem(R.id.archive).setVisible(false); } if (!account.hasSpamFolder()) { menu.findItem(R.id.spam).setVisible(false); } }

Target:
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; Cursor cursor = (Cursor) mListView.getItemAtPosition(info.position); if (cursor == null) { return; } getActivity().getMenuInflater().inflate(R.menu.message_list_item_context, menu); menu.findItem(R.id.debug_delete_locally).setVisible(BuildConfig.DEBUG); mContextMenuUniqueId = cursor.getLong(mUniqueIdColumn); Account account = getAccountFromCursor(cursor); String subject = cursor.getString(SUBJECT_COLUMN); boolean read = (cursor.getInt(READ_COLUMN) == 1); boolean flagged = (cursor.getInt(FLAGGED_COLUMN) == 1); menu.setHeaderTitle(subject); if( mSelected.contains(mContextMenuUniqueId)) { menu.findItem(R.id.select).setVisible(false); } else { menu.findItem(R.id.deselect).setVisible(false); } if (read) { menu.findItem(R.id.mark_as_read).setVisible(false); } else { menu.findItem(R.id.mark_as_unread).setVisible(false); } if (flagged) { menu.findItem(R.id.flag).setVisible(false); } else { menu.findItem(R.id.unflag).setVisible(false); } if (!mController.isCopyCapable(account)) { menu.findItem(R.id.copy).setVisible(false); } if (!mController.isMoveCapable(account)) { menu.findItem(R.id.move).setVisible(false); menu.findItem(R.id.archive).setVisible(false); menu.findItem(R.id.spam).setVisible(false); } if (!account.hasArchiveFolder()) { menu.findItem(R.id.archive).setVisible(false); } if (!account.hasSpamFolder()) { menu.findItem(R.id.spam).setVisible(false); } }
Source:
public DistributorVersionDTO populate(ModelTranslator modelTranslator, DistributorVersion source, DistributorVersionDTO dest) { if (source == null) { throw new IllegalArgumentException("source is null"); } if (dest == null) { throw new IllegalArgumentException("dest is null"); } dest.id(source.getId()) .name(source.getName()) .displayName(source.getDisplayName()) .created(toDateTime(source::getCreated)) .updated(toDateTime(source::getUpdated)); if (modelTranslator != null) { Set<DistributorVersionCapability> sourceCapabilities = source.getCapabilities(); if (sourceCapabilities != null && !sourceCapabilities.isEmpty()) { List<DistributorVersionCapabilityDTO> capabilities = sourceCapabilities.stream() .filter(Objects::nonNull) .map(this::toDto) .collect(Collectors.toList()); dest.setCapabilities(capabilities); } } return dest; }

Target:
public DistributorVersionDTO populate(ModelTranslator modelTranslator, DistributorVersion source, DistributorVersionDTO dest) { if (source == null) { throw new IllegalArgumentException("source is null"); } if (dest == null) { throw new IllegalArgumentException("dest is null"); } dest.id(source.getId()) .name(source.getName()) .displayName(source.getDisplayName()) .created(Util.toDateTime(source.getCreated())) .updated(Util.toDateTime(source.getUpdated())) .capabilities(toDto(source.getCapabilities())); return dest; }
Source:
public void setBuyOrders(HashMap<String, ArrayList<Order>> buyOrders) { this.buyOrders = buyOrders; }

Target:
private void setBuyOrders(HashMap<String, ArrayList<Order>> buyOrders) { this.buyOrders = buyOrders; }
Source:
public List<VisitType> getOrderedVisitTypes (List<VisitType> visitTypes, String propertyValue,VisitService visitService) { Map<Integer,String> order = null; List<VisitType> visitTypesOrdered = new ArrayList<VisitType>(); if (propertyValue != null) { try { order = new ObjectMapper().readValue(propertyValue, HashMap.class); } catch (JsonParseException e) { VisitTypeHelper.log.error("Unable to parse global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); e.printStackTrace(); } catch (JsonMappingException e) { VisitTypeHelper.log.error("Unable to map global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); e.printStackTrace(); } catch (APIException e) { VisitTypeHelper.log.error("Unable to load global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); e.printStackTrace(); } catch (IOException e) { VisitTypeHelper.log.error("Unable to load global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); e.printStackTrace(); } } if (order != null) { for (int i=1 ; i <= order.size() ; i++) { String typeUuid = order.get(Integer.toString(i)); VisitType type = visitService.getVisitTypeByUuid(typeUuid); if (visitTypes.contains(type)) { visitTypesOrdered.add(visitService.getVisitTypeByUuid(typeUuid)); } } for (VisitType type: visitTypes) { if (!order.containsValue(type.getUuid())) { visitTypesOrdered.add(type); } } } if (!(visitTypes.size()==visitTypesOrdered.size())) { VisitTypeHelper.log.warn("Visit Types order property is not used."); return visitTypes; } return visitTypesOrdered; }

Target:
public List<VisitType> getOrderedVisitTypes (List<VisitType> visitTypes, String propertyValue,VisitService visitService) { Map<Integer,String> order = null; List<VisitType> visitTypesOrdered = new ArrayList<VisitType>(); if (propertyValue != null) { try { order = new ObjectMapper().readValue(propertyValue, HashMap.class); } catch (JsonParseException e) { VisitTypeHelper.LOG.error("Unable to parse global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); } catch (JsonMappingException e) { VisitTypeHelper.LOG.error("Unable to map global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); } catch (APIException e) { VisitTypeHelper.LOG.error("Unable to load global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); } catch (IOException e) { VisitTypeHelper.LOG.error("Unable to read global property \"" + CoreAppsConstants.VISIT_TYPES_ORDER_PROPERTY + "\""); } } if (order != null) { for (int i=1 ; i <= order.size() ; i++) { String typeUuid = order.get(Integer.toString(i)); VisitType type = visitService.getVisitTypeByUuid(typeUuid); if (visitTypes.contains(type)) { visitTypesOrdered.add(visitService.getVisitTypeByUuid(typeUuid)); } } for (VisitType type: visitTypes) { if (!order.containsValue(type.getUuid())) { visitTypesOrdered.add(type); } } } if (!(visitTypes.size()==visitTypesOrdered.size())) { VisitTypeHelper.LOG.warn("Visit Types order property is not used."); return visitTypes; } return visitTypesOrdered; }
Source:
public void beforeSetup(FeaturesRunner runner) throws Exception { if (granularity != Granularity.METHOD) { return; } allDirectoryData = new HashMap<>(); DirectoryService directoryService = Framework.getService(DirectoryService.class); loginStack = ClientLoginModule.getThreadLocalLogin(); loginStack.push(new SystemPrincipal(null), null, null); try { for (Directory dir : directoryService.getDirectories()) { if (dir.isReadOnly() || dir instanceof MultiDirectory) { continue; } try (Session session = dir.getSession()) { session.setReadAllColumns(true); List<DocumentModel> entries = session.query(Collections.emptyMap(), Collections.emptySet(), Collections.emptyMap(), true); Map<String, Map<String, Object>> data = entries.stream().collect( Collectors.toMap(DocumentModel::getId, entry -> entry.getProperties(dir.getSchema()))); allDirectoryData.put(dir.getName(), data); } } if (TransactionHelper.isTransactionActiveOrMarkedRollback()) { TransactionHelper.commitOrRollbackTransaction(); TransactionHelper.startTransaction(); } } catch (Exception e) { loginStack.pop(); } }

Target:
public void beforeSetup(FeaturesRunner runner) throws Exception { if (granularity != Granularity.METHOD) { return; } allDirectoryData = new HashMap<>(); DirectoryService directoryService = Framework.getService(DirectoryService.class); loginStack = ClientLoginModule.getThreadLocalLogin(); loginStack.push(new SystemPrincipal(null), null, null); try { for (Directory dir : directoryService.getDirectories()) { if (dir.isReadOnly() || dir instanceof MultiDirectory) { continue; } try (Session session = dir.getSession()) { session.setReadAllColumns(true); List<DocumentModel> entries = session.query(Collections.emptyMap(), Collections.emptySet(), Collections.emptyMap(), true); Map<String, Map<String, Object>> data = entries.stream().collect( Collectors.toMap(DocumentModel::getId, entry -> entry.getProperties(dir.getSchema()))); allDirectoryData.put(dir.getName(), data); } } if (TransactionHelper.isTransactionActiveOrMarkedRollback()) { TransactionHelper.commitOrRollbackTransaction(); TransactionHelper.startTransaction(); } } catch (Exception e) { loginStack.pop(); throw e; } }
Source:
protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { return super.appendAttributes(tsb) .append("url", url) .append("username", username) .append("origintype", originType); }

Target:
protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { return super.appendAttributes(tsb) .append("url", url) .append("username", username) .append("originType", originType); }
Source:
public StatementMetadata() { gson = new GsonBuilder().enableComplexMapKeySerialization() .registerTypeHierarchyAdapter(RyaType.class, new RyaTypeAdapter()).create(); }

Target:
public StatementMetadata()