auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void saveIssues(InputFile sonarFile, SourceFile squidFile) { Collection<CheckMessage> messages = squidFile.getCheckMessages(); if (messages != null) { for (CheckMessage message : messages) { RuleKey ruleKey = checks.ruleKey((SquidAstVisitor<Grammar>) message.getCheck()); Issuable issuable = resourcePerspectives.as(Issuable.class, sonarFile); if (issuable != null) { Issue issue = issuable.newIssueBuilder() .ruleKey(RuleKey.of(ruleKey.repository(), ruleKey.rule())) .line(message.getLine()) .message(message.getText(Locale.ENGLISH)) .build(); issuable.addIssue(issue); } } } }

Target:
private void saveIssues(InputFile sonarFile, SourceFile squidFile) { Collection<CheckMessage> messages = squidFile.getCheckMessages(); if (messages != null) { for (CheckMessage message : messages) { RuleKey ruleKey = checks.ruleKey((SquidAstVisitor<Grammar>) message.getCheck()); Issuable issuable = resourcePerspectives.as(Issuable.class, sonarFile); if (issuable != null) { Issue issue = issuable.newIssueBuilder() .ruleKey(ruleKey) .line(message.getLine()) .message(message.getText(Locale.ENGLISH)) .build(); issuable.addIssue(issue); } } } }
Source:
public void test_of_reasonMessageExceptionNestedExceptionWithAttributes() { IllegalArgumentException innerEx = new IllegalArgumentException("inner"); IllegalArgumentException ex = new IllegalArgumentException("message", innerEx); FailureItem test = FailureItem.of(FailureReason.INVALID, ex, "my {foo} {bar} failure", "big", "bad"); assertEquals(test.getReason(), FailureReason.INVALID); assertEquals(test.getMessage(), "my big bad failure"); assertEquals(test.getCauseType().isPresent(), true); assertEquals(test.getCauseType().get(), IllegalArgumentException.class); assertEquals(test.getStackTrace().contains(".test_of_reasonMessageExceptionNestedExceptionWithAttributes("), true); assertEquals(test.toString(), "INVALID: my big bad failure: java.lang.IllegalArgumentException: message : {bar=bad, foo=big}"); }

Target:
public void test_of_reasonMessageExceptionNestedExceptionWithAttributes() { IllegalArgumentException innerEx = new IllegalArgumentException("inner"); IllegalArgumentException ex = new IllegalArgumentException("message", innerEx); FailureItem test = FailureItem.of(FailureReason.INVALID, ex, "my {foo} {bar} failure", "big", "bad"); assertEquals(test.getAttributes(), ImmutableMap.of("foo", "big", "bar", "bad")); assertEquals(test.getReason(), FailureReason.INVALID); assertEquals(test.getMessage(), "my big bad failure"); assertEquals(test.getCauseType().isPresent(), true); assertEquals(test.getCauseType().get(), IllegalArgumentException.class); assertEquals(test.getStackTrace().contains(".test_of_reasonMessageExceptionNestedExceptionWithAttributes("), true); assertEquals(test.toString(), "INVALID: my big bad failure: java.lang.IllegalArgumentException: message : {bar=bad, foo=big}"); }
Source:
protected void execute() { for (Entry<String, Meter> entry : meterDeviceConfigurtions.entrySet()) { Meter reader = entry.getValue(); Map<String, DataSet> dataSets = reader.read(); for (Iec6205621MeterBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { String obis = provider.getObis(itemName); String meterName = provider.getMeterName(itemName); if (obis != null && dataSets.containsKey(obis) && meterName != null && meterName.equals(entry.getKey())) { DataSet dataSet = dataSets.get(obis); Class<? extends Item> itemType = provider .getItemType(itemName); if (itemType.isAssignableFrom(NumberItem.class)) { eventPublisher.postUpdate(itemName, new DecimalType(dataSet.getValue())); } if (itemType.isAssignableFrom(StringItem.class)) { String value = dataSet.getValue(); eventPublisher.postUpdate(itemName, new StringType( value)); } } } } } }

Target:
protected void execute() { Map<String, Map<String, DataSet>> cache = new HashMap<String, Map<String,DataSet>>(); for (Iec6205621MeterBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { for (Entry<String, Meter> entry : meterDeviceConfigurtions.entrySet()) { Meter reader = entry.getValue(); String meterName = provider.getMeterName(itemName); if(meterName != null && meterName.equals(entry.getKey())) { Map<String, DataSet> dataSets; if((dataSets = cache.get(meterName)) == null) { if(logger.isDebugEnabled()) logger.debug("Read meter: " + meterName + "; " + reader.getConfig().getSerialPort()); dataSets = reader.read(); cache.put(meterName, dataSets); } String obis = provider.getObis(itemName); if (obis != null && dataSets.containsKey(obis)) { DataSet dataSet = dataSets.get(obis); if(logger.isDebugEnabled()) logger.debug("Updateing item " + itemName + " with OBIS code " + obis + " and value " + dataSet.getValue()); Class<? extends Item> itemType = provider .getItemType(itemName); if (itemType.isAssignableFrom(NumberItem.class)) { eventPublisher.postUpdate(itemName, new DecimalType(dataSet.getValue())); } if (itemType.isAssignableFrom(StringItem.class)) { String value = dataSet.getValue(); eventPublisher.postUpdate(itemName, new StringType( value)); } } } } } } }
Source:
public <TElement extends Element> void updateElement( Graph graph, ExistingElementMutation<TElement> elementMutation, Authorizations authorizations ) { TElement element = elementMutation.getElement(); if (MUTATION_LOGGER.isTraceEnabled()) { MUTATION_LOGGER.trace("updateElement: %s", elementMutation.getId()); } if (!getConfig().isIndexEdges() && elementMutation.getElementType() == ElementType.EDGE) { return; } bulkUpdateService.flushUntilElementIdIsComplete(elementMutation.getId()); addMutationPropertiesToIndex(graph, elementMutation); addUpdateForMutationToBulk(graph, elementMutation); if (elementMutation.getNewElementVisibility() != null && element.getFetchHints().isIncludeExtendedDataTableNames()) { ImmutableSet<String> extendedDataTableNames = element.getExtendedDataTableNames(); if (extendedDataTableNames != null && !extendedDataTableNames.isEmpty()) { extendedDataTableNames.forEach(tableName -> alterExtendedDataElementTypeVisibility( graph, elementMutation, element.getExtendedData(tableName), elementMutation.getOldElementVisibility(), elementMutation.getNewElementVisibility() )); } } }

