auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testExtensionPoint() { List<MarkerSet> initial = MarkerConfigXmlParser.getMarkerSets(); assertTrue("No Marker Set should be loaded at this point", initial.isEmpty()); MarkerConfigXmlParser.initMarkerSets(); List<MarkerSet> loaded = MarkerConfigXmlParser.getMarkerSets(); assertEquals(1, loaded.size()); MarkerSet set = loaded.get(0); assertEquals("Wrong MarkerSet name", "Example", set.getName()); assertEquals("Wrong MarkerSet Id", "example.id", set.getId()); }

Target:
public void testExtensionPoint() { List<MarkerSet> markerSet = MarkerConfigXmlParser.getMarkerSets(); assertEquals("Extension point markers should be loaded", 1, markerSet.size()); MarkerSet set = markerSet.get(0); assertEquals("Wrong MarkerSet name", "Example", set.getName()); assertEquals("Wrong MarkerSet Id", "example.id", set.getId()); }
Source:
public void showBusy(boolean busy) { MPart model = getModel(); IEventBroker eventBroker = getEventBroker(model); if (eventBroker != null) { Map<String, Object> data = new HashMap<String, Object>(); data.put(UIEvents.EventTags.ELEMENT, model); data.put(UIEvents.EventTags.ATTNAME, UIEvents.UILabel.BUSY); data.put(UIEvents.EventTags.NEW_VALUE, busy); eventBroker.send(UIEvents.UILabel.TOPIC_BUSY, data); } }

Target:
public void showBusy(boolean busy) { UIEvents.publishEvent(createEvent(UIEvents.UILabel.TOPIC_BUSY) .withParam(UIEvents.EventTags.ELEMENT, getModel()) .withParam(UIEvents.EventTags.ATTNAME, UIEvents.UILifeCycle.BUSY) .withParam(UIEvents.EventTags.NEW_VALUE, busy)); }
Source:
public List<Role> findAllRoles() { Query query = entityManager.createNamedQuery("listAllRoles"); return query.getResultList(); }

Target:
public List<Role> findAllRoles() { JPAQuery query = new JPAQuery(entityManager); query.from(QRoleImpl.roleImpl).list(QRoleImpl.roleImpl); List<RoleImpl> result = query.list(QRoleImpl.roleImpl); return Lists.transform(result, new Function<RoleImpl, Role>() { @Override public Role apply(RoleImpl input) { return input; } }); }
Source:
public ImmutableSpongeCommandData(String storedCommand, int success, boolean tracks, Text lastOutput) { super(ImmutableCommandData.class); this.storedCommand = storedCommand; this.success = success; this.tracks = tracks; this.lastOutput = lastOutput; this.storedValue = new ImmutableSpongeValue<>(Keys.COMMAND, this.storedCommand); this.successValue = SpongeValueBuilder.boundedBuilder(Keys.SUCCESS_COUNT) .actualValue(this.success) .defaultValue(0) .minimum(0) .maximum(Integer.MAX_VALUE) .build() .asImmutable(); this.tracksValue = ImmutableSpongeValue.cachedOf(Keys.TRACKS_OUTPUT, this.tracks, false); this.lastOutputValue = new ImmutableSpongeOptionalValue<>(Keys.LAST_COMMAND_OUTPUT, Optional.ofNullable(this.lastOutput)); registerGetters(); }

Target:
public ImmutableSpongeCommandData(String storedCommand, int success, boolean tracks, Text lastOutput) { super(ImmutableCommandData.class); this.storedCommand = storedCommand; this.success = success; this.tracks = tracks; this.lastOutput = lastOutput; this.storedValue = new ImmutableSpongeValue<>(Keys.COMMAND, this.storedCommand); this.successValue = SpongeValueBuilder.boundedBuilder(Keys.SUCCESS_COUNT) .actualValue(this.success) .defaultValue(0) .minimum(0) .maximum(Integer.MAX_VALUE) .build() .asImmutable(); this.tracksValue = ImmutableSpongeValue.cachedOf(Keys.TRACKS_OUTPUT, false, this.tracks); this.lastOutputValue = new ImmutableSpongeOptionalValue<>(Keys.LAST_COMMAND_OUTPUT, Optional.ofNullable(this.lastOutput)); registerGetters(); }
Source:
private static String getExtension(String name) { int ext = name.lastIndexOf('.'); return 0 < ext ? name.substring(ext, name.length()) : ""; }

Target:
private static String getExtension(String name) { int ext = name.lastIndexOf('.'); return 0 < ext ? name.substring(ext) : ""; }
Source:
public Constraints clone() { if (myAnchor != null) { return new Constraints(myAnchor, relativeId); } if (direction != null) { return new Constraints(direction, relativeId); } return null; }

Target:
public Constraints clone() { if (myAnchor != null) { return new Constraints(myAnchor, relativeId); } else if (direction != null) { return new Constraints(direction, relativeId); } return null; }
Source:
private static void copyDirectory(final File source, final File target) throws IOException { Path sourcePath = source.toPath(); Path targetPath = target.toPath(); Files.walkFileTree(sourcePath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException { Files.createDirectories(targetPath.resolve(sourcePath .relativize(dir))); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { if (attrs.isSymbolicLink()) { Path symTarget = Files.readSymbolicLink(file); File symTargetFile = symTarget.toFile(); if (!symTargetFile.isAbsolute()) { if (file.getParent() != null) { symTarget = file.getParent().resolve(symTarget); } else { throw new IOException("Recursive symbolic link: " + file.toFile().getAbsolutePath() + "=>" + symTargetFile.getCanonicalPath() + "can't copy directory"); } } if (symTarget.toFile().getCanonicalFile().isDirectory()) { if (file.getParent().toFile().getCanonicalPath(). startsWith(symTarget.toFile().getCanonicalPath())) { throw new IOException("Recursive symbolic link: " + file.toFile().getAbsolutePath() + "=>" + symTarget.toFile().getCanonicalPath() + ". Can't copy directory"); } else { copyDirectory(symTarget.toFile(), targetPath.resolve(sourcePath .relativize(file)).toFile()); } return FileVisitResult.CONTINUE; } } Files.copy(file, targetPath.resolve(sourcePath.relativize(file))); return FileVisitResult.CONTINUE; } }); }

