auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void checkAlwaysTransitionHasLowestPriority(RegularState state) { Iterator<Transition> iterator = state.getOutgoingTransitions().iterator(); while (iterator.hasNext()) { Transition transition = iterator.next(); Trigger trigger = transition.getTrigger(); if (trigger instanceof DefaultTrigger && iterator.hasNext()) { warning(String.format(ALWAYS_TRUE_TRANSITION_USED, transition.getSpecification()), transition, null, -1); } else if (trigger instanceof ReactionTrigger) { ReactionTrigger reactTrigger = (ReactionTrigger) trigger; EList<EventSpec> triggers = reactTrigger.getTriggers(); if (triggers.size() == 1 && reactTrigger.getGuard() == null) { EventSpec eventSpec = triggers.get(0); if (eventSpec instanceof AlwaysEvent && iterator.hasNext()) { warning(String.format(ALWAYS_TRUE_TRANSITION_USED, getTransitionDeclaration(transition)), transition, null, -1); } } } } }

Target:
public void checkAlwaysTransitionHasLowestPriority(RegularState state) { Iterator<Transition> iterator = state.getOutgoingTransitions().iterator(); Transition deadTransition = null; while (iterator.hasNext()) { Transition transition = iterator.next(); Trigger trigger = transition.getTrigger(); if (deadTransition != null) { warning(String.format(DEAD_TRANSITION, getTransitionDeclaration(deadTransition)), transition, null, -1); } if (trigger instanceof DefaultTrigger && iterator.hasNext()) { warning(String.format(ALWAYS_TRUE_TRANSITION_USED, transition.getSpecification()), transition, null, -1); if(deadTransition == null) { deadTransition = transition; } } else if (trigger instanceof ReactionTrigger) { ReactionTrigger reactTrigger = (ReactionTrigger) trigger; EList<EventSpec> triggers = reactTrigger.getTriggers(); if (triggers.size() == 1 && reactTrigger.getGuard() == null) { EventSpec eventSpec = triggers.get(0); if (eventSpec instanceof AlwaysEvent && iterator.hasNext()) { warning(String.format(ALWAYS_TRUE_TRANSITION_USED, getTransitionDeclaration(transition)), transition, null, -1); if(deadTransition == null) { deadTransition = transition; } } } } } }
Source:
protected Serializer<Object> locate() { if (isAvailable("io.jsonwebtoken.io.JacksonSerializer")) { return Classes.newInstance("io.jsonwebtoken.io.JacksonSerializer"); } else if (isAvailable("io.jsonwebtoken.io.OrgJsonSerializer")) { return Classes.newInstance("io.jsonwebtoken.io.OrgJsonSerializer"); } else if (isAvailable("com.google.gson.GsonBuilder")) { return Classes.newInstance("io.jsonwebtoken.io.GsonSerializer"); } else { throw new IllegalStateException("Unable to discover any JSON Serializer implementations on the classpath."); } }

Target:
protected Serializer<Object> locate() { if (isAvailable("io.jsonwebtoken.io.JacksonSerializer")) { return Classes.newInstance("io.jsonwebtoken.io.JacksonSerializer"); } else if (isAvailable("io.jsonwebtoken.io.OrgJsonSerializer")) { return Classes.newInstance("io.jsonwebtoken.io.OrgJsonSerializer"); } else if (isAvailable("io.jsonwebtoken.gson.io.GsonSerializer")) { return Classes.newInstance("io.jsonwebtoken.gson.io.GsonSerializer"); } else { throw new IllegalStateException("Unable to discover any JSON Serializer implementations on the classpath."); } }
Source:
public HashMapExecutionDags() { this.map = new ConcurrentHashMap<>(); }

Target:
private HashMapExecutionDags() { this.map = new ConcurrentHashMap<>(); }
Source:
private void process(Id contentId) throws org.atlasapi.entity.util.WriteException { Timer.Context time = metricsTimer.time(); Resolved<Content> content = resolveContent(contentId); if (content.getResources().isEmpty()) { log.error("Failed to resolve content {}", contentId); throw new IllegalArgumentException("Failed to resolve content " + contentId); } WriteResult<Content, Content> result = writer.writeContent(content.getResources().first().get()); if (result.written()) { log.debug("Bootstrapped content {}", result.toString()); columbusTelescopeReporter.reportSuccessfulMigration( content.getResources().first().get() ); time.stop(); } else { log.debug("Content has not been written: {}", result.toString()); columbusTelescopeReporter.reportFailedMigration( content.getResources().first().get(), result.toString() ); contentNotWrittenMeter.mark(); } }

Target:
private void process(Id contentId) throws org.atlasapi.entity.util.WriteException { Timer.Context time = metricsTimer.time(); Resolved<Content> content = resolveContent(contentId); if (content.getResources().isEmpty()) { log.error("Failed to resolve content {}", contentId); throw new IllegalArgumentException("Failed to resolve content " + contentId); } WriteResult<Content, Content> result = writer.writeContent(content.getResources().first().get()); if (result.written()) { log.debug("Bootstrapped content {}", result.toString()); columbusTelescopeReporter.reportSuccessfulMigration( content.getResources().first().get() ); time.stop(); } else { log.debug("Content has not been written: {}", result.toString()); contentNotWrittenMeter.mark(); } }
Source:
public void test_arithmetic_binary_operations() throws Exception { assertThat(getSymbol("exp1").types().getUniqueKnownType()).isEqualTo(PrimitiveType.NUMBER); assertThat(getSymbol("exp2").types().getUniqueKnownType()).isEqualTo(PrimitiveType.STRING); assertThat(getSymbol("exp3").types().getUniqueKnownType()).isEqualTo(PrimitiveType.NUMBER); }

Target:
public void test_arithmetic_binary_operations() throws Exception { assertThat(getSymbol("exp1").types()).containsOnly(PrimitiveType.NUMBER); assertThat(getSymbol("exp2").types()).containsOnly(PrimitiveType.STRING); assertThat(getSymbol("exp3").types()).containsOnly(PrimitiveType.NUMBER); assertThat(getSymbol("exp5").types()).containsOnly(PrimitiveType.UNKNOWN); assertThat(getSymbol("exp6").types()).containsOnly(PrimitiveType.NUMBER); }
Source:
protected void assertNoMachinesAvailableForApp(TestApplication app) { try { app.start(ImmutableList.of(pool.getDynamicLocation())); fail("Expected exception when starting app with too many entities for pool"); } catch (Exception e) { Throwable t = Exceptions.getFirstThrowableOfType(e, NoMachinesAvailableException.class); assertTrue(t != null, "expected " + NoMachinesAvailableException.class.getName() + " to be thrown, not found in " + e); } }