Target:
public <TElement extends Element> void updateElement( Graph graph, ExistingElementMutation<TElement> elementMutation, Authorizations authorizations ) { TElement element = elementMutation.getElement(); if (MUTATION_LOGGER.isTraceEnabled()) { MUTATION_LOGGER.trace("updateElement: %s", elementMutation.getId()); } if (!getConfig().isIndexEdges() && elementMutation.getElementType() == ElementType.EDGE) { return; } addMutationPropertiesToIndex(graph, elementMutation); addUpdateForMutationToBulk(graph, elementMutation); if (elementMutation.getNewElementVisibility() != null && element.getFetchHints().isIncludeExtendedDataTableNames()) { ImmutableSet<String> extendedDataTableNames = element.getExtendedDataTableNames(); if (extendedDataTableNames != null && !extendedDataTableNames.isEmpty()) { extendedDataTableNames.forEach(tableName -> alterExtendedDataElementTypeVisibility( graph, elementMutation, element.getExtendedData(tableName), elementMutation.getOldElementVisibility(), elementMutation.getNewElementVisibility() )); } } if (getConfig().isAutoFlush()) { flush(graph); } }
Source:
public static void closeEditor(IRepositoryViewObject viewObj, boolean save) { IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IEditorReference[] editorReferences = activePage.getEditorReferences(); for (IEditorReference ref : editorReferences) { if (ref != null) { try { IEditorInput editorInput = ref.getEditorInput(); if (editorInput instanceof IRepositoryViewEditorInput) { Item inputItem = ((IRepositoryViewEditorInput) editorInput).getInputItem(); if (inputItem != null) { IRepositoryViewObject vObj = ContainerCacheService.get(inputItem.getProperty()); if (vObj != null && vObj.equals(viewObj)) { activePage.closeEditors(new IEditorReference[] { ref }, save); } } } else if (editorInput instanceof URIEditorInput) { URIEditorInput uriEditorInput = (URIEditorInput) editorInput; String name = uriEditorInput.getName(); if (name.equals(viewObj.getLabel() + "-" + viewObj.getVersion() + ".proc")) { activePage.closeEditors(new IEditorReference[] { ref }, false); } URI uri = uriEditorInput.getURI(); System.out.println(uri); } } catch (PartInitException e) { LOG.error(e.getMessage(), e); } } } }

Target:
public static void closeEditor(IRepositoryViewObject viewObj, boolean save) { IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IEditorReference[] editorReferences = activePage.getEditorReferences(); for (IEditorReference ref : editorReferences) { if (ref != null) { try { IEditorInput editorInput = ref.getEditorInput(); if (editorInput instanceof IRepositoryViewEditorInput) { Item inputItem = ((IRepositoryViewEditorInput) editorInput).getInputItem(); if (inputItem != null) { IRepositoryViewObject vObj = ContainerCacheService.get(inputItem.getProperty()); if (vObj != null && vObj.equals(viewObj)) { activePage.closeEditors(new IEditorReference[] { ref }, save); } } } } catch (PartInitException e) { LOG.error(e.getMessage(), e); } } } }
Source:
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(4, 1)); final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(IORootDefinition.INSTANCE); registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE, false); subsystem.registerXMLElementWriter(IOSubsystemParser_2_0::new); }

Target:
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(4)); final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(IORootDefinition.INSTANCE); registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE, false); subsystem.registerXMLElementWriter(IOSubsystemParser_2_0::new); }
Source:
public void setConnectionTtlToMinusOne() { page.switchToConnectionManagementTab(); page.edit().text("connectionTTL", "-1"); page.clickButton("Save"); WebElement webElement = browser.findElement(By.className("form-item-error-desc")); Assert.assertNull("Test failed due to HAL-1382.", webElement); }

Target:
public void setConnectionTtlToMinusOne() throws Exception { page.selectInTable("InVmConnectionFactory"); page.switchToConnectionManagementTab(); editTextAndVerify(IN_VM_CONNECTOR_ADDRESS, "connectionTTL", "connection-ttl", -1L) ; }
Source:
private Object getAdapter(Object sourceObject, Class adapterType) { Assert.isNotNull(adapterType); if (sourceObject == null) { return null; } if (adapterType.isInstance(sourceObject)) { return sourceObject; } if (sourceObject instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) sourceObject; Object result = adaptable.getAdapter(adapterType); if (result != null) { Assert.isTrue(adapterType.isInstance(result)); return result; } } if (!(sourceObject instanceof PlatformObject)) { Object result = Platform.getAdapterManager().getAdapter( sourceObject, adapterType); if (result != null) { return result; } } return null; }

Target:
private Object getAdapter(Object sourceObject, Class adapterType) { Assert.isNotNull(adapterType); if (sourceObject == null) return null; if (adapterType.isInstance(sourceObject)) return sourceObject; if (sourceObject instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) sourceObject; Object result = adaptable.getAdapter(adapterType); if (result != null) { Assert.isTrue(adapterType.isInstance(result)); return result; } } if (!(sourceObject instanceof PlatformObject)) { Object result = Platform.getAdapterManager().getAdapter( sourceObject, adapterType); if (result != null) return result; } return null; }
Source:
public void noopQueries() { Term t = new Term("test", "foo"); Query[] queries = new Query[] { new TermQuery(t), new FuzzyQuery(t, 1, 1, 1, false), new RegexpQuery(t), new WildcardQuery(t), new PrefixQuery(t), new CommonTermsQuery(Occur.SHOULD, Occur.MUST, .5f), new ExtendedCommonTermsQuery(Occur.SHOULD, Occur.MUST, .5f, false, null), new XConstantScoreQuery(new TermFilter(t)), pq("1", "2", "3"), mpq(new String[] {"1", "2"}, new String[] {"3"}, new String[] {"a", "Adsfa"}), multiPhrasePrefixQuery(new String[] {"1", "2"}, new String[] {"3"}, new String[] {"a", "Adsfa"}), new FieldMaskingSpanQuery(new SpanTermQuery(t), "test"), new SpanMultiTermQueryWrapper<PrefixQuery>(new PrefixQuery(t)), new SpanNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), new PayloadNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), new SpanNotQuery(new SpanTermQuery(t), new SpanTermQuery(t)), new SpanOrQuery(new SpanTermQuery(t), new SpanTermQuery(t)), new SpanNearPayloadCheckQuery(new SpanNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), Collections.<byte[]>emptyList()), new SpanPayloadCheckQuery(new SpanTermQuery(t), Collections.<byte[]>emptyList()), new SpanPositionRangeQuery(new SpanTermQuery(t), 1, 20), new SpanFirstQuery(new SpanTermQuery(t), 10), new SpanTermQuery(t), new AllTermQuery(t), new PayloadTermQuery(t, new MaxPayloadFunction()), }; for (Query query: queries) { query.setBoost(getRandom().nextFloat()); assertEquals(query, new Safeifier(true).safeify(query)); } }