Target:
private static void copyDirectory(final File source, final File target) throws IOException { Path sourcePath = source.toPath(); Path targetPath = target.toPath(); Files.walkFileTree(sourcePath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException { Files.createDirectories(targetPath.resolve(sourcePath .relativize(dir))); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { if (attrs.isSymbolicLink()) { Path symTarget = Files.readSymbolicLink(file); File symTargetFile = symTarget.toFile(); if (!symTargetFile.isAbsolute()) { if (file.getParent() != null) { symTarget = file.getParent().resolve(symTarget); } else { throw new IOException("Recursive symbolic link: " + file.toFile().getAbsolutePath() + "=>" + symTargetFile.getCanonicalPath() + ". Can't copy directory"); } } if (symTarget.toFile().getCanonicalFile().isDirectory()) { if (file.getParent().toFile().getCanonicalPath(). startsWith(symTarget.toFile().getCanonicalPath())) { throw new IOException("Recursive symbolic link: " + file.toFile().getAbsolutePath() + "=>" + symTarget.toFile().getCanonicalPath() + ". Can't copy directory"); } else { copyDirectory(symTarget.toFile(), targetPath.resolve(sourcePath .relativize(file)).toFile()); } return FileVisitResult.CONTINUE; } } Files.copy(file, targetPath.resolve(sourcePath.relativize(file))); return FileVisitResult.CONTINUE; } }); }
Source:
public void glazedListDependencyVersionTest() { testPapyrusDependencies2("ca.odell.glazedlists", GLAZED_LIST_VERSION); }

Target:
public void glazedListDependencyVersionTest() { testPapyrusDependencies2("ca.odell.glazedlists", NATTABLE_VERSION); }
Source:
public SashLayout(final Composite host, MUIElement root) { this.root = root; this.host = host; host.addMouseTrackListener(MouseTrackListener.mouseExitAdapter(e -> { host.setCursor(null); lastCursor = null; })); host.addMouseMoveListener(e -> { if (!draggingSashes) { List<SashRect> sashList = getSashRects(e.x, e.y); final int newCursor; if (sashList.isEmpty()) { newCursor = SWT.CURSOR_ARROW; } else if (sashList.size() == 1) { if (sashList.get(0).container.isHorizontal()) newCursor = SWT.CURSOR_SIZEWE; else newCursor = SWT.CURSOR_SIZENS; } else { newCursor = SWT.CURSOR_SIZEALL; } if (lastCursor == null || lastCursor != newCursor) { host.setCursor(host.getDisplay().getSystemCursor(newCursor)); } } else { try { layoutUpdateInProgress = true; adjustWeights(sashesToDrag, e.x, e.y); try { host.setRedraw(false); host.layout(); } finally { host.setRedraw(true); } host.update(); } finally { layoutUpdateInProgress = false; } } }); host.addMouseListener(new MouseAdapter() { @Override public void mouseUp(MouseEvent e) { host.setCapture(false); draggingSashes = false; } @Override public void mouseDown(MouseEvent e) { if (e.button != 1) { return; } sashesToDrag = getSashRects(e.x, e.y); if (sashesToDrag.size() > 0) { draggingSashes = true; host.setCapture(true); } } }); }

Target:
public SashLayout(final Composite host, MUIElement root) { this.root = root; this.host = host; host.addMouseTrackListener(MouseTrackListener.mouseExitAdapter(e -> { host.setCursor(null); lastCursor = null; })); host.addMouseMoveListener(e -> { if (!draggingSashes) { List<SashRect> sashList = getSashRects(e.x, e.y); final int newCursor; if (sashList.isEmpty()) { newCursor = SWT.CURSOR_ARROW; } else if (sashList.size() == 1) { if (sashList.get(0).container.isHorizontal()) newCursor = SWT.CURSOR_SIZEWE; else newCursor = SWT.CURSOR_SIZENS; } else { newCursor = SWT.CURSOR_SIZEALL; } if (lastCursor == null || lastCursor != newCursor) { host.setCursor(host.getDisplay().getSystemCursor(newCursor)); lastCursor = newCursor; } } else { try { layoutUpdateInProgress = true; adjustWeights(sashesToDrag, e.x, e.y); try { host.setRedraw(false); host.layout(); } finally { host.setRedraw(true); } host.update(); } finally { layoutUpdateInProgress = false; } } }); host.addMouseListener(new MouseAdapter() { @Override public void mouseUp(MouseEvent e) { host.setCapture(false); draggingSashes = false; } @Override public void mouseDown(MouseEvent e) { if (e.button != 1) { return; } sashesToDrag = getSashRects(e.x, e.y); if (sashesToDrag.size() > 0) { draggingSashes = true; host.setCapture(true); } } }); }
Source:
private void initToolTips() { numberOfCoresTooltip.setHtml(templates.numOfCoresTooltipBasicDetails()); }

Target:
private void initToolTips() { numberOfCoresTooltip.setHtml(templates.numOfCpuCoresTooltip()); }
Source:
public void respondOk_whenCreateMandateRequest(CreateMandateRequestParams params) { setupCreateAgreement(params.getGatewayAccountId(), aResponse() .withStatus(CREATED_201) .withHeader(CONTENT_TYPE, APPLICATION_JSON) .withHeader(LOCATION, format("/v1/api/accounts/%s/mandates/%s", params.getGatewayAccountId(), params.getMandateId())) .withBody(buildCreateAgreementResponse( params.getMandateId(), params.getProviderId(), params.getServiceReference(), params.getReturnUrl(), params.getCreatedDate(), params.getState(), params.getDescription(), validGetLink(mandateLocation(params.getGatewayAccountId(), params.getMandateId()), "self"), validGetLink(nextUrl(params.getChargeTokenId()), "next_url"), validPostLink(nextUrlPost(), "next_url_post", "application/x-www-form-urlencoded", Map.of("chargeTokenId", params.getChargeTokenId()) ))) ); }