Target:
protected void assertNoMachinesAvailableForApp(TestApplication app) { try { app.start(ImmutableList.of(pool.getDynamicLocation())); fail("Expected exception when starting app with too many entities for pool"); } catch (Exception e) { Throwable t = Exceptions.getFirstThrowableOfType(e, NoMachinesAvailableException.class); if (t == null) { throw new RuntimeException(e); } } }
Source:
public Value applyAssoc(String assocOrig) { switch (assocOrig) { case "left": return Associativity.Left(); case "right": return Associativity.Right(); case "non-assoc": return Associativity.NonAssoc(); default: throw new RuntimeException("Incorrect assoc string: " + assocOrig); } }

Target:
public Value applyAssoc(String assocOrig) { switch (assocOrig) { case "left": return Associativity.Left(); case "right": return Associativity.Right(); case "non-assoc": return Associativity.NonAssoc(); default: throw new AssertionError("Incorrect assoc string: " + assocOrig); } }
Source:
private void computeTopPaths() { int cp = beginIndex; int ch = list[cp].getPathHash(); long cw = list[cp].getWeight(); totalWeight = list[cp].getWeight(); for (int i = cp + 1; i < endIndex; i++) { ObjectToPack o = list[i]; if (ch != o.getPathHash()) { if (MIN_TOP_PATH < cw) { if (topPathCnt < topPaths.length) { TopPath p = new TopPath(cw, ch, cp, i); topPaths[topPathCnt] = p; if (++topPathCnt == topPaths.length) Arrays.sort(topPaths); } else if (topPaths[0].weight < cw) { topPaths[0] = new TopPath(cw, ch, cp, i); if (topPaths[0].compareTo(topPaths[1]) > 0) Arrays.sort(topPaths); } } cp = i; ch = o.getPathHash(); cw = 0; } cw += o.getWeight(); totalWeight += o.getWeight(); } Arrays.sort(topPaths, 0, topPathCnt, new Comparator<TopPath>() { public int compare(TopPath a, TopPath b) { return a.beginIdx - b.beginIdx; } }); for (int i = 0; i < topPathCnt; i++) totalWeight -= topPaths[i].weight; }

Target:
private void computeTopPaths() { int cp = beginIndex; int ch = list[cp].getPathHash(); long cw = list[cp].getWeight(); totalWeight = list[cp].getWeight(); for (int i = cp + 1; i < endIndex; i++) { ObjectToPack o = list[i]; if (ch != o.getPathHash()) { if (MIN_TOP_PATH < cw) { if (topPathCnt < topPaths.length) { TopPath p = new TopPath(cw, ch, cp, i); topPaths[topPathCnt] = p; if (++topPathCnt == topPaths.length) Arrays.sort(topPaths); } else if (topPaths[0].weight < cw) { topPaths[0] = new TopPath(cw, ch, cp, i); if (topPaths[0].compareTo(topPaths[1]) > 0) Arrays.sort(topPaths); } } cp = i; ch = o.getPathHash(); cw = 0; } cw += o.getWeight(); totalWeight += o.getWeight(); } Arrays.sort(topPaths, 0, topPathCnt, new Comparator<TopPath>() { public int compare(TopPath a, TopPath b) { return a.beginIdx - b.beginIdx; } }); for (int i = 0; i < topPathCnt; i++) totalWeight -= topPaths[i].weight; System.out.println(String.format("%d top paths:", topPathCnt)); for(int i = 0; i < topPathCnt; i++) System.out.println(String.format(" %8x %5d %5d", topPaths[i].pathHash, topPaths[i].endIdx - topPaths[i].beginIdx, topPaths[i].weight)); }
Source:
private LoadBalancerStats createLoadBalancerStatsFromConfig(IClientConfig clientConfig) { String loadBalancerStatsClassName = clientConfig .get(CommonClientConfigKey.NFLoadBalancerStatsClassName, LoadBalancerStats.class.getName()); try { return (LoadBalancerStats) ClientFactory.instantiateInstanceWithClientConfig( loadBalancerStatsClassName, clientConfig); } catch (Exception e) { throw new RuntimeException("Error initializing LoadBalancerStats", e); } }

Target:
private LoadBalancerStats createLoadBalancerStatsFromConfig(IClientConfig clientConfig) { String loadBalancerStatsClassName = clientConfig .get(CommonClientConfigKey.NFLoadBalancerStatsClassName, LoadBalancerStats.class.getName()); try { return (LoadBalancerStats) ClientFactory.instantiateInstanceWithClientConfig( loadBalancerStatsClassName, clientConfig); } catch (Exception e) { logger.warn("Error initializing configured LoadBalancerStats class - " + String.valueOf(loadBalancerStatsClassName) + ". Falling-back to a new LoadBalancerStats instance instead.", e); return new LoadBalancerStats(clientConfig.getClientName()); } }
Source:
boolean isInTokenModeNeeded(boolean needTokensForGII, boolean needRIDestroyToken) { return (needTokensForGII || needRIDestroyToken) && !getConcurrencyChecksEnabled(); }

Target:
boolean isInTokenModeNeeded(boolean needTokensForGII, boolean needRIDestroyToken) { return !getConcurrencyChecksEnabled() && (needTokensForGII || needRIDestroyToken); }
Source:
public Mediator createSpecificMediator(OMElement omElement, Properties properties) { BamMediator bam = new BamMediator(); if (StringUtils.isEmpty(this.getServerProfileName(omElement))) { handleException("BAM Mediator : Server Profile Name can not be empty"); } else if (StringUtils.isEmpty(this.getStreamName(omElement))) { handleException("BAM Mediator : Stream Name can not be empty"); } else if (StringUtils.isEmpty(this.getStreamVersion(omElement))) { handleException("BAM Mediator : Stream Version can not be empty"); } bam.setServerProfile(this.getServerProfileName(omElement)); bam.getStream().setStreamConfiguration(new StreamConfiguration()); bam.getStream().getStreamConfiguration().setName(this.getStreamName(omElement)); bam.getStream().getStreamConfiguration().setVersion(this.getStreamVersion(omElement)); return bam; }