Target:
public void noopQueries() { Term t = new Term("test", "foo"); Query[] queries = new Query[] { new TermQuery(t), new FuzzyQuery(t, 1, 1, 1, false), new RegexpQuery(t), new WildcardQuery(t), new PrefixQuery(t), new CommonTermsQuery(Occur.SHOULD, Occur.MUST, .5f), new ExtendedCommonTermsQuery(Occur.SHOULD, Occur.MUST, .5f, false, null), new XConstantScoreQuery(new TermFilter(t)), pq("1", "2", "3"), mpq(new String[] {"1", "2"}, new String[] {"3"}, new String[] {"a", "Adsfa"}), multiPhrasePrefixQuery(new String[] {"1", "2"}, new String[] {"3"}, new String[] {"a", "Adsfa"}), new FieldMaskingSpanQuery(new SpanTermQuery(t), "test"), new SpanMultiTermQueryWrapper<>(new PrefixQuery(t)), new SpanNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), new PayloadNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), new SpanNotQuery(new SpanTermQuery(t), new SpanTermQuery(t)), new SpanOrQuery(new SpanTermQuery(t), new SpanTermQuery(t)), new SpanNearPayloadCheckQuery(new SpanNearQuery(new SpanQuery[] {new SpanTermQuery(t)}, 1, true), Collections.<byte[]>emptyList()), new SpanPayloadCheckQuery(new SpanTermQuery(t), Collections.<byte[]>emptyList()), new SpanPositionRangeQuery(new SpanTermQuery(t), 1, 20), new SpanFirstQuery(new SpanTermQuery(t), 10), new SpanTermQuery(t), new AllTermQuery(t), new PayloadTermQuery(t, new MaxPayloadFunction()), }; for (Query query: queries) { query.setBoost(getRandom().nextFloat()); assertEquals(query, new Safeifier(true).safeify(query)); } }
Source:
static void close(Set<?> set) { set.stream() .filter(o -> o instanceof Closeable) .map(c -> (Closeable) c) .forEach(c -> { try { c.close(); } catch (Throwable t) { log.errorClosingCloseable(c, t); } }); }

Target:
static void close(Set<?> set) { set.stream() .filter(Closeable.class::isInstance) .map(Closeable.class::cast) .forEach(c -> { try { c.close(); } catch (Exception e) { log.errorClosingCloseable(c, e); } }); }
Source:
public static void main(String[] args) { String masc = ""; String output = ""; String type = ""; String analysis = ""; if (args.length > 0) { masc = args[0]; output = args[1]; analysis = args[2]; type = args[3]; } else { logger.info("No arguments, using defaults."); masc = "MASC-3.0.0/data/written/"; output = "output/new_illinois_result_wn5.txt"; analysis = "analysis/new_illinois_result_wn5.txt"; type = "illinois"; } MASCevaluation m = new MASCevaluation(masc); LemmatizerInterface lem = initLemmatizer(type); lem.initLemmatizer(); MASCevaluationResult[] lem_result = m.evaluation(lem); try { File file = new File(analysis); FileWriter writer = new FileWriter(file, false); PrintWriter out = new PrintWriter(writer); out.println(MASCevaluationResult.getOverallAnalytics(lem_result)); } catch (Exception e) { e.printStackTrace(); } try { File file = new File(output); FileWriter writer = new FileWriter(file, false); PrintWriter out = new PrintWriter(writer); int total = 0; int correct = 0; for (MASCevaluationResult aLem_result1 : lem_result) { total += aLem_result1.getTotal(); correct += aLem_result1.getCorrect(); } out.printf("Overall Accuracy: %f %%\n", (double) correct / (double) total * 100); for (MASCevaluationResult aLem_result : lem_result) out.println(aLem_result.toString()); out.close(); } catch (Exception e) { e.printStackTrace(); } }

Target:
public static void main(String[] args) { String masc = ""; String output = ""; String type = ""; String analysis = ""; if (args.length > 0) { masc = args[0]; output = args[1]; analysis = args[2]; type = args[3]; } else { System.out.println("No arguments, using defaults."); masc = "MASC-3.0.0/data/written/"; output = "output/new_illinois_result_wn5.txt"; analysis = "analysis/new_illinois_result_wn5.txt"; type = "illinois"; } MASCevaluation m = new MASCevaluation(masc); LemmatizerInterface lem = initLemmatizer(type); lem.initLemmatizer(); MASCevaluationResult[] lem_result = m.evaluation(lem); try { File file = new File(analysis); FileWriter writer = new FileWriter(file, false); PrintWriter out = new PrintWriter(writer); out.println(MASCevaluationResult.getOverallAnalytics(lem_result)); } catch (Exception e) { e.printStackTrace(); } try { File file = new File(output); FileWriter writer = new FileWriter(file, false); PrintWriter out = new PrintWriter(writer); int total = 0; int correct = 0; for (MASCevaluationResult aLem_result1 : lem_result) { total += aLem_result1.getTotal(); correct += aLem_result1.getCorrect(); } out.printf("Overall Accuracy: %f %%\n", (double) correct / (double) total * 100); for (MASCevaluationResult aLem_result : lem_result) out.println(aLem_result.toString()); out.close(); } catch (Exception e) { e.printStackTrace(); } }
Source:
private InputStream getInputStreamFromJar(String fileName) { final Locale locale = Locale.getDefault(); final String languageTag = BrowserLocaleManager.getLanguageTag(locale); String url = getSearchPluginsJarURL(languageTag, fileName); final InputStream in = GeckoJarReader.getStream(url); if (in != null) { return in; } final String language = locale.getLanguage(); if (languageTag.equals(language)) { return null; } url = getSearchPluginsJarURL(language, fileName); return GeckoJarReader.getStream(url); }