Target:
public void respondOk_whenCreateMandateRequest(CreateMandateRequestParams params) { setupCreateMandate(params.getGatewayAccountId(), aResponse() .withStatus(CREATED_201) .withHeader(CONTENT_TYPE, APPLICATION_JSON) .withHeader(LOCATION, format("/v1/api/accounts/%s/mandates/%s", params.getGatewayAccountId(), params.getMandateId())) .withBody(buildCreateMandateResponse( params.getMandateId(), params.getProviderId(), params.getServiceReference(), params.getReturnUrl(), params.getCreatedDate(), params.getState(), params.getDescription(), validGetLink(mandateLocation(params.getGatewayAccountId(), params.getMandateId()), "self"), validGetLink(nextUrl(params.getChargeTokenId()), "next_url"), validPostLink(nextUrlPost(), "next_url_post", "application/x-www-form-urlencoded", Map.of("chargeTokenId", params.getChargeTokenId()) ))) ); }
Source:
protected List<KetchReplica> createReplicas(KetchLeader leader, Repository repo) throws URISyntaxException { List<KetchReplica> remotes = new ArrayList<>(); Config cfg = repo.getConfig(); String localName = getLocalName(cfg); for (String name : cfg.getSubsections(CONFIG_KEY_REMOTE)) { ReplicaConfig kc = new ReplicaConfig().fromConfig(cfg, name); if (kc.getType() == NONE) { continue; } if (name.equals(localName)) { remotes.add(new LocalReplica(leader, name, kc)); continue; } RemoteConfig rc = new RemoteConfig(cfg, name); List<URIish> uris = rc.getPushURIs(); if (uris.isEmpty()) { uris = rc.getURIs(); } for (URIish uri : uris) { String n = uris.size() == 1 ? name : uri.getHost(); remotes.add(new RemoteGitReplica(leader, n, uri, kc, rc)); } } return remotes; }

Target:
protected List<KetchReplica> createReplicas(KetchLeader leader, Repository repo) throws URISyntaxException { List<KetchReplica> replicas = new ArrayList<>(); Config cfg = repo.getConfig(); String localName = getLocalName(cfg); for (String name : cfg.getSubsections(CONFIG_KEY_REMOTE)) { if (!hasParticipation(cfg, name)) { continue; } ReplicaConfig kc = ReplicaConfig.newFromConfig(cfg, name); if (name.equals(localName)) { replicas.add(new LocalReplica(leader, name, kc)); continue; } RemoteConfig rc = new RemoteConfig(cfg, name); List<URIish> uris = rc.getPushURIs(); if (uris.isEmpty()) { uris = rc.getURIs(); } for (URIish uri : uris) { String n = uris.size() == 1 ? name : uri.getHost(); replicas.add(new RemoteGitReplica(leader, n, uri, kc, rc)); } } return replicas; }
Source:
public static Stereotype getViewpointStereotype(Project project) { Profile profile = StereotypesHelper.getAllProfiles(project).stream().filter (x -> (MDKConstants.SYSML_PROFILE_LOCAL_ID).equals(x.getLocalID())) .findFirst() .orElse(null); if (profile == null) { return null; } return StereotypesHelper.getStereotype(project, "Viewpoint", profile); }

Target:
public static Stereotype getViewpointStereotype(Project project) { Profile profile = StereotypesHelper.getAllProfiles(project).stream().filter ( x -> MDKConstants.SYSML_PROFILE_ID.equals(Converters.getElementToIdConverter().apply(x))) .findAny() .orElse(null); if (profile == null) { return null; } return StereotypesHelper.getStereotype(project, "Viewpoint", profile); }
Source:
private int createPermanentFunction(Hive db, CreateFunctionDesc createFunctionDesc) throws HiveException, IOException { String[] qualifiedNameParts = FunctionUtils.getQualifiedFunctionNameParts( createFunctionDesc.getFunctionName()); String dbName = qualifiedNameParts[0]; String funcName = qualifiedNameParts[1]; String registeredName = FunctionUtils.qualifyFunctionName(funcName, dbName); String className = createFunctionDesc.getClassName(); List<ResourceUri> resources = createFunctionDesc.getResources(); checkLocalFunctionResources(db, createFunctionDesc.getResources()); FunctionInfo registered = null; HiveConf oldConf = SessionState.get().getConf(); try { SessionState.get().setConf(conf); registered = FunctionRegistry.registerPermanentFunction( registeredName, className, true, toFunctionResource(resources)); } catch (RuntimeException ex) { Throwable t = ex; while (t.getCause() != null) { t = t.getCause(); } } finally { SessionState.get().setConf(oldConf); } if (registered == null) { console.printError("Failed to register " + registeredName + " using class " + createFunctionDesc.getClassName()); return 1; } Function func = new Function( funcName, dbName, className, SessionState.get().getUserName(), PrincipalType.USER, (int) (System.currentTimeMillis() / 1000), org.apache.hadoop.hive.metastore.api.FunctionType.JAVA, resources ); try { db.createFunction(func); } catch (HiveException he) { FunctionRegistry.unregisterPermanentFunction(registeredName); throw he; } return 0; }

Target:
private int createPermanentFunction(Hive db, CreateFunctionDesc createFunctionDesc) throws HiveException, IOException { String[] qualifiedNameParts = FunctionUtils.getQualifiedFunctionNameParts( createFunctionDesc.getFunctionName()); String dbName = qualifiedNameParts[0]; String funcName = qualifiedNameParts[1]; String registeredName = FunctionUtils.qualifyFunctionName(funcName, dbName); String className = createFunctionDesc.getClassName(); List<ResourceUri> resources = createFunctionDesc.getResources(); checkLocalFunctionResources(db, createFunctionDesc.getResources()); FunctionInfo registered = null; HiveConf oldConf = SessionState.get().getConf(); try { SessionState.get().setConf(conf); registered = FunctionRegistry.registerPermanentFunction( registeredName, className, true, toFunctionResource(resources)); } catch (RuntimeException ex) { Throwable t = ex; while (t.getCause() != null) { t = t.getCause(); } } finally { SessionState.get().setConf(oldConf); } if (registered == null) { console.printError("Failed to register " + registeredName + " using class " + createFunctionDesc.getClassName()); return 1; } Function func = new Function( funcName, dbName, className, SessionState.get().getUserName(), PrincipalType.USER, (int) (System.currentTimeMillis() / 1000), org.apache.hadoop.hive.metastore.api.FunctionType.JAVA, resources ); try { db.createFunction(func); } catch (Exception e) { FunctionRegistry.unregisterPermanentFunction(registeredName); setException(e); LOG.error("Failed to add function " + createFunctionDesc.getFunctionName() + " to the metastore.", e); return 1; } return 0; }
Source:
public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { if (aTarget instanceof RepositoryGroupNode) { return handleRepositoryGroupNodeDrop((RepositoryGroupNode) aTarget, aDropTargetEvent); } else if (aTarget instanceof IWorkspaceRoot) { return handleWOrkspaceRootDrop(aDropTargetEvent); } String[] data = (String[]) aDropTargetEvent.data; for (String folder : data) { File repoFile = new File(folder); if (FileKey.isGitRepository(repoFile, FS.DETECTED)) Activator.getDefault().getRepositoryUtil() .addConfiguredRepository(repoFile); else if (!repoFile.getName().equals(Constants.DOT_GIT)) { File dotgitfile = new File(repoFile, Constants.DOT_GIT); if (FileKey.isGitRepository(dotgitfile, FS.DETECTED)) Activator.getDefault().getRepositoryUtil() .addConfiguredRepository(dotgitfile); } } return Status.OK_STATUS; }