Target:
public Mediator createSpecificMediator(OMElement omElement, Properties properties) { BamMediator bam = new BamMediator(); String serverProfilePath = SERVER_PROFILE_LOCATION + "/" + this.getServerProfileName(omElement); String streamName = this.getStreamName(omElement); String streamVersion = this.getStreamVersion(omElement); if (isNotNullOrEmpty(serverProfilePath) && isNotNullOrEmpty(streamName) && isNotNullOrEmpty(streamVersion)) { bam.setServerProfile(serverProfilePath); bam.getStream().setStreamConfiguration(new StreamConfiguration()); bam.getStream().getStreamConfiguration().setName(streamName); bam.getStream().getStreamConfiguration().setVersion(streamVersion); } return bam; }
Source:
public void testHostPortArgsDefault() throws Exception { KafkaExternalLoaderCLIArguments args = new KafkaExternalLoaderCLIArguments(); args.parse("KafaExternalLoader", new String[] { "-z", "localhost:2181", "-t", "volt-topic", "KAFKA_IMPORT" } ); List<String> hosts = args.getVoltHosts(); Assert.assertEquals(Arrays.asList(new String[]{"localhost:21212"}), hosts); StringWriter sw = new StringWriter(); args = new KafkaExternalLoaderCLIArguments(new PrintWriter(sw)); args.parse("KafaExternalLoader", new String[] { "--servers", "host1:100,host2:200", "--host", "host3,host4", "-z", "localhost:2181", "-t", "volt-topic", "KAFKA_IMPORT" } ); hosts = args.getVoltHosts(); Assert.assertEquals(Arrays.asList(new String[]{"host3:21212", "host4:21212"}), hosts); Assert.assertTrue(sw.toString().startsWith("Warning: --servers argument is deprecated; please use --host instead")); }

Target:
public void testHostPortArgsDefault() throws Exception { KafkaExternalLoaderCLIArguments args = new KafkaExternalLoaderCLIArguments(); args.parse("KafaExternalLoader", new String[] { "-z", "localhost:2181", "-t", "volt-topic", "KAFKA_IMPORT" } ); List<String> hosts = args.getVoltHosts(); Assert.assertEquals(Arrays.asList(new String[]{"localhost:21212"}), hosts); StringWriter sw = new StringWriter(); args = new KafkaExternalLoaderCLIArguments(new PrintWriter(sw)); args.parse("KafaExternalLoader", new String[] { "--servers", "host1:100,host2:200", "--host", "host3,host4", "-z", "localhost:2181", "-t", "volt-topic", "KAFKA_IMPORT" } ); hosts = args.getVoltHosts(); Assert.assertEquals(Arrays.asList(new String[]{"host3:21212", "host4:21212"}), hosts); System.out.println(sw.toString()); Assert.assertTrue(sw.toString().startsWith("Warning: --servers argument is deprecated in favor of --host; value is ignored.")); }
Source:
public void testArrayPrependFunction23() throws Exception { Object[] o = new Object[270]; for (int i = 0; i < o.length - 2; i++) o[i] = null; o[o.length - 2] = "1"; o[o.length - 1] = "2"; Object[] o2 = new Object[271]; for (int i = 0; i < o2.length - 2; i++) o2[i] = null; o2[o2.length - 2] = "1"; o2[o2.length - 1] = "2"; Object element = null; PDataType baseType = PVarchar.INSTANCE; PhoenixArray arr = new PhoenixArray(baseType, o); PhoenixArray expected = new PhoenixArray(baseType, o2); test(arr, element, PDataType.fromTypeId(baseType.getSqlType() + PDataType.ARRAY_TYPE_BASE), null, null, baseType, 1, null, expected, SortOrder.ASC, SortOrder.DESC); }

Target:
public void testArrayPrependFunction23() throws Exception { byte[][] o = new byte[][]{new byte[]{2, 3}, new byte[]{42, 3}, new byte[]{5, 3}, new byte[]{6, 3}, new byte[]{2, 5}}; byte[][] o2 = new byte[][]{new byte[]{5, 6}, new byte[]{2, 3}, new byte[]{42, 3}, new byte[]{5, 3}, new byte[]{6, 3}, new byte[]{2, 5}}; byte[] element = new byte[]{5, 6}; PDataType baseType = PBinary.INSTANCE; PhoenixArray arr = new PhoenixArray(baseType, o); PhoenixArray expected = new PhoenixArray(baseType, o2); test(arr, element, PDataType.fromTypeId(baseType.getSqlType() + PDataType.ARRAY_TYPE_BASE), 2, null, baseType, 1, null, expected, SortOrder.ASC, SortOrder.DESC); }
Source:
public void testIdMismatchFails() throws Exception { final Job job = new Job(JobId.fromString("foo:bar:badf00d"), "bar", EMPTY_COMMAND, EMPTY_ENV, EMPTY_PORTS, EMPTY_REGISTRATION, EMPTY_VOLUMES, ""); final JobId recomputedId = job.toBuilder().build().getId(); assertEquals(ImmutableSet.of("Id hash mismatch: " + job.getId().getHash() + " != " + recomputedId.getHash()), validator.validate(job)); }

Target:
public void testIdMismatchFails() throws Exception { final Job job = new Job(JobId.fromString("foo:bar:badf00d"), "bar", EMPTY_COMMAND, EMPTY_ENV, EMPTY_PORTS, EMPTY_REGISTRATION, EMPTY_VOLUMES, EMPTY_EXPIRES, EMPTY_REGISTRATION_DOMAIN); final JobId recomputedId = job.toBuilder().build().getId(); assertEquals(ImmutableSet.of("Id hash mismatch: " + job.getId().getHash() + " != " + recomputedId.getHash()), validator.validate(job)); }
Source:
public void checkLoginFailedMessage() { waitForElementToBeDisplayed(R.id.alertTitle); }

Target:
public void checkLoginFailedMessage() { waitForElementToBeDisplayed(ALERT_LOGIN); }
Source:
ContactPopMenu(ContactTreeRootNode.ContactInfo contactInfo) { this.contactInfo = contactInfo; SarosPluginContext.initComponent(this); JMenu menuShareProject = new JMenu("Work together on..."); menuShareProject.setIcon(IconManager.SESSIONS_ICON); List<String> nonCompliantModules = new ArrayList<>(); for (Project project : ProjectManager.getInstance().getOpenProjects()) { Pair<JMenu, List<String>> results = prepareProjectMenu(project); if (results == null) { return; } JMenu projectMenu = results.first; List<String> projectNonCompliantModules = results.second; menuShareProject.add(projectMenu); if (!projectNonCompliantModules.isEmpty()) { nonCompliantModules.addAll(projectNonCompliantModules); } } if (!nonCompliantModules.isEmpty()) { NotificationPanel.showWarning( MessageFormat.format( Messages.Contact_saros_message_conditional, MessageFormat.format( Messages.ContactPopMenu_invalid_module_message_condition, nonCompliantModules)), Messages.ContactPopMenu_invalid_module_title); } add(menuShareProject); }