Target:
private InputStream getInputStreamFromJar(String fileName) { final Locale locale = Locale.getDefault(); final String languageTag = BrowserLocaleManager.getLanguageTag(locale); String url = getSearchPluginsJarURL(languageTag, fileName); final InputStream in = GeckoJarReader.getStream(url); if (in != null) { return in; } final String language = BrowserLocaleManager.getLanguage(locale); if (languageTag.equals(language)) { return null; } url = getSearchPluginsJarURL(language, fileName); return GeckoJarReader.getStream(url); }
Source:
public void onReceiveBuildingUpgradeEvent(UpgradeBuildingEvent upgradeBuildingEvent, EntityRef player) { buildingToUpgrade.send(new CloseUpgradeScreenEvent()); logger.info("adding building upgrade task"); ConstructedBuildingComponent buildingComponent = buildingToUpgrade.getComponent(ConstructedBuildingComponent.class); TaskComponent taskComponent = new TaskComponent(); taskComponent.assignedTaskType = AssignedTaskType.Upgrade; taskComponent.taskRegion = buildingComponent.boundingRegions.get(86); taskComponent.buildingToUpgrade = buildingToUpgrade; taskComponent.taskCompletionTime = taskMangementSystem.getTaskCompletionTime(AssignedTaskType.Upgrade); EntityRef task = entityManager.create(taskComponent); taskMangementSystem.addTask(player, task); }

Target:
public void onReceiveBuildingUpgradeEvent(UpgradeBuildingEvent upgradeBuildingEvent, EntityRef player) { buildingToUpgrade.send(new CloseUpgradeScreenEvent()); logger.info("adding building upgrade task"); ConstructedBuildingComponent buildingComponent = buildingToUpgrade.getComponent(ConstructedBuildingComponent.class); TaskComponent taskComponent = new TaskComponent(); taskComponent.assignedTaskType = AssignedTaskType.Upgrade; taskComponent.taskRegion = buildingComponent.boundingRegions.get(Constants.DINER_CHAIR_REGION_INDEX); taskComponent.buildingToUpgrade = buildingToUpgrade; taskComponent.taskCompletionTime = taskMangementSystem.getTaskCompletionTime(AssignedTaskType.Upgrade); EntityRef task = entityManager.create(taskComponent); taskMangementSystem.addTask(player, task); }
Source:
public Map<Client, PaxosLong> apply(Set<Client> requestedClients) { clientsSeenSoFar.addAll(requestedClients); int attempt = 0; while (attempt < 3) { TimestampedAcceptorCacheKey timestampedCacheKey = cacheKey.get(); try { if (timestampedCacheKey == null) { return populateNewCache(requestedClients); } else { return populateExistingCache( timestampedCacheKey, cacheKeysToCaches.get(timestampedCacheKey.cacheKey()), requestedClients); } } catch (InvalidAcceptorCacheKeyException e) { log.info("Cache key is invalid, invalidating cache and retrying", SafeArg.of("attempt", attempt), e); cacheKey.compareAndSet(timestampedCacheKey, null); attempt++; } } throw new SafeIllegalStateException("could not request complete request due to contention in the cache"); }

Target:
public Map<Client, PaxosLong> apply(Set<Client> requestedClients) { clientsSeenSoFar.addAll(requestedClients); int attempt = 0; while (attempt < 3) { TimestampedAcceptorCacheKey timestampedCacheKey = latestCacheKey.get(); try { if (timestampedCacheKey == null) { return populateNewCache(requestedClients); } else { return populateExistingCache( timestampedCacheKey, cacheKeysToCaches.get(timestampedCacheKey.cacheKey()), requestedClients); } } catch (InvalidAcceptorCacheKeyException e) { log.info("Cache key is invalid, invalidating cache and retrying", SafeArg.of("attempt", attempt), e); latestCacheKey.compareAndSet(timestampedCacheKey, null); attempt++; } } throw new SafeIllegalStateException("could not complete request due to contention in the cache"); }
Source:
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { controller.resetLineNumber(); Parameter[] parameters = node.getParameters(); String methodType = BytecodeHelper.getMethodDescriptor(node.getReturnType(), parameters); String signature = BytecodeHelper.getGenericsMethodSignature(node); int modifiers = node.getModifiers(); if (isVargs(node.getParameters())) modifiers |= Opcodes.ACC_VARARGS; MethodVisitor mv = cv.visitMethod(modifiers, node.getName(), methodType, signature, buildExceptions(node.getExceptions())); controller.setMethodVisitor(mv); visitAnnotations(node, mv); for (int i = 0; i < parameters.length; i++) { visitParameterAnnotations(parameters[i], i, mv); } if (getCompileUnit().getConfig().getParameters()){ for (int i = 0; i < parameters.length; i++) { mv.visitParameter(parameters[i].getName(), 0); } } if (controller.getClassNode().isAnnotationDefinition() && !node.isStaticConstructor()) { visitAnnotationDefault(node, mv); } else if (!node.isAbstract()) { Statement code = node.getCode(); mv.visitCode(); if (code instanceof BytecodeSequence && ((BytecodeSequence)code).getInstructions().size() == 1 && ((BytecodeSequence)code).getInstructions().get(0) instanceof BytecodeInstruction) { ((BytecodeInstruction)((BytecodeSequence)code).getInstructions().get(0)).visit(mv); } else { visitStdMethod(node, isConstructor, parameters, code); } mv.visitMaxs(0, 0); } mv.visitEnd(); }