Target:
public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { if (aTarget instanceof RepositoryGroupNode) { return handleRepositoryGroupNodeDrop((RepositoryGroupNode) aTarget, aDropTargetEvent); } else if (aTarget instanceof IWorkspaceRoot) { return handleWorkspaceRootDrop(aDropTargetEvent); } String[] data = (String[]) aDropTargetEvent.data; for (String folder : data) { File repoFile = new File(folder); if (FileKey.isGitRepository(repoFile, FS.DETECTED)) Activator.getDefault().getRepositoryUtil() .addConfiguredRepository(repoFile); else if (!repoFile.getName().equals(Constants.DOT_GIT)) { File dotgitfile = new File(repoFile, Constants.DOT_GIT); if (FileKey.isGitRepository(dotgitfile, FS.DETECTED)) Activator.getDefault().getRepositoryUtil() .addConfiguredRepository(dotgitfile); } } return Status.OK_STATUS; }
Source:
public static String getSAPVersion(String camelVersion) { switch (camelVersion) { case CAMEL_2_15_1_REDHAT_621084: return SAP_621_REDHAT_084; case CAMEL_2_15_1_REDHAT_621117: return SAP_621_REDHAT_117; case CAMEL_2_15_1_REDHAT_621159: return SAP_621_REDHAT_159; case CAMEL_2_15_1_REDHAT_621169: return SAP_621_REDHAT_169; case CAMEL_2_15_1_REDHAT_621186: return SAP_621_REDHAT_186; case CAMEL_2_17_0_REDHAT_630187: return SAP_630_REDHAT_187; case CAMEL_2_17_0_REDHAT_630224: return SAP_630_REDHAT_224; case CAMEL_2_17_0_REDHAT_630254: return SAP_630_REDHAT_254; case CAMEL_2_17_0_REDHAT_630262: return SAP_630_REDHAT_262; default: if (camelVersion.startsWith("6.2.1")) { return SAP_621_REDHAT_LATEST; } return SAP_630_REDHAT_LATEST; } }

Target:
public static String getSAPVersion(String camelVersion) { switch (camelVersion) { case CAMEL_2_15_1_REDHAT_621084: return SAP_621_REDHAT_084; case CAMEL_2_15_1_REDHAT_621117: return SAP_621_REDHAT_117; case CAMEL_2_15_1_REDHAT_621159: return SAP_621_REDHAT_159; case CAMEL_2_15_1_REDHAT_621169: return SAP_621_REDHAT_169; case CAMEL_2_15_1_REDHAT_621186: return SAP_621_REDHAT_186; case CAMEL_2_17_0_REDHAT_630187: return SAP_630_REDHAT_187; case CAMEL_2_17_0_REDHAT_630224: return SAP_630_REDHAT_224; case CAMEL_2_17_0_REDHAT_630254: return SAP_630_REDHAT_254; case CAMEL_2_17_0_REDHAT_630262: return SAP_630_REDHAT_262; default: if (camelVersion.startsWith("2.15")) { return SAP_621_REDHAT_LATEST; } return SAP_630_REDHAT_LATEST; } }
Source:
public void reconnectPolicyDefault() throws ConfigurationException, MqttException, InterruptedException { MqttBrokerConnection a = new MqttBrokerConnection("123.123.123.123", null, false, "MqttBrokerConnectionTests"); assertTrue(a.getReconnectStrategy() instanceof PeriodicReconnectStrategy); AbstractReconnectStrategy p = a.getReconnectStrategy(); assertThat(p.getBrokerConnection(), equalTo(a)); }

Target:
public void reconnectPolicyDefault() throws ConfigurationException, MqttException, InterruptedException { MqttBrokerConnectionEx connection = new MqttBrokerConnectionEx("123.123.123.123", null, false, "MqttBrokerConnectionTests"); assertTrue(connection.getReconnectStrategy() instanceof PeriodicReconnectStrategy); AbstractReconnectStrategy p = connection.getReconnectStrategy(); assertThat(p.getBrokerConnection(), equalTo(connection)); }
Source:
private PlanNodeWithCost getJoinNodeWithCost(Context context, JoinNode possibleJoinNode) { TypeProvider types = context.getSymbolAllocator().getTypes(); StatsProvider stats = context.getStatsProvider(); boolean replicated = possibleJoinNode.getDistributionType().get().equals(REPLICATED); PlanNodeCostEstimate exchangesCost = exchangeCostCalculator.calculateJoinExchangeCost( possibleJoinNode.getLeft(), possibleJoinNode.getRight(), stats, types, replicated); PlanNodeCostEstimate inputCost = exchangeCostCalculator.calculateJoinInputCost( possibleJoinNode.getLeft(), possibleJoinNode.getRight(), stats, types, replicated); return new PlanNodeWithCost(exchangesCost.add(inputCost), possibleJoinNode); }