Target:
ContactPopMenu(ContactTreeRootNode.ContactInfo contactInfo) { this.contactInfo = contactInfo; JMenu menuShareProject = new JMenu(Messages.ContactPopMenu_root_popup_text); menuShareProject.setIcon(IconManager.SESSIONS_ICON); List<String> nonCompliantModules = new ArrayList<>(); for (Project project : ProjectManager.getInstance().getOpenProjects()) { Pair<JMenu, List<String>> results = prepareProjectMenu(project); if (results == null) { return; } JMenu projectMenu = results.first; List<String> projectNonCompliantModules = results.second; menuShareProject.add(projectMenu); if (!projectNonCompliantModules.isEmpty()) { nonCompliantModules.addAll(projectNonCompliantModules); } } if (!nonCompliantModules.isEmpty()) { NotificationPanel.showWarning( MessageFormat.format( Messages.Contact_saros_message_conditional, MessageFormat.format( Messages.ContactPopMenu_invalid_module_message_condition, nonCompliantModules)), Messages.ContactPopMenu_invalid_module_title); } add(menuShareProject); }
Source:
private void backup() throws IOException { if (streamIDs.isEmpty()) { log.warn("back up is called with empty streamIDs!"); } for (UUID streamId : streamIDs) { if (!tableExists(streamId)) { log.warn("cannot back up a non-existent table: {}", streamId); continue; } String fileName = backupTempDirPath + File.separator + streamId; backupTable(fileName, streamId); } log.info("successfully backed up tables to directory", streamIDs.size(), backupTempDirPath); }

Target:
private void backup() throws IOException { if (streamIDs.isEmpty()) { log.warn("back up is called with empty streamIDs!"); return; } for (UUID streamId : streamIDs) { if (!tableExists(streamId)) { log.warn("cannot back up a non-existent table: {}", streamId); continue; } String fileName = backupTempDirPath + File.separator + streamId; backupTable(fileName, streamId); } log.info("successfully backed up tables to directory", streamIDs.size(), backupTempDirPath); }
Source:
public String[] getProtocolsMask(long noOpt) { ctx.setOptions(noOpt); return WolfSSL.getProtocolsMask(noOpt); }

Target:
public String[] getProtocolsMask(long noOpt) { if(ctx != null) ctx.setOptions(noOpt); return WolfSSL.getProtocolsMask(noOpt); }
Source:
public static Runnable wrap(final Runnable runnable) { final Map<WeakReference<? extends ExecutorInheritableThreadLocal<?>>, Object> mapForNewThread = ExecutorInheritableThreadLocal.getMapForNewThread(); Runnable wrappedRunnable = Tracers.wrap(new Runnable() { @Override public void run() { ConcurrentMap<WeakReference<? extends ExecutorInheritableThreadLocal<?>>, Object> oldMap = ExecutorInheritableThreadLocal.installMapOnThread(mapForNewThread); try { runnable.run(); } finally { ExecutorInheritableThreadLocal.uninstallMapOnThread(oldMap); } } }); if (runnable instanceof Future<?>) { @SuppressWarnings("unchecked") Future<Object> unsafeFuture = (Future<Object>) runnable; return new ForwardingRunnableFuture<Object>(wrappedRunnable, unsafeFuture); } return wrappedRunnable; }

Target:
public static Runnable wrap(final Runnable runnable) { Runnable wrappedRunnable = wrapRunnable(runnable); if (runnable instanceof Future<?>) { @SuppressWarnings("unchecked") Future<Object> unsafeFuture = (Future<Object>) runnable; return new ForwardingRunnableFuture<>(wrappedRunnable, unsafeFuture); } return wrappedRunnable; }
Source:
protected static void configureScanner(Job job, Node query, GlobalIndexVisitor globalInexVisitor, TypeRegistry<String> typeRegistry) throws AccumuloSecurityException, AccumuloException, TableNotFoundException { QueryOptimizer optimizer = new QueryOptimizer(query, globalInexVisitor, typeRegistry); NodeToJexl nodeToJexl = new NodeToJexl(typeRegistry); String jexl = nodeToJexl.transform(optimizer.getOptimizedQuery()); String originalJexl = nodeToJexl.transform(query); Collection<Range> ranges = new ArrayList<Range>(); if(jexl.equals("()") || jexl.equals("")) { ranges.add(new Range(END_BYTE)); } else { for (String shard : optimizer.getShards()) ranges.add(new Range(shard)); } setRanges(job, ranges); IteratorSetting setting = new IteratorSetting(16, OptimizedQueryIterator.class); setting.addOption(BooleanLogicIterator.QUERY_OPTION, originalJexl); setting.addOption(BooleanLogicIterator.FIELD_INDEX_QUERY, jexl); final String[] selectFields = job.getConfiguration().getStrings("selectFields"); setting.addOption("auths", getScanAuthorizations(job).serialize()); if (selectFields != null && selectFields.length > 0) { IteratorSetting iteratorSetting = new IteratorSetting(16, SelectFieldsExtractor.class); SelectFieldsExtractor.setSelectFields(iteratorSetting, new HashSet<String>(Arrays.asList(selectFields))); } addIterator(job, setting); }

Target:
protected static void configureScanner(Job job, Node query, GlobalIndexVisitor globalInexVisitor, TypeRegistry<String> typeRegistry) throws AccumuloSecurityException, AccumuloException, TableNotFoundException { QueryOptimizer optimizer = new QueryOptimizer(query, globalInexVisitor, typeRegistry); NodeToJexl nodeToJexl = new NodeToJexl(typeRegistry); String jexl = nodeToJexl.transform(optimizer.getOptimizedQuery()); String originalJexl = nodeToJexl.transform(query); Collection<Range> ranges = new ArrayList<Range>(); if(jexl.equals("()") || jexl.equals("")) { ranges.add(new Range(END_BYTE)); } else { for (String shard : optimizer.getShards()) ranges.add(new Range(shard)); } setRanges(job, ranges); IteratorSetting setting = new IteratorSetting(16, OptimizedQueryIterator.class); setting.addOption(BooleanLogicIterator.QUERY_OPTION, originalJexl); setting.addOption(BooleanLogicIterator.FIELD_INDEX_QUERY, jexl); final String[] selectFields = job.getConfiguration().getStrings(SELECT_FIELDS); if (selectFields != null && selectFields.length > 0) { IteratorSetting iteratorSetting = new IteratorSetting(16, SelectFieldsExtractor.class); SelectFieldsExtractor.setSelectFields(iteratorSetting, new HashSet<String>(Arrays.asList(selectFields))); } addIterator(job, setting); }
Source:
private static JsonObject fork( final String organization) throws Exception { return Json.createObjectBuilder() .add("id", 1) .add(ORGANIZATION, organization) .build(); }