Target:
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { controller.resetLineNumber(); Parameter[] parameters = node.getParameters(); String methodType = BytecodeHelper.getMethodDescriptor(node.getReturnType(), parameters); String signature = BytecodeHelper.getGenericsMethodSignature(node); int modifiers = node.getModifiers(); if (isVargs(node.getParameters())) modifiers |= Opcodes.ACC_VARARGS; MethodVisitor mv = cv.visitMethod(modifiers, node.getName(), methodType, signature, buildExceptions(node.getExceptions())); controller.setMethodVisitor(mv); visitAnnotations(node, mv); for (int i = 0; i < parameters.length; i++) { visitParameterAnnotations(parameters[i], i, mv); } if (controller.getClassNode().isAnnotationDefinition() && !node.isStaticConstructor()) { visitAnnotationDefault(node, mv); } else if (!node.isAbstract()) { Statement code = node.getCode(); mv.visitCode(); if (code instanceof BytecodeSequence && ((BytecodeSequence)code).getInstructions().size() == 1 && ((BytecodeSequence)code).getInstructions().get(0) instanceof BytecodeInstruction) { ((BytecodeInstruction)((BytecodeSequence)code).getInstructions().get(0)).visit(mv); } else { visitStdMethod(node, isConstructor, parameters, code); } mv.visitMaxs(0, 0); } mv.visitEnd(); }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_playlist, container, false); unbinder = ButterKnife.bind(this, root); playListAdapter = new PlayListAdapter(); playlistListView.setAdapter(playListAdapter); playlistListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { int playlistId = playlists.get(playlistsBar.getSelectedPlaylistType()).getPlaylistId(); Player.Open action = new Player.Open(Player.Open.TYPE_PLAYLIST, playlistId, position); action.execute(hostManager.getConnection(), defaultStringActionCallback, callbackHandler); } }); playlistsBar.setOnPlaylistSelectedListener(new PlaylistsBar.OnPlaylistSelectedListener() { @Override public void onPlaylistSelected(String playlistType) { userSelectedTab = true; displayPlaylist(); PlaylistHolder playlistHolder = playlists.get(playlistType); if ( playlistHolder != null) { refreshPlaylist(playlistHolder.getPlaylistResult.type, playlistHolder.index, playlistHolder.top); } } @Override public void onPlaylistDeselected(String playlistType) { View v = playlistListView.getChildAt(0); int top = (v == null) ? 0 : (v.getTop() - playlistListView.getPaddingTop()); PlaylistHolder playlistHolder = playlists.get(playlistType); if (playlistHolder != null) playlistHolder.setListViewPosition(playlistListView.getFirstVisiblePosition(), top); } }); return root; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_playlist, container, false); unbinder = ButterKnife.bind(this, root); playListAdapter = new PlayListAdapter(); playlistListView.setAdapter(playListAdapter); playlistListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { int playlistId = playlists.get(playlistsBar.getSelectedPlaylistType()).getPlaylistId(); Player.Open action = new Player.Open(Player.Open.TYPE_PLAYLIST, playlistId, position); action.execute(hostManager.getConnection(), defaultStringActionCallback, callbackHandler); } }); playlistsBar.setOnPlaylistSelectedListener(new PlaylistsBar.OnPlaylistSelectedListener() { @Override public void onPlaylistSelected(String playlistType) { userSelectedTab = true; displayPlaylist(); } @Override public void onPlaylistDeselected(String playlistType) { View v = playlistListView.getChildAt(0); int top = (v == null) ? 0 : (v.getTop() - playlistListView.getPaddingTop()); PlaylistHolder playlistHolder = playlists.get(playlistType); if (playlistHolder != null) playlistHolder.setListViewPosition(playlistListView.getFirstVisiblePosition(), top); } }); return root; }
Source:
public SerialNumberPolicyWidget(EventBus eventBus) { serialNumberPolicy = new EnumRadioEditor<SerialNumberPolicy>(SerialNumberPolicy.class, eventBus); serialNumberPolicy.addValueChangeHandler(this); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); driver.initialize(this); ViewIdHandler.idHandler.generateAndSetIds(this); serialNumberPolicy.asWidget().addStyleName(style.serialNumberPolicy()); }

Target:
public SerialNumberPolicyWidget(EventBus eventBus) { serialNumberPolicy = new EnumRadioEditor<SerialNumberPolicy>(SerialNumberPolicy.class, eventBus); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); driver.initialize(this); ViewIdHandler.idHandler.generateAndSetIds(this); serialNumberPolicy.asWidget().addStyleName(style.serialNumberPolicy()); }
Source:
public final Maybe<T> defaultIfEmpty(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "item is null"); return switchIfEmpty(Single.just(defaultItem)); }

Target:
public final Maybe<T> defaultIfEmpty(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "item is null"); return switchIfEmpty(just(defaultItem)); }
Source:
protected void computeWithClause(List<SqlHandler<?>> handlers) throws OseeCoreException { if (OptionsUtil.isHistorical(getOptions())) { if (queryType != QueryType.COUNT) { for (SqlHandler<?> handler : handlers) { if (handler instanceof ArtifactGuidSqlHandler) { ArtifactGuidSqlHandler theHandler = (ArtifactGuidSqlHandler) handler; theHandler.addWith(this, branchId); } else if (handler instanceof AttributeTypeExistsSqlHandler) { AttributeTypeExistsSqlHandler theHandler = (AttributeTypeExistsSqlHandler) handler; theHandler.addWith(this, branchId); } else if (handler instanceof RelatedToSqlHandler) { RelatedToSqlHandler theHandler = (RelatedToSqlHandler) handler; theHandler.addWith(this, branchId); } } } } super.computeWithClause(handlers); }

Target:
protected void computeWithClause(List<SqlHandler<?>> handlers) throws OseeCoreException { if (OptionsUtil.isHistorical(getOptions())) { if (queryType != QueryType.COUNT) { for (SqlHandler<?> handler : handlers) { handler.addWithTables(this, branchId); } } } super.computeWithClause(handlers); }
Source:
List<?> convertListItems(List<?> unconvertedValues) { return unconvertedValues.stream().map(this::convertSingle).collect(toList()); }

Target:
private List<?> convertListItems(List<?> unconvertedValues) { return unconvertedValues.stream().map(this::convertSingle).collect(toList()); }
Source:
public <T> Query<T> mapTo(Class<T> resultType) { return this.mapTo(resultType); }