Target:
private PlanNodeWithCost getJoinNodeWithCost(Context context, JoinNode possibleJoinNode) { TypeProvider types = context.getSymbolAllocator().getTypes(); StatsProvider stats = context.getStatsProvider(); boolean replicated = possibleJoinNode.getDistributionType().get().equals(REPLICATED); int estimatedSourceDistributedTaskCount = taskCountEstimator.estimateSourceDistributedTaskCount(); PlanNodeCostEstimate exchangesCost = calculateJoinExchangeCost( possibleJoinNode.getLeft(), possibleJoinNode.getRight(), stats, types, replicated, estimatedSourceDistributedTaskCount); PlanNodeCostEstimate inputCost = calculateJoinInputCost( possibleJoinNode.getLeft(), possibleJoinNode.getRight(), stats, types, replicated, estimatedSourceDistributedTaskCount); return new PlanNodeWithCost(exchangesCost.add(inputCost), possibleJoinNode); }
Source:
public IndexedTable(DataSchema dataSchema, QueryContext queryContext, int trimSize, int trimThreshold) { super(dataSchema); List<ExpressionContext> groupByExpressions = queryContext.getGroupByExpressions(); assert groupByExpressions != null; _numKeyColumns = groupByExpressions.size(); _aggregationFunctions = queryContext.getAggregationFunctions(); List<OrderByExpressionContext> orderByExpressions = queryContext.getOrderByExpressions(); if (orderByExpressions != null) { _hasOrderBy = true; _tableResizer = new TableResizer(dataSchema, queryContext); _trimSize = trimSize; _trimThresholdForUpsert = Math.max(trimSize * 4, trimThreshold); _trimThresholdForFinish = trimSize * 4; } else { _hasOrderBy = false; _tableResizer = null; _trimSize = trimSize; _trimThresholdForUpsert = trimSize; _trimThresholdForFinish = trimSize; } }

Target:
protected IndexedTable(DataSchema dataSchema, QueryContext queryContext, int trimSize, int trimThreshold) { super(dataSchema); List<ExpressionContext> groupByExpressions = queryContext.getGroupByExpressions(); assert groupByExpressions != null; _numKeyColumns = groupByExpressions.size(); _aggregationFunctions = queryContext.getAggregationFunctions(); List<OrderByExpressionContext> orderByExpressions = queryContext.getOrderByExpressions(); if (orderByExpressions != null) { _hasOrderBy = true; _tableResizer = new TableResizer(dataSchema, queryContext); _trimSize = Math.min(trimSize, trimThreshold / 2); _trimThreshold = trimThreshold; } else { _hasOrderBy = false; _tableResizer = null; _trimSize = trimSize; _trimThreshold = trimSize; } }
Source:
public double[] getMzValues() { double[] result = null; byte[] bytesIn = new byte[getMzBinaryDataInfo().getEncodedLength()]; int precision = 0; EnumSet<MzMLBinaryDataInfo.MzMLCompressionType> compressions = EnumSet .noneOf(MzMLBinaryDataInfo.MzMLCompressionType.class); try { mappedByteBufferInputStream.setPosition(getMzBinaryDataInfo().getPosition()); XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); XMLEventReader xmlEventReader = xmlInputFactory.createXMLEventReader(mappedByteBufferInputStream); if (getMzBinaryDataInfo().getBitLength().toString().startsWith("THIRTY_TWO")) { precision = 32; } else if (getMzBinaryDataInfo().getBitLength().toString().startsWith("SIXTY_FOUR")) { precision = 64; } while (xmlEventReader.hasNext()) { XMLEvent xmlEvent = xmlEventReader.nextEvent(); if (xmlEvent.isStartElement()) { StartElement startElement = xmlEvent.asStartElement(); if (startElement.getName().getLocalPart().equals("binary") && xmlEventReader.hasNext()) { xmlEvent = xmlEventReader.nextEvent(); bytesIn = xmlEvent.asCharacters().getData().getBytes(); compressions.add(getMzBinaryDataInfo().getCompressionType()); result = MzMLPeaksDecoder.decode(bytesIn, getMzBinaryDataInfo().getArrayLength(), new Integer(precision), getMzBinaryDataInfo().getEncodedLength(), compressions).arr; break; } } } } catch (XMLStreamException e) { e.printStackTrace(); } catch (DataFormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (MSDKException e) { e.printStackTrace(); } return result; }

Target:
public double[] getMzValues() { double[] result = null; byte[] bytesIn = new byte[getMzBinaryDataInfo().getEncodedLength()]; Integer precision; EnumSet<MzMLBinaryDataInfo.MzMLCompressionType> compressions = EnumSet .noneOf(MzMLBinaryDataInfo.MzMLCompressionType.class); try { mappedByteBufferInputStream.setPosition(getMzBinaryDataInfo().getPosition()); switch (getMzBinaryDataInfo().getBitLength()) { case THIRTY_TWO_BIT_FLOAT: case THIRTY_TWO_BIT_INTEGER: precision = 32; break; case SIXTY_FOUR_BIT_FLOAT: case SIXTY_FOUR_BIT_INTEGER: precision = 64; break; default: precision = null; } mappedByteBufferInputStream.read(bytesIn, 0, getMzBinaryDataInfo().getEncodedLength()); compressions.add(getMzBinaryDataInfo().getCompressionType()); result = MzMLPeaksDecoder.decode(bytesIn, getMzBinaryDataInfo().getEncodedLength(), precision, getMzBinaryDataInfo().getArrayLength(), compressions).arr; } catch (Exception e) { e.printStackTrace(); } return result; }
Source:
public Bundle asBundle() { bundle.putString(JWT, jwt); return bundle; }

Target:
public Bundle asBundle() { return bundle; }
Source:
protected void internalRegisterService(ServiceInstance<T> service) throws Exception { byte[] bytes = serializer.serialize(service); String path = pathForInstance(service.getName(), service.getId()); final int MAX_TRIES = 2; boolean isDone = false; for ( int i = 0; !isDone && (i < MAX_TRIES); ++i ) { try { CreateMode mode; switch (service.getServiceType()){ case DYNAMIC: mode = CreateMode.EPHEMERAL; break; case DYNAMIC_SEQUENTIAL: mode = CreateMode.EPHEMERAL_SEQUENTIAL; break; default: mode = CreateMode.PERSISTENT; } client.create().creatingParentContainersIfNeeded().withMode(mode).forPath(path, bytes); isDone = true; } catch ( KeeperException.NodeExistsException e ) { client.delete().forPath(path); } } }