Target:
private static JsonObject fork( final String organization) { return Json.createObjectBuilder() .add("id", 1) .add(ORGANIZATION, organization) .build(); }
Source:
protected ImmutableList<String> getAllImports( final Ds3Request ds3Request, final String packageName) { final ImmutableSet.Builder<String> builder = ImmutableSet.builder(); if (isSpectraDs3(packageName)) { builder.add(getParentImport(ds3Request)); } builder.addAll(getImportsFromParamList(ds3Request.getRequiredQueryParams())); builder.addAll(getImportsFromParamList(ds3Request.getOptionalQueryParams())); if (isResourceAnArg(ds3Request.getResource(), ds3Request.includeIdInPath()) && RequestConverterUtil.isResourceId(ds3Request.getResource())) { builder.add("java.util.UUID"); } return builder.build().asList(); }

Target:
public ImmutableList<String> getAllImports( final Ds3Request ds3Request, final String packageName) { final ImmutableSet.Builder<String> builder = ImmutableSet.builder(); if (isSpectraDs3(packageName)) { builder.add(getParentImport(ds3Request)); } builder.addAll(getImportsFromParamList(ds3Request.getRequiredQueryParams())); builder.addAll(getImportsFromParamList(ds3Request.getOptionalQueryParams())); if (isResourceAnArg(ds3Request.getResource(), ds3Request.includeIdInPath()) && RequestConverterUtil.isResourceId(ds3Request.getResource())) { builder.add("java.util.UUID"); } return builder.build().asList(); }
Source:
protected void endVmCommand() { Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); boolean taskGroupSucceeded = createdSnapshot != null && getParameters().getTaskGroupSuccess(); boolean liveSnapshotRequired = isLiveSnapshotApplicable(); boolean liveSnapshotSucceeded = false; if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (liveSnapshotRequired) { liveSnapshotSucceeded = performLiveSnapshot(createdSnapshot); } else { if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { logMemorySavingFailed(); getSnapshotDao().removeMemoryFromSnapshot(createdSnapshot.getId()); removeMemoryVolumesOfSnapshot(createdSnapshot); } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { removeMemoryVolumesOfSnapshot(createdSnapshot); } } else { log.warnFormat("No snapshot was created for VM {0} which is in LOCKED status", getVmId()); } } if (getParameters().isSaveMemory() && !isMemorySnapshotSupported()) { log.warnFormat("A memory snapshot was required but not created, since VM architecture does not support it."); } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded && (!liveSnapshotRequired || liveSnapshotSucceeded)); getReturnValue().setEndActionTryAgain(false); }

Target:
protected void endVmCommand() { Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); boolean taskGroupSucceeded = createdSnapshot != null && getParameters().getTaskGroupSuccess(); boolean liveSnapshotRequired = isLiveSnapshotApplicable(); boolean liveSnapshotSucceeded = false; if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (liveSnapshotRequired) { liveSnapshotSucceeded = performLiveSnapshot(createdSnapshot); } else { if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { logMemorySavingFailed(); getSnapshotDao().removeMemoryFromSnapshot(createdSnapshot.getId()); removeMemoryVolumesOfSnapshot(createdSnapshot); } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { removeMemoryVolumesOfSnapshot(createdSnapshot); } } else { log.warnFormat("No snapshot was created for VM {0} which is in LOCKED status", getVmId()); } } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded && (!liveSnapshotRequired || liveSnapshotSucceeded)); getReturnValue().setEndActionTryAgain(false); }
Source:
public void testLoadBundleWithExecFileVersion074() throws IOException { ExecutionFileLoader loader = new ExecutionFileLoader(); assertTrue("This test requires that a jacoco.exec file exists in the target-directory", new File("target/jacoco.exec").exists()); loader.setClassDir(new FilePath(new File("target/classes"))); loader.setExcludes("excludme.test"); loader.addExecFile(new FilePath(new File("src/test/jacoco_074.exec"))); loader.addExecFile(new FilePath(new File("somenonexistingfile"))); IBundleCoverage coverage = loader.loadBundleCoverage(); assertNotNull(coverage); assertTrue("Expect to have at least some lines found, but had: " + coverage.getClassCounter(), coverage.getClassCounter().getMissedCount() > 0 || coverage.getClassCounter().getCoveredCount() > 0); }

Target:
public void testLoadBundleWithExecFileVersion074() throws IOException { ExecutionFileLoader loader = new ExecutionFileLoader(); assertTrue("This test requires that a jacoco.exec file exists in the target-directory", new File("src/test/resources/jacoco_074.exec").exists()); loader.setClassDir(new FilePath(new File("target/classes"))); loader.setExcludes("excludme.test"); loader.addExecFile(new FilePath(new File("src/test/resources/jacoco_074.exec"))); loader.addExecFile(new FilePath(new File("somenonexistingfile"))); IBundleCoverage coverage = loader.loadBundleCoverage(); assertNotNull(coverage); assertTrue("Expect to have at least some lines found, but had: " + coverage.getClassCounter(), coverage.getClassCounter().getMissedCount() > 0 || coverage.getClassCounter().getCoveredCount() > 0); }
Source:
private CorfuRuntime(@Nonnull CorfuRuntimeParameters parameters) { this.parameters = parameters; bootstrapLayoutServers = parameters.getLayoutServers().stream() .map(NodeLocator::toString) .collect(Collectors.toList()); layoutServers = new ArrayList<>(bootstrapLayoutServers); clusterId = parameters.getClusterId(); nettyEventLoop = parameters.nettyEventLoop == null ? getNewEventLoopGroup() : parameters.nettyEventLoop; nodeRouterPool = new NodeRouterPool(getRouterFunction); MetricsUtils.metricsReportingSetup(defaultMetrics); if (parameters.getPrometheusMetricsPort() != MetricsUtils.NO_METRICS_PORT) { MetricsUtils.metricsReportingSetup( defaultMetrics, parameters.getPrometheusMetricsPort()); } CorfuRuntimeParameters.MicroMeterRuntimeConfig microMeterRuntimeConfig = this.parameters.getMicroMeterRuntimeConfig(); if (microMeterRuntimeConfig.metricsEnabled) { Logger logger = LoggerFactory.getLogger(microMeterRuntimeConfig.configuredLoggerName); registry = Optional.of(MeterRegistryInitializer.newInstance(logger, microMeterRuntimeConfig.loggingInterval, parameters.clientId)); } else { registry = Optional.empty(); } fetchLayoutTimer = registry.map(r -> Timer.builder("runtime.fetch_layout.timer") .publishPercentileHistogram(true).publishPercentiles(0.50, 0.95, 0.99).register(r)); log.info("Corfu runtime version initialized.", getVersionString()); }

