<commit_before>/*
 * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.oxauth.interop;

import org.gluu.oxauth.BaseTest;
import org.gluu.oxauth.client.*;
import org.gluu.oxauth.model.common.ResponseType;
import org.gluu.oxauth.model.register.ApplicationType;
import org.gluu.oxauth.model.util.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import static org.testng.Assert.*;

/**
 * OC5:FeatureTest-Displays Logo in Login Page
 *
 * @author <NAME>
 * @version November 3, 2016
 */
public class DisplaysLogoInLoginPage extends BaseTest {

	@Parameters({ "redirectUris", "redirectUri", "sectorIdentifierUri" })
	@Test
	public void displaysLogoInLoginPage(final String redirectUris, final String redirectUri,
			final String sectorIdentifierUri) throws Exception {
		showTitle("OC5:FeatureTest-Displays Logo in Login Page");

		List<ResponseType> responseTypes = Arrays.asList(ResponseType.CODE);
		String logoUri = "http://www.gluu.org/wp-content/themes/gluursn/images/logo.png";

		// 1. Register client
		RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
				StringUtils.spaceSeparatedToList(redirectUris));
		registerRequest.setResponseTypes(responseTypes);
		registerRequest.setLogoUri(logoUri);
		registerRequest.setSectorIdentifierUri(sectorIdentifierUri);

		RegisterClient registerClient = new RegisterClient(registrationEndpoint);
		registerClient.setRequest(registerRequest);
		RegisterResponse registerResponse = registerClient.exec();

		showClient(registerClient);
		assertEquals(registerResponse.getStatus(), 200, "Unexpected response code: " + registerResponse.getEntity());
		assertNotNull(registerResponse.getClientId());
		assertNotNull(registerResponse.getClientSecret());
		assertNotNull(registerResponse.getRegistrationAccessToken());
		assertNotNull(registerResponse.getClientIdIssuedAt());
		assertNotNull(registerResponse.getClientSecretExpiresAt());

		String clientId = registerResponse.getClientId();

		// 2. Request authorization and receive the authorization code.
		List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
		String state = UUID.randomUUID().toString();

		AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId, scopes,
				redirectUri, null);
		authorizationRequest.setState(state);

		String authorizationRequestUrl = getAuthorizationEndpoint() + "?" + authorizationRequest.getQueryString();

		AuthorizeClient authorizeClient = new AuthorizeClient(getAuthorizationEndpoint());
		authorizeClient.setRequest(authorizationRequest);

		try {
			startSelenium();
			navigateToAuhorizationUrl(driver, authorizationRequestUrl);
			WebElement logo = driver.findElement(By.id("AppLogo"));
			assertNotNull(logo);
			assertTrue(logo.getText().endsWith("/servlet/logo"));
		} catch (NoSuchElementException ex) {
			fail("Logo not found");
		} finally {
			stopSelenium();
		}
	}
}<commit_msg>Fix failing test due to logo change<commit_after>/*
 * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.oxauth.interop;

import org.gluu.oxauth.BaseTest;
import org.gluu.oxauth.client.*;
import org.gluu.oxauth.model.common.ResponseType;
import org.gluu.oxauth.model.register.ApplicationType;
import org.gluu.oxauth.model.util.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import static org.testng.Assert.*;

/**
 * OC5:FeatureTest-Displays Logo in Login Page
 *
 * @author <NAME>
 * @version November 3, 2016
 */
public class DisplaysLogoInLoginPage extends BaseTest {

	@Parameters({ "redirectUris", "redirectUri", "sectorIdentifierUri" })
	@Test
	public void displaysLogoInLoginPage(final String redirectUris, final String redirectUri,
			final String sectorIdentifierUri) throws Exception {
		showTitle("OC5:FeatureTest-Displays Logo in Login Page");

		List<ResponseType> responseTypes = Arrays.asList(ResponseType.CODE);
		String logoUri = "http://www.gluu.org/wp-content/themes/gluursn/images/logo.png";

		// 1. Register client
		RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
				StringUtils.spaceSeparatedToList(redirectUris));
		registerRequest.setResponseTypes(responseTypes);
		registerRequest.setLogoUri(logoUri);
		registerRequest.setSectorIdentifierUri(sectorIdentifierUri);

		RegisterClient registerClient = new RegisterClient(registrationEndpoint);
		registerClient.setRequest(registerRequest);
		RegisterResponse registerResponse = registerClient.exec();

		showClient(registerClient);
		assertEquals(registerResponse.getStatus(), 200, "Unexpected response code: " + registerResponse.getEntity());
		assertNotNull(registerResponse.getClientId());
		assertNotNull(registerResponse.getClientSecret());
		assertNotNull(registerResponse.getRegistrationAccessToken());
		assertNotNull(registerResponse.getClientIdIssuedAt());
		assertNotNull(registerResponse.getClientSecretExpiresAt());

		String clientId = registerResponse.getClientId();

		// 2. Request authorization and receive the authorization code.
		List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
		String state = UUID.randomUUID().toString();

		AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId, scopes,
				redirectUri, null);
		authorizationRequest.setState(state);

		String authorizationRequestUrl = getAuthorizationEndpoint() + "?" + authorizationRequest.getQueryString();

		AuthorizeClient authorizeClient = new AuthorizeClient(getAuthorizationEndpoint());
		authorizeClient.setRequest(authorizationRequest);

		try {
			startSelenium();
			navigateToAuhorizationUrl(driver, authorizationRequestUrl);
			WebElement logo = driver.findElement(By.id("AppLogo"));
			assertNotNull(logo);
		} catch (NoSuchElementException ex) {
			fail("Logo not found");
		} finally {
			stopSelenium();
		}
	}
}
{'fraction_non_alphanumeric': 0.10964575985278331, 'fraction_numerical': 0.006134028523232633, 'mean_word_length': 6.190738699007718, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2278549', 'n_tokens_mistral': 2008, 'n_tokens_neox': 1821, 'n_words': 371}