Target:
protected void internalRegisterService(ServiceInstance<T> service) throws Exception { byte[] bytes = serializer.serialize(service); String path = pathForInstance(service.getName(), service.getId()); final int MAX_TRIES = 2; boolean isDone = false; for ( int i = 0; !isDone && (i < MAX_TRIES); ++i ) { try { CreateMode mode; switch (service.getServiceType()) { case DYNAMIC: mode = CreateMode.EPHEMERAL; break; case DYNAMIC_SEQUENTIAL: mode = CreateMode.EPHEMERAL_SEQUENTIAL; break; default: mode = CreateMode.PERSISTENT; break; } client.create().creatingParentContainersIfNeeded().withMode(mode).forPath(path, bytes); isDone = true; } catch ( KeeperException.NodeExistsException e ) { client.delete().forPath(path); } } }
Source:
public File gitPrefix() throws IOException { String gitExe = scanPath(SystemReader.getInstance().getenv("PATH"), "git"); if (gitExe != null) return new File(gitExe).getAbsoluteFile().getParentFile() .getParentFile(); return super.gitPrefix(); }

Target:
public File gitPrefix() { File gitExe = searchPath(SystemReader.getInstance().getenv("PATH"), "git"); if (gitExe != null) return gitExe.getParentFile().getParentFile(); return super.gitPrefix(); }
Source:
private String getEditUrl(String page, String query) { return urlBuilder.appendQueryStringToURL( urlBuilder.getUrlForWikiPage(String.format("/wiki/%s", urlBuilder.normalizePageName(page))), query); }

Target:
private String getEditUrl(String page, String query) { return urlBuilder.appendQueryStringToURL( urlBuilder.getUrlForWikiPage(urlBuilder.normalizePageName(page)), query); }
Source:
protected Operand parseOperand() throws CommandLineException { skipWhitespaces(); if(pos == input.length()) { return null; } if(input.charAt(pos) == '(') { int depthCount = 0; int endIndex = pos; while(++endIndex < input.length()) { if(input.charAt(endIndex) == '(') { ++depthCount; } else if(input.charAt(endIndex) == ')') { if(depthCount == 0) { final Operation expr = parseExpression(input.substring(pos + 1, endIndex)); skipWhitespaces(); return expr; } else { --depthCount; } } else if (input.charAt(endIndex) == '"') { endIndex = input.indexOf('"', endIndex + 1); if (endIndex == -1) { throw new IllegalStateException(String.format("Unclosed parentheses starting at %d in '%s'", endIndex, input)); } } } throw new IllegalStateException("Failed to locate closing ')' for '(' at " + pos + " in '" + input + "'"); } final int start = pos; int end = pos; ComparisonOperation comparison = null; while(true) { if(pos == input.length()) { break; } final char ch = input.charAt(pos); if(Character.isWhitespace(ch)) { skipWhitespaces(); comparison = tryComparison(); break; } if(ch == '&' || ch == '|') { break; } comparison = tryComparison(); if(comparison != null) { break; } ++pos; ++end; } final String op = input.substring(start, end); Operand operand; if(comparison != null) { comparison.addOperand(new ModelNodePathOperand(op)); operand = comparison; comparison.addOperand(parseOperand()); } else { operand = new StringValueOperand(op); } return operand; }

Target:
protected Operand parseOperand() throws CommandLineException { skipWhitespaces(); if(pos == input.length()) { return null; } if(input.charAt(pos) == '(') { int depthCount = 0; int endIndex = pos; while(++endIndex < input.length()) { if(input.charAt(endIndex) == '(') { ++depthCount; } else if(input.charAt(endIndex) == ')') { if(depthCount == 0) { final Operation expr = parseExpression(input.substring(pos + 1, endIndex)); skipWhitespaces(); return expr; } else { --depthCount; } } else if (input.charAt(endIndex) == '"') { endIndex = traverseStringInQuotes(endIndex); } } throw new IllegalStateException("Failed to locate closing ')' for '(' at " + pos + " in '" + input + "'"); } final int start = pos; int end = pos; ComparisonOperation comparison = null; while(true) { if(pos == input.length()) { break; } final char ch = input.charAt(pos); if(Character.isWhitespace(ch)) { skipWhitespaces(); comparison = tryComparison(); break; } if(ch == '&' || ch == '|') { break; } comparison = tryComparison(); if(comparison != null) { break; } ++pos; ++end; } final String op = input.substring(start, end); Operand operand; if(comparison != null) { comparison.addOperand(new ModelNodePathOperand(op)); operand = comparison; comparison.addOperand(parseOperand()); } else { operand = new StringValueOperand(op); } return operand; }
Source:
protected void init() { spark1Condition = new MultiComponentCondition( new BasicExpression(SparkBatchConstant.SPARK_LOCAL_MODE_PARAMETER, EqualityOperator.EQ, "false"), BooleanOperator.AND, new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_1_6.getSparkVersion())); spark2Condition = new MultiComponentCondition( new BasicExpression(SparkBatchConstant.SPARK_LOCAL_MODE_PARAMETER, EqualityOperator.EQ, "false"), BooleanOperator.AND, new MultiComponentCondition( new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_2.getSparkVersion()), BooleanOperator.OR, new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_4.getSparkVersion()) )); }

Target:
protected void init() { spark2Condition = new MultiComponentCondition( new BasicExpression(SparkBatchConstant.SPARK_LOCAL_MODE_PARAMETER, EqualityOperator.EQ, "false"), BooleanOperator.AND, new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_4.getSparkVersion())); }
Source:
public ProfileEntry(final int id, final DateTime time, final double value) { this.id = id; this.time = time; final DecimalFormat df = new DecimalFormat("#.#####"); df.setRoundingMode(RoundingMode.HALF_UP); this.value = Double.parseDouble(df.format(value)); }

Target:
public ProfileEntry(final int id, final DateTime time, final double value) { this.id = id; this.time = time; this.value = this.roundValue(value); }
Source:
public void setup() throws Exception { profileInstances = spy(new ManagedInstanceStub<Profile>(profile1, profile2)); tested = new ClientProfileManager(definitionUtils, profileInstances); }

Target:
public void setup() { profileInstances = spy(new ManagedInstanceStub<>(profile1, profile2)); tested = new ClientProfileManager(definitionUtils, profileInstances); }
Source:
private static Supplier<QosIoExceptionHandler> createQosHandler(ClientConfiguration config) { return () -> new AsyncQosIoExceptionHandler(scheduledExecutorService, Executors.newSingleThreadExecutor(), new ExponentialBackoff(config.maxNumRetries(), config.backoffSlotSize(), new Random())); }