Target:
private CorfuRuntime(@Nonnull CorfuRuntimeParameters parameters) { this.parameters = parameters; bootstrapLayoutServers = parameters.getLayoutServers().stream() .map(NodeLocator::toString) .collect(Collectors.toList()); layoutServers = new ArrayList<>(bootstrapLayoutServers); clusterId = parameters.getClusterId(); nettyEventLoop = parameters.nettyEventLoop == null ? getNewEventLoopGroup() : parameters.nettyEventLoop; nodeRouterPool = new NodeRouterPool(getRouterFunction); MetricsUtils.metricsReportingSetup(defaultMetrics); if (parameters.getPrometheusMetricsPort() != MetricsUtils.NO_METRICS_PORT) { MetricsUtils.metricsReportingSetup( defaultMetrics, parameters.getPrometheusMetricsPort()); } CorfuRuntimeParameters.MicroMeterRuntimeConfig microMeterRuntimeConfig = this.parameters.getMicroMeterRuntimeConfig(); if (microMeterRuntimeConfig.metricsEnabled) { Logger logger = LoggerFactory.getLogger(microMeterRuntimeConfig.configuredLoggerName); if (logger.isDebugEnabled()) { registry = Optional.of(MeterRegistryInitializer.newInstance(logger, microMeterRuntimeConfig.loggingInterval, parameters.clientId)); } else { registry = Optional.empty(); log.warn("No registered metrics logger provided."); } } else { registry = Optional.empty(); } fetchLayoutTimer = registry.map(r -> Timer.builder("runtime.fetch_layout.timer") .publishPercentileHistogram(true).publishPercentiles(0.50, 0.95, 0.99).register(r)); log.info("Corfu runtime version initialized.", getVersionString()); }
Source:
protected TrustManager[] engineGetTrustManagers() { ObjectUtil.checkNotNull(tm, "TrustManagerFactoryWrapper is created with null TrustManager value"); return new TrustManager[] {tm}; }