Target:
public <T> Query<T> mapTo(Class<T> resultType) { return this.mapTo((Type) resultType); }
Source:
public String describeFirstNonRequestableCapability() { if (hasCapability(NET_CAPABILITY_VALIDATED)) return "NET_CAPABILITY_VALIDATED"; if (hasCapability(NET_CAPABILITY_CAPTIVE_PORTAL)) return "NET_CAPABILITY_CAPTIVE_PORTAL"; if (hasCapability(NET_CAPABILITY_FOREGROUND)) return "NET_CAPABILITY_FOREGROUND"; if (hasCapability(NET_CAPABILITY_UNCONGESTED)) return "NET_CAPABILITY_UNCONGESTED"; if ((mNetworkCapabilities & NON_REQUESTABLE_CAPABILITIES) != 0) { return "unknown non-requestable capabilities " + Long.toHexString(mNetworkCapabilities); } if (mLinkUpBandwidthKbps != 0 || mLinkDownBandwidthKbps != 0) return "link bandwidth"; if (hasSignalStrength()) return "signalStrength"; return null; }

Target:
public String describeFirstNonRequestableCapability() { final long nonRequestable = (mNetworkCapabilities & NON_REQUESTABLE_CAPABILITIES); if (nonRequestable != 0) { return capabilityNameOf(BitUtils.unpackBits(nonRequestable)[0]); } if (mLinkUpBandwidthKbps != 0 || mLinkDownBandwidthKbps != 0) return "link bandwidth"; if (hasSignalStrength()) return "signalStrength"; return null; }
Source:
private void setDefaults() { IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore(); final boolean enabled = store.getBoolean(IGdbDebugPreferenceConstants.PREF_CONSOLE_INVERTED_COLORS); final int bufferLines = store.getInt(IGdbDebugPreferenceConstants.PREF_CONSOLE_BUFFERLINES); Display.getDefault().asyncExec(() -> { getInputStream().setColor(Display.getDefault().getSystemColor(SWT.COLOR_GREEN)); fErrorStream.setColor(Display.getDefault().getSystemColor(SWT.COLOR_RED)); setInvertedColors(enabled); setBufferLineLimit(bufferLines); }); }

Target:
private void setDefaults() { IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(IGdbDebugPreferenceConstants.PREF_CONSOLE_INVERTED_COLORS); int bufferLines = store.getInt(IGdbDebugPreferenceConstants.PREF_CONSOLE_BUFFERLINES); Display.getDefault().asyncExec(() -> { getInputStream().setColor(Display.getDefault().getSystemColor(SWT.COLOR_GREEN)); fErrorStream.setColor(Display.getDefault().getSystemColor(SWT.COLOR_RED)); setInvertedColors(enabled); setBufferLineLimit(bufferLines); }); }
Source:
public void delete(GoogleComputeInstanceTemplate template, Collection<String> instanceIds) throws InterruptedException { for (String currentId : instanceIds) { Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeProviderConfigurationProperty.ZONE); String decoratedInstanceName = decorateInstanceName(template, currentId); try { compute.instances().delete(projectId, zone, decoratedInstanceName).execute(); } catch (IOException e) { e.printStackTrace(); } } }

Target:
public void delete(GoogleComputeInstanceTemplate template, Collection<String> instanceIds) throws InterruptedException { for (String currentId : instanceIds) { Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeInstanceTemplateConfigurationProperty.ZONE); String decoratedInstanceName = decorateInstanceName(template, currentId); try { compute.instances().delete(projectId, zone, decoratedInstanceName).execute(); } catch (IOException e) { throw new RuntimeException(e); } } }
Source:
public void customize(Connector connector, HttpConfiguration config, Request request) { HttpFields httpFields = request.getHttpFields(); Forwarded forwarded = new Forwarded(request, config); try { for (HttpField field : httpFields) { try { MethodHandle handle = _handles.get(field.getName()); if (handle != null) handle.invoke(forwarded, field); } catch (Throwable t) { onError(field, t); } } } catch (Throwable e) { throw new RuntimeException(e); } if (forwarded._proto != null) { request.setScheme(forwarded._proto); if (forwarded._proto.equalsIgnoreCase(config.getSecureScheme())) request.setSecure(true); } if (forwarded._server != null && forwarded._host instanceof PortSetHostPort) { httpFields.put(new HostPortHttpField(forwarded._server, forwarded._host.getPort())); request.setAuthority(forwarded._server, forwarded._host.getPort()); } else if (forwarded._host != null) { httpFields.put(new HostPortHttpField(forwarded._host)); request.setAuthority(forwarded._host.getHost(), forwarded._host.getPort()); } else if (forwarded._server != null) { httpFields.put(new HostPortHttpField(forwarded._server)); request.setAuthority(forwarded._server, 0); } if (forwarded._for != null) { int port = forwarded._for.getPort() > 0 ? forwarded._for.getPort() : request.getRemotePort(); request.setRemoteAddr(InetSocketAddress.createUnresolved(forwarded._for.getHost(), port)); } }

Target:
public void customize(Connector connector, HttpConfiguration config, Request request) { HttpFields httpFields = request.getHttpFields(); Forwarded forwarded = new Forwarded(request, config); for (HttpField field : httpFields) { try { MethodHandle handle = _handles.get(field.getName()); if (handle != null) handle.invoke(forwarded, field); } catch (Throwable t) { onError(field, t); } } if (forwarded._proto != null) { request.setScheme(forwarded._proto); if (forwarded._proto.equalsIgnoreCase(config.getSecureScheme())) request.setSecure(true); } if (forwarded._server != null && forwarded._host instanceof PortSetHostPort) { httpFields.put(new HostPortHttpField(forwarded._server, forwarded._host.getPort())); request.setAuthority(forwarded._server, forwarded._host.getPort()); } else if (forwarded._host != null) { httpFields.put(new HostPortHttpField(forwarded._host)); request.setAuthority(forwarded._host.getHost(), forwarded._host.getPort()); } else if (forwarded._server != null) { httpFields.put(new HostPortHttpField(forwarded._server)); request.setAuthority(forwarded._server, 0); } if (forwarded._for != null) { int port = forwarded._for.getPort() > 0 ? forwarded._for.getPort() : request.getRemotePort(); request.setRemoteAddr(InetSocketAddress.createUnresolved(forwarded._for.getHost(), port)); } }
Source:
protected StorageDomain getEntityObject(StorageDomain object) { if (object instanceof StorageDomain){ return object; } else { return null; } }