Target:
private static Supplier<QosIoExceptionHandler> createQosHandler(ClientConfiguration config) { return () -> new AsyncQosIoExceptionHandler(scheduledExecutorService, executorService, new ExponentialBackoff(config.maxNumRetries(), config.backoffSlotSize(), new Random())); }
Source:
private BooleanProperty torNetworkNodeShutDown() { final BooleanProperty done = new SimpleBooleanProperty(); if (executorService != null) { executorService.submit(() -> { Utilities.setThreadName("torNetworkNodeShutDown"); long ts = System.currentTimeMillis(); log.debug("Shutdown torNetworkNode"); try { if (tor == null) tor = Tor.getDefault(); if (tor != null) tor.shutdown(); log.debug("Shutdown torNetworkNode done after " + (System.currentTimeMillis() - ts) + " ms."); } catch (Throwable e) { log.error("Shutdown torNetworkNode failed with exception: " + e.getMessage()); e.printStackTrace(); } finally { UserThread.execute(() -> done.set(true)); } }); } else { done.set(true); } return done; }

Target:
private BooleanProperty torNetworkNodeShutDown() { final BooleanProperty done = new SimpleBooleanProperty(); if (executorService != null) { executorService.submit(() -> { Utilities.setThreadName("torNetworkNodeShutDown"); long ts = System.currentTimeMillis(); log.debug("Shutdown torNetworkNode"); try { tor = Tor.getDefault(); if (tor != null) tor.shutdown(); log.debug("Shutdown torNetworkNode done after " + (System.currentTimeMillis() - ts) + " ms."); } catch (Throwable e) { log.error("Shutdown torNetworkNode failed with exception: " + e.getMessage()); e.printStackTrace(); } finally { UserThread.execute(() -> done.set(true)); } }); } else { done.set(true); } return done; }
Source:
public synchronized void initTrace(@Nullable IResource resource, @Nullable String path, @Nullable Class<? extends ITmfEvent> type) throws TmfTraceException { if (path == null) { throw new TmfTraceException("No path has been specified."); } File f = new File(path); String absPath = f.getAbsolutePath(); if (absPath == null) { throw new TmfTraceException("No path has been specified."); } super.initTrace(resource, absPath, type); try { fPcapFile = new PcapFile(absPath); } catch (IOException | BadPcapFileException e) { throw new TmfTraceException(e.getMessage(), e); } }

Target:
public synchronized void initTrace(@Nullable IResource resource, @Nullable String path, @Nullable Class<? extends ITmfEvent> type) throws TmfTraceException { super.initTrace(resource, path, type); if (path == null) { throw new TmfTraceException("No path has been specified."); } try { fPcapFile = new PcapFile(path); } catch (IOException | BadPcapFileException e) { throw new TmfTraceException(e.getMessage(), e); } }
Source:
protected String execute(Jedis client, String[] tokens) { String result = client.geoadd(tokens[1], Double.valueOf(tokens[2]), Double.valueOf(tokens[3]), tokens[4]) + ""; return result; }

Target:
protected String execute(Jedis client, String[] tokens) { String result = client.geoadd(tokens[1], Double.valueOf(tokens[2]), Double.valueOf(tokens[3]), tokens[4]).toString(); return result; }
Source:
public void write() throws StoreException, IOException { logger.info("writing index to disk for {}", indexFile.getPath()); File temp = new File(indexFile.getAbsolutePath() + ".tmp"); FileOutputStream fileStream = new FileOutputStream(temp); CrcOutputStream crc = new CrcOutputStream(fileStream); DataOutputStream writer = new DataOutputStream(crc); synchronized(lock) { try { long fileEndPointer = logEndOffset.get(); log.flush(); writer.writeShort(BlobPersistantIndex.version); for (Map.Entry<StoreKey, BlobIndexValue> entry : index.entrySet()) { writer.write(entry.getKey().toBytes()); writer.write(entry.getValue().getBytes().array()); } writer.writeLong(fileEndPointer); long crcValue = crc.getValue(); writer.writeLong(crcValue); fileStream.getChannel().force(true); temp.renameTo(indexFile); } catch (IOException e) { logger.error("IO error while persisting index to disk {}", indexFile.getAbsoluteFile()); throw new StoreException("IO error while persisting index to disk " + indexFile.getAbsolutePath(), e, StoreErrorCodes.IOError); } finally { writer.close(); } } logger.info("Completed writing index to file"); }

Target:
public void write() throws StoreException, IOException { logger.info("writing index to disk for {}", indexFile.getPath()); DataOutputStream writer = null; synchronized(lock) { try { File temp = new File(indexFile.getAbsolutePath() + ".tmp"); FileOutputStream fileStream = new FileOutputStream(temp); CrcOutputStream crc = new CrcOutputStream(fileStream); writer = new DataOutputStream(crc); long fileEndPointer = logEndOffset.get(); log.flush(); writer.writeShort(BlobIndex.version); for (Map.Entry<StoreKey, BlobIndexValue> entry : index.entrySet()) { writer.write(entry.getKey().toBytes()); writer.write(entry.getValue().getBytes().array()); } writer.writeLong(fileEndPointer); long crcValue = crc.getValue(); writer.writeLong(crcValue); fileStream.getChannel().force(true); temp.renameTo(indexFile); } catch (IOException e) { logger.error("IO error while persisting index to disk {}", indexFile.getAbsoluteFile()); throw new StoreException("IO error while persisting index to disk " + indexFile.getAbsolutePath(), e, StoreErrorCodes.IOError); } finally { if (writer != null) writer.close(); } } logger.info("Completed writing index to file"); }
Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dynamic_setters); ButterKnife.bind(this); currentTileSize = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; currentTileWidth = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; currentTileHeight = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; widget.setOnTitleClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { Toast.makeText(DynamicSettersActivity.this, "Today is the day", Toast.LENGTH_SHORT) .show(); } }); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dynamic_setters); ButterKnife.bind(this); currentTileSize = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; currentTileWidth = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; currentTileHeight = MaterialCalendarView.DEFAULT_TILE_SIZE_DP; widget.setOnTitleClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { Toast.makeText(DynamicSettersActivity.this, R.string.today, Toast.LENGTH_SHORT) .show(); } }); }
Source:
public void testIsProcessAlive() throws Exception { String randomUser = RandomStringUtils.randomAlphanumeric(12); Collection<Long> pids = getRunningProcessIds(); Assert.isNonEmpty(pids); for (long pid: pids) { boolean status = Container.isProcessAlive(pid, randomUser); org.junit.Assert.assertFalse("Random user " + randomUser + " is not expected to own any process", status); } boolean status = false; String currentUser = System.getProperty("user.name"); for (long pid: pids) { if (Container.isProcessAlive(pid, currentUser)) { status = true; break; } } org.junit.Assert.assertTrue("Expecting user " + currentUser + " to own at least one process", status); }