Target:
protected TrustManager[] engineGetTrustManagers() { return new TrustManager[] {tm}; }
Source:
public void testSerialization() { final Repository repository = Repository.builder() .name("bigtop") .addEntry("deb <LINK_0> bigtop contrib") .key("-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "Version: GnuPG v1.4.10 (GNU/Linux)\n" + "\n" + "[....]") .createRepository(); Software software = Software.builder() .imageId("ubuntu-10.04") .repository(repository) .packages("vim", "git-core", "bigtop-utils") .file("<LINK_1>", "/root/something.tar.gz") .option("provider", "specific") .createSoftware(); assertThat(software.getImageId()).isEqualTo("ubuntu-10.04"); assertThat(software.toBuilder().createSoftware()).isEqualTo(software); assertSerializable(software, Software.class); }

Target:
public void testSerialization() { final Repository repository = Repository.builder() .name("bigtop") .addEntry("deb <LINK_0> bigtop contrib") .key("-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "Version: GnuPG v1.4.10 (GNU/Linux)\n" + "\n" + "[....]") .createRepository(); Software software = Software.builder() .imageId("default") .repository(repository) .packages("vim", "git-core", "bigtop-utils") .file("<LINK_1>", "/root/something.tar.gz") .option("provider", "specific") .createSoftware(); assertThat(software.getImageId()).isEqualTo("default"); assertThat(software.toBuilder().createSoftware()).isEqualTo(software); assertSerializable(software, Software.class); }
Source:
private void processCallStackElement(ICallStackElement element, Builder<FlameChartEntryModel> builder, FlameChartEntryModel parentEntry) { long elementId = getEntryId(element); FlameChartEntryModel entry = new FlameChartEntryModel(elementId, parentEntry.getId(), element, element.getName(), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.LEVEL, IHostModel.UNKNOWN_TID); builder.add(entry); if ((element instanceof InstrumentedCallStackElement) && element.isLeaf()) { InstrumentedCallStackElement finalElement = (InstrumentedCallStackElement) element; CallStack callStack = finalElement.getCallStack(); for (int i = 0; i < callStack.getMaxDepth(); i++) { FlameChartEntryModel flameChartEntry = new FlameChartEntryModel(getEntryId(new CallStackDepth(callStack, i + 1)), entry.getId(), element, element.getName(), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.FUNCTION, IHostModel.UNKNOWN_TID); builder.add(flameChartEntry); if (i == 0 && callStack.hasKernelStatuses()) { builder.add(new FlameChartEntryModel(getKernelEntryId(flameChartEntry.getId()), entry.getId(), element, "Kernel statuses", parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.KERNEL, IHostModel.UNKNOWN_TID)); } } return; } element.getChildren().stream().forEach(e -> processCallStackElement(e, builder, entry)); }

Target:
private void processCallStackElement(ICallStackElement element, Builder<FlameChartEntryModel> builder, FlameChartEntryModel parentEntry) { long elementId = getEntryId(element); FlameChartEntryModel entry = new FlameChartEntryModel(elementId, parentEntry.getId(), element, element.getName(), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.LEVEL, IHostModel.UNKNOWN_TID); builder.add(entry); if ((element instanceof InstrumentedCallStackElement) && element.isLeaf()) { InstrumentedCallStackElement finalElement = (InstrumentedCallStackElement) element; CallStack callStack = finalElement.getCallStack(); for (int depth = 0; depth < callStack.getMaxDepth(); depth++) { FlameChartEntryModel flameChartEntry = new FlameChartEntryModel(getEntryId(new CallStackDepth(callStack, depth + 1)), entry.getId(), element, element.getName(), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.FUNCTION, IHostModel.UNKNOWN_TID); builder.add(flameChartEntry); if (depth == 0 && callStack.hasKernelStatuses()) { builder.add(new FlameChartEntryModel(getKernelEntryId(flameChartEntry.getId()), entry.getId(), element, String.valueOf(Messages.FlameChartDataProvider_KernelStatusTitle), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.KERNEL, IHostModel.UNKNOWN_TID)); } } return; } for (ICallStackElement child : element.getChildren()) { processCallStackElement(child, builder, entry); } }
Source:
public boolean catalogAlreadyExists(Connection conn) throws CatalogException { boolean result = false; try { result = checkExistence(conn, DatabaseObjectType.TABLE, CatalogConstants.TB_META); } catch (SQLException e) { throw new CatalogException(e.getMessage(), e); } return result; }

Target:
public boolean catalogAlreadyExists(Connection conn) throws CatalogException { boolean result = false; try { List<String> constants = TUtil.newList(); constants.add(CatalogConstants.TB_META); constants.add(CatalogConstants.TB_SPACES); constants.add(CatalogConstants.TB_DATABASES); constants.add(CatalogConstants.TB_TABLES); constants.add(CatalogConstants.TB_COLUMNS); constants.add(CatalogConstants.TB_OPTIONS); constants.add(CatalogConstants.TB_INDEXES); constants.add(CatalogConstants.TB_STATISTICS); constants.add(CatalogConstants.TB_PARTITION_METHODS); constants.add(CatalogConstants.TB_PARTTIONS); constants.add(CatalogConstants.TB_PARTTION_KEYS); for (String constant : constants) { if (checkExistence(conn, DatabaseObjectType.TABLE, constant)) { return true; } } } catch (SQLException e) { throw new CatalogException(e.getMessage(), e); } return result; }
Source:
protected void executeCommand() { getParameters().setImageGroupID(Guid.newGuid()); getParameters().setDestinationImageId(Guid.newGuid()); persistCommand(getParameters().getParentCommand(), true); getParameters().setEntityInfo( new EntityInfo(VdcObjectType.Disk, getParameters().getImageGroupID())); Backend.getInstance().runInternalAction(VdcActionType.AddDisk, createAddDiskParameters(), ExecutionHandler.createDefaultContextForTasks(getContext())); getParameters().setNextPhase(ImportRepoImageParameters.Phase.DOWNLOAD); persistCommand(getParameters().getParentCommand(), true); setSucceeded(true); }

Target:
protected void executeCommand() { setupParameters(); persistCommand(getParameters().getParentCommand(), true); Backend.getInstance().runInternalAction(VdcActionType.AddDisk, createAddDiskParameters(), ExecutionHandler.createDefaultContextForTasks(getContext())); getParameters().setNextPhase(ImportRepoImageParameters.Phase.DOWNLOAD); persistCommand(getParameters().getParentCommand(), true); setSucceeded(true); }
Source:
public int onStartCommand(Intent intent, int flags, int startId) { if (intent != null) { switch (intent.getAction()) { case ACTION_START: startForegroundService(); break; case ACTION_STOP: stopForegroundService(); break; } } return super.onStartCommand(intent, flags, startId); }

Target:
public int onStartCommand(Intent intent, int flags, int startId) { if (intent != null && intent.getAction() != null) { switch (intent.getAction()) { case ACTION_START: startForegroundService(); break; case ACTION_STOP: stopForegroundService(); break; } } return super.onStartCommand(intent, flags, startId); }
Source:
private KeyValueCollectionPermission isPermitted( CollectionPermission s, KeyValueCollectionPermission match, KeyValueCollectionPermission allPerms) { Map<String, Set<String>> subject = getPermissions(s.getPermissionList()); Map<String, Set<String>> metacard = getPermissions(allPerms.getPermissionList()); if (Collections.disjoint(metacard.keySet(), ACCESS_CONTROL_IMPLIED)) { return match; } SecurityPredicate readPermsImplied = (sub, mc) -> hasAccessAdministrators.apply(subject, metacard) || hasAccessIndividuals.apply(subject, metacard) || hasAccessGroups.apply(subject, metacard) || hasAccessGroupsReadOnly.apply(subject, metacard) || hasAccessIndividualsReadOnly.apply(subject, metacard); Supplier<Set<String>> impliedPermissions = () -> { if (isSystem.test(subject) || isOwner.apply(subject, metacard)) { return metacard.keySet(); } else if (readPermsImplied.apply(subject, metacard)) { return ACCESS_CONTROL_IMPLIED; } else { return Collections.emptySet(); } }; Function<Set<String>, KeyValueCollectionPermission> filterPermissions = (implied) -> { List<KeyValuePermission> values = match .getPermissionList() .stream() .map(p -> (KeyValuePermission) p) .filter((permission) -> !implied.contains((permission).getKey())) .collect(Collectors.toList()); return new KeyValueCollectionPermission(match.getAction(), values); }; return filterPermissions.apply(impliedPermissions.get()); }

Target:
private KeyValueCollectionPermission isPermitted( CollectionPermission s, KeyValueCollectionPermission match, KeyValueCollectionPermission allPerms) { Map<String, Set<String>> subject = getPermissions(s.getPermissionList()); Map<String, Set<String>> metacard = getPermissions(allPerms.getPermissionList()); if (Collections.disjoint(metacard.keySet(), ACCESS_CONTROL_IMPLIED)) { return match; } SecurityPredicate subjectImpliesACL = (sub, mc) -> hasAccessAdministrators.apply(sub, mc) || hasAccessIndividuals.apply(sub, mc) || hasAccessGroups.apply(sub, mc) || (READ_ACTION.equals(allPerms.getAction()) && (hasAccessGroupsReadOnly.apply(sub, mc) || hasAccessIndividualsReadOnly.apply(sub, mc))); Supplier<Set<String>> impliedPermissions = () -> { if (isSystem.test(subject) || isOwner.apply(subject, metacard)) { return metacard.keySet(); } else if (subjectImpliesACL.apply(subject, metacard)) { return ACCESS_CONTROL_IMPLIED; } else { return Collections.emptySet(); } }; Function<Set<String>, KeyValueCollectionPermission> filterPermissions = (implied) -> { List<KeyValuePermission> values = match .getPermissionList() .stream() .map(p -> (KeyValuePermission) p) .filter((permission) -> !implied.contains((permission).getKey())) .collect(Collectors.toList()); return new KeyValueCollectionPermission(match.getAction(), values); }; return filterPermissions.apply(impliedPermissions.get()); }
Source:
private void upgradePageStore(String propertyPrefix) { String dbUrl = Common.envProps.getString(propertyPrefix + "db.url"); Path dbPath = getDbPathFromUrl(dbUrl); Path legacy = dbPath.getParent().resolve(dbPath.getFileName().toString() + ".h2.db"); if(legacy.toFile().exists()) { LOG.info("Converting legacy h2 database..."); String dumpFileName = "mah2.h2.196.sql.zip"; Path dumpPath = Common.MA_HOME_PATH.resolve("backup").resolve(dumpFileName); try { LOG.info("Dumping legacy database to file " + dumpPath.toString()); dump(legacy, dumpPath); Files.delete(legacy); String user = Common.envProps.getString(propertyPrefix + "db.username", null); String password = Common.envProps.getString(propertyPrefix + "db.password", null); String url = getUrl(propertyPrefix); LOG.info("Importing exisiting H2 database..."); String runScript = url + ";init=RUNSCRIPT FROM '" + dumpPath.toString() + "' COMPRESSION ZIP"; try(Connection conn = DriverManager.getConnection(runScript, user, password);){ Statement stat = conn.createStatement(); stat.execute("shutdown compact"); stat.close(); } try { LOG.info("Cleaning up H2 initializataion tests..."); Files.deleteIfExists(dumpPath); } catch (IOException e) { LOG.warn("Unable to delete un-necessary H2 dump file " + dumpPath.toString(), e); } } catch(Exception e) { throw new ShouldNeverHappenException(e); } } }

Target:
private void upgradePageStore(String propertyPrefix) { String dbUrl = Common.envProps.getString(propertyPrefix + "db.url"); Path dbPath = getDbPathFromUrl(dbUrl); Path legacy = dbPath.getParent().resolve(dbPath.getFileName().toString() + ".h2.db"); if(legacy.toFile().exists()) { LOG.info("Converting legacy h2 database..."); String dumpFileName = "mah2.h2.196.sql.zip"; Path dumpPath = Common.MA_HOME_PATH.resolve("backup").resolve(dumpFileName); if(dumpPath.toFile().exists()) throw new ShouldNeverHappenException("Found upgrade database backup, aborting startup. Likely corrupt database, replace with contents from " + dumpPath.toString()); try { LOG.info("Dumping legacy database to file " + dumpPath.toString()); dump(legacy, dumpPath); Files.delete(legacy); String user = Common.envProps.getString(propertyPrefix + "db.username", null); String password = Common.envProps.getString(propertyPrefix + "db.password", null); String url = getUrl(propertyPrefix); LOG.info("Importing existing H2 database..."); String runScript = url + ";init=RUNSCRIPT FROM '" + dumpPath.toString().replaceAll("\\\\", "/") + "' COMPRESSION ZIP"; try(Connection conn = DriverManager.getConnection(runScript, user, password);){ Statement stat = conn.createStatement(); stat.execute("SHUTDOWN COMPACT"); stat.close(); } try { LOG.info("Cleaning up H2 initializataion tests..."); Files.deleteIfExists(dumpPath); } catch (IOException e) { LOG.warn("Unable to delete un-necessary H2 dump file " + dumpPath.toString(), e); } } catch(Exception e) { if(e.getCause() instanceof JdbcSQLIntegrityConstraintViolationException) { throw new ShouldNeverHappenException("H2 Failed to start, likely corrupt database replace with contents of backup at: " + dumpPath.toString()); }else throw new ShouldNeverHappenException(e); } } }
Source:
public static List<Trade> createSwapTrades() { return ImmutableList.of( createVanillaFixedVsLibor3mSwap(), createBasisLibor3mVsLibor6mWithSpreadSwap(), createOvernightAveragedWithSpreadVsLibor3mSwap(), createFixedVsLibor3mWithFixingSwap(), createFixedVsOvernightWithFixingSwap(), createStub3mFixedVsLibor3mSwap(), createStub1mFixedVsLibor3mSwap(), createInterpolatedStub3mFixedVsLibor6mSwap(), createInterpolatedStub4mFixedVsLibor6mSwap(), createZeroCouponFixedVsLibor3mSwap(), createCompoundingFixedVsFedFundsSwap(), createCompoundingFedFundsVsLibor3mSwap(), createCompoundingLibor6mVsLibor3mSwap(), createXCcyGbpLibor3mVsUsdLibor3mSwap(), createXCcyUsdFixedVsGbpLibor3mSwap(), createNotionalExchangeSwap()); }

Target:
private static List<Trade> createSwapTrades() { return ImmutableList.of( createVanillaFixedVsLibor3mSwap(), createBasisLibor3mVsLibor6mWithSpreadSwap(), createOvernightAveragedWithSpreadVsLibor3mSwap(), createFixedVsLibor3mWithFixingSwap(), createFixedVsOvernightWithFixingSwap(), createStub3mFixedVsLibor3mSwap(), createStub1mFixedVsLibor3mSwap(), createInterpolatedStub3mFixedVsLibor6mSwap(), createInterpolatedStub4mFixedVsLibor6mSwap(), createZeroCouponFixedVsLibor3mSwap(), createCompoundingFixedVsFedFundsSwap(), createCompoundingFedFundsVsLibor3mSwap(), createCompoundingLibor6mVsLibor3mSwap(), createXCcyGbpLibor3mVsUsdLibor3mSwap(), createXCcyUsdFixedVsGbpLibor3mSwap(), createNotionalExchangeSwap()); }
Source:
public SqlParameterSource createParameterSource(final Object input) { AbstractSqlParameterSource sqlParameterSource = new ExpressionEvaluatingSqlParameterSource(input, this.staticParameters, this.parameterExpressions, true); enrichSqlParametersType(sqlParameterSource); return sqlParameterSource; }

Target:
public SqlParameterSource createParameterSource(final Object input) { AbstractSqlParameterSource sqlParameterSource = new ExpressionEvaluatingSqlParameterSource(input, this.staticParameters, this.parameterExpressions, true); registerSqlTypes(sqlParameterSource); return sqlParameterSource; }
Source:
public boolean verified(Payload payload, SessionWrapper session) { try { return this.checkRoles(SessionWrapper.class.cast(session).getUser(), (String) payload.getVisibilityId()); } catch (DotDataException e) { throw new BaseRuntimeInternationalizationException(e); } }

Target:
public boolean verified(Payload payload, SessionWrapper session) { try { return this.checkRoles(SessionWrapper.class.cast(session).getUser(), (String) payload.getVisibilityId()); } catch (DotDataException e) { throw new VerifierException(e); } }