Target:
protected StorageDomain getEntityObject(StorageDomain object) { return object; }
Source:
private void checkAnnotationIndentation(DetailAST atNode, NavigableMap<Integer, DetailAST> firstNodesOnLines, int indentLevel) { final int firstNodeIndent = getLineStart(atNode); final int currentIndent = firstNodeIndent + indentLevel; final Collection<DetailAST> values = firstNodesOnLines.values(); final DetailAST lastAnnotationNode = atNode.getParent().getLastChild(); final int lastAnnotationLine = lastAnnotationNode.getLineNo(); final Iterator<DetailAST> itr = values.iterator(); while (firstNodesOnLines.size() > 1) { final DetailAST node = itr.next(); final DetailAST parentNode = node.getParent(); final boolean isCurrentNodeCloseAnnotationAloneInLine = node.getLineNo() == lastAnnotationLine && isEndOfScope(lastAnnotationNode, node); if (isCurrentNodeCloseAnnotationAloneInLine || node.getType() == TokenTypes.AT && (parentNode.getParent().getType() == TokenTypes.MODIFIERS || parentNode.getParent().getType() == TokenTypes.ANNOTATIONS) || parentNode.getType() == TokenTypes.MODIFIERS) { logWarningMessage(node, firstNodeIndent); } else { logWarningMessage(node, currentIndent); } itr.remove(); } }

Target:
private void checkAnnotationIndentation(DetailAST atNode, NavigableMap<Integer, DetailAST> firstNodesOnLines, int indentLevel) { final int firstNodeIndent = getLineStart(atNode); final int currentIndent = firstNodeIndent + indentLevel; final Collection<DetailAST> values = firstNodesOnLines.values(); final DetailAST lastAnnotationNode = atNode.getParent().getLastChild(); final int lastAnnotationLine = lastAnnotationNode.getLineNo(); final Iterator<DetailAST> itr = values.iterator(); while (firstNodesOnLines.size() > 1) { final DetailAST node = itr.next(); final DetailAST parentNode = node.getParent(); final boolean isCurrentNodeCloseAnnotationAloneInLine = node.getLineNo() == lastAnnotationLine && isEndOfScope(lastAnnotationNode, node); if (isCurrentNodeCloseAnnotationAloneInLine || node.getType() == TokenTypes.AT && (parentNode.getParent().getType() == TokenTypes.MODIFIERS || parentNode.getParent().getType() == TokenTypes.ANNOTATIONS) || node.getLineNo() == atNode.getLineNo()) { logWarningMessage(node, firstNodeIndent); } else { logWarningMessage(node, currentIndent); } itr.remove(); } }
Source:
private List<FeedbackResultsResponseTable> createResponseTables( FeedbackQuestionAttributes question, List<FeedbackResponseAttributes> responsesBundle) { List<FeedbackResultsResponseTable> responseTables = new ArrayList<FeedbackResultsResponseTable>(); List<String> recipients = new ArrayList<String>(); for (FeedbackResponseAttributes singleResponse : responsesBundle) { if (!recipients.contains(singleResponse.recipient)) { recipients.add(singleResponse.recipient); } } for (String recipient : recipients) { List<FeedbackResponseAttributes> responsesForRecipient = filterResponsesByRecipientEmail(recipient, responsesBundle); boolean isUserRecipient = student.email.equals(recipient); boolean isUserTeamRecipient = (question.recipientType == FeedbackParticipantType.TEAMS || question.recipientType == FeedbackParticipantType.CUSTOM && question.isFeedbackPathsRecipientTypeTeams()) && student.team.equals(recipient); String recipientName; if (isUserRecipient) { recipientName = "You"; } else if (isUserTeamRecipient) { recipientName = String.format("Your Team (%s)", bundle.getNameForEmail(recipient)); } else { recipientName = bundle.getNameForEmail(recipient); } responseTables.add(createResponseTable(question, responsesForRecipient, recipientName)); } return responseTables; }

Target:
private List<FeedbackResultsResponseTable> createResponseTables( FeedbackQuestionAttributes question, List<FeedbackResponseAttributes> responsesBundle) { List<FeedbackResultsResponseTable> responseTables = new ArrayList<FeedbackResultsResponseTable>(); List<String> recipients = new ArrayList<String>(); for (FeedbackResponseAttributes singleResponse : responsesBundle) { if (!recipients.contains(singleResponse.recipient)) { recipients.add(singleResponse.recipient); } } for (String recipient : recipients) { List<FeedbackResponseAttributes> responsesForRecipient = filterResponsesByRecipientEmail(recipient, responsesBundle); boolean isUserRecipient = student.email.equals(recipient); boolean isUserTeamRecipient = question.isRecipientATeam() && student.team.equals(recipient); String recipientName; if (isUserRecipient) { recipientName = "You"; } else if (isUserTeamRecipient) { recipientName = String.format("Your Team (%s)", bundle.getNameForEmail(recipient)); } else { recipientName = bundle.getNameForEmail(recipient); } responseTables.add(createResponseTable(question, responsesForRecipient, recipientName)); } return responseTables; }
Source:
static ParquetMetadata readSummaryMetadata(Configuration configuration, Path basePath, boolean skipRowGroups) throws IOException { Path metadataFile = new Path(basePath, PARQUET_METADATA_FILE); Path commonMetaDataFile = new Path(basePath, PARQUET_COMMON_METADATA_FILE); FileSystem fileSystem = basePath.getFileSystem(configuration); if (skipRowGroups && fileSystem.exists(commonMetaDataFile)) { if (Log.INFO) { LOG.info("reading summary file: " + commonMetaDataFile); } return readFooter(configuration, commonMetaDataFile, filter(skipRowGroups)); } else if (fileSystem.exists(metadataFile)) { if (Log.INFO) { LOG.info("reading summary file: " + metadataFile); } return readFooter(configuration, metadataFile, filter(skipRowGroups)); } else { return null; } }