Target:
public void testIsProcessAlive() throws Exception { String randomUser = RandomStringUtils.randomAlphanumeric(12); Collection<Long> pids = getRunningProcessIds(); assertFalse(pids.isEmpty()); for (long pid: pids) { boolean status = Container.isProcessAlive(pid, randomUser); assertFalse("Random user " + randomUser + " is not expected to own any process", status); } boolean status = false; String currentUser = System.getProperty("user.name"); for (long pid: pids) { if (Container.isProcessAlive(pid, currentUser)) { status = true; break; } } assertTrue("Expecting user " + currentUser + " to own at least one process", status); }
Source:
public void testConnectionTypeHasCorrectIsClientOriented() throws Exception { final boolean result = connType.isClientOriented(); assertTrue(result == expected); }

Target:
public void testConnectionTypeHasCorrectIsClientOriented() throws Exception { final boolean result = connType.isClientOriented(); assertEquals(result, expected); }
Source:
protected AbstractS3ATokenIdentifier( final Text kind, final URI uri, final Text owner, final Text renewer, final String origin, final EncryptionSecrets encryptionSecrets) { this(kind, owner, renewer, new Text(), uri); this.origin = requireNonNull(origin); this.encryptionSecrets = requireNonNull(encryptionSecrets); }

Target:
protected AbstractS3ATokenIdentifier( final Text kind, final URI uri, final Text owner, final Text renewer, final String origin, final EncryptionSecrets encryptionSecrets) { this(kind, owner, (renewer != null ? renewer : new Text()), new Text(), uri); this.origin = requireNonNull(origin); this.encryptionSecrets = requireNonNull(encryptionSecrets); }
Source:
private void raiseViolationOnDuplicateLandmarkRole(List<TagNode> nodes) { Map<String, List<TagNode>> matched = nodes.stream().collect(Collectors.groupingBy(node -> node.getAttribute("role"))); for (List<TagNode> matches : matched.values()) { raiseViolationOnSize(matches); } }

Target:
private void raiseViolationOnDuplicateLandmarkRole(List<TagNode> nodes) { Map<String, List<TagNode>> matched = nodes.stream().collect(Collectors.groupingBy(node -> node.getAttribute("ROLE").toUpperCase(Locale.ROOT))); for (List<TagNode> matches : matched.values()) { List<TagNode> labeless = matches.stream().filter(match -> !hasAriaLabel(match)).collect(Collectors.toList()); if (labeless.size() > 1 || matches.size() > 1) { for (TagNode node : labeless) { createViolation(node.getStartLinePosition(), "Add an \"aria-label\" or \"aria-labbelledby\" attribute to this element."); } } } }
Source:
public void getUserAuthenticated() throws IOException { service = new GmailServiceMaker(username).makeGmailService(); int retryLimit = 5; while (retryLimit > 0) { try { retryLimit--; service.users().messages().list(username).setMaxResults(1L).execute(); break; } catch (HttpResponseException e) { if (e.getStatusCode() == HttpStatusCodes.STATUS_CODE_FORBIDDEN || e.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED || e.getStatusCode() == HttpStatusCodes.STATUS_CODE_BAD_REQUEST) { System.out.println(e.getMessage()); service = new GmailServiceMaker(username, true).makeGmailService(); } else { throw new IOException(e); } } } }

Target:
public void getUserAuthenticated() throws IOException { service = new GmailServiceMaker(username).makeGmailService(); int retryLimit = 5; while (retryLimit > 0) { try { retryLimit--; getListOfUnreadEmailFromSender(1L, ""); break; } catch (HttpResponseException e) { if (e.getStatusCode() == HttpStatusCodes.STATUS_CODE_FORBIDDEN || e.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED || e.getStatusCode() == HttpStatusCodes.STATUS_CODE_BAD_REQUEST) { System.out.println(e.getMessage()); service = new GmailServiceMaker(username, true).makeGmailService(); } else { throw new IOException(e); } } } }
Source:
public void isActionFailed_GUIDAccessDeniedVerifiesTrueKey() { pushResponse.response.accumulate("guid_access_denied", true); Assert.assertTrue(pushResponse.isActionFailed_GUIDAccessDenied()); }

Target:
public void isActionFailed_GUIDAccessDeniedVerifiesTrueKey() { pushResponse.response.accumulate("guid_access_denied", true); Assert.assertTrue(pushResponse.isActionFailed_GUIDAccessDenied()); pushResponse.response.clear(); pushResponse.response.accumulate("guid_access_denied", false); Assert.assertFalse(pushResponse.isActionFailed_GUIDAccessDenied()); }
Source:
public ContextHolder(T context, Class<T> type, Set<Annotation> qualifiers) { this.context = context; this.type = type; this.qualifiers = asSet(DefaultLiteral.INSTANCE, AnyLiteral.INSTANCE); this.qualifiers.addAll(qualifiers); }

Target:
public ContextHolder(T context, Class<T> type, Set<Annotation> qualifiers) { this.context = context; this.type = type; this.qualifiers = qualifiers; }
Source:
private void notifyRemove(Collection<IProjectAdapter> adapters) { synchronized (listeners) { try { for (IProjectAdapter a : adapters) { listeners.forEach(l->l.handleRemoveFromCache(this, a)); } }catch(Exception e) { Trace.error("Exception while trying to notify cache listener", e); } } }

Target:
private void notifyRemove(Collection<IProjectAdapter> adapters) { synchronized (listeners) { try { for (IProjectAdapter a : adapters) { listeners.forEach(l->l.handleRemoveFromCache(this, a)); a.dispose(); } }catch(Exception e) { Trace.error("Exception while trying to notify cache listener", e); } } }
Source:
protected void createCommentEditor(final int suggestRow, final int column, final int line, final short file) { createCommentEditor(suggestRow, column, line, file, ""); }

Target:
protected void createCommentEditor(final int suggestRow, final int column, final int line, final short file) { createCommentEditor(suggestRow, column, line, file, null ); }