Target:
static ParquetMetadata readSummaryMetadata(Configuration configuration, Path basePath, boolean skipRowGroups) throws IOException { Path metadataFile = new Path(basePath, PARQUET_METADATA_FILE); Path commonMetaDataFile = new Path(basePath, PARQUET_COMMON_METADATA_FILE); FileSystem fileSystem = basePath.getFileSystem(configuration); if (skipRowGroups && fileSystem.exists(commonMetaDataFile)) { if (Log.INFO) LOG.info("reading summary file: " + commonMetaDataFile); return readFooter(configuration, commonMetaDataFile, filter(skipRowGroups)); } else if (fileSystem.exists(metadataFile)) { if (Log.INFO) { LOG.info("reading summary file: " + metadataFile); } return readFooter(configuration, metadataFile, filter(skipRowGroups)); } else { return null; } }
Source:
public void setAttribute(String key, Object value) { if (!key.startsWith(__ASYNC_PREFIX)) super.setAttribute(key, value); switch (key) { case AsyncContext.ASYNC_REQUEST_URI: _requestURI = (String)value; break; case AsyncContext.ASYNC_CONTEXT_PATH: _contextPath = (String)value; break; case AsyncContext.ASYNC_SERVLET_PATH: _servletPath = (String)value; break; case AsyncContext.ASYNC_PATH_INFO: _pathInfo = (String)value; break; case AsyncContext.ASYNC_QUERY_STRING: _query = (String)value; break; default: super.setAttribute(key, value); } }

Target:
public void setAttribute(String key, Object value) { switch (key) { case AsyncContext.ASYNC_REQUEST_URI: _requestURI = (String)value; break; case AsyncContext.ASYNC_CONTEXT_PATH: _contextPath = (String)value; break; case AsyncContext.ASYNC_SERVLET_PATH: _servletPath = (String)value; break; case AsyncContext.ASYNC_PATH_INFO: _pathInfo = (String)value; break; case AsyncContext.ASYNC_QUERY_STRING: _queryString = (String)value; break; default: super.setAttribute(key, value); break; } }
Source:
void reset(int width, int height) { if (mAllocationOut != null) { mAllocationOut.setSurface(null); mAllocationOut.destroy(); } android.util.Log.v("cpa", "reset " + width + ", " + height); mHeight = height; mWidth = width; mScript.invoke_setSize(mWidth, mHeight); Type.Builder tb = new Type.Builder(mRS, Element.RGBA_8888(mRS)); tb.setX(mWidth); tb.setY(mHeight); Type t = tb.create(); mAllocationOut = Allocation.createTyped(mRS, t, Allocation.USAGE_SCRIPT | Allocation.USAGE_IO_OUTPUT); tb = new Type.Builder(mRS, Element.createPixel(mRS, Element.DataType.UNSIGNED_8, Element.DataKind.PIXEL_YUV)); tb.setX(mWidth); tb.setY(mHeight); tb.setYuvFormat(android.graphics.ImageFormat.NV21); mAllocationIn = Allocation.createTyped(mRS, tb.create(), Allocation.USAGE_SCRIPT); mYuv.setInput(mAllocationIn); setupSurface(); ScriptGroup.Builder b = new ScriptGroup.Builder(mRS); b.addKernel(mScript.getKernelID_root()); b.addKernel(mYuv.getKernelID()); b.addConnection(t, mYuv.getKernelID(), mScript.getKernelID_root()); mGroup = b.create(); }

Target:
void reset(int width, int height) { if (mAllocationOut != null) { mAllocationOut.destroy(); } android.util.Log.v("cpa", "reset " + width + ", " + height); mHeight = height; mWidth = width; mScript.invoke_setSize(mWidth, mHeight); Type.Builder tb = new Type.Builder(mRS, Element.RGBA_8888(mRS)); tb.setX(mWidth); tb.setY(mHeight); Type t = tb.create(); mAllocationOut = Allocation.createTyped(mRS, t, Allocation.USAGE_SCRIPT | Allocation.USAGE_IO_OUTPUT); tb = new Type.Builder(mRS, Element.createPixel(mRS, Element.DataType.UNSIGNED_8, Element.DataKind.PIXEL_YUV)); tb.setX(mWidth); tb.setY(mHeight); tb.setYuvFormat(android.graphics.ImageFormat.NV21); mAllocationIn = Allocation.createTyped(mRS, tb.create(), Allocation.USAGE_SCRIPT); mYuv.setInput(mAllocationIn); setupSurface(); ScriptGroup.Builder b = new ScriptGroup.Builder(mRS); b.addKernel(mScript.getKernelID_root()); b.addKernel(mYuv.getKernelID()); b.addConnection(t, mYuv.getKernelID(), mScript.getKernelID_root()); mGroup = b.create(); }
Source:
public void expungeCharge(Long id, String externalId) { entityManager.get() .createNativeQuery("delete from charge_events where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from tokens where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from emitted_events where resource_external_id = ?1 AND resource_type=PAYMENT") .setParameter(1, externalId) .executeUpdate(); entityManager.get() .createNativeQuery("delete from fees where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from charges where id = ?1") .setParameter(1, id) .executeUpdate(); }

Target:
public void expungeCharge(Long id, String externalId) { entityManager.get() .createNativeQuery("delete from charge_events where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from tokens where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from emitted_events where resource_type = ?1 AND resource_external_id = ?2") .setParameter(1, "PAYMENT") .setParameter(2, externalId) .executeUpdate(); entityManager.get() .createNativeQuery("delete from fees where charge_id = ?1") .setParameter(1, id) .executeUpdate(); entityManager.get() .createNativeQuery("delete from charges where id = ?1") .setParameter(1, id) .executeUpdate(); }
Source:
public void waitAllMarkersDisappear(String markerType) { elemDriverWait.until( (ExpectedCondition<Boolean>) driver -> driver.findElements(By.xpath(markerType)).size() == 0); }

Target:
public void waitAllMarkersDisappear(String markerType) { loaderDriverWait.until( (ExpectedCondition<Boolean>) driver -> driver.findElements(By.xpath(markerType)).size() == 0); }